Speech recognition methods, devices, equipment, storage media and products

By combining the construction of a hash mapping table with a preset speech recognition model, the problem of poor speech recognition performance in professional fields or specific industries has been solved, and the recognition accuracy has been improved, especially in hotel name recognition.

CN118800223BActive Publication Date: 2025-11-14CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410251456.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-11-14
Estimated Expiration
2044-03-05

AI Technical Summary

Technical Problem

Existing technologies have poor speech recognition performance in professional fields or specific industries, especially in recognizing hotel names that sound the same but have different characters.

Method used

A hash mapping table is constructed, and the speech to be recognized is obtained through a preset speech recognition model. Regular, precise and fuzzy recognition are performed, and the target speech recognition result is calculated by combining the hash mapping table.

Benefits of technology

It improves the accuracy of speech recognition in professional fields or specific industries, especially in the presence of noise interference or homophones, achieving more efficient recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118800223B_ABST
    Figure CN118800223B_ABST
Patent Text Reader

Abstract

This invention relates to the field of speech recognition technology, and discloses a speech recognition method, apparatus, device, storage medium, and computer program product. The method includes: constructing a hash mapping table; acquiring the speech to be recognized and recognizing it using a preset speech recognition model to obtain a conventional recognition result; performing precise and fuzzy recognition on the speech to be recognized based on the hash mapping table to obtain precise and fuzzy recognition results; and calculating the target speech recognition result based on the conventional, precise, and fuzzy recognition results. This invention solves the technical problem of poor speech recognition performance in specialized fields or specific industries by calculating the target speech recognition result using the conventional recognition result obtained from the preset speech recognition model and the precise and fuzzy recognition results obtained from the hash mapping table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech recognition technology, and in particular to a speech recognition method, apparatus, device, storage medium, and computer program product. Background Technology

[0002] Currently, speech recognition is typically performed using GMM-HMM speech recognition frameworks, DNN-HMM speech recognition frameworks, and end-to-end technologies. However, these technologies have poor performance in recognizing speech in specialized fields or specific industries. For example, they have poor performance in recognizing speech in hotel names that contain homophones but different characters. Summary of the Invention

[0003] The main objective of this invention is to provide a speech recognition method, apparatus, device, storage medium, and computer program product, aiming to solve the technical problems of the prior art.

[0004] To achieve the above objectives, the present invention provides a speech recognition method, the method comprising the following steps:

[0005] Construct a hash mapping table;

[0006] The speech to be recognized is acquired, and the speech to be recognized is recognized by a preset speech recognition model to obtain a conventional recognition result;

[0007] Based on the hash mapping table, the speech to be recognized is accurately recognized and fuzzily recognized respectively, to obtain accurate recognition results and fuzzy recognition results;

[0008] The target speech recognition result is obtained by calculating based on the conventional recognition result, the accurate recognition result, and the fuzzy recognition result.

[0009] Optionally, constructing the hash mapping table includes:

[0010] Obtain the frequency of occurrence of each initial consonant in a preset corpus, and determine the target initial consonant based on the frequency of occurrence;

[0011] Obtain the target prime number from the prime number table, and determine the mapping relationship between the initial consonant and the prime number based on the target initial consonant and the target prime number;

[0012] Construct a hash mapping table based on the mapping relationship between the initial consonants and prime numbers.

[0013] Optionally, constructing a hash mapping table based on the mapping relationship between the initial consonant and the prime number includes:

[0014] Traverse the proper noun database, perform pinyin conversion on the proper nouns in the database to obtain the pinyin of the proper nouns, and determine the initial consonant of each character in the proper noun based on the pinyin of the proper nouns;

[0015] The prime number of the initial consonant of each character in the proper noun is determined based on the mapping relationship between the initial consonant and the prime number.

[0016] The composite number of the initials of all characters in the proper noun is determined based on the prime number of the initials of each character in the proper noun, and multiple hash mapping tables are constructed based on the prime numbers and the composite numbers.

[0017] Optionally, the hash mapping table includes at least a first hash mapping table, a second hash mapping table, and a third hash mapping table. The step of performing precise recognition and fuzzy recognition on the speech to be recognized based on the hash mapping table to obtain precise recognition results and fuzzy recognition results includes:

[0018] The speech to be recognized is accurately identified based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result;

[0019] Based on the first hash map, the second hash map, and the third hash map, fuzzy recognition is performed on the speech to be recognized to obtain a fuzzy recognition result.

[0020] Optionally, the step of accurately recognizing the speech to be recognized based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result includes:

[0021] The speech to be recognized is converted into pinyin to obtain the pinyin to be recognized;

[0022] Obtain the initial consonant of the first character and the initial consonant of the second character in the pinyin to be recognized. Determine the prime number of the initial consonant of the first character and the prime number of the initial consonant of the second character according to the mapping relationship between the initial consonant and the prime number, and calculate to obtain the first target composite number. Here, the first character is the first character corresponding to the pinyin to be recognized, and the first character and the second character are adjacent.

[0023] Determine whether the first target composite number exists in the first hash mapping table;

[0024] If it exists, then the term containing the first character and the second character is determined according to the first hash mapping table, and the first term is obtained;

[0025] A new composite number is determined based on the first term, and a first candidate term is determined based on the new composite number;

[0026] Based on the new composite number and the second hash mapping table, the target candidate word in the first candidate word is determined, and the target candidate word in the first candidate word is identified to obtain the first target word, the position of the first and last characters of the first target word, and the first identification probability.

[0027] The accurate recognition result is determined based on the first target term, the positions of the first and last characters of the first target term, and the first recognition probability.

[0028] Optionally, the step of performing fuzzy recognition on the speech to be recognized based on the first hash map, the second hash map, and the third hash map to obtain a fuzzy recognition result includes:

[0029] The speech to be recognized is converted into pinyin and denoised to obtain the denoised pinyin to be recognized.

[0030] Obtain the initials of the third and fourth characters in the denoised pinyin to be recognized, and determine the prime numbers of the initials of the third and fourth characters according to the mapping relationship between the initials and prime numbers. The third character is the first character corresponding to the denoised pinyin to be recognized, and the third character and the fourth character are adjacent.

[0031] The second target composite number is obtained by calculating the prime numbers of the initials of the third character and the fourth character.

[0032] Determine whether the second target composite number exists in the first hash map table and whether a prime number representing the initial consonant of the third character exists in the third hash map table;

[0033] If the second target composite number does not exist in the first hash map table and the prime number of the initial consonant of the third character exists in the third hash map table, then obtain the composite number of the initial consonant of the third character in the third hash map table.

[0034] A new composite number is determined based on the composite number of the initial consonant of the third character, and a second candidate term is determined based on the new composite number and the third hash mapping table;

[0035] The target candidate word in the second candidate word is determined based on the new composite number, the second hash mapping table, and the candidate word. The target candidate word in the second candidate word is then identified to obtain the second target word, the position of the first and last characters of the second target word, and the second identification probability.

[0036] The fuzzy recognition result is determined based on the second target term, the positions of the first and last characters of the second target term, and the second recognition probability.

[0037] Furthermore, to achieve the above objectives, the present invention also proposes a speech recognition device, the speech recognition device comprising:

[0038] Modules for building hash maps;

[0039] The recognition module is used to acquire the speech to be recognized and to recognize the speech through a preset speech recognition model to obtain a conventional recognition result;

[0040] The recognition module is also used to perform precise recognition and fuzzy recognition on the speech to be recognized based on the hash mapping table, respectively, to obtain precise recognition results and fuzzy recognition results;

[0041] The calculation module is used to perform calculations based on the conventional recognition results, accurate recognition results, and fuzzy recognition results to obtain the target speech recognition result.

[0042] Furthermore, to achieve the above objectives, the present invention also proposes a speech recognition device, the speech recognition device comprising: a memory, a processor, and a speech recognition program stored in the memory and executable on the processor, the speech recognition program being configured to implement the steps of the speech recognition method as described above.

[0043] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a speech recognition program, which, when executed by a processor, implements the steps of the speech recognition method described above.

[0044] In addition, to achieve the above objectives, the present invention also provides a computer program product, which includes a speech recognition program. When the speech recognition program is executed by a processor, it implements the steps of the speech recognition method as described above.

[0045] This invention solves the technical problem of poor speech recognition performance in specialized fields or specific industries by constructing a hash mapping table; acquiring the speech to be recognized; recognizing the speech using a preset speech recognition model to obtain a conventional recognition result; performing precise and fuzzy recognition on the speech based on the hash mapping table to obtain precise and fuzzy recognition results respectively; and calculating the target speech recognition result based on the conventional, precise, and fuzzy recognition results. By using the conventional recognition result obtained from the preset speech recognition model and the precise and fuzzy recognition results obtained from the hash mapping table to calculate the target speech recognition result, this invention improves the accuracy of speech recognition in specialized fields or specific industries. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the structure of a speech recognition device in the hardware operating environment involved in the embodiments of the present invention;

[0047] Figure 2 This is a flowchart illustrating the first embodiment of the speech recognition method of the present invention;

[0048] Figure 3This is a flowchart illustrating the second embodiment of the speech recognition method of the present invention;

[0049] Figure 4 This is a structural block diagram of the first embodiment of the speech recognition device of the present invention.

[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the speech recognition device involved in the embodiments of the present invention.

[0053] like Figure 1 As shown, the voice recognition device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the speech recognition device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0055] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a speech recognition program.

[0056] exist Figure 1In the voice recognition device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the voice recognition device of the present invention can be set in the voice recognition device, and the voice recognition device calls the voice recognition program stored in the memory 1005 through the processor 1001 and executes the voice recognition method provided in the embodiment of the present invention.

[0057] This invention provides a speech recognition method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the speech recognition method of the present invention.

[0058] In this embodiment, the speech recognition method includes the following steps:

[0059] Step S10: Construct a hash mapping table.

[0060] It should be noted that the execution subject in this embodiment is a voice recognition device, but it can also be other devices that perform the same or similar functions. This embodiment does not impose specific restrictions on this, and this embodiment uses a voice recognition device as an example for explanation.

[0061] Understandably, a hash map is obtained by preprocessing the proper noun database. Specific steps include: determining the mapping relationship between initials and prime numbers; and constructing a hashmap, i.e., a hash mapping table. A hashmap is a data structure used to store key-value pairs, enabling fast lookup, insertion, and deletion operations.

[0062] In specific implementation, the professional terminology database can be determined according to the professional field or specific industry. This embodiment does not impose specific restrictions on this. This embodiment takes the hotel industry as an example for illustration. For the hotel industry, the professional terminology database is a hotel name dictionary containing more than one million hotel names. That is, a hash mapping table is obtained by preprocessing the data of the hotel name dictionary containing more than one million hotel names.

[0063] Furthermore, to accelerate the speed of precise matching and fuzzy matching, the construction of the hash mapping table includes: obtaining the occurrence frequency of each initial consonant in a preset corpus, and determining the target initial consonant based on the occurrence frequency; obtaining the target prime number in the prime number table, and determining the mapping relationship between the initial consonant and the prime number based on the target initial consonant and the target prime number; and constructing the hash mapping table based on the mapping relationship between the initial consonant and the prime number.

[0064] It should be noted that constructing a hash map includes: determining the mapping relationship between initials and prime numbers; and constructing a hashmap, i.e., a hash map.

[0065] In the specific implementation, the process of determining the mapping relationship between initials and prime numbers includes: statistically analyzing the frequency of initials (23) based on a traditional dialogue flow corpus; selecting initials with a frequency reaching a preset threshold as target initials; assigning smaller prime numbers to target initials with high frequency, i.e., selecting smaller prime numbers from a prime number table (such as 2 / 3 / 5 / 7 / 11 / 13 / 17 / 19 / 23 / 29 / 31 / 37 / 41 / 43 / 47 / 53 / 59 / 61 / 67 / 71 / 73 / 79 / 83 / 89 / 97 / 101 / 103 / 107 / 109 / 113...) as target prime numbers and allocating them to the corresponding initials, thereby obtaining the mapping relationship between initials and prime numbers. This reduces the magnitude of the prime product (i.e., composite number) and increases the speed of solving prime numbers corresponding to composite numbers, thus obtaining the mapping relationship between initials and prime numbers.

[0066] Furthermore, to improve the recognition rate of both precise and fuzzy recognition, the step of constructing a hash mapping table based on the mapping relationship between the initial consonant and the prime number includes:

[0067] Traverse the proper noun database, perform pinyin conversion on the proper nouns in the database to obtain the pinyin of the proper nouns, and determine the initial consonant of each character in the proper noun based on the pinyin of the proper noun; determine the prime number of the initial consonant of each character in the proper noun based on the mapping relationship between the initial consonant and the prime number; determine the composite number of the initial consonants of all characters in the proper noun based on the prime number of the initial consonant of each character in the proper noun, and construct multiple hash mapping tables based on the prime number and the composite number.

[0068] It should be noted that a prime number is a natural number greater than 1 that cannot be divided by any other natural number except 1 and itself (it can also be defined as a number that has only two positive factors, 1 and itself).

[0069] In a specific implementation, the proper noun library can be a hotel name library. The process of constructing a hashmap includes: traversing the hotel name library in sequence, converting the hotel name into pinyin to obtain the hotel name pinyin, for example, converting "Beijing Friendship Hotel" into "beijingshiyouyibinguan"; obtaining the initials of each character based on the hotel name pinyin, that is, obtaining "b" and "j" from "beijing"; determining the prime number corresponding to each character's initial according to the mapping relationship between the initial and the prime number, and calculating the product of the prime numbers corresponding to the initials of each character to obtain the composite number of the initials of all characters in the hotel name; using the composite number of the initials of all characters in the hotel name as the primary key key of the hashmap, and constructing HashMap1, that is, the first hash mapping table, with the length of the name and the composite number of the initials of all characters corresponding to the pinyin of the hotel name as the value (when there are multiple values, sort them in descending order of length); using the composite number of the initials of all characters in the hotel name as the primary key key of the hashmap, and the Chinese characters of the name as the value, constructing HashMap2, that is, the second hash mapping table; using the prime number corresponding to the first letter of each character as the primary key key, and constructing HashMap3, that is, the third hash mapping table, with the length of the name and the product of the prime numbers corresponding to the initials of each character in the entry as the value (when there are multiple values, sort them in descending order of length).

[0070] It should be noted that the property that a composite number can be uniquely decomposed into a group of prime numbers multiplied can achieve a better recognition rate in exact matching and fuzzy matching.

[0071] Step S20: Obtain the speech to be recognized, and recognize the speech to be recognized through a preset speech recognition model to obtain a conventional recognition result.

[0072] It should be noted that receive the speech file transmitted back by the speech recording end (in this embodiment, it is the digital human interaction page), obtain the speech to be recognized according to the language file, and start multi-modal parallel recognition, which mainly involves preset speech model recognition, accurate recognition and fuzzy recognition based on pinyin.

[0073] It can be understood that the preset speech recognition model, that is, the conventional recognition model, can be an HMM model, and this embodiment does not make specific restrictions on this.

[0074] Step S30: Perform exact recognition and fuzzy recognition on the speech to be recognized based on the hash mapping table respectively to obtain an exact recognition result and a fuzzy recognition result.

[0075] It should be noted that the speech to be recognized obtained according to the audio file is converted into corresponding pinyin data. Thus, accurate recognition and fuzzy recognition are performed in parallel.

[0076] Understandably, accurate recognition means that the pinyin data matches the proper noun 100%, while fuzzy recognition means that in the presence of noise interference, it can identify the complete noun or a list of nouns (including the probability of recognition) based on part of the pinyin.

[0077] Step S40: Calculate the target speech recognition result based on the conventional recognition result, the accurate recognition result, and the fuzzy recognition result.

[0078] It should be noted that, based on the conventional model of the acquisition method and the three sets of recognition results based on pinyin, namely accurate recognition and fuzzy recognition, each set of recognition results includes at least: the word, the position of the word's last character / pinyin, and the recognition probability (the higher the probability, the more accurate).

[0079] In the specific implementation, the longest character recognition result set is used as the benchmark (e.g., if one result set has 16 characters, another has 10 characters, and another has 13 characters, then the result set with 16 characters is used as the benchmark). Each index value is sequentially traversed. If the index value does not start with a character, the next character is moved on. If the character starting with the current index appears only once in the three result sets, it is included in the final result set (including the word, the position of the word's ending character / pinyin, and the recognition probability). If the character starting with the current index appears multiple times in the three result sets, the longest recognition result is taken and included in the final result set (including the word, the position of the word's ending character / pinyin, and the recognition probability), until no more characters are processed.

[0080] This embodiment constructs a hash mapping table; acquires the speech to be recognized; and recognizes the speech using a preset speech recognition model to obtain a conventional recognition result. Based on the hash mapping table, it performs precise and fuzzy recognition on the speech to be recognized, obtaining precise and fuzzy recognition results respectively. Finally, it calculates the target speech recognition result based on the conventional, precise, and fuzzy recognition results. By using the conventional recognition result obtained from the preset speech recognition model and the precise and fuzzy recognition results obtained from the hash mapping table to calculate the target speech recognition result, this embodiment solves the technical problem of poor speech recognition performance in specialized fields or specific industries, thereby improving the accuracy of speech recognition in these fields.

[0081] refer to Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the speech recognition method of the present invention.

[0082] Based on the first embodiment described above, step S30 in the speech recognition method of this embodiment includes:

[0083] Step S301: Accurately identify the speech to be identified based on the first hash mapping table and the second hash mapping table to obtain an accurate identification result.

[0084] It should be noted that, during the accurate recognition process, the audio segment is assumed to be recorded completely and accurately. The audio segment is converted into the pinyin to be recognized, and the accurate recognition of the speech is achieved based on the first hash map, the second hash map, and the pinyin to be recognized, thus obtaining the accurate recognition result.

[0085] Furthermore, to improve recognition efficiency and accuracy, the step of accurately recognizing the speech to be recognized based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result includes: converting the speech to be recognized into pinyin to obtain pinyin to be recognized; obtaining the initial consonant of the first character and the initial consonant of the second character in the pinyin to be recognized, determining the prime number of the initial consonant of the first character and the prime number of the initial consonant of the second character according to the mapping relationship between the initial consonant and the prime number, and calculating to obtain a first target composite number, wherein the first character is the first character corresponding to the pinyin to be recognized, and the first character and the second character are adjacent; determining whether the first hash mapping table contains... Does the first target composite number exist? If it does, determine the term containing the first character and the second character according to the first hash mapping table to obtain the first term; determine a new composite number according to the first term, and determine a first candidate term according to the new composite number; determine the target candidate term in the first candidate term based on the new composite number and the second hash mapping table, and identify the target candidate term in the first candidate term to obtain the first target term, the position corresponding to the first and last characters of the first target term, and the first recognition probability; determine the accurate recognition result according to the first target term, the position corresponding to the first and last characters of the first target term, and the first recognition probability.

[0086] It should be noted that the process involves taking the initials of the first two Chinese characters (i.e., the first and second characters) from the string of pinyin to be recognized, and obtaining the prime numbers of the corresponding initials based on the mapping relationship between initials and prime numbers. The sum of these two numbers is then calculated to obtain the first target composite number. The process then checks whether the first target composite number exists in HashMap1. If it does not exist, it means that there are no entries starting with the first and second characters. The second and third Chinese characters are then extracted from the pinyin string, and the process of obtaining the initials of the first and second characters from the pinyin to be recognized is repeated. Based on the mapping relationship between initials and prime numbers, the prime numbers of the initials of the first and second characters are determined and calculated to obtain the first target composite number.

[0087] It is understandable that if the first target composite number exists in the first hash map HashMap1, it means that there are entries starting with the first and second characters. In this case, HashMap1 may contain multiple values, and they are sorted in descending order of entry length. Assuming the list corresponding to the first target composite number is List, extract the initial consonant of the third character of each word starting with the first or second character, and multiply its corresponding prime number by the first target composite number to obtain a new composite number. If the composite number of a word in List is divisible by the new composite number, then the word in List is a candidate word for recognition. Extract the initial consonant of the next Chinese character, and multiply its corresponding prime number by the new composite number to obtain a new composite number. Continue extracting composite numbers from multiple candidate words. If a composite number is divisible by the new composite number, then the word in List is a candidate word for recognition. Retrieve the corresponding word from HashMap2 based on the new composite number; this is the target candidate word (ultimately, only one word can be recognized, resulting in a 100% recognition probability; each recognized word records the indices of its first and last characters in the recognition string). When a candidate word is recognized, move the selected pinyin position before the pinyin of the next word. The number of moves is equal to the length of the recognized character. For example, if "Beijing Friendship Hotel" is recognized, the selection position of the pinyin will be placed at the pinyin corresponding to "next to" until there are no more pinyin to be recognized.

[0088] Step S302: Perform fuzzy recognition on the speech to be recognized based on the first hash map, the second hash map, and the third hash map to obtain the fuzzy recognition result.

[0089] It should be noted that noise can occur due to interference (such as booking a hotel via voice interaction with a digital human on the street) or the loss of some content (such as characters or sounds) during speech-to-pinyin conversion. Therefore, the pinyin obtained during fuzzy recognition is already noise-removed; that is, the denoised pinyin to be recognized may be a string of fragmented content. Fuzzy recognition of the speech to be recognized is achieved using the first hash map, the second hash map, and the pinyin string, yielding the fuzzy recognition result.

[0090] Furthermore, to improve recognition efficiency and accuracy, the step of performing fuzzy recognition on the speech to be recognized based on the first hash map, the second hash map, and the third hash map to obtain a fuzzy recognition result includes: performing pinyin conversion and denoising on the speech to be recognized to obtain denoised pinyin; obtaining the initial consonant of the third character and the initial consonant of the fourth character in the denoised pinyin, and determining the prime number of the initial consonant of the third character and the prime number of the initial consonant of the fourth character according to the mapping relationship between the initial consonant and the prime number, wherein the third character is the first character corresponding to the denoised pinyin, and the third character and the fourth character are adjacent; calculating the second target composite number based on the prime number of the initial consonant of the third character and the prime number of the initial consonant of the fourth character; determining whether the second target composite number and the first target composite number exist in the first hash map. Does the three-hash mapping table contain a prime number for the initial consonant of the third character? If the first hash mapping table does not contain the second target composite number and the third hash mapping table contains a prime number for the initial consonant of the third character, then obtain the composite number for the initial consonant of the third character in the third hash mapping table. Determine a new composite number based on the composite number of the initial consonant of the third character, and determine a second candidate term based on the new composite number and the third hash mapping table. Determine the target candidate term in the second candidate term based on the new composite number, the second hash mapping table, and the candidate term, and identify the target candidate term in the second candidate term to obtain the second target term, the position corresponding to the first and last characters of the second target term, and the second recognition probability. Determine the fuzzy recognition result based on the second target term, the position corresponding to the first and last characters of the second target term, and the second recognition probability.

[0091] It should be noted that the process involves obtaining the initials of the first two Chinese characters (i.e., the third and fourth characters) in the denoised string of the pinyin to be recognized; determining the prime numbers of the initials of the third and fourth characters based on the mapping relationship between initials and prime numbers, and calculating their composite number to obtain the second target composite number; checking whether the second target composite number exists in HashMap1, and simultaneously checking whether the prime number corresponding to the first letter of the current character exists in HashMap3.

[0092] In the specific implementation, if a second target composite number exists in HashMap1, then regardless of whether a prime number corresponding to the first letter of the current first character (i.e., the third character) exists in HashMap3, the result of HashMap1's existence will be taken as the standard. If a second target composite number does not exist in HashMap1 but a prime number corresponding to the first letter of the current first character (i.e., the third character) exists in HashMap3, it means that the initial consonant of the single character has been successfully recognized. The composite number K corresponding to HashMap3 is obtained, and the product of the prime number corresponding to the initial consonant of the next character and the initial consonant of the current character is calculated to obtain a new composite number. If the new composite number is not divisible by the composite number K, it means that the recognition has failed, and the recognition continues with the recognition of strings starting with the next character. If it can be recognized... This indicates that the term may be fuzzily recognized. If HashMap3 has only one candidate result, the recognition probability is 100%. Each recognized term will record the index of the first and last characters in the recognized string. If there are multiple candidate results, the relevant candidate term, i.e., the target candidate term, will be retrieved from HashMap2 based on the current composite number. The recognition probability is calculated based on the correlation. Each recognized term will record the index of the first and last characters in the recognized string. If there is no second target composite number in HashMap1 and no prime number corresponding to the first letter of the current first character (i.e., the third character) in HashMap3, it means that the recognition has failed. Continue to recognize strings starting with the next character until there are no more pinyin to be recognized.

[0093] This embodiment performs precise recognition of the speech to be recognized based on the first and second hash mapping tables to obtain a precise recognition result; and performs fuzzy recognition of the speech to be recognized based on the first, second, and third hash mapping tables to obtain a fuzzy recognition result. By using the above method to perform precise and fuzzy recognition of the speech to be recognized according to the first, second, and third hash mapping tables, the efficiency and accuracy of speech recognition are improved.

[0094] Reference Figure 4 , Figure 4 This is a structural block diagram of the first embodiment of the speech recognition device of the present invention.

[0095] like Figure 4 As shown, the speech recognition device proposed in this embodiment of the invention includes:

[0096] Module 10 is used to build hash mapping tables.

[0097] The recognition module 20 is used to acquire the speech to be recognized and to recognize the speech through a preset speech recognition model to obtain a conventional recognition result.

[0098] The recognition module 20 is also used to perform precise recognition and fuzzy recognition on the speech to be recognized based on the hash mapping table, so as to obtain precise recognition results and fuzzy recognition results.

[0099] The calculation module 30 is used to perform calculations based on the conventional recognition results, accurate recognition results, and fuzzy recognition results to obtain the target speech recognition results.

[0100] This embodiment constructs a hash mapping table; acquires the speech to be recognized; and recognizes the speech using a preset speech recognition model to obtain a conventional recognition result. Based on the hash mapping table, it performs precise and fuzzy recognition on the speech to be recognized, obtaining precise and fuzzy recognition results respectively. Finally, it calculates the target speech recognition result based on the conventional, precise, and fuzzy recognition results. By using the conventional recognition result obtained from the preset speech recognition model and the precise and fuzzy recognition results obtained from the hash mapping table to calculate the target speech recognition result, this embodiment solves the technical problem of poor speech recognition performance in specialized fields or specific industries, thereby improving the accuracy of speech recognition in these fields.

[0101] In one embodiment, the construction module 10 is further configured to obtain the occurrence frequency of each initial consonant in a preset corpus, and determine the target initial consonant based on the occurrence frequency; obtain the target prime number in the prime number table, and determine the mapping relationship between the initial consonant and the prime number based on the target initial consonant and the target prime number; and construct a hash mapping table based on the mapping relationship between the initial consonant and the prime number.

[0102] In one embodiment, the construction module 10 is further configured to traverse the proper noun library, perform pinyin conversion on the proper nouns in the proper noun library to obtain the proper noun pinyin, and determine the initial consonant of each character in the proper noun based on the proper noun pinyin; determine the prime number of the initial consonant of each character in the proper noun based on the mapping relationship between the initial consonant and the prime number; determine the composite number of the initial consonants of all characters in the proper noun based on the prime number of the initial consonant of each character in the proper noun, and construct multiple hash mapping tables based on the prime number and the composite number.

[0103] In one embodiment, the hash mapping table includes at least a first hash mapping table and a second hash mapping table. The recognition module 20 is further configured to perform accurate recognition of the speech to be recognized based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result; and to perform fuzzy recognition of the speech to be recognized based on the first hash mapping table, the second hash mapping table and the third hash mapping table to obtain a fuzzy recognition result.

[0104] In one embodiment, the recognition module 20 is further configured to perform pinyin conversion on the speech to be recognized to obtain pinyin to be recognized; obtain the initial consonant of the first character and the initial consonant of the second character in the pinyin to be recognized; determine the prime number of the initial consonant of the first character and the prime number of the initial consonant of the second character according to the mapping relationship between the initial consonant and the prime number, and calculate to obtain a first target composite number, wherein the first character is the first character corresponding to the pinyin to be recognized, and the first character and the second character are adjacent; determine whether the first target composite number exists in the first hash mapping table; if it exists, determine the term containing the first character and the second character according to the first hash mapping table to obtain a first term; determine a new composite number according to the first term, and determine a first candidate term according to the new composite number; determine the target candidate term in the first candidate term based on the new composite number and the second hash mapping table, and recognize the target candidate term in the first candidate term to obtain the first target term, the position corresponding to the first and last characters of the first target term, and the first recognition probability; determine the accurate recognition result according to the first target term, the position corresponding to the first and last characters of the first target term, and the first recognition probability.

[0105] In one embodiment, the recognition module 20 is further configured to perform pinyin conversion and denoising on the speech to be recognized to obtain denoised pinyin; obtain the initial consonant of the third character and the initial consonant of the fourth character in the denoised pinyin, and determine the prime number of the initial consonant of the third character and the prime number of the initial consonant of the fourth character according to the mapping relationship between the initial consonant and the prime number, wherein the third character is the first character corresponding to the denoised pinyin, and the third character and the fourth character are adjacent; calculate based on the prime number of the initial consonant of the third character and the prime number of the initial consonant of the fourth character to obtain a second target composite number; determine whether the second target composite number exists in the first hash mapping table and whether the prime number of the initial consonant of the third character exists in the third hash mapping table; if the first target composite number exists in the first hash mapping table, the second target composite number exists in the first hash mapping table and the third target hash mapping table; if the first target composite number exists in the first hash mapping table, the second target composite number exists in the first hash mapping table and the third target hash mapping table; if the first target composite number exists in the first hash mapping table, the second target composite number exists in the first hash mapping table and the third target hash mapping table; if the second ... and the third target hash mapping table, the second target composite number exists in the first hash mapping table and the third target hash mapping table. If the second target composite number does not exist in the hash mapping table and a prime number of the initial consonant of the third character exists in the third hash mapping table, then obtain the composite number of the initial consonant of the third character in the third hash mapping table; determine a new composite number based on the composite number of the initial consonant of the third character, and determine a second candidate word based on the new composite number and the third hash mapping table; determine the target candidate word in the second candidate word based on the new composite number, the second hash mapping table, and the candidate word, and identify the target candidate word in the second candidate word to obtain the second target word, the position corresponding to the first and last characters of the second target word, and the second recognition probability; determine the fuzzy recognition result based on the second target word, the position corresponding to the first and last characters of the second target word, and the second recognition probability.

[0106] Furthermore, to achieve the above objectives, the present invention also proposes a speech recognition device, the speech recognition device comprising: a memory, a processor, and a speech recognition program stored in the memory and executable on the processor, the speech recognition program being configured to implement the steps of the speech recognition method as described above.

[0107] Since this speech recognition device adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0108] Furthermore, this embodiment of the invention also proposes a storage medium storing a speech recognition program, which, when executed by a processor, implements the steps of the speech recognition method described above.

[0109] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0110] Furthermore, embodiments of the present invention also propose a computer program product, including a speech recognition program, which, when executed by a processor, implements the steps of the speech recognition method as described above.

[0111] Since the computer program product of the present invention adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0112] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0113] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0114] In addition, for technical details not described in detail in this embodiment, please refer to the speech recognition method provided in any embodiment of the present invention, which will not be repeated here.

[0115] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0116] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0117] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0119] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A speech recognition method, characterized in that, The method includes: The occurrence frequency of each initial consonant in a preset corpus is obtained, and the target initial consonant is determined based on the occurrence frequency; the target prime number in the prime number table is obtained, and the mapping relationship between the initial consonant and the prime number is determined based on the target initial consonant and the target prime number; a hash mapping table is constructed based on the mapping relationship between the initial consonant and the prime number, and the hash mapping table includes at least a first hash mapping table, a second hash mapping table, and a third hash mapping table; The speech to be recognized is acquired, and the speech to be recognized is recognized by a preset speech recognition model to obtain a conventional recognition result; The speech to be recognized is accurately identified based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result; Based on the first hash mapping table, the second hash mapping table, and the third hash mapping table, fuzzy recognition is performed on the speech to be recognized to obtain a fuzzy recognition result; The target speech recognition result is obtained by calculating based on the conventional recognition result, the accurate recognition result, and the fuzzy recognition result.

2. The method as described in claim 1, characterized in that, The step of constructing a hash mapping table based on the mapping relationship between the initial consonant and the prime number includes: Traverse the proper noun database, perform pinyin conversion on the proper nouns in the database to obtain the pinyin of the proper nouns, and determine the initial consonant of each character in the proper noun based on the pinyin of the proper nouns; The prime number of the initial consonant of each character in the proper noun is determined based on the mapping relationship between the initial consonant and the prime number. The composite number of the initials of all characters in the proper noun is determined based on the prime number of the initials of each character in the proper noun, and multiple hash mapping tables are constructed based on the prime numbers and the composite numbers.

3. The method as described in claim 1, characterized in that, The accurate recognition of the speech to be recognized based on the first hash mapping table and the second hash mapping table to obtain an accurate recognition result includes: The speech to be recognized is converted into pinyin to obtain the pinyin to be recognized; Obtain the initial consonant of the first character and the initial consonant of the second character in the pinyin to be recognized. Determine the prime number of the initial consonant of the first character and the prime number of the initial consonant of the second character according to the mapping relationship between the initial consonant and the prime number, and calculate to obtain the first target composite number. Here, the first character is the first character corresponding to the pinyin to be recognized, and the first character and the second character are adjacent. Determine whether the first target composite number exists in the first hash mapping table; If it exists, then the term containing the first character and the second character is determined according to the first hash mapping table, and the first term is obtained; A new composite number is determined based on the first term, and a first candidate term is determined based on the new composite number; Based on the new composite number and the second hash mapping table, the target candidate word in the first candidate word is determined, and the target candidate word in the first candidate word is identified to obtain the first target word, the position of the first and last characters of the first target word, and the first identification probability. The accurate recognition result is determined based on the first target term, the positions of the first and last characters of the first target term, and the first recognition probability.

4. The method as described in claim 1, characterized in that, The step of performing fuzzy recognition on the speech to be recognized based on the first hash map, the second hash map, and the third hash map to obtain the fuzzy recognition result includes: The speech to be recognized is converted into pinyin and denoised to obtain the denoised pinyin to be recognized. Obtain the initials of the third and fourth characters in the denoised pinyin to be recognized, and determine the prime numbers of the initials of the third and fourth characters according to the mapping relationship between the initials and prime numbers. The third character is the first character corresponding to the denoised pinyin to be recognized, and the third character and the fourth character are adjacent. The second target composite number is obtained by calculating the prime numbers of the initials of the third character and the fourth character. Determine whether the second target composite number exists in the first hash map table and whether a prime number representing the initial consonant of the third character exists in the third hash map table; If the second target composite number does not exist in the first hash map table and the prime number of the initial consonant of the third character exists in the third hash map table, then obtain the composite number of the initial consonant of the third character in the third hash map table. A new composite number is determined based on the composite number of the initial consonant of the third character, and a second candidate term is determined based on the new composite number and the third hash mapping table; The target candidate word in the second candidate word is determined based on the new composite number, the second hash mapping table, and the candidate word. The target candidate word in the second candidate word is then identified to obtain the second target word, the position of the first and last characters of the second target word, and the second identification probability. The fuzzy recognition result is determined based on the second target term, the positions of the first and last characters of the second target term, and the second recognition probability.

5. A voice recognition device, characterized in that, The speech recognition device includes: A construction module is used to obtain the occurrence frequency of each initial consonant in a preset corpus and determine the target initial consonant based on the occurrence frequency; obtain the target prime number in the prime number table and determine the mapping relationship between the initial consonant and the prime number based on the target initial consonant and the target prime number; construct a hash mapping table based on the mapping relationship between the initial consonant and the prime number, wherein the hash mapping table includes at least a first hash mapping table, a second hash mapping table and a third hash mapping table; The recognition module is used to acquire the speech to be recognized and to recognize the speech through a preset speech recognition model to obtain a conventional recognition result; The recognition module is further configured to perform accurate recognition of the speech to be recognized based on the first hash map table and the second hash map table to obtain an accurate recognition result; and to perform fuzzy recognition of the speech to be recognized based on the first hash map table, the second hash map table and the third hash map table to obtain a fuzzy recognition result. The calculation module is used to perform calculations based on the conventional recognition results, accurate recognition results, and fuzzy recognition results to obtain the target speech recognition result.

6. A voice recognition device, characterized in that, The speech recognition device includes: a memory, a processor, and a speech recognition program stored in the memory and executable on the processor, the speech recognition program being configured to implement the speech recognition method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium stores a speech recognition program, which, when executed by a processor, implements the speech recognition method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product includes a speech recognition program, which, when executed by a processor, implements the steps of the speech recognition method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Voice recognition processing method and device, electronic equipment and storage medium

    CN111462748A

  • Speech recognition method and device, equipment and storage medium

    CN113920999A