File uploading method based on voice recognition

文档序号:1965043 发布日期:2021-12-14 浏览:19次 中文

阅读说明:本技术 一种基于语音识别的文件上传方法 (File uploading method based on voice recognition ) 是由 禹成国 田永鑫 武豪 刘乐乐 于 2021-09-07 设计创作,主要内容包括:本发明涉及计算机技术领域,具体公开了一种基于语音识别的文件上传方法,包括如下步骤:基于语音识别模块采集信息生成识别标识;利用文件检索模块根据识别标识检索目标文件;基于文件上传模块将检索到的目标文件进行上传至对象存储设施。以此能够在文件位置未知情况下快速定位目标文件,并将目标文件进行快速且准确的上传。(The invention relates to the technical field of computers, and particularly discloses a file uploading method based on voice recognition, which comprises the following steps: generating a recognition identifier based on information collected by a voice recognition module; retrieving the target file according to the identification mark by using a file retrieval module; and uploading the retrieved target file to the object storage facility based on the file uploading module. Therefore, the target file can be quickly positioned under the condition that the position of the file is unknown, and the target file can be quickly and accurately uploaded.)

1. A file uploading method based on voice recognition is characterized by comprising the following steps:

inputting voice;

generating a recognition identifier based on information collected by a voice recognition module;

retrieving the target file according to the identification mark by using a file retrieval module;

and uploading the retrieved target file to the object storage facility based on the file uploading module.

2. The file uploading method based on speech recognition according to claim 1, wherein the specific way of speech input is as follows:

the user dictates the file name.

3. The method for uploading files based on voice recognition according to claim 1, wherein in the step of generating the recognition mark based on the information collected by the voice recognition module:

the collected voice information is in an uncompressed data bare stream PCM format and does not need to be processed and converted.

4. The voice recognition-based file uploading method of claim 3, wherein after the voice information in the PCM format is collected:

calling a third-party voice recognition interface to recognize voice data in a PCM format and feeding back a result, wherein the feedback result is a character string text;

and calculating the character string text by using an MD5 algorithm to obtain the identification.

5. The method for uploading files based on speech recognition according to claim 4,

the identification mark is a character string text with a fixed length of 32-digit alpha-numeric mixed code.

6. The method for uploading a document based on speech recognition according to claim 1, wherein in the step of retrieving the target document according to the recognition mark using the document retrieving module:

before retrieval, the automatic file retrieval module performs MD5 calculation on the names of all the retrieved files, and saves the identification and file path generated by calculation in a hash table in the form of key-value pairs.

7. The method for uploading a document based on speech recognition according to claim 6, wherein in the step of retrieving the target document according to the recognition mark using the document retrieving module:

the file retrieval module retrieves a hash table according to the identification marks generated by the voice recognition module, and sequentially matches the identical identification marks based on the sequence in the marks, so that a target file path is obtained.

Technical Field

The invention relates to the technical field of computers, in particular to a file uploading method based on voice recognition.

Background

The existing file uploading mode is to click and upload through manually retrieving files or drag and upload files. The file retrieval mechanism of the windows 10 system is to manually retrieve layer by layer in a file tree form, and click and upload after retrieving a target file. The Baidu network disk retrieval depends on an operating system, and the uploading mode provides two modes of clicking and dragging.

The defects and shortcomings of the prior art are as follows: the basis of manual retrieval click uploading and dragging uploading is that the position of a file is known definitely, and a target file is difficult to retrieve for uploading under the condition that the position of the file is unknown.

Disclosure of Invention

The invention aims to provide a file uploading method based on voice recognition, and aims to solve the technical problem that a target file is difficult to retrieve and upload under the condition that the position of the file is unknown in the prior art.

In order to achieve the above object, the present invention provides a file uploading method based on speech recognition, comprising the following steps:

inputting voice;

generating a recognition identifier based on information collected by a voice recognition module;

retrieving the target file according to the identification mark by using a file retrieval module;

and uploading the retrieved target file to the object storage facility based on the file uploading module.

The specific mode of the voice input is as follows:

the user dictates the file name.

Wherein, in the step of generating the identification mark based on the information collected by the voice recognition module:

the collected voice information is in an uncompressed data bare stream PCM format and does not need to be processed and converted.

After acquiring the voice information in the PCM format:

calling a third-party voice recognition interface to recognize voice data in a PCM format and feeding back a result, wherein the feedback result is a character string text;

and calculating the character string text by using an MD5 algorithm to obtain the identification.

The identification mark is a character string text with a fixed length of 32-digit mixed alpha-numeric characters.

Wherein, in the step of searching the target file according to the identification mark by using the file searching module:

before retrieval, the automatic file retrieval module performs MD5 calculation on the names of all the retrieved files, and saves the identification and file path generated by calculation in a hash table in the form of key-value pairs.

Wherein, in the step of searching the target file according to the identification mark by using the file searching module:

the file retrieval module retrieves a hash table according to the identification marks generated by the voice recognition module, and sequentially matches the identical identification marks based on the sequence in the marks, so that a target file path is obtained.

The invention relates to a file uploading method based on voice recognition, which comprises the steps of voice input; generating a recognition identifier based on information collected by a voice recognition module; retrieving the target file according to the identification mark by using a file retrieval module; and uploading the retrieved target file to the object storage facility based on the file uploading module. On the basis of traditional manual retrieval click uploading and dragging uploading, a voice file uploading method under the condition that the position of a file is unknown is provided, and a target file can be quickly found and uploaded.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

Fig. 1 is a schematic diagram of a file uploading method based on speech recognition according to the present invention.

Fig. 2 is a flowchart of a file uploading method based on speech recognition according to the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.

In the description of the present invention, it is to be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships illustrated in the drawings, and are used merely for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present invention. Further, in the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.

Referring to fig. 1 and 2, the present invention provides a file uploading method based on speech recognition, including the following steps:

s1: inputting voice;

s2: generating a recognition identifier based on information collected by a voice recognition module;

s3: retrieving the target file according to the identification mark by using a file retrieval module;

s4: and uploading the retrieved target file to the object storage facility based on the file uploading module.

The specific mode of the voice input is as follows:

the user dictates the file name.

In the step of generating the recognition identifier based on the information collected by the voice recognition module:

the collected voice information is in an uncompressed data bare stream PCM format and does not need to be processed and converted.

After the voice information in PCM format is collected:

calling a third-party voice recognition interface to recognize voice data in a PCM format and feeding back a result, wherein the feedback result is a character string text;

and calculating the character string text by using an MD5 algorithm to obtain the identification.

The identification mark is a character string text with a fixed length of 32-digit alpha-numeric mixed code.

In the step of retrieving the target document according to the identification mark by using the document retrieval module:

before retrieval, the automatic file retrieval module performs MD5 calculation on the names of all the retrieved files, and saves the identification and file path generated by calculation in a hash table in the form of key-value pairs.

In the step of retrieving the target document according to the identification mark by using the document retrieval module:

the file retrieval module retrieves a hash table according to the identification marks generated by the voice recognition module, and sequentially matches the identical identification marks based on the sequence in the marks, so that a target file path is obtained.

In the step of uploading the retrieved target file to the object storage facility based on the file uploading module:

after the target file path is obtained, the file uploading module uploads the target path file, and the file is uploaded without processing or format conversion.

The voice recognition module collects the voice information of the user in an active or passive mode.

Uploading the target file to an object storage facility:

the target of the file upload supports the object storage facility of Amazon S3 protocol.

The method specifically comprises the following steps: the user dictates a file name, the voice recognition module collects voice information to generate a recognition identifier, the voice collection device is a microphone, and the collected voice information is in an uncompressed data bare stream PCM (Pulse Code Modulation) format and does not need to be processed and converted. And then calling a third-party voice recognition interface to recognize voice data in the PCM format and feeding back a result, wherein the format of the feedback result is a character string text. For example, the speech content is "Beijing. jpg", and the resulting character string is "Beijing. jpg". And (3) calculating the character string text by using MD5(Message-Digest Algorithm 5) to obtain a recognition identifier, wherein the recognition identifier is the character string text with a fixed length of 32-digit mixed alphabets. Taking "Beijing. jpg" as an example, the identification mark obtained by calculating it by using MD5 is "6D 5DFDA07D668ECEACD1 ACAEEBB 0F 8430". The automatic document retrieval module performs MD5 calculation on the names of all the documents to be retrieved before retrieval, and the MD5 calculation is completely consistent with the MD5 calculation. And storing the identification mark and the file path generated by calculation in a hash table in a form of a key-value pair, wherein the hash table is maintained in a memory, and the purpose of the operation is to greatly shorten the time for searching the file by utilizing the characteristic that the complexity of the time for searching the hash table is O (1). The file retrieval module retrieves a hash table according to the identification marks generated by the voice identification module, and sequentially matches the identical identification marks based on the sequence in the marks to obtain a target file path.

The voice recognition module collects the voice information of the user in an active or passive mode, the user can control voice input or monitor in real time, and the microphone is monitored in real time through third-party voice recognition.

The third-party voice recognition technology is provided by Baidu voice recognition, supports Chinese and English bilingual languages, has the accuracy rate of 70 percent, and does not perform format conversion on voice data; in addition, the file uploading aims at an object storage facility supporting the Amazon S3 protocol; the time complexity of the search hash table search is O (1). The order of magnitude is reduced from linear to constant compared to the time complexity o (n) of a conventional traversal search. All the processes can be implemented in a cross-platform mode (Windows and Linux). The implementation of cross-platform technology is based on cross-platform programming languages, such as Java and C #, which themselves support cross-platform languages. The effect of writing and running multiple places at a time can be realized under the support of cross-platform technology.

In summary, the file uploading method based on voice recognition provided by the invention can easily and quickly find the target file under the condition that the file position is unknown, and quickly and accurately upload the target file.

While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种语音控制物业管理的方法、系统、设备及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!