A speech recognition method and related apparatus

By using a pre-set database and Markov chain model in the ASR system to replace characters with low confidence, a more accurate target string is generated, which solves the problem of inaccurate recognition of device serial numbers in the ASR system and improves the accuracy of speech recognition and user experience.

CN119993131BActive Publication Date: 2026-04-14LENOVO (BEIJING) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing ASR systems are prone to inaccurate recognition when processing strings containing alphanumeric characters due to factors such as accent, speech speed, and clarity. This is especially true in scenarios involving input device serial numbers, where inaccurate recognition can lead to incorrect results.

Method used

The system obtains the speech information to be recognized, generates characters with low confidence, replaces the characters with low confidence using a pre-set database and a Markov chain model, generates a target string with a higher matching degree to the speech information to be recognized, and outputs the recognition result.

Benefits of technology

It improves the accuracy of speech recognition, optimizes the recognition results, and simplifies the user input process, especially in device serial number recognition scenarios with high noise or user accents, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119993131B_ABST
    Figure CN119993131B_ABST
Patent Text Reader

Abstract

The application discloses a speech recognition method and related device, and relates to the field of information processing, and comprises the following steps: obtaining to-be-recognized speech information; obtaining a first character string by recognizing the to-be-recognized speech information; replacing characters in the first character string that meet a replacement condition in terms of confidence to obtain a target character string; and outputting the target character string as a recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing, and more particularly to a speech recognition method and related apparatus. Background Technology

[0002] Voice input, as a common input method, has been widely used in various scenarios.

[0003] For voice input, ASR (Automatic Speech Recognition) systems are generally used to process it and obtain the recognition results.

[0004] When users input various alphanumeric information via voice, factors such as accent, speaking speed, and clarity may lead to inaccurate speech recognition. In particular, when inputting strings composed of alphanumeric characters, such as device serial numbers, the limitations of the ASR system often prevent the system from accurately recognizing usable strings when processing the input voice, resulting in incorrect recognition results. Summary of the Invention

[0005] The first aspect of this application provides a speech recognition method, including:

[0006] Obtain the speech information to be recognized;

[0007] The first string is obtained by recognizing the speech information to be recognized;

[0008] Replace the characters in the first string that meet the replacement condition with the new characters to obtain the target string;

[0009] The target string is output as the recognition result.

[0010] In one possible implementation, replacing characters in the first string whose confidence level satisfies the replacement condition to obtain the target string includes:

[0011] Based on the confidence level of each character in the first string, it is determined that the first character in the first string satisfies the replacement condition, and the confidence level of the first character is lower than a set threshold.

[0012] The first character is replaced by the second character in the first string to obtain the target string. The target string matches the speech information to be recognized to a greater degree than the first string matches the speech information to be recognized.

[0013] In one possible implementation, the step of replacing the first character with the second character in the first string to obtain the target string includes:

[0014] Based on the second character in each first string and the position of the second character, at least one candidate string is obtained by querying a preset database. The characters in the candidate string are consistent with the second character in the corresponding first string, and the number of first strings is at least one.

[0015] The matching degree between each candidate string and each first string is determined sequentially;

[0016] Based on the matching degree, one of the at least one candidate strings is selected as the first target string, and the matching degree between the first target string and each first string is higher than the matching degree between the candidate strings that are not the first target strings and each first string.

[0017] In one possible implementation, the step of replacing the first character with the second character in the first string to obtain the target string includes:

[0018] Based on the second character in each first string and the position of the second character, if no candidate string is found in the preset database, the number of first strings is at least one.

[0019] Based on the second character in each first string, a query is performed in a preset transition probability matrix to obtain at least one target character that any second character can be transitioned to. The target character corresponds to the first character in each first string. The target character is a character ordered after the second character. The preset transition probability matrix contains several characters, the transition characters of each character, and the transition probability of each character and the corresponding transition character.

[0020] The second target string is determined based on the second character in each of the first strings and the corresponding target character.

[0021] In one possible implementation, determining the second target string based on the second character in each first string and the corresponding target character includes:

[0022] The target character is combined with the corresponding second character in the first string to obtain at least two candidate strings;

[0023] By querying the preset transition probability matrix, the transition probability corresponding to each target character in any candidate string can be obtained;

[0024] The weight of the arbitrary candidate string is determined based on the transition probability corresponding to each target character in the arbitrary candidate string;

[0025] Select the second target string from among the candidate strings. The weight of the second target string is higher than the weight of the non-second target strings among the candidate strings.

[0026] In one possible implementation, selecting the second target string from among the candidate strings includes:

[0027] Sort the candidate strings according to their weights;

[0028] Based on the sorting of the candidate strings, query the preset database to see if the candidate strings exist;

[0029] The target candidate string will be retrieved from the preset database and used as the second target string. The weight of the target candidate string is higher than that of the non-target candidate string.

[0030] In one possible implementation, prior to obtaining the speech information to be recognized, the process further includes:

[0031] Obtain device information provided by the user terminal;

[0032] Accordingly, outputting the target string as the recognition result includes:

[0033] Based on the matching of the target string with the device information, predict the service process corresponding to the voice information to be identified;

[0034] The identification result is output to the service terminal using the service process, and the service terminal is used to provide services to each user terminal.

[0035] In one possible implementation, obtaining the speech information to be recognized includes:

[0036] Based on the response to the call request, obtain the voice information to be recognized in real time;

[0037] Accordingly, outputting the target string as the recognition result includes:

[0038] Count the number of times the target string is obtained during this call;

[0039] Based on the fact that the first number of times is less than the threshold of the first number of times, the target string is output as the recognition result;

[0040] Based on the fact that the first number of times is not less than the threshold of the first number, the target string is prohibited from being output as the recognition result.

[0041] One possible implementation also includes:

[0042] Obtain relevant information about the user terminal;

[0043] Based on the relevant information of the user terminal, count the number of times the user terminal is involved in obtaining the target string during a call within a preset time period;

[0044] Based on the fact that the second number of times is not less than the second number threshold, and according to the relevant information of the target terminal, the response to the voice information to be recognized provided by the target terminal is prohibited.

[0045] A second aspect of this application provides a voice recognition device, comprising:

[0046] An interface for obtaining the speech information to be recognized;

[0047] The processor is configured to recognize the speech information to be recognized to obtain a first string; replace characters in the first string whose confidence level meets the replacement condition to obtain a target string; and output the target string as the recognition result.

[0048] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the speech recognition method of the first aspect or any implementation thereof.

[0049] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0050] The memory is used to store computer programs;

[0051] The processor is used to execute the computer program so that the electronic device can implement the speech recognition method of the first aspect or any implementation thereof.

[0052] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the speech recognition method described in the first aspect or any implementation thereof. Attached Figure Description

[0053] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0054] Figure 1 This is a schematic flowchart of a speech recognition method provided in an embodiment of this application;

[0055] Figure 2 This is a flowchart illustrating the process of replacing characters in the first string whose confidence level meets the replacement conditions to obtain the target string, as provided in the embodiments of this application.

[0056] Figure 3This is a schematic diagram of the first string provided in the embodiments of this application;

[0057] Figure 4 This is a flowchart illustrating the process of replacing characters in the first string whose confidence level meets the replacement conditions to obtain the target string, as provided in the embodiments of this application.

[0058] Figure 5 This is a flowchart illustrating the process of obtaining a target string by replacing the first character with the second character in the first string, as provided in an embodiment of this application.

[0059] Figure 6 This is a flowchart illustrating the process of determining a second target string based on the second character in each first string and the corresponding target character, provided in an embodiment of this application.

[0060] Figure 7 This is a flowchart illustrating the process of selecting a second target string from among the candidate strings provided in an embodiment of this application;

[0061] Figure 8 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0062] Figure 9 This is a schematic diagram of the process of outputting the target string as the recognition result according to an embodiment of this application;

[0063] Figure 10 This is another flowchart illustrating the process of outputting the target string as a recognition result, provided in an embodiment of this application.

[0064] Figure 11 This is a schematic flowchart of the speech recognition method provided in the embodiments of this application;

[0065] Figure 12 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of this application;

[0066] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0067] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0068] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0069] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0070] Reference Figure 1 , Figure 1 This is a flowchart illustrating a speech recognition method provided in an embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, a speech recognition method may include steps 101 to 104, which are described in detail below.

[0071] 101. Obtain the speech information to be recognized;

[0072] The speech recognition method provided in this application is applied to an electronic device.

[0073] The voice information to be identified can be voice information obtained from other devices or voice information collected by this device.

[0074] As an example, the electronic device acts as a server, connected to the terminal wirelessly or via a wired connection. The terminal has an audio acquisition device. After acquiring voice information, the terminal sends the voice information to the electronic device, which then recognizes the voice information and obtains its corresponding string.

[0075] As an example, the electronic device is equipped with an audio acquisition device, which acquires voice information and then identifies the strings in the voice information.

[0076] The speech information to be recognized may contain multiple speech segments. During the recognition process, each speech segment can be recognized separately to obtain multiple corresponding target strings.

[0077] The speech information to be recognized can be obtained in real time. The target string is obtained by recognizing the speech information obtained in real time.

[0078] The voice information to be recognized can also be obtained from a storage location where a segment of voice information is stored. The electronic device recognizes the segment of voice information obtained from the storage location to obtain the target string.

[0079] 102. Recognize the speech information to be recognized to obtain the first string;

[0080] The first string can represent one string or multiple strings.

[0081] The speech information to be recognized can be identified using a recognition system to obtain the first string.

[0082] As an example, the recognition system could employ ASR.

[0083] The first string contains multiple characters, each with a confidence level, which represents a quantitative representation of the reliability of the recognition system's recognition results.

[0084] For example, a high confidence level indicates that the recognition system is highly reliable in its recognition results, that the input speech features match the speech patterns in the model well, and that the speech is easily identifiable. This means that the speech information to be recognized is relatively consistent with the patterns trained by the system at both the acoustic and linguistic levels, and is more likely to be an accurate recognition result. A low confidence level, on the other hand, suggests that the recognition result may have significant uncertainty, possibly due to poor speech quality, the presence of uncommon vocabulary or language structures, or the speech features having a certain similarity to multiple model patterns, making it difficult for the system to make an accurate judgment. In this case, further analysis of the speech or other measures are needed to verify the accuracy of the recognition results.

[0085] Due to issues such as the user's non-standard accent, background noise, or other factors, the first string recognized by the ASR may contain characters with low confidence.

[0086] Therefore, the first string needs to be further processed to improve the recognition accuracy of the speech information to be recognized.

[0087] 103. Replace the characters in the first string that meet the replacement criteria with the given confidence level to obtain the target string;

[0088] The replacement condition can be that the confidence level is less than a set threshold.

[0089] In one possible implementation, characters in the first string with a confidence level less than a set threshold are replaced to obtain the target string.

[0090] As an example, when the first string represents a string, it can be used to replace characters in that string whose confidence level is less than a set threshold to obtain the corresponding target string.

[0091] As an example, when the first string represents multiple strings, characters with a confidence level less than a set threshold can be replaced in each string to obtain the corresponding string. Subsequently, one of these multiple corresponding strings can be selected as the target string.

[0092] 104. Output the target string as the recognition result.

[0093] The target string can consist of only numbers, only letters, letters and numbers, or Chinese characters, letters and numbers. The letters can be one or more English letters or Greek letters. This application does not restrict the format of the characters contained in the target string.

[0094] The target string is obtained by replacing characters with confidence levels that meet the replacement conditions, and the target string has a higher degree of matching with the speech information to be recognized.

[0095] The recognition result can be output either as voice or as a display.

[0096] In one possible implementation, the target string is converted into speech and output through an audio output device.

[0097] The audio output can be achieved through an audio output device installed on the electronic device, or through an audio output device on a terminal that is connected to the electronic device.

[0098] In one possible implementation, the target string is displayed in a set display interface and audio is output through an audio output device.

[0099] The audio output can be achieved through an audio output device installed on the electronic device, or through an audio output device on a terminal that is connected to the electronic device.

[0100] In this embodiment, after obtaining the speech information to be recognized, the speech information is recognized to obtain a first string; characters in the first string whose confidence level meets the replacement condition are replaced to obtain a target string; and the target string is output as the recognition result. In this process, by replacing characters in the first string whose confidence level meets the replacement condition, the recognition result is optimized, resulting in a more accurate target string and improving the accuracy of speech information recognition. In scenarios involving speech recognition based on the device's Serial Number (SN) or telephone customer service, the recognition result can be optimized. Even if there is significant ambient noise or the user's accent causes the first string to appear, the recognition result can be optimized and corrected through subsequent processes. This eliminates the need for the user to repeatedly input a string by raising their voice or changing their accent, thus optimizing the user experience. Furthermore, it simplifies the workflow by eliminating the need for multiple reminders from the device program or telephone customer service program / personnel.

[0101] Figure 2 This is a flowchart illustrating the process of replacing characters in the first string that meet the replacement conditions with confidence levels, as provided in this application embodiment, to obtain the target string. It may include steps 201 to 202, which are described in detail below.

[0102] 201. Based on the confidence level of each character in the first string, determine that the first character in the first string satisfies the replacement condition, and the confidence level of the first character is lower than the set threshold;

[0103] The recognition system, after recognizing the speech information to be recognized, obtains a first string and the confidence level of each character in the first string.

[0104] The recognition system converts the input speech information into text characters and generates a confidence level for each character.

[0105] For characters whose recognition system has a high degree of confidence in the recognition result, a higher confidence level is set for the converted character; for characters whose recognition system has a low degree of confidence in the recognition result, a lower confidence level is set for the converted character.

[0106] If the confidence level of a character is lower than a set threshold, it can be determined that the character meets the replacement condition; otherwise, the character does not meet the replacement condition.

[0107] In one possible implementation, confidence levels can be expressed as percentages, such as 90%, 52%, etc.

[0108] As an example, the threshold can be set to 70%. If the confidence level of a character is less than 70%, the character can be determined to meet the replacement condition. In the first string, characters with a confidence level of less than 70% are the first characters, and characters with a confidence level of not less than 70% are the second characters.

[0109] In one possible implementation, confidence levels can be represented by decimals, such as 0.95, 0.76, etc.

[0110] As an example, the threshold can be set to 0.75. If the confidence level of a character is less than 0.75, the character can be determined to meet the replacement condition. In the first string, characters with a confidence level less than 0.75 are the first characters, and characters with a confidence level not less than 0.75 are the second characters.

[0111] As an example, for a speech segment, the first string obtained is "3A75C24". Table 1 below shows the confidence level of each character in this first string.

[0112] Table 1

[0113]

[0114] If the threshold is set to 80%, in Table 1 above, the first character in the first string includes "C" and "4", and the remaining characters are the second characters.

[0115] The order of the first and second characters in the first string can be arbitrary. For example, the first and second characters can be alternated sequentially, or multiple second characters can be separated by one first character, or multiple first characters can be separated by one second character. This application does not impose any restrictions on the order of the first and second characters in the first string.

[0116] Figure 3 This is a schematic diagram of a first string provided in an embodiment of this application. The first string includes a first character and a second character. Figure 3 The first character is marked with a dashed line, and the second character is marked with a solid line. In this diagram, in the string "3A75C24", "3", "A", "7", "5", and "2" are the second characters, and "C" and "4" are the first characters; in the string "352791", "3", "5", "9", and "1" are the second characters, and "2" and "7" are the first characters; in the string "672CD8Y0", "6", "7", "2", "Y", and "0" are the second characters, and "C", "D", and "8" are the first characters.

[0117] In one possible implementation, multiple first strings can be identified for the same speech information to be recognized.

[0118] As an example, the pronunciation of the third character in the speech information to be recognized is identified as multiple characters, such as "3" (confidence 0.35), "5" (confidence 0.4) or "8" (confidence 0.25). Accordingly, "3", "5" or "8" can be combined with other recognized characters to form a first string, in which the third character of the three first strings is "3", "5" and "8" respectively.

[0119] Accordingly, the process in this embodiment is executed for each first string to obtain the string corresponding to each first string, and then one of the strings corresponding to each first string is determined as the target string.

[0120] 202. Replace the first character with the second character in the first string to obtain the target string. The degree of matching between the target string and the speech information to be recognized is greater than the degree of matching between the first string and the speech information to be recognized.

[0121] In this system, since the second character in the first string has a high confidence level, the recognition system has a high degree of confidence in it. The first character is replaced by the second character in the first string to replace the characters with low confidence levels in the first string.

[0122] In one possible implementation, the character needed to replace the first character can be determined based on the second character in the first string, and the first character in the first string can be replaced with the required character to obtain the target string.

[0123] In this case, since the character required for the replacement is determined based on the second character, it combines the second character and takes into account more dimensions of influence compared to the first character, resulting in a higher degree of matching between the determined target string and the speech information to be recognized.

[0124] As an example, referring to the example in Table 1 above, based on "3A75" and "2", the characters to be replaced are "4" and "S", resulting in the target string "3A7542S".

[0125] In this embodiment, based on the confidence level of each character in the first string, it is determined that the first character in the first string meets the replacement condition, and the confidence level of the first character is lower than a set threshold. The first character is then replaced by a second character in the first string to obtain a target string. This target string matches the speech information to be recognized to a greater extent than the first string matches the speech information to be recognized. By using a second character with higher confidence in the first string to replace a first character with lower confidence, a target string with a higher degree of matching to the speech information to be recognized is obtained, thus optimizing the recognition results and improving the accuracy of speech information recognition.

[0126] Figure 4This is a flowchart illustrating the process of replacing characters in the first string that meet the replacement conditions with confidence levels, as provided in this application embodiment, to obtain the target string. It may include steps 401 to 403, which are described in detail below.

[0127] 401. Based on the second character in each first string and the position of the second character, at least one candidate string is obtained by querying the preset database. The characters in the candidate string are consistent with the second character in the corresponding first string. The number of first strings is at least one.

[0128] The voice input to be recognized is a specific type of string. Correspondingly, a preset database can be set for this type of string, which can store the possible string forms of this type of string.

[0129] As an example, the voice information to be identified is the voice information captured when a user inputs the serial number (SN) of an electronic device. The SN is a set of letters and numbers used to uniquely identify a product.

[0130] Accordingly, an SN code database can be set up for the electronic device's SN code, which can pre-store the SN codes of various models produced by different manufacturers. Correspondingly, based on the second character and its position in the first string, candidate strings matching the second character and its position can be queried from the SN code database.

[0131] As an example, the voice information to be recognized is the voice information captured when a phone number is input via voice. The phone number is an 11-digit code.

[0132] Correspondingly, a phone number database can be set up for phone numbers, which can pre-store phone numbers provided by various operators. Accordingly, based on the second character and the position of the second character in the first string, candidate strings that match the second character and its position can be queried in the phone number database.

[0133] Specifically, a query is performed in the preset database to check whether there is a candidate string that has the same second character and position as the first string.

[0134] In one possible implementation, the number of high-confidence bits in the first string is fixed as the second character, and the number of bits of these second characters is fixed to the correct recognition value. Candidate strings matching these second characters are then filtered from a preset database.

[0135] Specifically, if a character in the candidate string is identical to the second character in the corresponding first string, then a portion of the characters in the candidate string are identical to the second character in the first string, and the position of the second character is the same. However, if the characters in the candidate string and the corresponding first string are different, then the characters at the position of the first character are different.

[0136] During the query process, the number of characters in the first string can also be used as a query condition. The database is first filtered by the number of characters, and then candidate strings that match the position of the second character in the first string are searched.

[0137] As an example, considering the first string "PF3748D2" obtained from the speech information to be recognized, the first character is "P" (confidence 0.95), the second character is "F" (confidence 0.92), the third character is "3" (confidence 0.88), the fourth character is "7" (confidence 0.93), the fifth character is "4" (confidence 0.65), the sixth character is "8" (confidence 0.72), the seventh character is "D" (confidence 0.75), and the eighth character is "2" (confidence 0.70). A threshold of 0.8 is set, determining that the first four characters ("PF37") have a higher confidence level and are selected as the second character, while the last four characters ("48D2") have a lower confidence level and are selected as the first character. Based on the first four characters PF37, a query is performed in a preset database to obtain candidate strings: PF3748D2, PF3749D2, PF3728D2, PF3748A2, and PF3748D2.

[0138] When multiple first strings are obtained for a given voice information to be recognized, the corresponding candidate strings can be queried in the preset database for each string.

[0139] 402. Determine the matching degree between each candidate string and each first string in turn;

[0140] Specifically, after querying the preset database for each first string to obtain the corresponding candidate string, the matching degree between each candidate string and each first string is determined.

[0141] In one possible implementation, calculating the matching degree between any candidate string and each first string can include: selecting any first string and calculating the matching degree between the arbitrary first string and the candidate string; similarly calculating the matching degree between each first string and the candidate string, and summing the matching degrees between the candidate string and each first string to obtain the matching degree between the arbitrary candidate string and each first string.

[0142] As an example, there are 3 first strings, and 2 candidate strings are determined for each first string, resulting in a total of 6 candidate strings. The matching degree between each of the 6 candidate strings and the 3 first strings is calculated. The matching degree between each candidate string and each first string is summed to obtain the matching degree between the candidate string and each first string.

[0143] 403. Based on the matching degree, select one of the at least one candidate strings as the first target string, and the matching degree between the first target string and each first string is higher than the matching degree between the non-first target strings and each first string in the candidate strings.

[0144] Specifically, based on the matching degree value, the candidate string with the highest matching degree value among the multiple candidate strings is selected as the first target string.

[0145] The matching degree between the candidate string and each of the first strings represents the overall matching degree between the candidate string and each of the first strings. Therefore, selecting the candidate string with the highest matching degree value among the first strings is a holistic approach, determining that the first target string best matches the speech information to be recognized.

[0146] In this embodiment, based on the second character and its position in each first string, at least one candidate string is retrieved from a preset database. The characters in this candidate string match the second character in the corresponding first string, and there are at least one such first string. The matching degree between each candidate string and each first string is determined sequentially. Based on this matching degree, one of the at least one candidate string is selected as the first target string. The matching degree between the first target string and each first string is higher than the matching degree between non-first target strings and each first string. The characters in the first string are processed hierarchically according to their confidence level. By fixing the second character with high confidence, candidate strings matching the fixed high-confidence second character are filtered from the preset database. The string with the highest matching degree to the first string is selected from these candidate strings as the first target string. This first target string is determined by combining the recognition results with existing strings in the preset database, thus improving the accuracy of speech information recognition compared to using only the recognition system.

[0147] Figure 5 This is a flowchart illustrating how a target string is obtained by replacing the first character with the second character in the first string, as provided in this application embodiment. It may include steps 501 to 503, which will be described in detail below.

[0148] 501. Based on the second character in each first string and the position of the second character, if no candidate string is found in the preset database, the number of first strings is at least one.

[0149] Specifically, based on the second character and its position in each first string, if no candidate string is found in the preset database, it indicates that there is no candidate string in the preset database that matches the second character in the first string.

[0150] Therefore, it is necessary to use other methods to replace the first character in the first string in order to correct the first string.

[0151] In one possible implementation, the recognition system recognizes the speech information to be recognized and obtains multiple first strings. The first part of the first string can be used to find candidate strings in a preset database, while the second part of the first string cannot be used to find candidate strings in the preset database. The second part of the first string adopts the process of obtaining the target string in this embodiment.

[0152] In one possible implementation, the recognition system recognizes the speech information to be recognized and obtains multiple first strings. If no candidate string can be found in the preset database for any of the first strings, the process of obtaining the target string in this embodiment is used for all the first strings.

[0153] In one possible implementation, a Markov chain model can be used for correction. In this embodiment, the process of using a Markov chain model for correction is described.

[0154] A Markov chain is a stochastic process that assumes that, given the current state, the future state depends only on the current state and is independent of the past history. This property is known as the Markov property.

[0155] Markov chain models are a statistical method used to capture the transition patterns between elements in a sequence. For strings belonging to the same category, the order of characters is not random but follows a certain pattern. By training, Markov chain models can utilize this pattern to predict the possible characters that may appear after a given character in the string, predicting the probability of low-confidence characters, without blindly permuting all combinations, thus improving processing efficiency.

[0156] As an example, the order of characters in a device serial number follows a certain pattern. For instance, a particular character is often followed by another specific character, and this pattern can be learned and utilized using a Markov chain model.

[0157] 502. Based on the second character in each first string, query in the preset transition probability matrix to obtain at least one target character that any second character can be transferred to. The target character corresponds to the first character in each first string. The target character is the character sorted after the second character. The preset transition probability matrix contains several characters, the transfer characters of each character, and the transition probability of each character and the transfer characters.

[0158] In the electronic device that implements the speech recognition method provided in the embodiments of this application, a Markov chain model can be used. The transition probability matrix is ​​the core of the Markov chain, which records the transition probability between each character.

[0159] In this application, the Markov chain model calculates the transition frequency between different character pairs using historical data to obtain a preset transition probability matrix, which records the probability of each character transitioning to another character.

[0160] Table 2 below is a list of preset transition probability matrices provided in the embodiments of this application.

[0161] Table 2

[0162]

[0163] Table 2 above lists the possible characters that can be transferred after each character and the probability of the transfer.

[0164] For example, when the current character is "P", the possible characters that can be transferred are "F", "4", and "G".

[0165] This preset transition probability matrix is ​​obtained by statistically analyzing the strings and their sequential relationships in real data. It calculates the probability of character transitions by statistically analyzing the order of each character (letters, numbers, etc.) within the same type of string. This preset transition probability matrix can discard permutations that have never appeared before, reducing the computational workload of predicting characters that might appear after any given character.

[0166] When generating the preset transition probability matrix, the transition probability of each character in the string can be calculated using the following formula:

[0167] (1)

[0168] Where P(a,b) represents the probability of transitioning from state a (i.e., character a) to state b (i.e., character b); F(a,b) represents the actual number of times (frequency) a transition from state a to state b occurs; ∑cF(a,c) represents the total number of times a transitions from state a to all other states (including a itself). It is the sum of the transition frequencies of a to every possible state, representing the total number of times state a occurs. In the above formula, a, b, and c represent different characters.

[0169] In the above formula (1), the numerator F(a,b) represents the number of times the state transitions from state a to state b in the historical data. For example, in the process of identifying the device serial number, if character a is "P" and character b is "F", then F(P,F) represents the number of times "P" is followed by "F" in the historical data.

[0170] In the above formula (1), the denominator ∑cF(a,c) represents the total number of times that state a (character a) can transition to all possible states after it appears. For example, the character "P" may be followed by "F", "3", "Q", etc., so the denominator is the total number of times all characters after "P" appear.

[0171] The probability of a transition from "P" to "F" is obtained by dividing the number of times a specific transition (such as "P" → "F") is given by the total number of all possible transitions.

[0172] Based on the above process, the transition character and the probability of transition for each character in strings belonging to the same category are determined, resulting in the preset transition probability matrix shown in Table 2 above.

[0173] Specifically, based on the second character in the first string, a query is performed in the preset transition probability matrix to obtain the target character that each second string can be transferred to.

[0174] The target character that the second character can transfer to can be either the character with the highest transfer probability corresponding to the second character, or a character with a transfer probability greater than a set threshold corresponding to the second character.

[0175] In one possible implementation, the above process needs to be performed for each first string to obtain the target character that each second character in each first string can be transferred.

[0176] In one possible implementation, when a second character is followed by a first character, the target character that the second character can be transferred to is queried in a preset transition probability matrix.

[0177] In the case where multiple characters may appear after the second character is obtained in the preset transition probability matrix, one or more characters can be selected as the target characters that the second character can transition to, according to the transition probability.

[0178] The selection criteria can be either that the transition probability is greater than a set transition probability threshold, or that the number of transition probabilities that appear first when sorted from largest to smallest.

[0179] In one possible implementation, when a second character is followed by two or more consecutive first characters, the target character that the second character can be transferred to is queried in a preset transition probability matrix, and then the target character that the target character can be transferred to is queried in the preset transition probability matrix, and so on, to obtain the target character corresponding to each first character in the first string.

[0180] As an example, when the speech information to be recognized is the serial number (SN) of an electronic device, a Markov chain is trained on a large number of device SNs to calculate the transition frequencies between different character pairs, thus obtaining a preset transition probability matrix for the device SN.

[0181] As an example, the first four characters of the speech information to be recognized, "PF37", have been correctly identified by the recognition system. The low-confidence position is the fifth character. Since the first four characters are "PF37", the analysis of the most likely character after "PF37" in the preset transition probability matrix shows that "4" is more likely to appear after "PF37" than other characters. Therefore, "4" is recommended as the fifth character. It can be inferred that "8" is the most suitable character, and so on.

[0182] As an example, the first four characters "PF37" and the last two characters "50" of the speech information to be recognized by the recognition system have been correctly recognized. The low confidence position is the fifth character, and the first four characters are "PF37". Based on the preset transition probability matrix, the most likely character to appear after "PF37" is analyzed. After "PF37", it is possible that "4" and "5" are not other characters. "4" is recommended as the fifth character. It is speculated that "8" is the most suitable character. "5" is recommended as the fifth character. "7" is recommended as the most suitable character, and so on.

[0183] 503. Determine the second target string based on the second character in each first string and the corresponding target character.

[0184] Specifically, after determining the target character corresponding to the second character, the second character and the corresponding target character are combined to form a candidate string, and the second target string is determined from multiple candidate strings.

[0185] As an example, the first four characters "PF37" and the last two characters "50" of the speech information to be recognized by the recognition system have been correctly recognized. The low-confidence position is the fifth character, and the first four characters are "PF37". Based on the preset transition probability matrix, the most likely character after "PF37" is analyzed. After "PF37", it is possible that "4" and "5" are not other characters. "4" is recommended as the fifth character. It is speculated that "8" is the most suitable character. "5" is recommended as the fifth character. "7" is recommended as the most suitable character. The first four characters "PF37", the fifth character "4", the sixth character "8" and the last two characters "50" are combined to form the candidate string "PF374850" and the first four characters "PF37", the fifth character "5", the sixth character "7" and the last two characters "50" are combined to form the candidate string "PF375750", resulting in two candidate strings. The second target string is determined from the two candidate strings.

[0186] In this embodiment, based on the second character in each first string and its position, if no candidate string is found in the preset database, the number of first strings is at least one. Based on the second character in each first string, a preset transition probability matrix is ​​searched to obtain at least one target character that any second character can transition to. This target character corresponds to the first character in each first string and is the character ordered after the second character. The preset transition probability matrix contains several characters, the transition characters for each character, and the transition probabilities of each character and the corresponding transition characters. Based on the second character in each first string and the corresponding target character, the second target string is determined. The preset transition probability matrix is ​​obtained by processing a large number of strings of the same type using a Markov chain model. The preset transition probability matrix is ​​used to predict the possible target characters that may appear after the second character, and the second string is determined using the second character in the first string and the corresponding target character. Since the preset transition probability matrix can predict the probability of characters that appear after any character, it is not necessary to list all possible character combinations when using the preset transition probability matrix to predict the target character after the second character; instead, prediction and optimization are performed directly based on the probability matrix. This method not only reduces the number of invalid combinations that the system needs to process, effectively reducing computational complexity, but also dynamically optimizes the recognition process.

[0187] Figure 6 This is a flowchart illustrating the process of determining a second target string based on the second character in each first string and the corresponding target character, as provided in the embodiments of this application. It may include steps 601 to 604, which are described in detail below.

[0188] 601. Combine the target character with the corresponding second character in the first string to obtain at least two candidate strings;

[0189] In this process, after determining the possible target characters following the second character using a preset transition probability matrix, the target character and its corresponding second character are combined sequentially to obtain candidate strings. This process is repeated, combining the second character of each first string with subsequent possible target characters to obtain multiple candidate strings.

[0190] 602. Query the preset transition probability matrix to obtain the transition probability corresponding to each target character in any candidate string;

[0191] Specifically, the transition probability of each second character in the candidate string to the target character is determined by querying the preset transition probability matrix.

[0192] As an example, as shown in Table 2, the current character is "P" and the target character is "F", with a transition probability of 0.70; the current character is "F" and the target character is "3", with a transition probability of 0.68.

[0193] 603. Determine the weight of the arbitrary candidate string based on the transition probability corresponding to each target character in the arbitrary candidate string;

[0194] The weight of a candidate string is calculated based on the transition probability of each target character within the same candidate string.

[0195] In one possible implementation, the transition probabilities corresponding to each target character in the same candidate string can be summed, and the sum can be used as the weight of the candidate string.

[0196] As an example, in the candidate string "PF374850", the transition probability of the target character containing the fifth character "4" is 0.50 and the transition probability of the sixth character "8" is 0.49, and the weight of the candidate string is 0.99.

[0197] In one possible implementation, the transition probabilities corresponding to each target character in the same candidate string can be multiplied together, and the sum can be used as the weight of the candidate string.

[0198] As an example, in the candidate string "PF374850", the transition probability of the target character containing the fifth character "4" is 0.50 and the transition probability of the sixth character "8" is 0.49, and the weight of the candidate string is 0.245.

[0199] In one possible implementation, the average of the transition probabilities corresponding to each target character in the same candidate string can be accumulated and used as the weight of the candidate string.

[0200] As an example, in the candidate string "PF374850", the transition probability of the target character containing the fifth character "4" is 0.50 and the transition probability of the sixth character "8" is 0.49. The weight of the candidate string is 0.495.

[0201] 604. Select the second target string from among the candidate strings. The weight of the second target string is higher than the weight of the non-second target strings among the candidate strings.

[0202] Specifically, based on the weight of each candidate string, the string with the highest weight is selected as the second target string, which is the string output as the recognition result.

[0203] In one possible implementation, all possible strings are stored in a preset database, and it needs to be determined whether the preset database contains the second target string to be finally selected.

[0204] In this embodiment, each target character is first combined with the corresponding second character in the first string to obtain at least two candidate strings. Then, the transition probability of each target character in any candidate string is obtained by querying the preset transition probability matrix. Based on the transition probability of each target character in the candidate string, the weight of the candidate string is determined. A second target string is selected from among the candidate strings, and the weight of the second target string is higher than the weight of the non-second target strings in each candidate string. This realizes the use of the transition probability of the second character to the target character recorded in the preset transition probability matrix to determine the weight of each candidate string. The weight is then used to select one of the multiple candidate strings as the second target string, ensuring that the final selected target string has a high degree of matching with the speech information to be recognized. This optimizes the recognition result and improves the accuracy of speech information recognition.

[0205] Figure 7 This is a flowchart illustrating the selection of a second target string from among the candidate strings provided in this application embodiment, which may include steps 701 to 703, and these steps are described in detail below.

[0206] 701. Sort each candidate string according to its weight;

[0207] Before querying the preset database to see if there are any candidate strings, each candidate string is sorted in advance.

[0208] In one possible implementation, the candidate strings can be sorted in descending order of weight.

[0209] In one possible implementation, the candidate strings can be sorted in ascending order of weight.

[0210] 702. Based on the sorting of the candidate strings, query the preset database to see if the candidate string exists;

[0211] Each candidate string is sorted and its existence is checked against a predefined database.

[0212] As an example, given 10 candidate strings, query the preset database to see if each of the 10 candidate strings exists.

[0213] In one possible implementation, some candidate strings may exist in the preset database and some may not exist in the preset database; all candidate strings may exist in the preset database; and some candidate strings may not exist in the preset database.

[0214] 703. The target candidate string that exists in the preset database will be used as the second target string. The weight of the target candidate string is higher than the weight of the non-target candidate string.

[0215] To reduce the number of queries, each candidate string can be checked against the preset database in descending order of its existence.

[0216] The target candidate string is a candidate string found in a preset database, and its weight is less than that of the target candidate string.

[0217] Specifically, when any candidate string is found in the preset database, the query stops, and the candidate string obtained is used as the second target string.

[0218] Among them, candidate strings that are not found in the preset database will not be considered as the second target string.

[0219] In one possible implementation, the overall confidence of each candidate string can also be determined by accumulating the matching score of each character, which is affected by whether it exists in a preset database and the transition probability of the character.

[0220] The confidence level of the candidate string can be calculated using the following formula:

[0221] (2)

[0222] Where S represents the overall confidence level of the candidate string, and W... i This represents the weighted value of the comparison results from the preset database. A successful match (found in the preset database) has a value of 1, and a failed match (not found in the preset database) has a value of 0; P(x i) represents the transition probability of a character, i represents the i-th character in the candidate string, and n represents the number of characters in the candidate string.

[0223] Formula (2) above means that when a candidate string is found in a preset database, the confidence level of the candidate string is obtained by accumulating the transition probabilities of each target character within it.

[0224] In one possible implementation, if none of the candidate strings can be found in the preset database through the above recognition process, it is determined that the recognition of the voice information to be recognized has failed. A prompt message can be generated to prompt the user to input the voice again and continue to use the above recognition process.

[0225] In this embodiment, the candidate strings are sorted according to their weights; based on the sorting of the candidate strings, a query is performed in a preset database to determine if the candidate string exists; the target candidate string found in the preset database is used as the second target string, with the target candidate string having a higher weight than the non-target candidate strings. This achieves the goal of combining the preset database with the candidate strings determined by the preset transition probability matrix for filtering, thus determining the second target string from multiple dimensions and improving the accuracy of speech information recognition.

[0226] In one possible implementation, before obtaining the speech information to be recognized, the following is also included:

[0227] Obtain device information provided by the user terminal.

[0228] The voice information to be recognized can be audio information collected by the terminal when the user speaks.

[0229] In one application scenario, the user also uploads device information through the terminal, which may include the device's model, manufacturer, and other information.

[0230] The device information can be entered via voice input or manually through the interface provided by the terminal.

[0231] Figure 8 This is a schematic diagram of an application scenario provided by an embodiment of this application. The application scenario includes a terminal 801 and a server 802. Dashed lines in the diagram represent the data connection between the terminal and the server. The speech recognition method provided in this application is applied to this server. The user inputs voice information and device information through the terminal. The terminal sends the collected voice information and device information to the server. The server performs recognition processing on the voice information to obtain a target string, and then performs further processing based on this target string.

[0232] Figure 9This is a flowchart illustrating how the target string is output as a recognition result according to an embodiment of this application. It may include steps 901 to 902, which are described in detail below.

[0233] 901. Based on the matching of the target string with the device information, predict the service process corresponding to the voice information to be recognized;

[0234] Once the target string is determined, relevant information about the terminal device can be identified.

[0235] The relevant information can be obtained by querying the service database using the target string to find various service-related information of the device corresponding to the target string.

[0236] To improve information security, the device information is compared with the target string to determine whether they match. If they match, the service process corresponding to the voice information to be recognized is predicted.

[0237] Determining whether the device information matches the target string can include: querying the device information corresponding to the target string in the device-related database, determining whether the device information corresponding to the target string is consistent with the received device information, and if they are consistent, determining that they match; otherwise, they do not match.

[0238] As an example, if the target string is found to be a tablet computer in the device-related database, but the received device information is a mobile phone, then the target string and the received device information are inconsistent.

[0239] As an example, if the target string is found to correspond to a mobile phone in the device-related database, and the received device information is also a mobile phone, then the target string and the received device information are consistent.

[0240] When the target string matches the device information, it can be determined that the user who uses the terminal for voice input is a legitimate user. For the device corresponding to the target string, the service process that it may use is predicted.

[0241] As an example, the target string can be used to determine the corresponding device information. Using this device information, the service-related information of the device can be determined, such as whether the device is under warranty (also known as within the warranty period). If it is under warranty, the user is redirected to the corresponding service process; if it is not under warranty, another service process is provided.

[0242] 902. The identification result is output to the service terminal using this service process. The service terminal is used to provide services to each user terminal.

[0243] Specifically, the system utilizes a predicted service flow to control whether a service terminal enters or prepares to enter the corresponding service. Using this service flow, the target string is output as the recognition result to the service terminal.

[0244] The service terminal, also known as a seat, can encrypt the target string and the corresponding device information. After the corresponding seat connects, the target string and the corresponding device information are transmitted to the agent through an encrypted channel between the electronic device and the seat to ensure information security.

[0245] Moreover, the target string obtained by the identification is not fed back to the user terminal. Even if an unauthorized user inputs accurate device information, it can still ensure information security by matching the target string obtained by the voice information to be identified.

[0246] As an example, if a device is within its warranty period and its warranty is predicted to be renewed, the renewal process outputs the identification result to the service terminal. The service terminal then displays a renewal process option, and the device serial number (SN) part of the renewal process is filled with the target string from the identification result, so that the service terminal staff can quickly respond to the user's renewal request.

[0247] Furthermore, since the target string is directly output to the service process in this application, even if someone tries to correct it in the system using a fake SN code, they will not be able to obtain sensitive information. Even if the fake SN code is corrected, it will only be redirected in the hotline's voice process, and the user information will only be displayed to the agents of the terminal call system for further customer service, without any sensitive information being fed back to the user through the system.

[0248] In one possible implementation, to enhance system traceability, real-time monitoring and logging are added. All failed attempts are recorded and auditable. Logs enable the technical team to respond quickly and take appropriate measures in the event of a security incident.

[0249] In this embodiment, the method further includes obtaining device information provided by the user terminal; correspondingly, outputting the target string as the recognition result includes: predicting the service process corresponding to the voice information to be recognized based on matching the target string with the device information; and outputting the recognition result to the service terminal using the service process, which is used to provide services to each user terminal. By comparing the device information provided by the user terminal with the target string, it is determined whether the user making the voice input is legitimate. If legitimate, the service process corresponding to the voice information to be recognized is predicted, and the recognition result is directly output to the service terminal using the service process, so that the staff of the service terminal can quickly respond to the service requests of subsequent users and improve service efficiency.

[0250] In one possible implementation, obtaining the voice information to be recognized includes: obtaining the voice information to be recognized in real time based on a response to a call request.

[0251] The voice information to be recognized is input by the user during a voice call on the terminal. Correspondingly, the electronic device acting as a server responds to the call request and obtains the voice during the call in real time as the voice information to be recognized.

[0252] During a single call, a user can input multiple voice messages to be recognized into the device.

[0253] Accordingly, for each input voice information to be recognized, the voice recognition method described in the aforementioned embodiments is used to process it to obtain the target string.

[0254] Figure 10 This is another flowchart provided by an embodiment of the present application, which outputs the target string as the recognition result. It may include steps 1001 to 1003, and these steps are described in detail below.

[0255] 1001. Count the number of times the target string is obtained during this call;

[0256] In particular, this is to prevent unauthorized users from attempting to obtain the target string through multiple attempts.

[0257] In this embodiment, the number of times the target string is obtained by recognizing the voice information to be recognized during the same call is counted.

[0258] Specifically, the first count of obtaining the target string during this call is counted. This first count is the number of times the user attempts to input the string during this call.

[0259] The first number of times the target string is obtained in a single call includes not only the processing of the voice information to be recognized for a specific device, but also the total number of times the target string is obtained in the entire call.

[0260] Under normal circumstances, when a user operates the service of a device (such as a telephone) via telephone, there will be no process of operating multiple devices simultaneously. Moreover, when inputting a string via voice on a certain device, if an error occurs once, the user will be more careful to re-enter it. Generally, the correct string can be entered in a few attempts. Therefore, setting a first-count threshold is to prevent unauthorized users from conducting trial-and-error attacks and repeatedly trying to steal the service operation process of the device.

[0261] 1002. Based on the fact that the first count is less than the first count threshold, the target string is output as the recognition result;

[0262] 1003. Based on the premise that the first count is not less than the first count threshold, the target string shall not be output as the recognition result.

[0263] If the first count is less than the first count threshold, the user can be considered a legitimate user, and the target string will be output as the recognition result for subsequent services.

[0264] If the first count is not less than the first count threshold, the user can be considered an illegal user who steals service operations from the device by inputting multiple times. In this case, the target string is prohibited from being output as the recognition result.

[0265] The threshold for the first count can be a small value, such as 2 or 3, to prevent trial-and-error attacks.

[0266] In one possible implementation, the above recognition process can also determine that the recognition of the voice information to be recognized has failed if the target string cannot be found. The number of failures can be counted, and when the number of failures exceeds a set value, an alarm can be triggered and protective measures can be taken to prevent a large-scale attack.

[0267] The first threshold number is used to distinguish whether a user is using a fake serial number (SN) to obtain more user information through the identification method described in this application.

[0268] In this embodiment, the voice information to be recognized is obtained in real time based on the response to the call request; accordingly, the target string is output as the recognition result, including: counting the first number of times the target string is obtained in this call; if the first number is less than the first number threshold, the target string is output as the recognition result; otherwise, the target string is prohibited from being output as the recognition result, so as to prevent users from conducting trial-and-error attacks and improve information security.

[0269] Figure 11 This is a flowchart illustrating the speech recognition method provided in this application embodiment, which may include steps 1101 to 1103. These steps will be described in detail below.

[0270] 1101. Obtain relevant information about the user terminal;

[0271] The relevant information of the user terminal may include the device number, address, and phone number of the user terminal.

[0272] In one possible implementation, the user terminal's phone number can be obtained along with the voice information to be identified during a wireless phone call.

[0273] In one possible implementation, when obtaining the voice information to be identified through a network call, information such as the user terminal's IP address (Internet Protocol Address) can also be obtained.

[0274] 1102. Based on the relevant information of the user terminal, count the number of times the user terminal is involved in obtaining the target string during a call within a preset time period;

[0275] The preset duration can be a relatively long period, such as 1 month, 1 week, or 1 day, and can be set according to the actual situation.

[0276] In normal use cases, a user will not frequently input the device's serial number via voice on the terminal. If frequent input occurs, it can be determined that a trial-and-error attack is being carried out.

[0277] Based on the relevant information of the user terminal, the number of times the terminal obtains the target string through voice input during a call within the preset time period is counted.

[0278] In one possible implementation, if the recognition process described above fails to find the target string, it is determined that the recognition of the voice information to be recognized has failed. The number of failures is counted, and when the number of failures exceeds a set value, an alarm is triggered and protective measures are taken to prevent a large-scale attack.

[0279] 1103. Based on the fact that the second number is not less than the threshold of the second number, and according to the relevant information of the target terminal, the response to the voice information to be recognized provided by the target terminal is prohibited.

[0280] If the second number is not less than the threshold for the second number, it can be determined that a trial-and-error attack process has been carried out.

[0281] In one possible implementation, responding to the voice information to be recognized provided by the target terminal is prohibited to protect data security, reduce the data processing burden on the electronic device executing the voice recognition method provided in this application, and ensure the safe operation of the electronic device.

[0282] In one possible implementation, starting from the current moment, for a relatively long period of time, responding to the voice information to be recognized provided by the target terminal is prohibited to protect data security and also to ensure the operational security of the electronic device executing the voice recognition method provided in this application.

[0283] In one possible implementation, Figure 11 Each step in the process, and Figure 1 The steps in the process are executed in parallel.

[0284] In this embodiment, relevant information about the user terminal is obtained. Based on this information, the number of times the user terminal obtains the target string during a call within a preset time period is counted. If this second count is not less than a threshold, and based on the relevant information of the target terminal, responding to the voice information to be recognized provided by the target terminal is prohibited. By utilizing the relevant information of the user terminal to count the number of times the user terminal obtains the target string during a call within a preset time period, if this number is large and does not belong to normal usage, then responding to the voice information to be recognized provided by the user terminal is prohibited, thus ensuring the data security of the user terminal and the operational security of the electronic device in the event of a trial-and-error attack.

[0285] The above describes a speech recognition method provided by an embodiment of this application. The following describes an apparatus for performing the above speech recognition method.

[0286] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a speech recognition device provided in an embodiment of this application. Figure 12 As shown, the voice recognition device 1200 includes:

[0287] Interface 1201 is used to obtain the speech information to be recognized;

[0288] The processor 1202 is used to recognize the speech information to be recognized to obtain a first string; replace the characters in the first string whose confidence level meets the replacement condition to obtain a target string; and output the target string as the recognition result.

[0289] In one possible implementation, the processor includes:

[0290] The recognition module is used to recognize the speech information to be recognized and obtain the first string;

[0291] The replacement module is used to replace characters in the first string that meet the replacement criteria with a certain confidence level, thus obtaining the target string;

[0292] The output module is used to output the target string as the recognition result.

[0293] In the case where the voice recognition device has an audio acquisition device, this interface is used to connect the processor and the audio acquisition device, and send the audio information acquired by the audio acquisition device to the processor.

[0294] In the case where the voice recognition device is connected to a user terminal, the user terminal collects the voice information to be recognized. The user terminal connects to the voice recognition device through the interface, and the interface sends the obtained audio information to the processor.

[0295] In one possible implementation, the replacement module includes:

[0296] The first determining unit is used to determine, based on the confidence level of each character in the first string, that the first character in the first string satisfies the replacement condition, and the confidence level of the first character is lower than a set threshold.

[0297] The replacement unit is used to replace the first character in the first string with the second character in the first string to obtain a target string. The target string matches the speech information to be recognized to a greater degree than the first string matches the speech information to be recognized.

[0298] In one possible implementation, the replacement unit is specifically used for:

[0299] Based on the second character in each first string and the position of the second character, at least one candidate string is obtained by querying a preset database. The characters in the candidate string are consistent with the second character in the corresponding first string, and the number of first strings is at least one.

[0300] The matching degree between each candidate string and each first string is determined sequentially;

[0301] Based on the matching degree, one of the at least one candidate strings is selected as the first target string, and the matching degree between the first target string and each first string is higher than the matching degree between the non-first target strings and each first string in the candidate strings.

[0302] In one possible implementation, the replacement unit is specifically used for:

[0303] Based on the second character in each first string and the position of that second character, if no candidate string is found in the preset database, the number of first strings is at least one.

[0304] Based on the second character in each first string, a query is performed in the preset transition probability matrix to obtain at least one target character that any second character can be transitioned to. The target character corresponds to the first character in each first string. The target character is the character ordered after the second character. The preset transition probability matrix contains several characters, the transition characters of each character, and the transition probability of each character and the corresponding transition characters.

[0305] The second target string is determined based on the second character in each of the first strings and the corresponding target character.

[0306] In one possible implementation, the replacement unit determines the second target string based on the second character in each first string and the corresponding target character, specifically including:

[0307] Combine the target character with the corresponding second character in the first string to obtain at least two candidate strings;

[0308] By querying the preset transition probability matrix, the transition probability corresponding to each target character in any candidate string can be obtained;

[0309] The weight of the arbitrary candidate string is determined based on the transition probability corresponding to each target character in the arbitrary candidate string;

[0310] Select the second target string from among the candidate strings. The weight of the second target string is higher than the weight of the non-second target strings among the candidate strings.

[0311] In one possible implementation, the replacement unit selects the second target string from among the candidate strings, specifically including:

[0312] Sort the candidate strings according to their weights;

[0313] Based on the sorting of the candidate strings, query the preset database to see if the candidate string exists;

[0314] The target candidate string will be retrieved from the preset database and used as the second target string. The weight of the target candidate string is higher than that of the non-target candidate string.

[0315] One possible implementation also includes:

[0316] The acquisition module is used to obtain device information provided by the user terminal before obtaining the voice information to be recognized;

[0317] Accordingly, the output module includes:

[0318] The prediction unit is used to predict the service flow corresponding to the voice information to be recognized based on the matching of the target string with the device information.

[0319] The first output unit is used to output the identification result to the service terminal using the service process. The service terminal is used to provide services to each user terminal.

[0320] In one possible implementation, the interface is specifically used for:

[0321] Based on the response to the call request, obtain the voice information to be recognized in real time;

[0322] Accordingly, the output module includes:

[0323] The statistics unit is used to count the number of times the target string is obtained during this call;

[0324] The second output unit is used to output the target string as the recognition result based on the fact that the first number is less than the first number threshold.

[0325] The prohibition unit is used to prohibit the target string from being output as a recognition result based on the first count not being less than the first count threshold.

[0326] One possible implementation also includes:

[0327] Obtain relevant information about the user terminal;

[0328] Based on the relevant information of the user terminal, count the number of times the user terminal is involved in obtaining the target string during a call within a preset time period;

[0329] Based on the fact that the second number is not less than the second number threshold, and according to the relevant information of the target terminal, the response to the voice information to be recognized provided by the target terminal is prohibited.

[0330] It should be noted that the functional explanations of each component structure in the speech recognition device provided in this application embodiment are as described in the foregoing method embodiment, and will not be repeated here.

[0331] In this embodiment, after the interface obtains the speech information to be recognized, the processor recognizes the speech information to obtain a first string; replaces characters in the first string whose confidence level meets the replacement condition to obtain a target string; and outputs the target string as the recognition result. In this process, by replacing characters in the first string whose confidence level meets the replacement condition, the recognition result is optimized, resulting in a more accurate target string and improving the accuracy of speech information recognition.

[0332] This application also provides an electronic device in its embodiments. (See reference...) Figure 13 The diagram illustrates a structural schematic of an electronic device suitable for implementing the speech recognition method in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 13 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0333] like Figure 13As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage device 1308 into a random access memory (RAM) 1303. When the electronic device is powered on, the RAM 1303 also stores various programs and data required for the operation of the electronic device. The processing unit 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0334] Typically, the following devices can be connected to I / O interface 1305: input devices 1306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1308 including, for example, memory cards, hard drives, etc.; and communication devices 1309. Communication device 1309 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 13 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0335] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the speech recognition methods provided in this application.

[0336] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the speech recognition methods provided in this application.

[0337] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0338] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, 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 readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0339] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0340] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A speech recognition method, comprising: Obtain the speech information to be recognized; The first string is obtained by recognizing the speech information to be recognized; Based on the confidence level of each character in the first string, it is determined that the first character in the first string satisfies the replacement condition, and the confidence level of the first character is lower than a set threshold. The first character is replaced by the second character in the first string to obtain the target string. The degree of matching between the target string and the speech information to be recognized is greater than the degree of matching between the first string and the speech information to be recognized. The target string is output as the recognition result. The step of replacing the first character with the second character in the first string to obtain the target string includes: Based on the second character in each first string and the position of the second character, at least one candidate string is obtained by querying a preset database. The characters in the candidate string are consistent with the second character in the corresponding first string, and the number of first strings is at least one. The matching degree between each candidate string and each first string is determined sequentially; Based on the matching degree, one of the at least one candidate strings is selected as the first target string, and the matching degree between the first target string and each first string is higher than the matching degree between the candidate strings and each first string.

2. The speech recognition method according to claim 1, wherein replacing the first character with the second character in the first string to obtain the target string comprises: Based on the second character in each first string and the position of the second character, if no candidate string is found in the preset database, the number of first strings is at least one. Based on the second character in each first string, a query is performed in a preset transition probability matrix to obtain at least one target character that any second character can be transitioned to. The target character corresponds to the first character in each first string. The target character is a character ordered after the second character. The preset transition probability matrix contains several characters, the transition characters of each character, and the transition probability of each character and the corresponding transition characters. The second target string is determined based on the second character in each of the first strings and the corresponding target character.

3. The speech recognition method according to claim 2, wherein determining the second target string based on the second character in each first string and the corresponding target character includes: The target character is combined with the corresponding second character in the first string to obtain at least two candidate strings; By querying the preset transition probability matrix, the transition probability corresponding to each target character in any candidate string can be obtained; The weight of the arbitrary candidate string is determined based on the transition probability corresponding to each target character in the arbitrary candidate string; Select the second target string from among the candidate strings. The weight of the second target string is higher than the weight of the non-second target strings among the candidate strings.

4. The speech recognition method according to claim 3, wherein selecting the second target string from among the candidate strings includes: Sort the candidate strings according to their weights; Based on the sorting of the candidate strings, query the preset database to see if the candidate strings exist; The target candidate string will be retrieved from the preset database and used as the second target string. The weight of the target candidate string is higher than that of the non-target candidate string.

5. The speech recognition method according to any one of claims 1-4, further comprising, before obtaining the speech information to be recognized: Obtain device information provided by the user terminal; Accordingly, outputting the target string as the recognition result includes: Based on the matching of the target string with the device information, predict the service process corresponding to the voice information to be identified; The identification result is output to the service terminal using the service process, and the service terminal is used to provide services to each user terminal.

6. The speech recognition method according to any one of claims 1-4, wherein obtaining the speech information to be recognized includes: Based on the response to the call request, obtain the voice information to be recognized in real time; Accordingly, outputting the target string as the recognition result includes: Count the number of times the target string is obtained during this call; Based on the fact that the first number of times is less than the threshold of the first number of times, the target string is output as the recognition result; Based on the fact that the first number of times is not less than the threshold of the first number, the target string is prohibited from being output as the recognition result.

7. The speech recognition method according to claim 6 further includes: Obtain relevant information about the user terminal; Based on the relevant information of the user terminal, count the number of times the user terminal is involved in obtaining the target string during a call within a preset time period; Based on the fact that the second count is not less than the second count threshold, and according to the relevant information of the user terminal, the response to the voice information to be recognized provided by the user terminal is prohibited.

8. A voice recognition device, comprising: An interface for obtaining the speech information to be recognized; The processor is configured to recognize the speech information to be recognized and obtain a first string; Based on the confidence level of each character in the first string, it is determined that the first character in the first string satisfies the replacement condition, and the confidence level of the first character is lower than a set threshold. The first character is replaced by the second character in the first string to obtain the target string. The degree of matching between the target string and the speech information to be recognized is greater than the degree of matching between the first string and the speech information to be recognized. The target string is output as the recognition result. The step of replacing the first character with the second character in the first string to obtain the target string includes: Based on the second character in each first string and the position of the second character, at least one candidate string is obtained by querying a preset database. The characters in the candidate string are consistent with the second character in the corresponding first string, and the number of first strings is at least one. The matching degree between each candidate string and each first string is determined sequentially; Based on the matching degree, one of the at least one candidate strings is selected as the first target string, and the matching degree between the first target string and each first string is higher than the matching degree between the candidate strings and each first string.

Citation Information

Patent Citations

  • Server supporting device to perform speech recognition and method of operating server

    CN114223029A