Speech text processing method and device, storage medium and processor

By combining regular matching, semantic matching and intent recognition models, combined with multi-task learning and knowledge distillation, the speech text processing is optimized, and the time-consuming and low efficiency problems in the existing technology are solved, and efficient and accurate speech text processing is achieved. and multi-scenario support.

CN114936561BActive Publication Date: 2025-01-07ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210375489.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2025-01-07
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

The existing speech text quality inspection algorithm takes too long, resulting in low processing efficiency and lack of multi-scenario application support.

Method used

The target algorithm model consisting of regular matching model, semantic matching model and target intent recognition model is used to process the speech text, and the speech text is quickly recognized and matched through regular matching, semantic matching and intent recognition, combining multi-task learning and knowledge distillation and adversarial learning and other technologies optimize models to reduce time-consuming and improve accuracy.

Benefits of technology

It significantly reduces the time-consuming process of speech text, improves processing efficiency and accuracy, supports multi-scene applications, and greatly reduces resource consumption without losing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936561B_ABST
    Figure CN114936561B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for processing speech text, a storage medium and a processor. The method comprises: obtaining speech text information to be processed; obtaining a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information. The present application solves the technical problem in the related art that the existing algorithm takes too long to process speech text quality inspection, resulting in relatively low processing efficiency of speech text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of semantic recognition technology, and in particular to a method and device for processing speech text, a storage medium, and a processor. Background Art

[0002] Sales is one of the most frequent and important channels to reach customers. The pre-sales and after-sales customer service and service attitude have the most direct impact on the reputation of the company's product or service quality. Every trial and error in sales and customer communication is actually a damage to the group's image. Therefore, voice quality inspection is very important. The existing algorithm has the following problems:

[0003] (1) Data problem: Lack of labeled data leads to ASR (Automatic Speech Recognition) recognition errors;

[0004] (2) Performance issues: The current semantic matching algorithm takes a long time and has low efficiency in processing speech text;

[0005] (3) Resource issue: When algorithm resources are scarce, the current algorithm does not support multi-scenario applications.

[0006] With regard to the problem that the existing algorithms in the above-mentioned related technologies take too long to process speech texts, resulting in relatively low efficiency in processing speech texts, no effective solution has been proposed so far. Summary of the invention

[0007] The embodiments of the present application provide a method and device for processing speech text, a storage medium and a processor, so as to at least solve the technical problem in the related art that when performing speech text quality inspection, the existing algorithm takes too long, resulting in relatively low processing efficiency of speech text.

[0008] According to one aspect of the embodiments of the present application, a method for processing speech text is provided, comprising: obtaining speech text information to be processed; obtaining a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model, and a target intention recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information.

[0009] Furthermore, the speech text to be processed is processed through the target algorithm model to obtain target speech text information, including: matching the speech text information to be processed with the regular expression in the regular matching model to obtain first speech text information; semantically matching the speech text information to be processed with the standard sentence library in the semantic matching model to obtain second speech text information; processing the speech text information to be processed through the target intention recognition model to obtain third speech text information; and using the first speech text information, the second speech text information and the second speech text information as the target speech text information.

[0010] Furthermore, the speech and text information to be processed is processed by the target intention recognition model to obtain the third speech and text information, including: performing intent recognition and slot extraction on the speech and text information to be processed by the target intention recognition model to obtain the intent label corresponding to the speech and text information to be processed; and using the speech and text information to be processed corresponding to the intent label that meets the preset requirements as the third speech and text information.

[0011] Furthermore, after the speech text to be processed is processed by the target algorithm model to obtain target speech text information, the method includes: verifying the accuracy of the target speech text information to obtain a verification result; and iteratively updating the target algorithm model based on the verification result.

[0012] Furthermore, obtaining the target algorithm model includes: constructing the regular expression to obtain the regular matching model; obtaining the semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; obtaining the target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and combining the regular matching model, the semantic matching model and the intent recognition model into the target algorithm model.

[0013] Furthermore, obtaining the target intent recognition model includes: constructing a model based on JointBert's multi-task learning model to obtain a first intent recognition model; obtaining training samples, wherein the training samples are used to train the first intent recognition model; based on the training samples, training the first intent recognition model a preset number of times using uncertainty sampling, and obtaining a second intent recognition model after the preset number of training times are completed; optimizing the second intent recognition model to obtain the target intent recognition model.

[0014] Furthermore, optimizing the second intention recognition model to obtain the target intention recognition model includes: acquiring the intention recognition model obtained after each training, and integrating the intention recognition model obtained after each training through a first preset algorithm to obtain a third intention recognition model; based on the third intention recognition model, performing transfer learning on the second intention recognition model through a second preset algorithm to obtain a fourth intention recognition model; optimizing the fourth intention recognition model through the third preset algorithm to obtain a fifth intention recognition model; and smoothing the parameters of the fifth intention recognition model through the fourth preset algorithm to obtain the target intention recognition model.

[0015] Furthermore, the fourth intention recognition model is optimized by a third preset algorithm to obtain a fifth intention recognition model, including: obtaining an adversarial sample, and inputting the adversarial sample into the fourth intention recognition model to obtain a first output result; inputting the training sample into the fourth intention recognition model to obtain a second output result; obtaining a maximum symmetric relative entropy based on the first output result and the second output result; adding the maximum symmetric relative entropy to the loss function of the fourth intention recognition model to obtain a target loss function; and optimizing the fourth intention recognition model based on the target loss function to obtain the fifth intention recognition model.

[0016] According to another aspect of an embodiment of the present application, a method for processing speech text is also provided, including: receiving speech text information to be processed sent by a client; processing the speech text to be processed by a target algorithm model in a cloud server to obtain target speech text information; and returning the target speech text information to the client.

[0017] According to another aspect of the embodiment of the present application, a speech text processing device is also provided, comprising: a first acquisition unit, used to acquire speech text information to be processed; a second acquisition unit, used to acquire a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intention recognition model. A processing unit, used to process the speech text to be processed by the target algorithm model to obtain the target speech text information.

[0018] Furthermore, the processing unit includes: a first matching subunit, used to match the speech text information to be processed with the regular expression in the regular matching model to obtain the first speech text information; a second matching subunit, used to semantically match the speech text information to be processed with the standard sentence library in the semantic matching model to obtain the second speech text information; a processing subunit, used to process the speech text information to be processed through the target intention recognition model to obtain the third speech text information; a determination subunit, used to use the first speech text information, the second speech text information and the second speech text information as the target speech text information.

[0019] Furthermore, the processing subunit includes: an identification module, which is used to perform intent recognition and slot extraction on the voice text information to be processed through the target intent recognition model to obtain the intent label corresponding to the voice text information to be processed; and a determination module, which is used to use the voice text information to be processed corresponding to the intent label that meets preset requirements as the third voice text information.

[0020] Furthermore, the device includes: a verification unit, which is used to verify the accuracy of the target speech text information after processing the speech text to be processed through the target algorithm model to obtain the target speech text information, and obtain a verification result; an updating unit, which is used to iteratively update the target algorithm model based on the verification result.

[0021] Furthermore, the second acquisition unit includes: a construction subunit, used to construct the regular expression to obtain the regular matching model; a first acquisition subunit, used to acquire the semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; a second acquisition subunit, used to acquire the target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and an assembly subunit, used to assemble the regular matching model, the semantic matching model and the intent recognition model into the target algorithm model.

[0022] Furthermore, the second acquisition subunit includes: a construction module, which is used to construct a model based on the multi-task learning model of JointBert to obtain a first intent recognition model; an acquisition module, which is used to obtain training samples, wherein the training samples are used to train the first intent recognition model; a training module, which is used to train the first intent recognition model for a preset number of times based on the training samples using uncertainty sampling, and obtain a second intent recognition model after the preset number of training is completed; and an optimization module, which is used to optimize the second intent recognition model to obtain the target intent recognition model.

[0023] Furthermore, the optimization module includes: a first acquisition submodule, used to acquire the intention recognition model obtained after each training, and perform integrated learning on the intention recognition model obtained after each training through a first preset algorithm to obtain a third intention recognition model; a learning submodule, used to perform transfer learning on the second intention recognition model through a second preset algorithm based on the third intention recognition model to obtain a fourth intention recognition model; an optimization submodule, used to optimize the fourth intention recognition model through a third preset algorithm to obtain a fifth intention recognition model; and a first processing submodule, used to smooth the parameters of the fifth intention recognition model through a fourth preset algorithm to obtain the target intention recognition model.

[0024] Furthermore, the optimization submodule includes: a second acquisition submodule, used to acquire adversarial samples and input the adversarial samples into the fourth intent recognition model to obtain a first output result; an input submodule, used to input the training samples into the fourth intent recognition model to obtain a second output result; a calculation submodule, used to obtain the maximum symmetric relative entropy based on the first output result and the second output result; an adding submodule, used to add the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; a second processing submodule, used to optimize the fourth intent recognition model based on the target loss function to obtain the fifth intent recognition model.

[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned methods for processing speech text.

[0026] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned speech text processing methods when running.

[0027] In the embodiment of the present application, the speech text information to be processed is obtained; the target algorithm model is obtained, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information, which solves the technical problem that the existing algorithm takes too long to process speech text quality inspection in the related technology, resulting in relatively low processing efficiency of speech text. The regular matching model, semantic matching model and target intent recognition model in the target algorithm model can quickly identify and match the speech text to obtain the target speech text information, thereby achieving the effect of improving the processing efficiency of speech text. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0029] Figure 1 is a schematic diagram of a computer terminal provided according to Embodiment 1 of the present invention;

[0030] Figure 2 is a flowchart of a method for processing speech text according to Embodiment 1 of the present invention;

[0031] Figure 3 is a schematic diagram of a target algorithm model provided according to Embodiment 1 of the present invention;

[0032] Figure 4 is a schematic diagram of intent recognition and slot extraction provided according to Embodiment 1 of the present invention;

[0033] Figure 5 is a schematic diagram of the SentenceBert algorithm provided according to the first embodiment of the present invention;

[0034] Figure 6 is a schematic diagram of a multi-task learning hard sharing model provided according to Embodiment 1 of the present invention;

[0035] Figure 7 is a schematic diagram of a multi-task learning soft sharing model provided according to Embodiment 1 of the present invention;

[0036] Figure 8 is a schematic diagram of a knowledge distillation algorithm provided according to Embodiment 1 of the present invention;

[0037] Fig. 9 is a flowchart of a method for processing speech text according to Embodiment 2 of the present invention;

[0038] Fig.10 is a schematic diagram of a speech text processing device provided according to Embodiment 3 of the present invention;

[0039] Fig.11 It is a schematic diagram of a computer terminal provided according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0043] NLU: Natural Language Understanding, a general term for all methods, models or tasks that support machines to understand text content;

[0044] SentenceBert: A sentence vectorization method based on Bert and twin network structure;

[0045] Multi-Task learning: Multi-task learning is a kind of joint learning, where multiple tasks are learned in parallel and the results influence each other;

[0046] Ensemble learning: building and combining multiple learners to complete learning tasks;

[0047] Knowledge distillation: transfer knowledge from a complex model (teacher) to a simple model (student);

[0048] SMART adversarial learning: a training method that can effectively improve the robustness and generalization ability of the model at the same time. It adds adversarial perturbations to the original input to obtain adversarial samples, and then uses the samples for training to improve the model effect.

[0049] EMA exponential smoothing: A method of smoothing model parameters that can effectively improve the robustness of the model.

[0050] Example 1

[0051] According to an embodiment of the present application, a method for processing speech text is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0052] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing speech text is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (shown as 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0053] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0054] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the voice text processing method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned voice text processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0055] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0056] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0057] Under the above operating environment, this application provides Figure 2 The method for processing speech text is shown. Figure 2 It is a flowchart of the method for processing speech text according to the first embodiment of the present application.

[0058] Step S201, obtaining voice text information to be processed.

[0059] Specifically, when performing quality inspection, the quality inspection is mainly performed on the voice information communicated with the customer, and then the voice information needs to be converted into text information, that is, the voice text information to be processed is first obtained.

[0060] Step S202, obtaining a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model.

[0061] Specifically, the regular matching model, semantic matching model and target intent recognition model are combined into a target algorithm model, for example, Figure 3Schematic diagram of the target algorithm model shown.

[0062] Step S203, processing the speech text to be processed by the target algorithm model to obtain target speech text information.

[0063] Specifically, the speech text to be processed is input into the target algorithm model, and the target algorithm model processes the speech text to be processed to obtain the target speech text, which refers to selecting certain speech texts through the target algorithm model. In addition to being used for quality inspection, the present invention can also be used in customer service software to automatically reply to customer questions and other scenarios.

[0064] In summary, through the regular matching model, semantic matching model and target intent recognition model, the speech text can be quickly recognized and matched, which improves the processing efficiency of the speech text.

[0065] Optionally, in the speech text processing method provided in Example 1 of the present invention, the speech text to be processed is processed by a target algorithm model to obtain target speech text information, including: matching the speech text information to be processed with a regular expression in a regular matching model to obtain first speech text information; semantically matching the speech text information to be processed with a standard sentence library in a semantic matching model to obtain second speech text information; processing the speech text information to be processed by a target intention recognition model to obtain third speech text information; and using the first speech text information, the second speech text information, and the second speech text information as target speech text information.

[0066] Specifically, the regular matching model includes a preset regular expression, and the first voice text information is obtained by matching the voice text to be processed with the regular expression. The semantic matching model includes a standard sentence library, and the second voice text information is obtained by semantically matching the voice text to be processed with the standard sentence library in the semantic matching model. The target intention recognition model performs intent recognition and slot extraction on the voice text to be processed to obtain the third voice text information. Intent recognition refers to identifying the meaning that the text wants to express. For example, the text information "I plan to buy a car in Hangzhou" recognizes that the intention is to buy a car. Then the first voice text, the second voice text and the third voice text are all the target voice texts. The above-mentioned regular matching model, semantic matching model and target intention recognition model are used to realize the rapid processing of the target voice text. It has been verified by experiments that the time consumption when processing by the above-mentioned target algorithm model is reduced by 80%, and the accuracy is improved by 10%.

[0067] Optionally, in the speech text processing method provided in Example 1 of the present invention, the speech text information to be processed is processed by a target intent recognition model to obtain the third speech text information, including: performing intent recognition and slot extraction on the speech text information to be processed by a target intent recognition model to obtain an intent label corresponding to the speech text information to be processed; and using the speech text information to be processed corresponding to the intent label that meets preset requirements as the third speech text information.

[0068] Specifically, the speech text to be processed is input into the target intent recognition model, and the target intent recognition model performs intent recognition and slot extraction on the speech text to be processed, for example, Figure 4 In the processing process shown, the intent tag of the text information to be processed is obtained, and the speech text information to be processed corresponding to the intent tag that meets the preset requirements is selected. The preset requirements can be set according to the actual situation. For example, if the speech text to be processed with the intention of intending to buy a car is selected, then intending to buy a car can be used as the preset requirement. The above target intent recognition model can accurately identify the intent information of the speech text to be processed, thereby improving the accuracy of speech text processing.

[0069] Optionally, in the speech text processing method provided in Example 1 of the present invention, after the speech text to be processed is processed by the target algorithm model to obtain the target speech text information, the method includes: verifying the accuracy of the target speech text information to obtain the verification result; and iteratively updating the target algorithm model based on the verification result.

[0070] Specifically, after obtaining the target speech text information, its accuracy will be verified, and the target algorithm model will be iteratively updated based on the verification results, thereby improving the accuracy of the target algorithm model.

[0071] Optionally, in the speech text processing method provided in Example 1 of the present invention, obtaining the target algorithm model includes: constructing a regular expression to obtain a regular matching model; obtaining a semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; obtaining a target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and combining the regular matching model, the semantic matching model and the intent recognition model into a target algorithm model.

[0072] Specifically, a regular matching model is obtained by constructing a regular expression; the semantic matching model is a multi-task learning model based on SentenceBert, Bert: Bidirectional Encoder Representation from Transformers, which is a pre-trained language representation model. It emphasizes that it no longer uses the traditional unidirectional language model or the shallow concatenation of two unidirectional language models for pre-training as in the past, but uses a new masked language model (MLM) to generate deep bidirectional language representation. SentenceBert (SBERT) schematic diagram, as shown Figure 5 As shown. It uses a twin network based on the pre-trained BERT to obtain a chapter vector that is semantically meaningful enough. This method can reduce the calculation time to about 5 seconds while maintaining the effect of Bert. The multi-task learning model is adopted to meet the problem of use in multiple scenarios. Multi-task learning is a machine learning method that is relative to single-task learning. In the field of machine learning, the standard algorithm theory is to learn one task at a time, that is, when the output of the system is a real number. Complex learning problems are first decomposed into theoretically independent sub-problems, and then each sub-problem is learned separately, and finally a mathematical model of the complex problem is established by combining the learning results of the sub-problems. Multi-task learning is a joint learning, where multiple tasks are learned in parallel and the results influence each other. There are two types of model structures for multi-task learning: hard sharing and soft sharing, such as Figure 6 and Figure 7 As shown in the figure. Combining multi-task learning with SentenceBert to obtain a semantic matching model. The target intent recognition model is a multi-task learning model based on JointBert, a Bert-based intent classification and slot filling model. In addition, the regular matching model and the semantic matching model can be cold-started to improve deployment efficiency. Through the above algorithm, the accuracy of the algorithm and the efficiency of processing are improved.

[0073] Optionally, in the speech text processing method provided in Example 1 of the present invention, obtaining a target intent recognition model includes: constructing a model based on a multi-task learning model of JointBert to obtain a first intent recognition model; obtaining training samples, wherein the training samples are used to train the first intent recognition model; based on the training samples, training the first intent recognition model a preset number of times using uncertainty sampling, and obtaining a second intent recognition model after the preset number of trainings are completed; and optimizing the second intent recognition model to obtain a target intent recognition model.

[0074] Specifically, the semantic matching model and the target intent recognition model are both trained and optimized algorithm models. The training methods and optimization methods of the two models are basically the same, so here only the training and optimization process of the target awareness recognition model is described. The model is constructed based on the multi-task learning model of JointBert to obtain the first intent recognition model. The training samples can be obtained from the dialogue data annotation platform. The dialogue data annotation platform includes data that have been intent-identified and annotated. In practical applications, there is a problem of lack of annotated data, that is, the problem of too few training samples. The problem of too few training samples can be solved by data enhancement and adversarial learning. In addition, Bert and Multi-task learning are both algorithm models for small training samples. The first intent recognition model is trained for a preset number of times (for example, the number of training times is generally 200 to 300 times) through the training samples to obtain the second intent recognition algorithm after the preset number of training. Since it is an algorithm model based on multi-task learning, uncertainty sampling is used for training. After the training is completed, the second intent recognition model is optimized to further improve the effect of the model. After completing the above steps, the target intent recognition model obtained reduces the resources and time consumption to 1 / N (N is the number of scenarios) without losing accuracy, and the accuracy of intent recognition is also improved by 10%.

[0075] Optionally, in the speech text processing method provided in Example 1 of the present invention, the second intention recognition model is optimized to obtain a target intention recognition model, including: obtaining the intention recognition model obtained after each training, and integrating the intention recognition model obtained after each training through a first preset algorithm to obtain a third intention recognition model; based on the third intention recognition model, transfer learning is performed on the second intention recognition model through a second preset algorithm to obtain a fourth intention recognition model; optimizing the fourth intention recognition model through the third preset algorithm to obtain a fifth intention recognition model; and smoothing the parameters of the fifth intention recognition model through the fourth preset algorithm to obtain a target intention recognition model.

[0076] Specifically, optimizing the second intent recognition model includes: first, obtaining the intent recognition model obtained after each training, and integrating the intent recognition model obtained after each training through an integrated learning algorithm (i.e., the first preset algorithm mentioned above) to obtain a third intent recognition model. For example, after 10 training times, 10 trained intent recognition models are obtained. After integrating these 10 intent recognition models, an intent recognition model (i.e., the third intent recognition model mentioned above) is obtained. Based on the third intent recognition model, the second intent recognition model is transferred and learned through knowledge distillation (i.e., the second preset algorithm mentioned above) to obtain a fourth intent recognition model. The schematic diagram of knowledge distillation is shown below. Figure 8As shown. Here, the effect of the fourth intent recognition model should be made as close as possible to that of the third intent recognition model, so as to improve the effect of the fourth intent recognition model. Since the model may become oversaturated after a certain number of model trainings, the fourth intent recognition model is optimized through SMART adversarial learning (i.e., the third preset algorithm mentioned above) to obtain the fifth intent recognition model. Finally, the model parameters are smoothed using the exponential smoothing algorithm (i.e., the fourth preset algorithm mentioned above) to obtain the final target intent recognition model. The update formula of the exponential smoothing algorithm is as follows: v n Characterize the cumulative model parameters, v n-1 Characterize the model parameters of the last time, θ n Characterizes the current model parameters, α is a constant between 0 and 1, g i Characterize the gradient of the model. Through the above-mentioned integrated learning, knowledge distillation, Smart adversarial learning and EMA exponential smoothing, a positive impact is generated between the various scenarios, improving the effect of the target intent recognition model.

[0077] Optionally, in the speech text processing method provided in Example 1 of the present invention, the fourth intent recognition model is optimized by a third preset algorithm to obtain a fifth intent recognition model, including: obtaining an adversarial sample, and inputting the adversarial sample into the fourth intent recognition model to obtain a first output result; inputting the training sample into the fourth intent recognition model to obtain a second output result; obtaining the maximum symmetric relative entropy based on the first output result and the second output result; adding the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; and optimizing the fourth intent recognition model based on the target loss function to obtain a fifth intent recognition model.

[0078] Specifically, SMART adversarial learning: a method that can simultaneously improve the robustness and generalization ability of the model. It obtains adversarial samples by adding slight perturbations to the model input, and calculates the maximum symmetric KL divergence between the output result and the original result (i.e. the symmetric relative entropy mentioned above) as a regular supplement to the loss function. First, give the model a random slight perturbation, then calculate the KL divergence between the output result and the original result, then find the gradient of the perturbation and make a residual link, and then normalize it to get a new perturbation. It is generally believed that such a perturbation is the perturbation that maximizes the KL divergence. The SMART adversarial training goal is: min θ [E (x,y)~D [l(f(x; θ)+αmaxl′(f(x+δ; θ), f(x; θ))], where l is the loss function, f is the output function of the model, x is the input of the model, θ is the model parameter, y is the intent label, and E (x,y)~Dis the expectation, and δ is the disturbance. Through the above algorithm, the model is more convergent and the model output is more stable.

[0079] Through the above steps, three models, namely regular matching model, semantic matching model and target intent recognition model, are adopted, which can quickly support new intents while ensuring a high accuracy of data processing; the target intent recognition model introduces the jointbert model to simultaneously perform intent recognition and slot extraction to further improve the accuracy of the algorithm; the semantic matching model adopts the SentenceBert model, which reduces the time consumption of the model by more than 80% without losing accuracy; multi-task learning is adopted to meet the needs of multiple scenarios, and algorithms such as integrated learning, knowledge distillation, Smart confrontation, and EMA exponential smoothing are introduced to produce positive influences between scenarios and improve the model effect.

[0080] In summary, in the method for processing speech text provided in the first embodiment of the present invention, a target algorithm model is obtained, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model. The speech text to be processed is processed by the target algorithm model to obtain target speech text information, which solves the technical problem that the existing algorithm takes too long to process speech text quality inspection in the related technology, resulting in relatively low processing efficiency of speech text. The regular matching model, semantic matching model and target intent recognition model in the target algorithm model can quickly identify and match the speech text to obtain the target speech text information, thereby achieving the effect of improving the processing efficiency of speech text.

[0081] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0083] Example 2

[0084] According to an embodiment of the present application, a method for processing the above-mentioned speech text is also provided, such as Fig. 9 As shown, the method includes:

[0085] Step 1001: receiving voice text information to be processed sent by a client.

[0086] Specifically, the voice text information to be processed is sent to the cloud server through the client, wherein the target algorithm model is deployed in the cloud server.

[0087] Step 1002, processing the speech text to be processed by the target algorithm model in the cloud server to obtain target speech text information.

[0088] Specifically, the target algorithm model is used in the cloud server to perform corresponding processing on the speech text to be processed to obtain target speech text information.

[0089] Step 1003: Return the target voice text information to the client.

[0090] The voice and text processing work is carried out through the cloud server, which improves the efficiency of the voice and text processing work and reduces the storage pressure of the local terminal.

[0091] In the cloud server, the specific method for processing the voice text is the same as that in the first embodiment, and will not be repeated here.

[0092] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0094] Example 3

[0095] According to an embodiment of the present application, a processing device for implementing the above-mentioned speech text is also provided, such as Fig.10 As shown, the device includes: a first acquisition unit 1101, a second acquisition unit 1102 and a processing unit 1103.

[0096] The first acquisition unit 1101 is used to acquire the voice text information to be processed;

[0097] The second acquisition unit 1102 is used to acquire a target algorithm model, wherein the target algorithm model consists of a regular matching model, a semantic matching model and a target intent recognition model.

[0098] The processing unit 1103 is used to process the speech text to be processed through the target algorithm model to obtain target speech text information.

[0099] The speech text processing device provided in the third embodiment of the present invention obtains the speech text information to be processed through the first acquisition unit 1101; the second acquisition unit 1102 obtains the target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model; the processing unit 1103 processes the speech text to be processed through the target algorithm model to obtain the target speech text information, thereby solving the technical problem in the related technology that when performing speech text quality inspection, the existing algorithm takes too long, resulting in relatively low processing efficiency of the speech text. The regular matching model, semantic matching model and target intent recognition model in the target algorithm model can quickly identify and match the speech text to obtain the target speech text information, thereby achieving the effect of improving the processing efficiency of the speech text.

[0100] Optionally, in the speech text processing device provided in Example 3 of the present invention, the processing unit 1103 includes: a first matching subunit, used to match the speech text information to be processed with a regular expression in a regular matching model to obtain first speech text information; a second matching subunit, used to semantically match the speech text information to be processed with a standard sentence library in a semantic matching model to obtain second speech text information; a processing subunit, used to process the speech text information to be processed through a target intention recognition model to obtain third speech text information; a determination subunit, used to use the first speech text information, the second speech text information and the second speech text information as target speech text information.

[0101] Optionally, in the speech text processing device provided in Example 3 of the present invention, the processing subunit includes: a recognition module, used to perform intent recognition and slot extraction on the speech text information to be processed through a target intent recognition model, and obtain the intent label corresponding to the speech text information to be processed; a determination module, used to use the speech text information to be processed corresponding to the intent label that meets preset requirements as the third speech text information.

[0102] Optionally, in the speech text processing device provided in Example 3 of the present invention, the device includes: a verification unit, which is used to verify the accuracy of the target speech text information after processing the speech text to be processed through the target algorithm model to obtain the target speech text information, and obtain a verification result; an updating unit, which is used to iteratively update the target algorithm model based on the verification result.

[0103] Optionally, in the speech text processing device provided in Example 3 of the present invention, the second acquisition unit 1102 includes: a construction subunit, used to construct a regular expression to obtain a regular matching model; a first acquisition subunit, used to obtain a semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; a second acquisition subunit, used to obtain a target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and an assembly subunit, used to assemble the regular matching model, the semantic matching model and the intent recognition model into a target algorithm model.

[0104] Optionally, in the speech text processing device provided in Example 3 of the present invention, the second acquisition subunit includes: a construction module, which is used to construct a model based on the multi-task learning model of JointBert to obtain a first intent recognition model; an acquisition module, which is used to obtain training samples, wherein the training samples are used to train the first intent recognition model; a training module, which is used to train the first intent recognition model for a preset number of times based on the training samples using uncertainty sampling, and obtain the second intent recognition model after the preset number of training is completed; an optimization module, which is used to optimize the second intent recognition model to obtain a target intent recognition model.

[0105] Optionally, in the speech text processing device provided in Example 3 of the present invention, the optimization module includes: a first acquisition sub-module, used to acquire the intention recognition model obtained after each training, and perform integrated learning on the intention recognition model obtained after each training through a first preset algorithm to obtain a third intention recognition model; a learning sub-module, used to perform transfer learning on the second intention recognition model through a second preset algorithm based on the third intention recognition model to obtain a fourth intention recognition model; an optimization sub-module, used to optimize the fourth intention recognition model through a third preset algorithm to obtain a fifth intention recognition model; and a first processing sub-module, used to smooth the parameters of the fifth intention recognition model through a fourth preset algorithm to obtain a target intention recognition model.

[0106] Optionally, in the speech text processing device provided in Example 3 of the present invention, the optimization submodule includes: a second acquisition submodule, used to acquire adversarial samples and input the adversarial samples into a fourth intent recognition model to obtain a first output result; an input submodule, used to input the training samples into the fourth intent recognition model to obtain a second output result; a calculation submodule, used to obtain the maximum symmetric relative entropy based on the first output result and the second output result; an adding submodule, used to add the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; and a second processing submodule, used to optimize the fourth intent recognition model based on the target loss function to obtain a fifth intent recognition model.

[0107] It should be noted that the first acquisition unit 1101, the second acquisition unit 1102 and the processing unit 1103 described above correspond to steps S201 to S203 in Embodiment 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1 described above. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in Embodiment 1.

[0108] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0109] Example 4

[0110] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0111] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0112] In this embodiment, the computer terminal can execute the program code of the following steps in the method for processing speech text: obtaining speech text information to be processed; obtaining a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model, and a target intention recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information.

[0113] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: processing the speech text to be processed through the target algorithm model to obtain the target speech text information including: matching the speech text information to be processed with the regular expression in the regular matching model to obtain the first speech text information; semantically matching the speech text information to be processed with the standard sentence library in the semantic matching model to obtain the second speech text information; processing the speech text information to be processed through the target intention recognition model to obtain the third speech text information; taking the first speech text information, the second speech text information and the second speech text information as the target speech text information.

[0114] The above-mentioned computer terminal can also execute the program code of the following steps in the voice text processing method: processing the voice text information to be processed through the target intention recognition model to obtain the third voice text information, including: performing intent recognition and slot extraction on the voice text information to be processed through the target intention recognition model to obtain the intent label corresponding to the voice text information to be processed; and using the voice text information to be processed corresponding to the intent label that meets the preset requirements as the third voice text information.

[0115] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: after processing the speech text to be processed through the target algorithm model to obtain the target speech text information, the target speech text information is verified for accuracy to obtain the verification result; based on the verification result, the target algorithm model is iteratively updated.

[0116] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: obtaining the target algorithm model includes: constructing a regular expression to obtain a regular matching model; obtaining a semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; obtaining a target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and combining the regular matching model, the semantic matching model and the intent recognition model into a target algorithm model.

[0117] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: Obtaining the target intent recognition model includes: constructing a model based on the multi-task learning model of JointBert to obtain a first intent recognition model; obtaining training samples, wherein the training samples are used to train the first intent recognition model; based on the training samples, the first intent recognition model is trained a preset number of times using uncertainty sampling, and a second intent recognition model is obtained after the preset number of trainings are completed; the second intent recognition model is optimized to obtain a target intent recognition model.

[0118] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: optimizing the second intention recognition model to obtain the target intention recognition model includes: obtaining the intention recognition model obtained after each training, and integrating the intention recognition model obtained after each training through the first preset algorithm to obtain a third intention recognition model; based on the third intention recognition model, performing transfer learning on the second intention recognition model through the second preset algorithm to obtain a fourth intention recognition model; optimizing the fourth intention recognition model through the third preset algorithm to obtain a fifth intention recognition model; smoothing the parameters of the fifth intention recognition model through the fourth preset algorithm to obtain the target intention recognition model.

[0119] The above-mentioned computer terminal can also execute the program code of the following steps in the method for processing speech text: optimizing the fourth intention recognition model through the third preset algorithm to obtain the fifth intention recognition model, including: obtaining adversarial samples, and inputting the adversarial samples into the fourth intention recognition model to obtain a first output result; inputting the training samples into the fourth intention recognition model to obtain a second output result; obtaining the maximum symmetric relative entropy based on the first output result and the second output result; adding the maximum symmetric relative entropy to the loss function of the fourth intention recognition model to obtain the target loss function; optimizing the fourth intention recognition model based on the target loss function to obtain the fifth intention recognition model.

[0120] Fig.11 is a structural block diagram of a computer terminal according to an embodiment of the present application. Fig.11 As shown, the computer terminal 10 may include: one or more ( Fig.11 Only one processor and memory are shown.

[0121] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for processing voice text in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method for processing voice text. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0122] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: obtain the speech text information to be processed; obtain the target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intention recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information.

[0123] Optionally, the processor may also execute the program code of the following steps: processing the speech text to be processed through the target algorithm model to obtain target speech text information including: matching the speech text information to be processed with the regular expression in the regular matching model to obtain the first speech text information; semantically matching the speech text information to be processed with the standard sentence library in the semantic matching model to obtain the second speech text information; processing the speech text information to be processed through the target intention recognition model to obtain the third speech text information; and using the first speech text information, the second speech text information and the second speech text information as the target speech text information.

[0124] Optionally, the processor may also execute the program code of the following steps: processing the voice text information to be processed through a target intent recognition model to obtain third voice text information, including: performing intent recognition and slot extraction on the voice text information to be processed through a target intent recognition model to obtain an intent tag corresponding to the voice text information to be processed; and using the voice text information to be processed corresponding to the intent tag that meets preset requirements as the third voice text information.

[0125] Optionally, the processor may also execute the following program code: after processing the speech text to be processed by the target algorithm model to obtain the target speech text information, verify the accuracy of the target speech text information to obtain a verification result; and iteratively update the target algorithm model based on the verification result.

[0126] Optionally, the processor may also execute the program code of the following steps: obtaining the target algorithm model includes: constructing a regular expression to obtain a regular matching model; obtaining a semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; obtaining a target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and combining the regular matching model, the semantic matching model and the intent recognition model into a target algorithm model.

[0127] Optionally, the processor may also execute the program code of the following steps: obtaining a target intent recognition model includes: constructing a model based on JointBert's multi-task learning model to obtain a first intent recognition model; obtaining training samples, wherein the training samples are used to train the first intent recognition model; based on the training samples, training the first intent recognition model a preset number of times using uncertainty sampling, and obtaining a second intent recognition model after the preset number of trainings are completed; optimizing the second intent recognition model to obtain a target intent recognition model.

[0128] Optionally, the processor may also execute the program code of the following steps: optimizing the second intent recognition model to obtain a target intent recognition model, including: obtaining the intent recognition model obtained after each training, and integrating the intent recognition model obtained after each training through a first preset algorithm to obtain a third intent recognition model; based on the third intent recognition model, performing transfer learning on the second intent recognition model through a second preset algorithm to obtain a fourth intent recognition model; optimizing the fourth intent recognition model through the third preset algorithm to obtain a fifth intent recognition model; and smoothing the parameters of the fifth intent recognition model through the fourth preset algorithm to obtain a target intent recognition model.

[0129] Optionally, the processor may also execute the program code of the following steps: optimizing the fourth intent recognition model through a third preset algorithm to obtain a fifth intent recognition model, including: obtaining adversarial samples, and inputting the adversarial samples into the fourth intent recognition model to obtain a first output result; inputting the training samples into the fourth intent recognition model to obtain a second output result; obtaining the maximum symmetric relative entropy based on the first output result and the second output result; adding the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; optimizing the fourth intent recognition model based on the target loss function to obtain a fifth intent recognition model.

[0130] It can be understood by those skilled in the art that Fig.11 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.11 The structure of the electronic device is not limited. For example, the computer terminal 10 may also include Fig.11 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.11 Different configurations are shown.

[0131] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0132] Example 5

[0133] The embodiment of the present application also provides a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for processing speech text provided in the first embodiment.

[0134] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0135] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: obtaining speech text information to be processed; obtaining a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model, and a target intent recognition model. The speech text to be processed is processed by the target algorithm model to obtain the target speech text information.

[0136] The above-mentioned storage medium is also configured to store program codes for executing the following steps: processing the speech text to be processed through the target algorithm model to obtain target speech text information including: matching the speech text information to be processed with the regular expression in the regular matching model to obtain the first speech text information; semantically matching the speech text information to be processed with the standard sentence library in the semantic matching model to obtain the second speech text information; processing the speech text information to be processed through the target intention recognition model to obtain the third speech text information; and using the first speech text information, the second speech text information and the second speech text information as the target speech text information.

[0137] The above-mentioned storage medium is also configured to store program codes for executing the following steps: processing the speech text information to be processed through the target intention recognition model to obtain the third speech text information, including: performing intent recognition and slot extraction on the speech text information to be processed through the target intention recognition model to obtain the intent label corresponding to the speech text information to be processed; and using the speech text information to be processed corresponding to the intent label that meets the preset requirements as the third speech text information.

[0138] The above-mentioned storage medium is also configured to store program codes for executing the following steps: after processing the speech text to be processed through the target algorithm model to obtain the target speech text information, the target speech text information is verified for accuracy to obtain the verification result; based on the verification result, the target algorithm model is iteratively updated.

[0139] The above-mentioned storage medium is also configured to store program code for executing the following steps: obtaining the target algorithm model includes: constructing a regular expression to obtain a regular matching model; obtaining a semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; obtaining a target intent recognition model, wherein the intent recognition model is a multi-task learning model based on JointBert; and combining the regular matching model, the semantic matching model and the intent recognition model into a target algorithm model.

[0140] The above-mentioned storage medium is also configured to store program codes for executing the following steps: obtaining a target intent recognition model includes: constructing a model based on a multi-task learning model of JointBert to obtain a first intent recognition model; obtaining training samples, wherein the training samples are used to train the first intent recognition model; based on the training samples, the first intent recognition model is trained a preset number of times using uncertainty sampling, and a second intent recognition model is obtained after the preset number of trainings are completed; and the second intent recognition model is optimized to obtain a target intent recognition model.

[0141] The above-mentioned storage medium is also configured to store program codes for executing the following steps: optimizing the second intention recognition model to obtain a target intention recognition model, including: obtaining the intention recognition model obtained after each training, and integrating the intention recognition model obtained after each training through a first preset algorithm to obtain a third intention recognition model; based on the third intention recognition model, performing transfer learning on the second intention recognition model through a second preset algorithm to obtain a fourth intention recognition model; optimizing the fourth intention recognition model through the third preset algorithm to obtain a fifth intention recognition model; and smoothing the parameters of the fifth intention recognition model through the fourth preset algorithm to obtain a target intention recognition model.

[0142] The above-mentioned storage medium is also configured to store program codes for executing the following steps: optimizing the fourth intent recognition model through a third preset algorithm to obtain a fifth intent recognition model, including: obtaining an adversarial sample, and inputting the adversarial sample into the fourth intent recognition model to obtain a first output result; inputting the training sample into the fourth intent recognition model to obtain a second output result; obtaining the maximum symmetric relative entropy based on the first output result and the second output result; adding the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; optimizing the fourth intent recognition model based on the target loss function to obtain a fifth intent recognition model.

[0143] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0144] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0146] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0148] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0149] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for processing speech text, characterized in that: include: Get the voice text information to be processed; Acquire a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model, and a target intent recognition model; Processing the speech text to be processed by the target algorithm model to obtain target speech text information; Wherein, obtaining the target algorithm model includes: obtaining the target intention recognition model, wherein the second intention recognition model is optimized to obtain the target intention recognition model; Optimizing the second intent recognition model to obtain the target intent recognition model includes: Acquire the intent recognition model obtained after each training, and perform integrated learning on the intent recognition model obtained after each training through a first preset algorithm to obtain a third intent recognition model; According to the third intent recognition model, transfer learning is performed on the second intent recognition model through a second preset algorithm to obtain a fourth intent recognition model; Optimizing the fourth intent recognition model by using a third preset algorithm to obtain a fifth intent recognition model; Smoothing the parameters of the fifth intent recognition model using a fourth preset algorithm to obtain the target intent recognition model; The second intent recognition model is obtained by training the first intent recognition model based on training samples by adopting uncertainty sampling, and the first intent recognition model is constructed based on the multi-task learning model of JointBert.

2. The method according to claim 1, characterized in that The speech text to be processed is processed by the target algorithm model to obtain the target speech text information including: Matching the speech text information to be processed with the regular expression in the regular matching model to obtain first speech text information; Performing semantic matching on the speech text information to be processed and the standard sentence library in the semantic matching model to obtain second speech text information; Processing the to-be-processed speech and text information by means of the target intention recognition model to obtain third speech and text information; The first voice-text information, the second voice-text information and the second voice-text information are used as the target voice-text information.

3. The method according to claim 2, characterized in that The target intention recognition model is used to process the speech text information to be processed, and the third speech text information is obtained, including: Performing intent recognition and slot extraction on the speech text information to be processed by the target intent recognition model to obtain an intent label corresponding to the speech text information to be processed; The voice text information to be processed corresponding to the intention tag that meets the preset requirements is used as the third voice text information.

4. The method according to claim 1, characterized in that: After the speech text to be processed is processed by the target algorithm model to obtain target speech text information, the method further includes: Verifying the accuracy of the target voice and text information to obtain a verification result; According to the verification result, the target algorithm model is iteratively updated.

5. The method according to claim 1, characterized in that Obtaining the target algorithm model includes: Constructing a regular expression to obtain the regular matching model; Acquire the semantic matching model, wherein the semantic matching model is a multi-task learning model based on SentenceBert; Acquire the target intention recognition model, wherein the intention recognition model is a multi-task learning model based on JointBert; The regular matching model, the semantic matching model and the intent recognition model are combined into the target algorithm model.

6. The method according to claim 5, characterized in that Acquiring the target intention recognition model includes: The model is constructed based on JointBert's multi-task learning model to obtain the first intent recognition model; Acquire a training sample, wherein the training sample is used to train the first intent recognition model; According to the training samples, the first intent recognition model is trained a preset number of times by using uncertainty sampling, and a second intent recognition model is obtained after the preset number of trainings are completed; The second intent recognition model is optimized to obtain the target intent recognition model.

7. The method according to claim 1, characterized in that The fourth intention recognition model is optimized by the third preset algorithm to obtain a fifth intention recognition model including: Obtaining an adversarial sample, and inputting the adversarial sample into the fourth intent recognition model to obtain a first output result; Inputting the training sample into the fourth intent recognition model to obtain a second output result; Obtaining a maximum symmetric relative entropy according to the first output result and the second output result; Adding the maximum symmetric relative entropy to the loss function of the fourth intent recognition model to obtain a target loss function; The fourth intent recognition model is optimized according to the target loss function to obtain the fifth intent recognition model.

8. A method for processing speech text, characterized in that: include: Receive the voice and text information to be processed sent by the client; The speech text to be processed is processed by a target algorithm model in the cloud server to obtain target speech text information, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intention recognition model; Returning the target voice text information to the client; Wherein, obtaining the target algorithm model includes: obtaining the target intention recognition model, wherein the second intention recognition model is optimized to obtain the target intention recognition model; Optimizing the second intent recognition model to obtain the target intent recognition model includes: Acquire the intent recognition model obtained after each training, and perform integrated learning on the intent recognition model obtained after each training through a first preset algorithm to obtain a third intent recognition model; According to the third intent recognition model, transfer learning is performed on the second intent recognition model through a second preset algorithm to obtain a fourth intent recognition model; Optimizing the fourth intent recognition model by using a third preset algorithm to obtain a fifth intent recognition model; Smoothing the parameters of the fifth intent recognition model using a fourth preset algorithm to obtain the target intent recognition model; The second intent recognition model is obtained by training the first intent recognition model based on training samples by adopting uncertainty sampling, and the first intent recognition model is constructed based on the multi-task learning model of JointBert.

9. A speech text processing device, characterized in that: include: A first acquisition unit, used to acquire the voice text information to be processed; A second acquisition unit is used to acquire a target algorithm model, wherein the target algorithm model is composed of a regular matching model, a semantic matching model and a target intent recognition model; A processing unit, used for processing the speech text to be processed by using the target algorithm model to obtain target speech text information; The second acquisition unit includes: a second acquisition subunit, used to acquire the target intention recognition model, and the second acquisition subunit includes: an optimization module, used to optimize the second intention recognition model to obtain the target intention recognition model; The optimization module includes: a first acquisition submodule, used to acquire the intent recognition model obtained after each training, and perform integrated learning on the intent recognition model obtained after each training through a first preset algorithm to obtain a third intent recognition model; a learning submodule, used to perform transfer learning on the second intent recognition model through a second preset algorithm based on the third intent recognition model to obtain a fourth intent recognition model; an optimization submodule, used to optimize the fourth intent recognition model through a third preset algorithm to obtain a fifth intent recognition model; a first processing submodule, used to perform smoothing processing on the parameters of the fifth intent recognition model through a fourth preset algorithm to obtain the target intent recognition model; The second intent recognition model is obtained by training the first intent recognition model based on training samples by adopting uncertainty sampling, and the first intent recognition model is constructed based on the multi-task learning model of JointBert.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method for processing speech text according to any one of claims 1 to 7.

11. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the method for processing speech text described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Man-machine conversation method and device, electronic device and storage medium

    CN112365892A