Intention recognition method and device, electronic equipment and storage medium
By determining the intent labels and demand intent corpus of the target business in the intent recognition model and combining it with incremental training to optimize the model, the problem of intent recognition lag caused by business changes is solved, and efficient and accurate intent recognition is achieved.
Patent Information
- Application Number
- CN202510764460.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies are difficult to adapt to business changes quickly, and the efficiency of corpus organization is poor, resulting in the intent recognition model's ability to lag behind in recognizing new business intents, reducing the accuracy and reliability of intent recognition.
By determining intent labels based on the keywords of the target business, obtaining user demand expression information, matching demand intent corpus, and incrementally training the intent recognition model, using cross-entropy loss and elastic weight solidification regularization terms to optimize the training process, and dynamically adjusting training data to improve model adaptability.
It improves the efficiency of corpus organization and the ability of the intent recognition model to identify new business intents, and improves the accuracy and reliability of intent recognition.
Smart Images

Figure CN120632099A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an intent recognition method, device, electronic device, and storage medium. Background Art
[0002] With the continuous development of computer technology, online customer service systems have become an important means for enterprises to improve service quality and customer satisfaction. During the operation of online customer service systems, user intent recognition, as one of its core functions, directly affects the accuracy and efficiency of service responses.
[0003] In related technologies, the application of machine learning models, especially deep learning models, obtained through training with large-scale annotated corpus can significantly improve the recognition effect.
[0004] However, with the expansion of business scope and the continuous evolution of customer needs, new business scenarios frequently emerge, and traditional intent recognition models struggle to adapt quickly to these changes. Furthermore, related technologies require business personnel to manually organize business data, resulting in poor efficiency and a lag in the ability to recognize new business intent, reducing the accuracy and reliability of intent recognition.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0006] The present disclosure provides an intent recognition method, device, electronic device and storage medium, which, at least to a certain extent, overcome the problems that related technologies are difficult to adapt to rapid changes, have poor efficiency in corpus organization and lag in the ability to recognize new business intents, thereby reducing the accuracy and reliability of intent recognition.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.
[0008] According to one aspect of the present disclosure, there is provided a method for identifying intent, comprising:
[0009] Determine intent tags based on keywords for your target business;
[0010] Obtain user demand expression information corresponding to the target business, match the user demand expression information with the intent tag, and obtain the demand intent corpus of the target business, wherein any user demand expression data corresponds to at least one intent tag;
[0011] Incrementally training the intent recognition model using the target business's demand intent corpus to obtain a trained intent recognition model;
[0012] The trained intention recognition model is used to identify user intention for the target business.
[0013] In some exemplary embodiments, determining an intent tag based on a keyword of a target business includes:
[0014] Determining business rules corresponding to the target business;
[0015] Filtering the keywords according to the business rules to obtain filtered keywords;
[0016] The filtered keywords are used as the intent tags.
[0017] In some exemplary embodiments, the intent recognition method provided by the embodiments of the present disclosure further includes:
[0018] Parsing the text data corresponding to the target business to obtain a text block;
[0019] Perform text embedding processing on each text block to obtain a text vector;
[0020] Keyword extraction is performed on each text vector to obtain keywords of the target business.
[0021] In some exemplary embodiments, incremental training of the intent recognition model using the target business's demand intent corpus to obtain a trained intent recognition model includes:
[0022] Obtaining first training data based on the target business demand intention corpus and the historical business demand intention corpus;
[0023] The intent recognition model is incrementally trained using the first training data to obtain a trained intent recognition model, wherein the loss function used in the incremental training includes a cross-entropy loss and / or a regularization term determined based on elastic weight solidification.
[0024] In some exemplary embodiments, obtaining first training data based on the target business's demand intention corpus and historical business's demand intention corpus includes:
[0025] Performing feature enhancement processing on the target business demand intention corpus;
[0026] The first training data is obtained by combining the demand intention corpus after feature enhancement processing and the demand intention corpus of the historical business based on a preset ratio.
[0027] In some exemplary embodiments, the intent recognition method provided by the embodiments of the present disclosure further includes:
[0028] Use the model validator to evaluate the accuracy of the trained intent recognition model and obtain the evaluation results;
[0029] Dynamically adjusting the amount of the first training data according to the evaluation result to obtain second training data;
[0030] The intent recognition model is iteratively and incrementally trained using the second training data to obtain a trained intent recognition model.
[0031] In some exemplary embodiments, dynamically adjusting the amount of the first training data according to the evaluation result to obtain the second training data includes:
[0032] The amount of the first training data is dynamically adjusted according to the evaluation result and the loss function to obtain the second training data.
[0033] According to another aspect of the present disclosure, there is also provided an intention recognition device, comprising:
[0034] Intent expression determination module, used to determine the intent label based on the keywords of the target business;
[0035] A demand intention corpus determination module is used to obtain user demand expression information corresponding to the target business, match the user demand expression information with the intention label, and obtain the demand intention corpus of the target business, wherein any user demand expression data corresponds to at least one intention label;
[0036] An incremental training module is used to incrementally train the intent recognition model using the target business demand intent corpus to obtain a trained intent recognition model;
[0037] The user intention recognition module is used to recognize the user intention of the target business through the trained intention recognition model.
[0038] In some exemplary embodiments, the intention expression determination module is used to determine the business rules corresponding to the target business; filter the keywords according to the business rules to obtain filtered keywords; and use the filtered keywords as the intention tags.
[0039] In some exemplary embodiments, the apparatus for identifying intention provided by the embodiments of the present disclosure further includes:
[0040] The keyword determination module is used to parse the text data corresponding to the target business to obtain text blocks; perform text embedding processing on each text block to obtain text vectors; and perform keyword extraction on each text vector to obtain keywords of the target business.
[0041] In some exemplary embodiments, the incremental training module is used to obtain first training data based on the demand intention corpus of the target business and the demand intention corpus of the historical business; the intent recognition model is incrementally trained through the first training data to obtain a trained intent recognition model, wherein the loss function used in the incremental training includes cross-entropy loss and / or a regularization term determined based on elastic weight solidification.
[0042] In some exemplary embodiments, the incremental training module is used to perform feature enhancement processing on the demand intention corpus of the target business; and to obtain the first training data based on a preset ratio by combining the demand intention corpus after feature enhancement processing with the demand intention corpus of the historical business.
[0043] In some exemplary embodiments, the incremental training module is also used to perform accuracy evaluation on the trained intent recognition model through a model validator to obtain an evaluation result; dynamically adjust the amount of the first training data according to the evaluation result to obtain second training data; and iteratively perform incremental training on the intent recognition model through the second training data to obtain a trained intent recognition model.
[0044] In some exemplary embodiments, the incremental training module is used to dynamically adjust the amount of the first training data according to the evaluation result and the loss function to obtain the second training data.
[0045] According to another aspect of the present disclosure, an electronic device is also provided, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-mentioned intention recognition methods by executing the executable instructions.
[0046] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned intention recognition methods.
[0047] According to another aspect of the present disclosure, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the intent recognition method provided in any of the optional embodiments of the present disclosure.
[0048] The technical solution provided in the embodiments of the present disclosure can obtain targeted intent labels through new target businesses, and based on the demand intent corpus required for training, improve the efficiency of corpus organization while adapting to business changes. In addition, the present disclosure can perform incremental training on the intent recognition model based on the demand intent corpus, thereby improving the model's ability to recognize new business intents and improving the accuracy and reliability of intent recognition.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0051] Figure 1 A schematic diagram showing a system architecture in an embodiment of the present disclosure;
[0052] Figure 2 A flow chart of an intention recognition method according to an embodiment of the present disclosure is shown;
[0053] Figure 3 A schematic diagram of a system architecture for intent recognition according to an embodiment of the present disclosure is shown;
[0054] Figure 4 A schematic diagram of an intent recognition process according to an embodiment of the present disclosure is shown;
[0055] Figure 5 A schematic diagram of an incremental training process according to an embodiment of the present disclosure is shown;
[0056] Figure 6 A schematic diagram of an intention recognition device according to an embodiment of the present disclosure is shown;
[0057] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0058] Figure 8 A schematic diagram of a computer-readable storage medium in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0059] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0060] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0061] The specific implementation of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0062] Figure 1 FIG. 1 shows an exemplary application system architecture diagram to which the intention recognition method in the embodiment of the present disclosure can be applied. Figure 1 As shown, the system architecture may include a terminal device 101 , a network 102 and a server 103 .
[0063] Among them, the terminal device 101 can send the target business keywords to the server 103, and the server 103 can determine the intent tag based on the target business keywords. Then, the server 103 can obtain the user demand expression information corresponding to the target business, match the user demand expression information with the intent tag, and obtain the demand intent corpus of the target business, wherein any user demand expression data corresponds to at least one intent tag; then, the server 103 can incrementally train the intent recognition model using the demand intent corpus of the target business to obtain a trained intent recognition model; finally, the server 103 can use the trained intent recognition model to identify user intent for the target business.
[0064] Alternatively, the terminal device 101 can determine the intent tag based on the keywords of the target business. Then, the terminal device 101 can obtain the user demand expression information corresponding to the target business, match the user demand expression information with the intent tag, and obtain the demand intent corpus of the target business, wherein any user demand expression data corresponds to at least one intent tag; then, the terminal device 101 can send the demand intent corpus of the target business to the server 103, and the server 103 can incrementally train the intent recognition model based on the demand intent corpus of the target business to obtain a trained intent recognition model; finally, the server 103 can use the trained intent recognition model to recognize the user intent of the target business.
[0065] The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103 , and can be a wired network or a wireless network.
[0066] Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network). In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0067] The terminal device 101 can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.
[0068] The server 103 may be a server that provides various services, such as a background management server that provides support for the devices operated by the user using the terminal device 101. The background management server may analyze and process the received request and other data, and feed back the processing results to the terminal device.
[0069] Optionally, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0070] Those skilled in the art will know that Figure 1 The number of terminal devices 101, networks 102 and servers 103 in the embodiment is only illustrative, and any number of terminal devices 101, networks 102 and servers 103 may be provided according to actual needs. This embodiment of the present disclosure does not limit this.
[0071] Under the above system architecture, an embodiment of the present disclosure provides an intent recognition method, which can be executed by any electronic device with computing and processing capabilities.
[0072] In some embodiments, the intent recognition method provided in the embodiments of the present disclosure can be executed by the terminal device of the above-mentioned system architecture; in other embodiments, the intent recognition method provided in the embodiments of the present disclosure can be executed by the server in the above-mentioned system architecture; in other embodiments, the intent recognition method provided in the embodiments of the present disclosure can be implemented by the terminal device and server in the above-mentioned system architecture through interaction.
[0073] Figure 2 A flow chart of an intention recognition method according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the intention recognition method provided in the embodiment of the present disclosure includes the following steps S202 to S208.
[0074] S202: Determine an intent tag based on the keywords of the target business.
[0075] The embodiments of this disclosure do not limit the target business. For example, the target business may include consulting services for new products launched by enterprises, online customer service for e-commerce platforms, library information retrieval, etc. The embodiments of this disclosure also do not limit the keywords of the target business. For example, taking consulting services for new products launched by enterprises as an example, keywords may include function introduction, technical parameters, user guide, etc. Alternatively, taking online customer service for e-commerce platforms as an example, keywords may include product recommendations, return and exchange procedures, logistics inquiries, etc.
[0076] In some exemplary embodiments, the intent recognition method provided by the embodiments of the present disclosure may also include: parsing the text data corresponding to the target business to obtain text blocks; performing text embedding processing on each text block to obtain text vectors; and performing keyword extraction on each text vector to obtain keywords of the target business.
[0077] Exemplarily, the text data can be in the format of pdf, word, etc. When determining the target business keywords, the format of the text data can be identified first, and the corresponding parsing module can be selected for processing. During the parsing process, for example, the content can be divided into multiple text blocks according to the document structure, and information such as semantic context relationships can be retained. Afterwards, each text block can be input into the text embedding module to obtain the corresponding text vector, and any text block can correspond to a text vector. Among them, due to the limitation of the input length of the text embedding model, the embodiment of the present disclosure can make the text content of the blocks overlap by 50%, so that the text context after the blocks can be coherent, ensuring that the candidate retrieval information is not missed.
[0078] The embodiments of the present disclosure do not limit the text embedding module. For example, the text embedding module may be bge-large-zh-v1.5 (Chinese large language model vectorized representation version 1.5), multilingual-e5-large (multilingual large language model vectorized representation model), etc.
[0079] In an exemplary embodiment, after obtaining the text vector, the text vector can be stored in a knowledge base. Furthermore, when performing keyword extraction, keywords can be extracted from the text vector in the knowledge base. The algorithm used for keyword extraction can be, for example, KeyBERT (a keyword extraction model), Rake (Rapid Automatic Keyword Extraction), and MDERank (Multi Document Ensemble Ranking for Keyword Extraction).
[0080] In some exemplary embodiments, determining an intent tag based on keywords of a target business includes: determining business rules corresponding to the target business; filtering the keywords according to the business rules to obtain filtered keywords; and using the filtered keywords as intent tags.
[0081] In some possible implementations, after obtaining keywords, each keyword can be deduplicated, and then the deduplicated keywords can be filtered according to business rules. The disclosed embodiments do not limit these business rules, which can describe the requirements related to the keywords of the target business. For example, the business rules can include length requirements for the extracted keywords, requirements for sensitive words, requirements for relevance to the target business, prefix requirements, etc. Finally, the keywords remaining after filtering can be used as intent tags.
[0082] S204, obtaining user demand expression information corresponding to the target business, matching the user demand expression information with the intent tag, and obtaining the demand intent corpus of the target business, wherein any user demand expression data corresponds to at least one intent tag.
[0083] In an exemplary embodiment, a customer's problem description can be obtained from a historical conversation database, and user demand expression information corresponding to the target business can be generated based on the problem description. This user demand expression information can include, for example, "What models does this product include?" or "How do I use this function?" The user demand expression information can then be matched with the intent tag.
[0084] In some exemplary embodiments, a pre-trained language model can be used to generate user demand expression information corresponding to the target business based on user demand expression information and relevant information about the target business extracted from a knowledge base. Then, intent labels can be matched against each user demand expression information. For example, matching can be performed through semantic similarity calculation or based on an intent classification model.
[0085] It should be noted that after matching the user demand expression information with the intent label, the generated demand intent corpus can be manually reviewed to ensure the quality of the demand intent corpus.
[0086] S206 , incrementally train the intent recognition model using the target business’s demand intent corpus to obtain a trained intent recognition model.
[0087] The embodiments of the present disclosure do not limit the type of the intent recognition model. For example, the intent recognition model can be a non-large model text classification model such as a support vector machine, BERT (Bidirectional Encoder Representations from Transformers), or RoBERTa (A Robustly Optimized BERT Pretraining Approach).
[0088] In an exemplary embodiment, the target business demand intent corpus can be standardized before incremental training, such as special character filtering, sensitive information desensitization, text normalization, etc., to ensure that the data quality meets the training requirements.
[0089] In some exemplary embodiments, the intent recognition model is incrementally trained using the demand intent corpus of the target business to obtain a trained intent recognition model, including: obtaining first training data based on the demand intent corpus of the target business and the demand intent corpus of historical businesses; and the intent recognition model is incrementally trained using the first training data to obtain a trained intent recognition model, wherein the loss function used in the incremental training includes cross-entropy loss and / or a regularization term determined based on elastic weight solidification.
[0090] In some possible implementations, the disclosed embodiments may perform incremental training on the intent recognition model based on an EWC (Elastic Weight Consolidation) algorithm, wherein the EWC algorithm may be used to construct a loss function.
[0091] In an exemplary embodiment, the loss function may be as shown in the following formula (1).
[0092]
[0093] In the formula (1), L(θ) can represent the loss function. CE (θ) can represent the cross entropy loss, which can be used to measure the difference between the probability distribution predicted by the intent recognition model and the true label.
[0094] in addition, It can be used to represent the regularization term of the EWC algorithm.
[0095] Among them, λ can be a hyperparameter used to control the strength of EWC regularization. θ i 、 It can represent the current parameter value and the optimal value of the parameter after the old task training is completed. iThe parameter θ can be i Importance measure for old tasks.
[0096] In an exemplary embodiment, the F i It can be expressed by the following formula (2).
[0097]
[0098] In formula (2), D old It can represent the data distribution of the old task, that is, the data set that the intention recognition model has learned before. x can represent the input of the model. logp θ (y|x) can represent the confidence of the intent recognition model that the input x belongs to category y.
[0099] It should be noted that the incremental training can be an iterative training process. After any iterative training is completed, the loss function corresponding to the iterative training can be obtained. Then, whether the incremental training is completed can be determined based on whether the loss function meets the training end condition.
[0100] The disclosed embodiment sets the loss function based on elastic weight solidification, which can penalize the model's deviation from the old task knowledge when learning a new task, thereby maintaining the old task knowledge and further improving the accuracy and reliability of intent recognition.
[0101] In some exemplary embodiments, the first training data is obtained based on the demand intention corpus of the target business and the demand intention corpus of the historical business, including: performing feature enhancement processing on the demand intention corpus of the target business; and obtaining the first training data based on a preset ratio by combining the demand intention corpus after feature enhancement processing with the demand intention corpus of the historical business.
[0102] Exemplarily, feature enhancement processing may be performed on the target business demand intention corpus. For example, the feature enhancement processing may include synonym replacement, back translation enhancement, random insertion, and other processing methods.
[0103] In some possible implementations, the first training data can also perform data enhancement on low-frequency samples corresponding to various types of intent in the target business based on the SMOTE (Synthetic Minority Over-sampling Technique) algorithm to improve the classification accuracy of the intent recognition model under unbalanced corpus, and protect against catastrophic forgetting when expanding the diversity of samples, thereby improving the intent recognition model's ability to recognize low-frequency user questions and improving the model's generalization performance.
[0104] The embodiment of the present disclosure does not limit the preset ratio between the demand intention corpus of the target business and the demand intention corpus of the historical business. The preset ratio may be, for example, 7:3 or 8:2.
[0105] In some exemplary embodiments, the intent recognition method provided by the embodiments of the present disclosure may further include: performing accuracy evaluation on the trained intent recognition model through a model validator to obtain an evaluation result; dynamically adjusting the amount of first training data according to the evaluation result to obtain second training data; and iteratively incrementally training the intent recognition model through the second training data to obtain a trained intent recognition model.
[0106] In an exemplary embodiment, the disclosed embodiments can use a historical data test set and a target business data test set to evaluate the accuracy of an incrementally trained intent recognition model. If the accuracy of the incrementally trained intent recognition model on the historical data test set decreases by less than 5%, and the accuracy on the target business data test set is greater than 80%, then the intent recognition model is determined to meet the accuracy evaluation criteria and can be selected as a deployment candidate. Otherwise, the amount of the first training data needs to be dynamically adjusted based on the evaluation results.
[0107] In some exemplary embodiments, the amount of the dynamically adjusted second training data may be determined based on the following formula (3).
[0108]
[0109] In the formula (3), N adj It can represent the number of second training data. new It can be equal to the number of the first training data, that is, the initial number of training data used in this incremental training of the target business. A1 can represent the accuracy of the intent recognition model corresponding to the historical business for the historical business. A2 can represent the accuracy of the intent recognition model for the target business after incremental training for the target business. A3 can represent the accuracy of the intent recognition model for the historical business after incremental training for the target business. α can be an adjustment parameter used to control the amplitude of adjustment of the number of training data according to the accuracy difference. The value range of α can be [0, 1].
[0110] In some exemplary embodiments, dynamically adjusting the amount of the first training data according to the evaluation result to obtain the second training data includes: dynamically adjusting the amount of the first training data according to the evaluation result and the loss function to obtain the second training data.
[0111] In an exemplary embodiment, the evaluation result and the loss function may be comprehensively considered to achieve dynamic adjustment of the amount of the first training data.
[0112] S208: Identify user intent for the target business using the trained intent recognition model.
[0113] In some possible implementations, while a trained intent recognition model is being used to identify user intent for a target service, changes to the production environment may occur. In this case, the trained intent recognition model can be hot-updated in the production environment, and the pre-hot-update intent recognition model can be cached, gradually switching production environment traffic to the hot-updated new model. This hot-updated new model can then be continuously monitored, and if the error rate increases by 5%, the model can be rolled back to the pre-hot-update intent recognition model.
[0114] Optionally, the embodiment of the present disclosure can record the accuracy and latency of the trained intent recognition model after it goes online, and simultaneously record newly input abnormal data to provide new data and business references for subsequent model adjustments.
[0115] The method provided by the embodiment of the present disclosure can obtain targeted intent labels through new target businesses, and based on the demand intent corpus required for training, improve the efficiency of corpus organization while adapting to business changes. In addition, the present disclosure can perform incremental training on the intent recognition model based on the demand intent corpus, thereby improving the model's ability to recognize new business intents and improving the accuracy and reliability of intent recognition.
[0116] It should be noted that the acquisition, storage, use, and processing of data in the technical solution disclosed herein are in compliance with the relevant provisions of national laws and regulations. The various types of data such as personal identity data, operation data, behavioral data, etc. related to individuals, customers, and groups obtained in the embodiments of the present disclosure have all been authorized.
[0117] Figure 3 A schematic diagram of the system architecture of intent recognition provided by an embodiment of the present disclosure is shown.
[0118] In this Figure 3 In the case of an incoming call, the user's intention can be identified and the corresponding intelligent service or manual service can be provided. The content of this intelligent service or manual service can also be stored in the historical conversation library.
[0119] Among them, the intent recognition optimization module used in this intent recognition can extract intent labels based on the target business product documents, and then obtain user demand expression information from the historical dialogue library to generate the demand intent corpus required for incremental training, and then perform incremental training fine-tuning.
[0120] Figure 4 A schematic diagram of the process of intent recognition provided by an embodiment of the present disclosure is shown.
[0121] The target business product document can be parsed and vectorized to obtain a text vector. The text vector can then be stored in a knowledge base. Keywords can then be extracted from the text vector in the knowledge base to generate intent labels, which are then added to the classifier.
[0122] For example, the disclosed embodiments can obtain user demand expression information from historical conversation libraries, match it with text vectors in the knowledge base, and use a large model to generate demand intent corpus. The demand intent corpus generated by the large model can then be manually reviewed to perform incremental training of the intent recognition model.
[0123] Figure 5 A schematic diagram of an incremental training process provided by an embodiment of the present disclosure is shown.
[0124] In this Figure 5 In this process, the target business's demand intent corpus is first obtained and then fed into the data cleaning module to standardize it. The cleaned demand intent corpus is then fed into the feature enhancement module, where incremental training is implemented using the incremental training engine. Furthermore, during incremental training, the model validator can be used to evaluate accuracy, dynamically adjusting the amount of training data based on the model validator's evaluation results.
[0125] Then, the trained intent recognition model can be hot-updated in the production environment, and online monitoring feedback can be performed on the new model after the hot update.
[0126] Based on the same inventive concept, the present disclosure also provides an intention recognition device, as described in the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0127] Figure 6 A schematic diagram of an intention recognition device according to an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the device includes:
[0128] Intention expression determination module 601, used to determine the intention label according to the keywords of the target business;
[0129] The demand intention corpus determination module 602 is used to obtain user demand expression information corresponding to the target business, match the user demand expression information with the intention label, and obtain the demand intention corpus of the target business, wherein any user demand expression data corresponds to at least one intention label;
[0130] Incremental training module 603, used to perform incremental training on the intent recognition model using the target business demand intent corpus to obtain a trained intent recognition model;
[0131] The user intention recognition module 604 is used to recognize the user intention of the target business through the trained intention recognition model.
[0132] In some exemplary embodiments, the intention expression determination module 601 is used to determine the business rules corresponding to the target business; filter the keywords according to the business rules to obtain filtered keywords; and use the filtered keywords as intention tags.
[0133] In some exemplary embodiments, the apparatus for identifying intention provided by the embodiments of the present disclosure further includes:
[0134] The keyword determination module is used to parse the text data corresponding to the target business to obtain text blocks; perform text embedding processing on each text block to obtain text vectors; and perform keyword extraction on each text vector to obtain keywords for the target business.
[0135] In some exemplary embodiments, the incremental training module 603 is used to obtain first training data based on the demand intention corpus of the target business and the demand intention corpus of the historical business; incremental training is performed on the intent recognition model through the first training data to obtain a trained intent recognition model, wherein the loss function used in the incremental training includes cross-entropy loss and / or a regularization term determined based on elastic weight solidification.
[0136] In some exemplary embodiments, the incremental training module 603 is used to perform feature enhancement processing on the demand intention corpus of the target business; the demand intention corpus after feature enhancement processing and the demand intention corpus of the historical business are compared to obtain first training data based on a preset ratio.
[0137] In some exemplary embodiments, the incremental training module 603 is also used to evaluate the accuracy of the trained intent recognition model through a model validator to obtain an evaluation result; dynamically adjust the amount of first training data according to the evaluation result to obtain second training data; and iteratively incrementally train the intent recognition model through the second training data to obtain a trained intent recognition model.
[0138] In some exemplary embodiments, the incremental training module 603 is configured to dynamically adjust the amount of the first training data according to the evaluation result and the loss function to obtain the second training data.
[0139] The device provided by the embodiment of the present disclosure can obtain targeted intent labels through new target businesses, and based on the demand intent corpus required for training, it can improve the efficiency of corpus organization while adapting to business changes. In addition, the present disclosure can perform incremental training on the intent recognition model based on the demand intent corpus, thereby improving the model's ability to recognize new business intents and improving the accuracy and reliability of intent recognition.
[0140] It should be noted that the above-mentioned intent expression determination module 601, demand intent corpus determination module 602, incremental training module 603, and user intent recognition module 604 correspond to S202 to S208 in the method embodiment. The examples and application scenarios implemented by the above-mentioned modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned method embodiment. It should be noted that the above-mentioned modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.
[0141] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."
[0142] An embodiment of the present disclosure provides an electronic device, illustratively comprising: a processor and a memory. The memory may be used to store executable instructions of the processor. The processor is configured to perform the intent recognition method provided by the embodiment of the present disclosure by executing the executable instructions.
[0143] Refer to the following Figure 7 700 according to this embodiment of the present disclosure will be described. Figure 7 The electronic device 700 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0144] like Figure 7 As shown, electronic device 700 is implemented as a general-purpose computing device. Components of electronic device 700 may include, but are not limited to, at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting various system components (including storage unit 720 and processing unit 710).
[0145] The storage unit stores program code that can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the "Exemplary Method" section above according to various exemplary embodiments of the present disclosure. For example, the processing unit 710 can perform the following steps of the aforementioned method embodiment:
[0146] Determine the intent label based on the keywords of the target business; obtain the user demand expression information corresponding to the target business, match the user demand expression information with the intent label, and obtain the demand intent corpus of the target business, where any user demand expression data corresponds to at least one intent label; incrementally train the intent recognition model through the demand intent corpus of the target business to obtain the trained intent recognition model; and perform user intent recognition on the target business through the trained intent recognition model.
[0147] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 7201 and / or a cache memory unit 7202 , and may further include a read-only memory unit (ROM) 7203 .
[0148] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0149] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0150] The electronic device 700 can also communicate with one or more external devices 740 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 750. Furthermore, the electronic device 700 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 700, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0151] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0152] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer program product, which includes: a computer program, which implements the above-mentioned intention recognition method when executed by a processor.
[0153] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the intention recognition method provided in the embodiment of the present disclosure can be implemented. The computer-readable storage medium can be a readable signal medium or a readable storage medium.
[0154] Figure 8 A schematic diagram of a computer-readable storage medium according to an embodiment of the present disclosure is shown. Figure 8As shown, the computer-readable storage medium 800 stores a program product capable of implementing the above-mentioned method of the present disclosure. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Methods" section above.
[0155] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0156] In the present disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0157] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0158] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0159] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0160] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0161] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0162] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope of the present disclosure being indicated by the appended claims.
Claims
1. A method for identifying intention, characterized in that: include: Determine intent tags based on keywords for your target business; Obtain user demand expression information corresponding to the target business, match the user demand expression information with the intent tag, and obtain the demand intent corpus of the target business, wherein any user demand expression data corresponds to at least one intent tag; Incrementally training the intent recognition model using the target business's demand intent corpus to obtain a trained intent recognition model; The trained intention recognition model is used to identify user intention for the target business.
2. The intention recognition method according to claim 1, characterized in that Determining the intent tag based on the keywords of the target business includes: Determining business rules corresponding to the target business; Filtering the keywords according to the business rules to obtain filtered keywords; The filtered keywords are used as the intent tags.
3. The intention recognition method according to claim 1, characterized in that The method further comprises: Parsing the text data corresponding to the target business to obtain a text block; Perform text embedding processing on each text block to obtain a text vector; Keyword extraction is performed on each text vector to obtain keywords of the target business.
4. The intention recognition method according to any one of claims 1 to 3, characterized in that: The incremental training of the intent recognition model using the target business demand intent corpus to obtain a trained intent recognition model includes: Obtaining first training data based on the target business demand intention corpus and the historical business demand intention corpus; The intent recognition model is incrementally trained using the first training data to obtain a trained intent recognition model, wherein the loss function used in the incremental training includes a cross-entropy loss and / or a regularization term determined based on elastic weight solidification.
5. The intention recognition method according to claim 4, characterized in that: The obtaining of first training data based on the target business demand intention corpus and the historical business demand intention corpus includes: Performing feature enhancement processing on the target business demand intention corpus; The first training data is obtained by combining the demand intention corpus after feature enhancement processing and the demand intention corpus of the historical business based on a preset ratio.
6. The intention recognition method according to claim 4, characterized in that: The method further comprises: Use the model validator to evaluate the accuracy of the trained intent recognition model and obtain the evaluation results; Dynamically adjusting the amount of the first training data according to the evaluation result to obtain second training data; The intent recognition model is iteratively and incrementally trained using the second training data to obtain a trained intent recognition model.
7. The intention recognition method according to claim 6, characterized in that: The dynamically adjusting the amount of the first training data according to the evaluation result to obtain the second training data includes: The amount of the first training data is dynamically adjusted according to the evaluation result and the loss function to obtain the second training data.
8. An intention recognition device, characterized in that: include: Intent expression determination module, used to determine the intent label based on the keywords of the target business; A demand intention corpus determination module is used to obtain user demand expression information corresponding to the target business, match the user demand expression information with the intention label, and obtain the demand intention corpus of the target business, wherein any user demand expression data corresponds to at least one intention label; An incremental training module is used to incrementally train the intent recognition model using the target business demand intent corpus to obtain a trained intent recognition model; The user intention recognition module is used to recognize the user intention of the target business through the trained intention recognition model.
9. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the intention recognition method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the intention recognition method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the intention recognition method as described in any one of claims 1 to 7.