Language recognition method, device, apparatus and storage medium
By automatically iteratively training and contextually adjusting the preset initial language model, the problems of lack of specificity and high cost in existing speech recognition technologies are solved, achieving more efficient speech recognition results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEBANK (CHINA)
- Filing Date
- 2021-04-16
- Publication Date
- 2026-07-14
AI Technical Summary
Existing speech recognition technologies lack specificity and are costly, with poor overall fine-tuning results.
The initial language model is automatically trained iteratively by acquiring training data with preset labels, and adjustments are made for different scenarios. The target candidate model is selected for the next round of adjustments and iterations until the target model is obtained.
It achieves targeted optimization of the language model, reduces manpower consumption, and improves the accuracy of speech recognition.
Smart Images

Figure CN113140214B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more particularly to a language recognition method, apparatus, device, and storage medium. Background Technology
[0002] With the continuous development of fintech, especially internet fintech, more and more technologies are being applied in the financial field. However, the financial industry is also placing higher demands on technology, such as on speech recognition and interpretation.
[0003] Speech recognition is becoming increasingly common in daily life. However, the accuracy of speech recognition in specific scenarios is usually low. In existing technologies, the language model is usually fine-tuned as a whole to apply the fine-tuned language model to any specific scenario. However, fine-tuning the language model as a whole often lacks specificity, is costly, and has poor practical application results. Summary of the Invention
[0004] The main objective of this application is to provide a speech recognition method, apparatus, device, and storage medium, which aims to solve the technical problems of existing speech recognition methods being untargetable and costly.
[0005] To achieve the above objectives, this application provides a language recognition method, the language recognition method comprising:
[0006] Acquire the data to be processed and input the data to be processed into a preset target language model;
[0007] Based on the preset target language model, the data to be processed is identified and processed to obtain the language recognition result of the data to be processed.
[0008] The preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in the iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment and iteration until the target model is obtained.
[0009] Optionally, before the step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed, the method includes:
[0010] Obtain preset training data with preset labels, and automatically iteratively train a preset initial language model based on the preset training data;
[0011] During the iterative training rounds, the preset initial language model in the iterative rounds is adjusted in different scenarios to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training until the target model is obtained.
[0012] Set the target model to the preset target language model.
[0013] Optionally, during the iterative training rounds, misidentified words are acquired, word error rate is obtained, and association type information of the misidentified words is acquired. Based on the word error rate and the association type information, the preset initial language model in the iterative round is subjected to directional scenario-based adjustment processing to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training.
[0014] Optionally, the step of obtaining preset training data with preset labels and iteratively training a preset initial language model based on the preset training data includes:
[0015] Obtain preset training data with preset labels, and input the preset training data into a preset initial language model to obtain the training recognition result obtained by the preset initial language model after recognizing the preset training data;
[0016] The training recognition results are compared with the preset labels to obtain the word error rate;
[0017] Based on the word error rate, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models;
[0018] The preset training data is input into the candidate model, and the target candidate model is selected from the candidate models;
[0019] Determine whether the target candidate model meets the preset training completion conditions. If not, obtain the training recognition result of the target candidate model and return to compare the training recognition result with the preset label to obtain the word error rate, until the iterative training is completed.
[0020] Optionally, the step of adjusting the preset initial language model based on the word error rate for different scenarios to obtain multiple candidate models includes:
[0021] Based on the word error rate, the weight parameters of the preset initial language model are adjusted to obtain the adjusted weights, and the gradient of the preset initial language model is adjusted to obtain the adjusted gradient.
[0022] Based on the adjusted weights and the adjusted gradients, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models.
[0023] Optionally, the step of acquiring the data to be processed and inputting the data to be processed into a preset target language model includes:
[0024] Acquire the data to be processed, acquire the scene information of the data to be processed, and input the data to be processed into the corresponding preset target language model based on the scene information;
[0025] The step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed includes:
[0026] Based on the corresponding preset target language model, the data to be processed is identified and processed to obtain the language recognition result of the data to be processed.
[0027] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scenario-based adjustment processing to match the preset scenario settings corresponding to the scenario information, and then the next round of adjustment iteration is carried out until the target model is obtained.
[0028] Optionally, the data to be processed is a scientific and technological term entry to be processed. The steps of obtaining the data to be processed, obtaining the scene information of the data to be processed, and inputting the data to be processed into the corresponding preset target language model based on the scene information include:
[0029] Obtain the scientific and technological terms to be processed, and obtain the scientific and technological context information of the scientific and technological terms to be processed;
[0030] Based on the aforementioned technological scenario information, the technological terms to be processed are input into the corresponding preset target language model.
[0031] This application also provides a language recognition device, the language recognition device comprising:
[0032] The first acquisition module is used to acquire the data to be processed and input the data to be processed into a preset target language model;
[0033] The recognition module is used to recognize and process the data to be processed based on the preset target language model, so as to obtain the language recognition result of the data to be processed.
[0034] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in each iteration round is adjusted for different scenarios and then iteratively adjusted again until the target model is obtained.
[0035] Optionally, the language recognition device further includes:
[0036] The second acquisition module is used to acquire preset training data with preset labels, and to automatically iteratively train a preset initial language model based on the preset training data.
[0037] The scenario-based module is used to perform different scenario-based adjustments on the preset initial language model in the iteration round during the iterative training process, so as to select the target candidate model from multiple adjusted models for the next round of adjustment and iterative training until the target model is obtained.
[0038] The setting module is used to set the target model as the preset target language model.
[0039] Optionally, during the iterative training rounds, misidentified words are acquired, word error rate is obtained, and association type information of the misidentified words is acquired. Based on the word error rate and the association type information, the preset initial language model in the iterative round is subjected to directional scenario-based adjustment processing to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training.
[0040] Optionally, the second acquisition module includes:
[0041] The first acquisition unit is used to acquire preset training data with preset labels, and input the preset training data into a preset initial language model to obtain the training recognition result obtained by the preset initial language model after recognizing the preset training data.
[0042] The comparison unit is used to compare the training recognition results with the preset labels to obtain the word error rate;
[0043] An adjustment unit is used to adjust the preset initial language model for different scenarios based on the word error rate to obtain multiple candidate models;
[0044] The selection unit is used to input the preset training data into the candidate model and select the target candidate model from the candidate models;
[0045] The judgment unit is used to determine whether the target candidate model meets the preset training completion conditions. If it does not meet the conditions, it obtains the training recognition result of the target candidate model and returns the step of comparing the training recognition result with the preset label to obtain the word error rate, until the iterative training is completed.
[0046] Optionally, the selection unit includes:
[0047] An adjustment subunit is used to adjust the weight parameters of the preset initial language model based on the word error rate to obtain the adjustment weights, and to adjust the gradient of the preset initial language model to obtain the adjustment gradient;
[0048] The scenario-based subunit is used to perform different scenario-based adjustments on the preset initial language model based on the adjustment weights and the adjustment gradients to obtain multiple candidate models.
[0049] Optionally, the first acquisition module includes:
[0050] The second acquisition unit is used to acquire data to be processed, acquire scene information of the data to be processed, and input the data to be processed into a corresponding preset target language model based on the scene information.
[0051] The identification module includes:
[0052] The recognition unit is used to recognize and process the data to be processed based on the corresponding preset target language model, so as to obtain the language recognition result of the data to be processed;
[0053] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scenario-based adjustment processing to match the preset scenario settings corresponding to the scenario information, and then the next round of adjustment iteration is carried out until the target model is obtained.
[0054] Optionally, the data to be processed is a list of scientific and technological terms to be processed, and the second acquisition unit includes:
[0055] The acquisition subunit is used to acquire the scientific and technological terms to be processed and to acquire the scientific and technological context information of the scientific and technological terms to be processed.
[0056] The input subunit is used to input the scientific and technological terms to be processed into the corresponding preset target language model based on the scientific and technological scenario information.
[0057] This application also provides a language recognition device, which is a physical device. The language recognition device includes: a memory, a processor, and a program of the language recognition method stored in the memory and executable on the processor. When the program of the language recognition method is executed by the processor, it can implement the steps of the language recognition method as described above.
[0058] This application also provides a readable storage medium storing a program implementing a language recognition method, wherein when the program is executed by a processor, it implements the steps of the language recognition method as described above.
[0059] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described language recognition method.
[0060] This application provides a language recognition method, apparatus, device, and storage medium. Compared with existing technologies that perform speech recognition by finely adjusting a language model in all scenarios, resulting in a lack of specificity and high cost, this application obtains data to be processed and inputs the data into a preset target language model; it then performs recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed; wherein, the preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in each iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment and iteration until the target model is obtained. In this application, the preset target language model is the target model obtained by automatically iteratively training a preset initial language model. During the iterative training process, the preset initial language model in the iteration round is adjusted for different scenarios to select candidate models for the next round of adjustment and iteration. That is, the optimization of the language model for different scenarios is automatically completed in this application. Therefore, the adjustment of the language model is more targeted, and since the iterative training is completed automatically, the human consumption is reduced. Attached Figure Description
[0061] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is a flowchart illustrating the first embodiment of the language recognition method of this application;
[0064] Figure 2 This is a detailed flowchart of step S10 in the first embodiment of the language recognition method of this application;
[0065] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.
[0066] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0067] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0068] This invention provides an embodiment of a language recognition method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0069] This application provides a language recognition method. In the first embodiment of the language recognition method of this application, referring to... Figure 1 The language recognition method includes:
[0070] Step S10: Obtain the data to be processed and input the data to be processed into a preset target language model;
[0071] Step S20: Based on the preset target language model, the data to be processed is subjected to recognition processing to obtain the language recognition result of the data to be processed;
[0072] The preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in the iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment and iteration until the target model is obtained.
[0073] The specific steps are as follows:
[0074] Step S10: Obtain the data to be processed and input the data to be processed into a preset target language model;
[0075] In this embodiment, it should be noted that the language recognition method can be applied to a language recognition system, which is subordinate to a language recognition device. The language recognition system has a built-in preset target language model, which is a pre-trained model. Specifically, the preset target language model can be a pre-trained, targeted model, meaning it is specific to a particular scenario or domain. It should be noted that the preset target language model is obtained by training on a preset initial language model. The preset initial language model can also be a pre-trained model, but it is a general model, meaning it is not specific to a particular domain or scenario. In this embodiment, the preset target language model is a language model that has been specifically optimized from the preset initial language model.
[0076] In this embodiment, data to be processed is acquired and input into a preset target language model. Specifically, the data to be processed can be a technology scenario or a life scenario, etc., and the scenario type is not limited. More specifically, technology scenarios can be further subdivided into camera scenarios, mobile phone scenarios, or computer scenarios, etc., and life scenarios can be further subdivided into dessert scenarios, staple food scenarios, or fruit scenarios, etc.
[0077] The process involves acquiring data to be processed and inputting it into a preset target language model. Specifically, if the data to be processed is a technological scenario, it is input into a preset technological language model; if the data to be processed is a daily life scenario, it is input into a preset daily life language model. Both the preset technological language model and the preset daily life language model are preset target language models, and both are obtained by optimizing a preset initial language model.
[0078] In this embodiment, it should be noted that the preset target language model can also be generated temporarily. That is, when the data to be processed is detected, the preset initial language model is optimized and adjusted to the preset target language model, and then the data to be processed is processed.
[0079] In this embodiment, by pre-setting a target language model, the probability of language entries or keyword entries in the corresponding scene is adjusted, thereby improving the recognition accuracy. That is, when the language model performs recognition, it needs to specifically identify the probability of the corresponding word. Generally, each entry in the language model is in the format of <word, probability>, for example:
[0080] White rice, 0.9
[0081] Computer, 0.9
[0082] When performing speech recognition in the technology field, it is necessary to increase the probability of "computer" (computer) speech recognition, while when performing speech recognition in the food and beverage (lifestyle) field, it is necessary to increase the probability of "white rice" (white rice). In this embodiment, the concept of AutoML is used to achieve this. That is, in this embodiment, the preset initial language model can be optimized based on AutoML to obtain a preset target language model for a specific scenario or a specific field. In other words, when performing speech recognition in the technology field, the probability of "computer" speech recognition is increased, while when performing speech recognition in the food and beverage field, the probability of "white rice" speech recognition is increased.
[0083] Step S20: Based on the preset target language model, the data to be processed is subjected to recognition processing to obtain the language recognition result of the data to be processed;
[0084] The preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in the iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment and iteration until the target model is obtained.
[0085] In this embodiment, the preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. The preset training data can be training data for a specific scenario or a specific field. In this embodiment, the language model adjustment process is fully automated, that is, the preset initial language model is automatically iteratively trained without human intervention.
[0086] During the iterative training process, the preset initial language model in the iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment iterations until the target model is obtained.
[0087] Specifically, during iterative training, the preset initial language model in each iteration cycle undergoes scenario-based adjustments. Scenario-based adjustments involve adjusting the probability or weight of recognizing a word as a scenario-related word when the preset initial language model identifies words. For example, in a technology scenario, the language model's example is optimized to "rice, 0.8; computer, 0.97," instead of "rice, 0.9; computer, 0.9." Different scenario-based adjustments involve adjusting the probability or weight of recognizing words as scenario-related words when the preset initial language model identifies words. It should be noted that in this embodiment, the adjustments are random during the iteration of the preset initial language model, thus resulting in different candidate models. For example, if the preset initial language model identifies "rice, 0.9; computer, 0.9" during the adjustment process, the adjusted model could be "rice, 0.8; computer, 0.97," or "rice, 0.9; computer, 0.8," or "rice, 0.7; computer, 0.8."
[0088] Before the step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed, the method includes:
[0089] Step S01: Obtain preset training data with preset labels, and automatically iteratively train the preset initial language model based on the preset training data;
[0090] Step S02: During the iterative training rounds, the preset initial language model in the iterative rounds is adjusted in different scenarios to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training until the target model is obtained.
[0091] Step S03: Set the target model to the preset target language model.
[0092] During iterative training, the preset initial language model in each iteration is adjusted in different scenarios to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training until the target model is obtained. Specifically, this can be done by: randomly adjusting the preset initial language model to obtain 10 models, then using labeled preset training data to select a target candidate model from the multiple adjusted models (10 models), and then using the target candidate model for the next round of processing. Alternatively, in this embodiment, the preset initial language model can be randomly adjusted to obtain 10 models, then using labeled preset training data to select all or some of the adjusted models (10 models) as target candidate models, and then using the target candidate models for the next round of processing. In the next round, a target candidate model needs to be selected again until the target model is obtained.
[0093] In this embodiment, all or a portion of the models are selected as target candidate models, rather than just one target candidate model for the next round of processing, which can avoid errors caused by random factors.
[0094] The step of acquiring preset training data with preset labels and iteratively training a preset initial language model based on the preset training data includes:
[0095] Step A1: Obtain preset training data with preset labels, and input the preset training data into a preset initial language model to obtain the training recognition result obtained by the preset initial language model after recognizing the preset training data;
[0096] In this embodiment, a first round of speech recognition is performed based on the current preset initial language model.
[0097] Step A2: Compare the training recognition results with the preset labels to obtain the word error rate;
[0098] In this embodiment, the training recognition results are compared with the ground truth (correct annotations or preset labels) to calculate the word error rate.
[0099] Step A3: Based on the word error rate, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models;
[0100] Step A4: Input the preset training data into the candidate model, and select the target candidate model from the candidate models;
[0101] Step A5: Determine whether the target candidate model meets the preset training completion conditions. If not, obtain the training recognition result of the target candidate model and return to the step of comparing the training recognition result with the preset label to obtain the word error rate, until the iterative training is completed.
[0102] In this embodiment, the word error rate is regarded as a reward for learning the preset initial language model, and the network model is updated with information such as gradients to obtain the language model with the lowest word error rate. After obtaining the language model with the lowest word error rate, it is determined whether the target candidate model meets the preset training completion conditions. If it does not meet the conditions, the training recognition result of the target candidate model is obtained, and the training recognition result is compared with the preset label to obtain the word error rate. This process is repeated until the iterative training is completed, and the model that has been iteratively trained is taken as the language model most suitable for the corresponding scenario.
[0103] After obtaining the target model, the model's prediction accuracy will be improved. For example, in a technology scenario, the language model example mentioned above will be optimized to...
[0104] White rice, 0.8
[0105] Computer, 0.97
[0106] In this way, the probability of words in this scenario being misidentified as words in a food-related scenario such as white rice will be greatly reduced, thereby improving the prediction accuracy.
[0107] In this embodiment, in order to reduce the number of tests or training iterations, during the iterative training process, misidentified words are acquired, word error rate is obtained, and association type information of the misidentified words is acquired. Based on the word error rate and the association type information, the preset initial language model in the iterative iteration is subjected to directional scenario-based adjustment processing, so as to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training.
[0108] The association type information can be the source engine (or source type, main type) of the data to be processed. Based on the word error rate and the association type information, the preset initial language model in the iteration round is subjected to directional scenario-based adjustment processing. The directional scenario-based adjustment processing can refer to the directional adjustment of model parameters such as weights (such as positive adjustment, i.e., increasing them) to select the target candidate model from multiple adjusted models for the next round of adjustment iteration training until the target model, i.e., the preset target language model, is obtained.
[0109] This application provides a language recognition method, apparatus, device, and storage medium. Compared with existing technologies that perform speech recognition by finely adjusting a language model in all scenarios, resulting in a lack of specificity and high cost, this application obtains data to be processed and inputs the data into a preset target language model; it then performs recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed; wherein, the preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in each iteration round is adjusted in different scenarios to select a target candidate model for the next round of adjustment and iteration until the target model is obtained. In this application, the preset target language model is the target model obtained by automatically iteratively training a preset initial language model. During the iterative training process, the preset initial language model in the iteration round is adjusted for different scenarios to select candidate models for the next round of adjustment and iteration. That is, the optimization of the language model for different scenarios is automatically completed in this application. Therefore, the adjustment of the language model is more targeted, and since the iterative training is completed automatically, the human consumption is reduced.
[0110] Furthermore, based on the first embodiment of this application, another embodiment of this application is provided. In this other embodiment, the step of adjusting the preset initial language model based on the word error rate for different scenarios to obtain multiple candidate models includes:
[0111] Step B1: Based on the word error rate, adjust the weight parameters of the preset initial language model to obtain the adjusted weights, and adjust the gradient of the preset initial language model to obtain the adjusted gradient;
[0112] Step B2: Based on the adjusted weights and the adjusted gradients, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models.
[0113] In this embodiment, in addition to adjusting the weight parameters of the preset initial language model based on the word error rate, the gradient of the preset initial language model is also adjusted to obtain an adjusted gradient. Based on the adjusted weights and the adjusted gradient, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models. In the process of adjusting the preset initial language model for different scenarios based on the adjusted weights and the adjusted gradient, the gradient can be adjusted for different scenarios under the same gradient, or different gradients can be adjusted under the same weights, thereby obtaining multiple candidate models.
[0114] In this embodiment, the weight parameters of the preset initial language model are adjusted based on the word error rate to obtain adjusted weights, and the gradient of the preset initial language model is adjusted to obtain adjusted gradients. Based on the adjusted weights and the adjusted gradients, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models. In this embodiment, multiple candidate models are obtained in an orderly manner.
[0115] Furthermore, based on the first and second embodiments of this application, in another embodiment of this application,
[0116] The steps of acquiring the data to be processed and inputting the data to be processed into a preset target language model include:
[0117] Step C1: Obtain the data to be processed, obtain the scene information of the data to be processed, and input the data to be processed into the corresponding preset target language model based on the scene information;
[0118] The step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed includes:
[0119] Step C2: Based on the corresponding preset target language model, the data to be processed is identified and processed to obtain the language recognition result of the data to be processed;
[0120] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scenario-based adjustment processing to match the preset scenario settings corresponding to the scenario information, and then the next round of adjustment iteration is carried out until the target model is obtained.
[0121] In this embodiment, scene information of the data to be processed is also obtained. Then, based on the scene information, the corresponding preset target language model is quickly found, and the data to be processed is input into the corresponding preset target language model. The data to be processed is processed based on the preset target language model. The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scene-based adjustment processing to match the preset scene settings corresponding to the scene information, and the next round of adjustment iteration is carried out until the target model is obtained.
[0122] In this embodiment, by acquiring the data to be processed and obtaining the scene information of the data to be processed, the data to be processed is input into the corresponding preset target language model based on the scene information, so as to quickly obtain the preset target language model and lay the foundation for quickly processing the data to be processed.
[0123] Furthermore, based on the first, second, and third embodiments of this application, another embodiment of this application is provided. In this other embodiment, the data to be processed is a technical term entry to be processed. The steps of obtaining the data to be processed, obtaining the scene information of the data to be processed, and inputting the data to be processed into a corresponding preset target language model based on the scene information include:
[0124] Step D1: Obtain the scientific and technological terms to be processed and obtain the scientific and technological scenario information of the scientific and technological terms to be processed.
[0125] Step D2: Based on the technological scenario information, input the technological terms to be processed into the corresponding preset target language model.
[0126] In this embodiment, the specific data to be processed is the scientific and technological terms to be processed. Then, the scientific and technological terms to be processed, such as "the cost of XX computer" or "the performance of XX computer", are obtained. The scientific and technological scenario information of the scientific and technological terms to be processed is obtained. Based on the scientific and technological scenario information, the scientific and technological terms to be processed are input into the corresponding preset target language model, that is, the corresponding preset scientific and technological language model, to obtain the corresponding recognition result.
[0127] In this embodiment, the scientific and technological terms to be processed are obtained, along with their corresponding scientific and technological context information. Based on this context information, the scientific and technological terms to be processed are input into a corresponding preset target language model. This embodiment achieves rapid processing of the scientific and technological terms to be processed.
[0128] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.
[0129] like Figure 3 As shown, the language recognition device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0130] Optionally, the speech recognition device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard. Optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0131] Those skilled in the art will understand that Figure 3 The structure of the speech recognition device shown does not constitute a limitation on the speech recognition device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0132] like Figure 3 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, and a language recognition method program. The operating system is a program that manages and controls the hardware and software resources of the language recognition device, supporting the operation of the language recognition method program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the language recognition method system.
[0133] exist Figure 3 In the language recognition device shown, the processor 1001 is used to execute the language recognition method program stored in the memory 1005 to implement the steps of the language recognition method described in any of the above claims.
[0134] The specific implementation of the language recognition device in this application is basically the same as the various embodiments of the language recognition method described above, and will not be repeated here.
[0135] This application embodiment also provides a language recognition device, the language recognition device comprising:
[0136] The first acquisition module is used to acquire the data to be processed and input the data to be processed into a preset target language model;
[0137] The recognition module is used to recognize and process the data to be processed based on the preset target language model, so as to obtain the language recognition result of the data to be processed.
[0138] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model in each iteration round is adjusted for different scenarios and then iteratively adjusted again until the target model is obtained.
[0139] Optionally, the language recognition device further includes:
[0140] The second acquisition module is used to acquire preset training data with preset labels, and to automatically iteratively train a preset initial language model based on the preset training data.
[0141] The scenario-based module is used to perform different scenario-based adjustments on the preset initial language model in the iteration round during the iterative training process, so as to select the target candidate model from multiple adjusted models for the next round of adjustment and iterative training until the target model is obtained.
[0142] The setting module is used to set the target model as the preset target language model.
[0143] Optionally, during the iterative training rounds, misidentified words are acquired, word error rate is obtained, and association type information of the misidentified words is acquired. Based on the word error rate and the association type information, the preset initial language model in the iterative round is subjected to directional scenario-based adjustment processing to select a target candidate model from multiple adjusted models for the next round of adjustment and iterative training.
[0144] Optionally, the second acquisition module includes:
[0145] The first acquisition unit is used to acquire preset training data with preset labels, and input the preset training data into a preset initial language model to obtain the training recognition result obtained by the preset initial language model after recognizing the preset training data.
[0146] The comparison unit is used to compare the training recognition results with the preset labels to obtain the word error rate;
[0147] An adjustment unit is used to adjust the preset initial language model for different scenarios based on the word error rate to obtain multiple candidate models;
[0148] The selection unit is used to input the preset training data into the candidate model and select the target candidate model from the candidate models;
[0149] The judgment unit is used to determine whether the target candidate model meets the preset training completion conditions. If it does not meet the conditions, it obtains the training recognition result of the target candidate model and returns the step of comparing the training recognition result with the preset label to obtain the word error rate, until the iterative training is completed.
[0150] Optionally, the selection unit includes:
[0151] An adjustment subunit is used to adjust the weight parameters of the preset initial language model based on the word error rate to obtain the adjustment weights, and to adjust the gradient of the preset initial language model to obtain the adjustment gradient;
[0152] The scenario-based subunit is used to perform different scenario-based adjustments on the preset initial language model based on the adjustment weights and the adjustment gradients to obtain multiple candidate models.
[0153] Optionally, the first acquisition module includes:
[0154] The second acquisition unit is used to acquire data to be processed, acquire scene information of the data to be processed, and input the data to be processed into a corresponding preset target language model based on the scene information.
[0155] The identification module includes:
[0156] The recognition unit is used to recognize and process the data to be processed based on the corresponding preset target language model, so as to obtain the language recognition result of the data to be processed;
[0157] The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scenario-based adjustment processing to match the preset scenario settings corresponding to the scenario information, and then the next round of adjustment iteration is carried out until the target model is obtained.
[0158] Optionally, the data to be processed is a list of scientific and technological terms to be processed, and the second acquisition unit includes:
[0159] The acquisition subunit is used to acquire the scientific and technological terms to be processed and to acquire the scientific and technological context information of the scientific and technological terms to be processed.
[0160] The input subunit is used to input the scientific and technological terms to be processed into the corresponding preset target language model based on the scientific and technological scenario information.
[0161] The specific implementation of the language recognition device in this application is basically the same as the various embodiments of the language recognition method described above, and will not be repeated here.
[0162] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described language recognition method.
[0163] The specific implementation of the computer program product of this application is basically the same as the various embodiments of the language recognition method described above, and will not be repeated here.
[0164] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A language recognition method, characterized in that, The language recognition method includes: Acquire the data to be processed and input the data to be processed into a preset target language model; Based on the preset target language model, the data to be processed is identified and processed to obtain the language recognition result of the data to be processed. The preset target language model is a target model obtained by automatically iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at each iteration round is adjusted in different scenarios based on the word error rate to obtain multiple candidate models. The target candidate model is selected from the multiple candidate models for the next round of adjustment and iteration until the target model is obtained. The word error rate is obtained by comparing the training recognition result with the preset labels. The training recognition result is obtained by inputting the preset training data into the preset initial language model and recognizing the preset training data. The step of adjusting the preset initial language model in different iteration rounds based on the word error rate to obtain multiple candidate models includes: Based on the word error rate, the weight parameters of the preset initial language model are adjusted to obtain the adjusted weights, and the gradient of the preset initial language model is adjusted to obtain the adjusted gradient. Based on the adjusted weights and the adjusted gradients, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models.
2. The language recognition method as described in claim 1, characterized in that, Before the step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed, the method includes: Obtain preset training data with preset labels, and automatically iteratively train a preset initial language model based on the preset training data; During the iterative training rounds, the preset initial language model in each iteration round is adjusted in different scenarios to obtain multiple candidate models. The target candidate model is selected from the multiple candidate models for the next round of adjustment and iterative training until the target model is obtained. Set the target model to the preset target language model.
3. The language recognition method as described in claim 2, characterized in that, During the iterative training rounds, misidentified words are acquired, word error rate is obtained, and association type information of the misidentified words is acquired. Based on the word error rate and the association type information, the preset initial language model in the iterative round is subjected to directional scenario-based adjustment processing to obtain multiple candidate models. The target candidate model is selected from the multiple candidate models for the next round of adjustment and iterative training.
4. The language recognition method as described in claim 2, characterized in that, The step of acquiring preset training data with preset labels and iteratively training a preset initial language model based on the preset training data includes: Obtain preset training data with preset labels, and input the preset training data into a preset initial language model to obtain the training recognition result obtained by the preset initial language model after recognizing the preset training data; The training recognition results are compared with the preset labels to obtain the word error rate; Based on the word error rate, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models; The preset training data is input into the candidate model, and the target candidate model is selected from the candidate models; Determine whether the target candidate model meets the preset training completion conditions. If not, obtain the training recognition result of the target candidate model and return to compare the training recognition result with the preset label to obtain the word error rate, until the iterative training is completed.
5. The language recognition method as described in claim 1, characterized in that, The steps of acquiring the data to be processed and inputting the data to be processed into a preset target language model include: Acquire the data to be processed, acquire the scene information of the data to be processed, and input the data to be processed into the corresponding preset target language model based on the scene information; The step of performing recognition processing on the data to be processed based on the preset target language model to obtain the language recognition result of the data to be processed includes: Based on the corresponding preset target language model, the data to be processed is identified and processed to obtain the language recognition result of the data to be processed. The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at different iteration rounds is subjected to scenario-based adjustment processing to match the preset scenario settings corresponding to the scenario information, and then the next round of adjustment iteration is carried out until the target model is obtained.
6. The language recognition method as described in claim 1, characterized in that, The data to be processed consists of scientific and technological terms to be processed. The steps of obtaining the data to be processed, obtaining the scene information of the data to be processed, and inputting the data to be processed into the corresponding preset target language model based on the scene information include: Obtain the scientific and technological terms to be processed, and obtain the scientific and technological context information of the scientific and technological terms to be processed; Based on the aforementioned technological scenario information, the technological terms to be processed are input into the corresponding preset target language model.
7. A language recognition device, characterized in that, The language recognition device includes: The first acquisition module is used to acquire the data to be processed and input the data to be processed into a preset target language model; The recognition module is used to recognize and process the data to be processed based on the preset target language model, so as to obtain the language recognition result of the data to be processed. The preset target language model is a target model obtained by iteratively training a preset initial language model based on preset training data with preset labels. During the iterative training process, the preset initial language model at each iteration round is adjusted in different scenarios based on the word error rate to obtain multiple candidate models. The target candidate model is selected from the multiple candidate models for the next round of adjustment and iteration until the target model is obtained. The word error rate is obtained by comparing the training recognition result with the preset labels. The training recognition result is obtained by inputting the preset training data into the preset initial language model and recognizing the preset training data. The step of adjusting the preset initial language model in different iteration rounds based on the word error rate to obtain multiple candidate models includes: Based on the word error rate, the weight parameters of the preset initial language model are adjusted to obtain the adjusted weights, and the gradient of the preset initial language model is adjusted to obtain the adjusted gradient. Based on the adjusted weights and the adjusted gradients, the preset initial language model is adjusted for different scenarios to obtain multiple candidate models.
8. A speech recognition device, characterized in that, The language recognition device includes: a memory, a processor, and a program stored in the memory for implementing the language recognition method. The memory is used to store the program that implements the language recognition method; The processor is configured to execute a program that implements the language recognition method to implement the steps of the language recognition method as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that, The readable storage medium stores a program implementing the language recognition method, which is executed by a processor to implement the steps of the language recognition method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 6.