Method, device, system, equipment and medium for generating language recognition model

By generating a multi-layer model structure and using user voice data to update the language recognition model, the problem of low iteration and update efficiency is solved, and the recognition accuracy and generalization ability of the speech recognition system are improved.

CN115547333BActive Publication Date: 2025-08-26BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211216345.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-08-26
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In the existing speech recognition system, the iteration and update efficiency of the language recognition model is low, resulting in insufficient accuracy of speech recognition.

Method used

By generating a multi-layer model structure, including the first basic model, the target vertical category model and the error correction model, the model is updated using user voice data. Only the basic model and the target vertical category model need to be updated can be achieved quickly iterated and updated, and the recognition accuracy is improved.

Benefits of technology

It realizes rapid iteration and update of the language recognition model, improves the user speech recognition accuracy of the speech recognition system, covers more scenarios and quickly locates abnormal problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115547333B_ABST
    Figure CN115547333B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, system, equipment and medium for generating a language recognition model. The method includes: generating a first basic model based on a first text corpus; determining the vertical domain category to which each annotated text in the first text corpus belongs, and counting the number of texts corresponding to each vertical domain category; determining a preset number of vertical domain categories with the largest number of texts as target vertical domain categories; for each target vertical domain category, generating a target vertical domain category model corresponding to the target vertical domain category based on the annotated text corresponding to the target vertical domain category; generating a language recognition model based on the first basic model and each target vertical domain category model. In this way, the purpose of rapid iteration and updating can be achieved, the efficiency of iteration and updating of the language recognition model can be improved, and the accuracy of the speech recognition system in recognizing user speech can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of speech recognition technology, and in particular to a method, device, system, equipment, and medium for generating a language recognition model. Background Art

[0002] Speech recognition technology converts human speech into computer-readable input. It has widespread applications in voice dialing, voice navigation, automatic device control, and other fields. Currently, speech is often converted into text using speech recognition systems. For example, speech recognition systems often use language recognition models and acoustic models. The language recognition model calculates the probability of a sentence, specifically the probability of whether a sentence conforms to human language. With the development of statistical models, the language recognition model used in speech recognition systems is often the N-gram language recognition model. Summary of the Invention

[0003] To overcome the problems existing in the related art, the present disclosure provides a method, device, system, equipment and medium for generating a language recognition model.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for generating a language recognition model is provided, comprising:

[0005] Generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech;

[0006] Determining the vertical domain category to which each annotated text in the first text corpus belongs, and counting the number of texts corresponding to each vertical domain category;

[0007] Determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories;

[0008] For each target vertical domain category, generating a target vertical domain category model corresponding to the target vertical domain category according to the annotation text corresponding to the target vertical domain category;

[0009] A language recognition model is generated based on the first basic model and each of the target vertical domain category models.

[0010] Optionally, generating a first basic model according to the first text corpus includes:

[0011] generating an online data model based on the first text corpus; and

[0012] Determining, in the first text corpus, annotated text corresponding to the incorrectly recognized user speech, and generating a first error correction model based on the annotated text corresponding to the incorrectly recognized user speech;

[0013] A first basic model is generated according to the online data model and the first error correction model.

[0014] Optionally, generating a first basic model according to the first text corpus further includes:

[0015] Determining a sentence pattern of each annotated text in the first text corpus, and determining a sentence pattern whose occurrence number is greater than a preset threshold as a target sentence pattern;

[0016] Acquire a second text corpus constructed by the user according to the target sentence pattern, and generate a new data model based on the second text corpus;

[0017] Generating a first basic model according to the online data model and the first error correction model includes:

[0018] The online data model, the first error correction model and the newly added data model are interpolated and merged to generate a first basic model.

[0019] Optionally, the method further includes:

[0020] Generate a multi-vertical domain category model based on the annotated text corresponding to other vertical domain categories except the target vertical domain category;

[0021] Generating the language recognition model according to the first basic model and each target vertical domain category model includes:

[0022] Generate a second basic model based on the first basic model and the multi-vertical domain category model;

[0023] A language recognition model is generated based on the second basic model and each of the target vertical domain category models.

[0024] Optionally, the method further includes:

[0025] Obtaining hot resource texts within a preset time period, and generating a resource model based on the hot resource texts; and

[0026] Obtaining annotated text corresponding to user speech that was incorrectly recognized within a current period, and generating a second error correction model based on the annotated text corresponding to the user speech that was incorrectly recognized within the current period;

[0027] Interpolating and merging the resource model and the second error correction model to generate a dynamic model;

[0028] Generating a language recognition model according to the first basic model and each of the target vertical domain category models includes:

[0029] A language recognition model is generated based on the first basic model, each of the target vertical domain category models and the dynamic model.

[0030] Optionally, the update frequency of the dynamic model is greater than the update frequency of the second basic model.

[0031] Optionally, the method further includes:

[0032] Obtaining a user's input demand text corpus related to the demand business, and generating a business demand model based on the demand text corpus;

[0033] Generating a language recognition model according to the first basic model and each of the target vertical domain category models includes:

[0034] A language recognition model is generated based on the first basic model, each of the target vertical domain category models and the business demand model.

[0035] According to a second aspect of an embodiment of the present disclosure, there is provided a device for generating a language recognition model, comprising:

[0036] A first generating module is configured to generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech;

[0037] a first determining module configured to determine the vertical domain category to which each annotated text in the first text corpus belongs, and to count the number of texts corresponding to each vertical domain category;

[0038] A second determining module is configured to determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories;

[0039] The second generating module is configured to generate, for each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category according to the annotated text corresponding to the target vertical domain category;

[0040] The third generation module is configured to generate a language recognition model based on the first basic model and each of the target vertical domain category models.

[0041] According to a third aspect of an embodiment of the present disclosure, a speech recognition system is provided, which includes a feature extraction model, an acoustic model, a language recognition model, a speech decoding and a search model, wherein the language recognition model is generated according to the method described in the first aspect of the present disclosure.

[0042] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0043] processor;

[0044] a memory for storing processor-executable instructions;

[0045] Wherein, the processor is configured to:

[0046] Generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech;

[0047] Determining the vertical domain category to which each annotated text in the first text corpus belongs, and counting the number of texts corresponding to each vertical domain category;

[0048] Determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories;

[0049] For each target vertical domain category, generating a target vertical domain category model corresponding to the target vertical domain category according to the annotation text corresponding to the target vertical domain category;

[0050] A language recognition model is generated based on the first basic model and each of the target vertical domain category models.

[0051] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method described in the first aspect of the present disclosure are implemented.

[0052] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:

[0053] First, a first basic model is generated using the first text corpus. Then, the vertical domain category to which each annotated text in the first text corpus belongs is determined, and the number of texts corresponding to each vertical domain category is counted. The preset number of vertical domain categories with the largest number of texts is determined as the target vertical domain category. For each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category is generated based on the annotated text corresponding to the target vertical domain category. Finally, a language recognition model is generated based on the first basic model and the target vertical domain category model. In this way, a multi-layer model is superimposed to generate a language recognition model. When the language recognition model is subsequently updated, only the first basic model and the target vertical domain category model need to be updated to achieve the update of the language recognition model. In this way, the purpose of rapid iteration and updating can be achieved, the efficiency of iteration and updating of the language recognition model can be improved, and the accuracy of the speech recognition system in recognizing user speech can be improved.

[0054] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0056] Figure 1 The figure is a schematic diagram of a speech recognition system according to an exemplary embodiment.

[0057] Figure 2 The figure is a flowchart of a method for generating a language recognition model according to an exemplary embodiment.

[0058] Figure 3 is a schematic diagram of a language recognition model according to an exemplary embodiment.

[0059] Figure 4 The present invention is a block diagram of a device for generating a language recognition model according to an exemplary embodiment.

[0060] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0062] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0063] In speech recognition systems, language recognition models can expand the model's generalization capabilities in a shorter timeframe than acoustic models. Therefore, to improve the accuracy of speech recognition systems for user speech, it's necessary to increase the efficiency of language recognition model iteration or updates.

[0064] In view of this, the present disclosure provides a method, device, system, equipment and medium for generating a language recognition model to improve the efficiency of iteration or updating of the language recognition model, thereby improving the recognition accuracy of the speech recognition system.

[0065] First, the speech recognition system will be described.

[0066] Generally, a speech recognition system can include four parts: feature extraction model, acoustic model, language recognition model, speech decoding and search model. Figure 1 FIG. 1 is a schematic diagram of a speech recognition system according to an exemplary embodiment. Figure 1 As shown, the user's voice is first input into the feature extraction model for characterization, converting the user's voice signal from the time domain to the frequency domain to provide a suitable feature vector for the acoustic model. This feature vector is then input into the acoustic model, which calculates the acoustic feature score for each feature vector based on the acoustic characteristics. The speech recognition model, based on linguistic theories, calculates the probability that the sound signal corresponds to a possible phrase sequence. Finally, based on the existing dictionary, the acoustic feature score for each feature vector calculated by the acoustic model, and the probability of the possible phrase sequence calculated by the speech recognition model, speech decoding and search algorithms are used to obtain the final possible text.

[0067] like Figure 1 As shown in Figure 1, the acoustic model training process is as follows: First, feature extraction is performed on speech samples in the speech database. The feature extraction results are used to train the acoustic model, resulting in a trained acoustic model. Similarly, the speech recognition model training process is as follows: the speech recognition model is trained using text samples in the text database, resulting in a trained speech recognition model.

[0068] In addition, in order to enable the feature extraction model to extract effective features, the collected sound signal can be pre-processed by filtering, framing and other audio data, and the audio signal to be analyzed can be extracted from the original audio signal. After that, the feature extraction model can be used to extract features of the audio signal to be analyzed.

[0069] Figure 2 is a flow chart of a method for generating a language recognition model according to an exemplary embodiment. The language recognition model is applied to Figure 1 In the speech recognition system shown in FIG. Figure 2 As shown, the method may include the following steps.

[0070] In step S21, a first basic model is generated based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to user speech.

[0071] It should be understood that if a language recognition model already exists but a new one needs to be generated, the first text corpus can be the annotated text corresponding to the user speech corresponding to the speech recognition system where the existing language recognition model resides. For example, it can be the annotated text corresponding to the user speech historically input to the speech recognition system. This disclosure does not specifically limit this.

[0072] In the present disclosure, the first basic model can be an N-gram model. The first text corpus can be the annotated text of user speech during a conversation between a user and a speech recognition system within a preset time period, or can be the annotated text of user speech and the number of times each user speech occurs within the preset time period, etc. Therefore, the first basic model generated using the first text corpus can fit the user's actual request, thereby ensuring that the speech recognition model can recognize most user speech.

[0073] In step S22, the vertical domain category to which each annotated text in the first text corpus belongs is determined, and the number of texts corresponding to each vertical domain category is counted.

[0074] In actual applications, the speech recognition system is applied in different scenarios, and the corresponding online user voices belong to different categories. For example, if the speech recognition system is applied to the airline ticket booking scenario, the categories to which the online user voices belong are usually flight schedule inquiry categories, flight price inquiry categories, ticket change categories, etc. If the speech recognition system is applied to leisure and entertainment scenarios, for example, an intelligent speaker with a speech recognition system, the categories to which the online user voices belong are usually music categories, film and television categories, audio radio categories, poetry categories, encyclopedia categories, chat categories, etc. Therefore, in the present disclosure, different models can also be generated for texts in different vertical categories to achieve the purpose of quickly locating and identifying abnormal problems.

[0075] In step S23, a preset number of vertical domain categories with the largest number of texts are determined as target vertical domain categories.

[0076] In step S24 , for each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category is generated according to the annotation text corresponding to the target vertical domain category.

[0077] Taking into account that the online user voices corresponding to the speech recognition system usually belong to many categories, if a model is generated for each category, the workload of generating the language recognition model will increase. In addition, the probability of recognition errors in the speech recognition system is higher for texts in categories with higher usage frequencies. Therefore, in this disclosure, models are only generated separately for the commonly used vertical domain categories corresponding to the speech recognition system.

[0078] For example, data analysis of the first text corpus can determine the vertical domain category to which each annotated text belongs, and determine the number of texts corresponding to each vertical domain category. Afterwards, the vertical domain categories are sorted according to the number of texts to obtain a sorted list, and the first N vertical domain categories in the sorted list are determined as target vertical domain categories. For each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category is generated based on the annotated text corresponding to the target vertical domain category.

[0079] For example, data analysis is performed on the first text corpus to determine that the three vertical domain categories with the largest number of texts are music, film, and audio radio. That is, the music, film, and audio radio categories are all target vertical domain categories. The annotated text belonging to the music category is used as training samples for the music category model to generate a music category model. The annotated text belonging to the film and television category is used as training samples for the film and television category model to generate a film and television category model. Furthermore, the annotated text belonging to the audio radio category is used as training samples for the audio radio category model to generate an audio radio category model.

[0080] In step S25, a language recognition model is generated based on the first basic model and each target vertical domain category model.

[0081] For example, the first basic model and each target vertical domain category model are interpolated and merged to generate a language recognition model.

[0082] It should be understood that the speech recognition system receives more than 100 million user requests every day. In order to ensure the recognition accuracy of the speech recognition system, the speech recognition system needs to be updated frequently, that is, the language recognition model needs to be updated. In the present disclosure, when the language recognition model needs to be updated, first, the user voices input by users in the speech recognition system over a period of time and the number of each user voice are counted, and then the annotated text corresponding to each user voice is obtained, and the annotated text corresponding to the user voice and the number of user voices are determined as the first text corpus for updating the first basic model and the target vertical domain category model, and the first text corpus is used to update the first basic model and the target vertical domain category model to obtain a new first basic model and target vertical domain category model.

[0083] The above technical solution is adopted, and a first basic model is generated using a first text corpus. Then, the vertical domain category to which each annotated text in the first text corpus belongs is determined, and the number of texts corresponding to each vertical domain category is counted. The preset number of vertical domain categories with the largest number of texts is determined as the target vertical domain category. For each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category is generated based on the annotated text corresponding to the target vertical domain category. Finally, a language recognition model is generated based on the first basic model and the target vertical domain category model. In this way, a language recognition model is generated by superimposing multiple models. When the language recognition model is subsequently updated, only the first basic model and the target vertical domain category model need to be updated to achieve the update of the language recognition model. In this way, the purpose of rapid iteration and updating can be achieved, the efficiency of iteration and updating of the language recognition model can be improved, and the accuracy of the speech recognition system in recognizing user speech can be improved.

[0084] In addition, for other vertical domain categories corresponding to non-target vertical domain categories, since they are not commonly used categories, they are used less frequently, that is, the probability of recognition errors is low. Therefore, a model can be generated for the annotated texts of other vertical domain categories, that is, a multi-vertical domain category model, to simplify the structure of the language recognition model. In one embodiment, the method may also include: generating a multi-vertical domain category model based on the annotated texts corresponding to other vertical domain categories other than the target vertical domain category. Accordingly, the above step S25 generates a language recognition model based on the first basic model and the target vertical domain category model, including: generating a second basic model based on the first basic model and the multi-vertical domain category model; generating a language recognition model based on the second basic model and the target vertical domain category model.

[0085] For example, the annotated text corresponding to vertical domain categories other than the target vertical domain category is used as training samples for a multi-domain category model to obtain a multi-domain category model for the language recognition model. For example, the annotated text corresponding to the vertical domain categories of poetry, encyclopedia, and small talk is used as training samples to obtain a multi-domain category model. The multi-domain category model can be an N-gram model.

[0086] After obtaining the multi-domain classification model, a second base model is generated based on the first base model and the multi-domain classification model. For example, the first base model and the multi-domain classification model are interpolated and merged to obtain the second base model of the speech recognition model. The multi-domain classification model can increase the generalization capability of the model. Therefore, the second base model determined based on the first base model and the multi-domain classification model can ensure that the speech recognition model has good generalization capability based on recognizing most user voices.

[0087] It should be understood that the number of texts corresponding to other vertical domain categories is small and the texts are more complex. By using this to generate the second basic model, the multi-vertical domain category model trained with partial text can supplement the target vertical domain category model and improve the generalization ability of the language recognition model.

[0088] By adopting the above technical solution, separate modeling is performed for the texts of the target vertical domain categories with higher usage frequency, and multi-vertical domain category models are generated for the texts of other vertical domain categories with lower usage frequency. In this way, on the one hand, the language recognition model can cover the entire domain text and improve the recognition accuracy of the language recognition model. On the other hand, it can also achieve the purpose of quickly locating and identifying abnormal problems.

[0089] In one embodiment, Figure 2 Step S21 in which the first basic model is generated according to the first text corpus may include the following steps.

[0090] (1) Generate an online data model based on the first text corpus.

[0091] Since the first text corpus is the annotated text of the user's voice conversation with the voice recognition system within a preset time period, the online data model generated using the first text corpus can fully conform to the normal distribution of user requests and can cover most user requests.

[0092] (2) Determine the annotated text corresponding to the incorrectly recognized user speech in the first text corpus, and generate a first error correction model based on the annotated text corresponding to the incorrectly recognized user speech.

[0093] In actual applications, incorrectly recognized user sentences often appear in the speech recognition system. In order to improve the recognition accuracy of the speech recognition system, in this embodiment, the language recognition model may further include a first error correction model for correcting historical incorrectly recognized user sentences.

[0094] For example, based on the annotated text corresponding to the speech that the speech recognition system reported as incorrectly recognized by the user, the annotated text corresponding to the user speech that was incorrectly recognized is determined in the first text corpus. For example, the user speech is "rainforest type", and the speech recognition system replies with content related to "fish scales". In this way, the user can report that the user speech that the speech recognition system recognized incorrectly is "rainforest type". For another example, when the speech recognition system does not accurately recognize the user speech, the user will again output another speech related to the user speech. Therefore, the speech recognition system can determine whether the user speech is accurately recognized based on the next speech input. For example, the user speech is "rainforest type", and the speech recognition system replies with content about "fish scales". Usually, the user will again input the user speech "climate rainforest type". In this way, when the speech recognition system receives another user speech "climate rainforest type" related to the user speech "rainforest type", it determines that the speech recognition system failed to accurately recognize the user speech "rainforest type", and then determines the user speech "rainforest type" as an incorrectly recognized user speech.

[0095] (3) Generate a first basic model based on the online data model and the first error correction model.

[0096] For example, the online data model and the first error correction model are interpolated and merged to obtain a first basic model of the language recognition model.

[0097] In this way, the first basic model of the language recognition model is obtained by using the online data model and the first error correction model. On the one hand, the generated language recognition model includes models at more levels, and the efficiency of iteration and update of the language recognition model is improved by using the characteristic that the upper-level model in the multi-layer model can be quickly iterated and updated. On the other hand, the first error correction model is used to correct the user data with recognition errors accumulated over a certain period of time, thereby further improving the recognition accuracy of the language recognition model.

[0098] In addition, considering that the number of user voices in the conversation between the user and the speech recognition system is small, the scenarios to which the user sentences belong are relatively single. If only the annotated text of the user voices in the conversation between the user and the speech recognition system is used to generate a language recognition model, the generated language recognition model will have a high recognition accuracy only in certain scenarios and a low recognition accuracy in other scenarios. Therefore, in another embodiment, Figure 2 Step S21 in which the first basic model is generated based on the first text corpus may also include: determining the sentence pattern of each annotated text in the first text corpus, and determining the sentence pattern whose occurrence number is greater than a preset threshold as the target sentence pattern; obtaining the second text corpus constructed by the user according to the target sentence pattern, and generating a new data model based on the second text corpus.

[0099] To enrich the text corpus to complement the user's speech scenario, sentence structures with high online usage frequency can be used for sentence construction. For example, a preset threshold is set, and sentence structures for each annotated text in the first text corpus are determined. Sentence structures with a frequency of occurrence greater than the preset threshold are identified as target sentence structures, i.e., sentences with high online usage frequency. This target sentence structure is then output, allowing the user to construct a second text corpus based on it, and then use this second text corpus to train a new data model.

[0100] Accordingly, generating the first basic model according to the online data model and the first error correction model may include: interpolating and merging the online data model, the first error correction model, and the newly added data model to generate the first basic model.

[0101] By adopting the above technical solution, the first basic model of the language recognition model is obtained by interpolating and merging the online data model, the first error correction model and the newly added data model, so that the first basic model can cover a larger range of scenarios, improve the generalization ability of the first basic model, and thus improve the generalization ability of the language recognition model.

[0102] In addition, considering that in actual applications, sudden high-hot resource texts often appear, where the high-hot resource texts can be film and television resource texts, music resource texts or news resource texts that have been popular in recent times, in order to ensure that the voice recognition system can recognize the user's requests for these high-hot resources, in one embodiment, the method can also include: obtaining hot resource texts within a preset time period, and generating a resource model based on the hot resource texts.

[0103] In the present disclosure, the hot resource text within a preset time period may include the text corresponding to the online user voice that the user has requested in the voice recognition system, and / or the text corresponding to the offline user voice that the user has submitted but has not yet requested in the voice recognition system. The present disclosure does not make specific limitations on this. It should be understood that the corresponding hot resources of the voice recognition system are different when applied to different businesses. For example, for the voice recognition system in the smart speaker, the corresponding hot resource text is usually the film and television resource text, music resource text or news resource text that has been popular in the recent period.

[0104] In addition, it should be understood that the language recognition model, as the core model in the speech recognition system, can be iterated quickly to improve the generalization ability of the model in the shortest time. However, the stability of the iteration is also a factor that needs to be considered when generating the language recognition model. Therefore, a stable model structure is required when generating the language recognition model to ensure the stability of the language recognition model iteration. The second basic model has a larger weight in this language recognition model. In order to ensure the stability of the language recognition model, the update cycle of the second basic model is usually longer and the update frequency is lower. Therefore, the update cycle of the first error correction model is longer.

[0105] However, in order to ensure the recognition accuracy of the speech recognition system, it is usually necessary to frequently update the speech recognition errors to correct the recognition errors of the speech recognition system. Therefore, in one embodiment, the method may also include: obtaining the annotated text corresponding to the user speech that was recognized incorrectly in the current period, and generating a second error correction model based on the annotated text corresponding to the user speech that was recognized incorrectly in the current period. For example, if the update cycle of the second error correction model is one day, the text corpus corresponding to the speech that was recognized incorrectly on that day is obtained. For example, when the second error correction model is generated on the T+1 day, the annotated text corresponding to the user speech that was recognized incorrectly on the T day is obtained.

[0106] Because the resource model and the second error correction model require frequent updates, a dynamic model of the language recognition model can be derived from the resource model and the second error correction model. This dynamic model refers to a model that requires frequent updates. For example, the resource model and the second error correction model are interpolated and merged to generate the dynamic model. The dynamic model is updated more frequently than the second basic model. This ensures the stability of the language recognition model.

[0107] Accordingly, Figure 2 The specific implementation method of step S25 for generating a language recognition model based on the first basic model and the target vertical domain category model is as follows: generating a language recognition model based on the first basic model, each target vertical domain category model and the dynamic model.

[0108] By adopting the above technical solution, a resource model is generated using hot resource texts, and a second error correction model is generated using the annotated text corresponding to the speech recognized incorrectly in the current time period, and a dynamic model is obtained based on the resource model and the second error correction model. In this way, the language recognition model can recognize hot resource texts, further improving the generalization ability of the language recognition model, and can also quickly fix speech recognition errors, further improving the recognition accuracy of the speech recognition system.

[0109] Furthermore, as technology advances, the services of speech recognition systems are also expanding. To enable the speech recognition system to meet new business needs, in one embodiment, the language recognition model may also include a business requirements model, which is used to cover the demand text. For example, the method may also include: obtaining a demand text corpus related to the demanded business input by the user, and generating a business requirements model based on the demand text corpus. For example, assuming that the new business is to control the operation of the air conditioner using the speech recognition system, the demand text corpus is the relevant text corpus used to control the operation of the air conditioner.

[0110] Accordingly, Figure 2 The specific implementation method of step S25 for generating a language recognition model based on the first basic model and the target vertical domain category model is as follows: generating a language recognition model based on the first basic model, each target vertical domain category model and the business demand model.

[0111] By adopting the above technical solution, when it is necessary to add services to the speech recognition system, the business demand model can be used to enable the language recognition model to quickly learn the text corresponding to the newly added services, so that the speech recognition system can recognize the requests corresponding to the services and meet user needs.

[0112] For example, Figure 3 FIG. 1 is a schematic diagram of a language recognition model according to an exemplary embodiment. Figure 3 As shown, first, the online data model, the first error correction model and the newly added data model are interpolated and merged to obtain the first basic model, and the resource model and the second error correction model are interpolated and merged to obtain the dynamic model. Then, the first basic model and the multi-vertical domain category model are interpolated and merged to obtain the second basic model. Finally, the second basic model, each target vertical domain category model, the dynamic model and the business demand model are interpolated and merged to obtain the language recognition model. Among them, in Figure 3 In this paper, the target vertical domain model is taken as the music category model, the film category model and the audio radio category model as an example. Figure 3 As shown, the second basic model, the music category model, the film and television category model, the audio radio category model, the dynamic model and the business demand model are interpolated and merged to obtain the language recognition model.

[0113] Considering that errors in the acoustic model, feature extraction model, etc. in the speech recognition system can also lead to speech recognition errors in the speech recognition system, before iterating and updating the language recognition model, it is also possible to determine whether the speech recognition error in the speech recognition system is caused by a recognition error in the language recognition model. If so, it is determined that it is necessary to iterate and update the language recognition model; otherwise, it is determined that it is not necessary to iterate and update the language recognition model.

[0114] For example, a specific implementation method for determining whether it is necessary to iterate and update the language recognition model is as follows: first, upon receiving the erroneous text (the erroneous text is the text recognized by the speech recognition system) corresponding to the speech with recognition error reported by the user and the annotated text corresponding to the speech, the perplexity of the erroneous text and the perplexity of the correct text are determined respectively; then, if the perplexity of the correct text is less than the perplexity of the erroneous text, it is determined that the speech recognition system has made a recognition error due to an inaccurate acoustic model, and there is no need to iterate and update the language recognition model; and if the perplexity of the correct text is greater than the perplexity of the erroneous text, it is determined that it is necessary to iterate and update the language recognition model. Afterwards, in the training sample for iterating and updating the language recognition model, i.e., the first text corpus, it is determined whether the erroneous text exists in the first text corpus. If so, the erroneous text in the first text corpus is changed to the correct text. If not, the correct text is added to the first text corpus. At the same time, the dictionary of the speech recognition system is queried to determine whether the pinyin corresponding to the erroneous text in the dictionary is accurate. If not, the pinyin corresponding to the erroneous text in the dictionary can be corrected.

[0115] In this way, problem repair tools are established by using methods such as perplexity comparison, training text indexing, and dictionary query, which effectively reduces manual work and locates and identifies error problems in multiple dimensions.

[0116] Based on the same inventive concept, the present disclosure also provides a device for generating a language recognition model. Figure 4 FIG. 1 is a block diagram of a device for generating a language recognition model according to an exemplary embodiment. Figure 4 As shown, the language recognition model generation device 400 may include:

[0117] A first generating module 401 is configured to generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech;

[0118] A first determining module 402 is configured to determine the vertical domain category to which each annotated text in the first text corpus belongs, and count the number of texts corresponding to each vertical domain category;

[0119] The second determining module 403 is configured to determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories;

[0120] The second generating module 404 is configured to generate, for each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category according to the annotation text corresponding to the target vertical domain category;

[0121] The third generating module 405 is configured to generate a language recognition model according to the first basic model and each of the target vertical domain category models.

[0122] Optionally, the first generating module 401 includes:

[0123] a first generating submodule, configured to generate an online data model according to the first text corpus; and

[0124] A second generating submodule is configured to determine, in the first text corpus, an annotated text corresponding to the user speech with recognition errors, and generate a first error correction model based on the annotated text corresponding to the user speech with recognition errors;

[0125] The third generating submodule is configured to generate a first basic model according to the online data model and the first error correction model.

[0126] Optionally, the first generating module 401 further includes:

[0127] A first determination submodule is configured to determine a sentence pattern of each annotated text in the first text corpus, and determine a sentence pattern whose occurrence number is greater than a preset threshold as a target sentence pattern;

[0128] a fourth generating submodule, configured to obtain a second text corpus constructed by the user according to the target sentence pattern, and generate a new data model based on the second text corpus;

[0129] The third generation submodule is configured to interpolate and merge the online data model, the first error correction model and the newly added data model to generate a first basic model.

[0130] Optionally, the device further comprises:

[0131] A fourth generating module is configured to generate a multi-vertical domain category model based on the annotated texts corresponding to other vertical domain categories except the target vertical domain category;

[0132] The third generation module 405 is configured to: generate a second basic model based on the first basic model and the multi-vertical domain category model; and generate a language recognition model based on the second basic model and each of the target vertical domain category models.

[0133] Optionally, the device further comprises:

[0134] a fifth generating module configured to obtain hot resource texts within a preset time period and generate a resource model based on the hot resource texts; and

[0135] a sixth generating module configured to obtain annotated text corresponding to user speech that was incorrectly recognized within a current period, and generate a second error correction model based on the annotated text corresponding to the user speech that was incorrectly recognized within the current period;

[0136] a seventh generating module, configured to interpolate and merge the resource model and the second error correction model to generate a dynamic model;

[0137] The third generation module 405 is configured to generate a language recognition model based on the first basic model, each target vertical domain category model and the dynamic model.

[0138] Optionally, the update frequency of the dynamic model is greater than the update frequency of the second basic model.

[0139] Optionally, the device further comprises:

[0140] An eighth generating module is configured to obtain a demand text corpus related to a demand business input by a user, and generate a business demand model based on the demand text corpus;

[0141] The third generation module 405 is configured to generate a language recognition model based on the first basic model, each target vertical domain category model and the business demand model.

[0142] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0143] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the steps of the method for generating a language recognition model provided by the present disclosure are implemented.

[0144] Figure 5 5 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0145] Reference Figure 5, the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output interface 512 , a sensor component 514 , and a communication component 516 .

[0146] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 502 may include one or more modules to facilitate interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.

[0147] The memory 504 is configured to store various types of data to support operations on the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0148] The power supply assembly 506 provides power to the various components of the electronic device 500. The power supply assembly 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.

[0149] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0150] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0151] The input / output interface 512 provides an interface between the processing component 502 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0152] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500. The sensor assembly 514 can also detect changes in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and temperature changes of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0153] The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0154] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0155] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the electronic device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0156] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0157] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a language recognition model, characterized in that: include: Generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech; Determining the vertical domain category to which each annotated text in the first text corpus belongs, and counting the number of texts corresponding to each vertical domain category; Determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories; For each target vertical domain category, generating a target vertical domain category model corresponding to the target vertical domain category according to the annotation text corresponding to the target vertical domain category; A language recognition model is generated based on the first basic model and each of the target vertical domain category models.

2. The method according to claim 1, characterized in that Generating a first basic model according to the first text corpus includes: generating an online data model based on the first text corpus; and Determining, in the first text corpus, annotated text corresponding to the incorrectly recognized user speech, and generating a first error correction model based on the annotated text corresponding to the incorrectly recognized user speech; A first basic model is generated according to the online data model and the first error correction model.

3. The method according to claim 2, characterized in that The step of generating a first basic model according to the first text corpus further includes: Determining a sentence pattern of each annotated text in the first text corpus, and determining a sentence pattern whose occurrence number is greater than a preset threshold as a target sentence pattern; Acquire a second text corpus constructed by the user according to the target sentence pattern, and generate a new data model based on the second text corpus; Generating a first basic model according to the online data model and the first error correction model includes: The online data model, the first error correction model and the newly added data model are interpolated and merged to generate a first basic model.

4. The method according to claim 1, wherein The method further comprises: Generate a multi-vertical domain category model based on the annotated text corresponding to other vertical domain categories except the target vertical domain category; Generating the language recognition model according to the first basic model and each target vertical domain category model includes: Generate a second basic model based on the first basic model and the multi-vertical domain category model; A language recognition model is generated based on the second basic model and each of the target vertical domain category models.

5. The method according to claim 4, characterized in that The method further comprises: Obtaining hot resource texts within a preset time period, and generating a resource model based on the hot resource texts; and Obtaining annotated text corresponding to user speech that was incorrectly recognized within a current period, and generating a second error correction model based on the annotated text corresponding to the user speech that was incorrectly recognized within the current period; Interpolating and merging the resource model and the second error correction model to generate a dynamic model; Generating a language recognition model according to the first basic model and each of the target vertical domain category models includes: A language recognition model is generated based on the first basic model, each of the target vertical domain category models and the dynamic model.

6. The method according to claim 5, characterized in that The update frequency of the dynamic model is greater than the update frequency of the second basic model.

7. The method according to claim 1, characterized in that The method further comprises: Obtaining a user's input demand text corpus related to the demand business, and generating a business demand model based on the demand text corpus; Generating a language recognition model according to the first basic model and each of the target vertical domain category models includes: A language recognition model is generated based on the first basic model, each of the target vertical domain category models and the business demand model.

8. A device for generating a language recognition model, characterized in that: include: A first generating module is configured to generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech; a first determining module configured to determine the vertical domain category to which each annotated text in the first text corpus belongs, and to count the number of texts corresponding to each vertical domain category; A second determining module is configured to determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories; The second generating module is configured to generate, for each target vertical domain category, a target vertical domain category model corresponding to the target vertical domain category according to the annotated text corresponding to the target vertical domain category; The third generation module is configured to generate a language recognition model based on the first basic model and each of the target vertical domain category models.

9. A speech recognition system, characterized in that: The speech recognition system includes a feature extraction model, an acoustic model, a language recognition model, a speech decoding model, and a search model, wherein the language recognition model is generated according to the method according to any one of claims 1-7.

10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Generate a first basic model based on a first text corpus, wherein the first text corpus is a pre-collected annotated text corresponding to a user's speech; Determining the vertical domain category to which each annotated text in the first text corpus belongs, and counting the number of texts corresponding to each vertical domain category; Determine a preset number of vertical domain categories with the largest amount of text as target vertical domain categories; For each target vertical domain category, generating a target vertical domain category model corresponding to the target vertical domain category according to the annotation text corresponding to the target vertical domain category; A language recognition model is generated based on the first basic model and each of the target vertical domain category models.

11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Speech recognition method and device

    CN106328147A

  • Voice recognition method, device and system, electronic device and storage medium

    CN110473531A