WO2023178965A1 - Intent recognition method and apparatus, and electronic device and storage medium - Google Patents

Intent recognition method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2023178965A1
WO2023178965A1 PCT/CN2022/120942 CN2022120942W WO2023178965A1 WO 2023178965 A1 WO2023178965 A1 WO 2023178965A1 CN 2022120942 W CN2022120942 W CN 2022120942W WO 2023178965 A1 WO2023178965 A1 WO 2023178965A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
intention
input data
long
input
Prior art date
Application number
PCT/CN2022/120942
Other languages
French (fr)
Chinese (zh)
Inventor
董益华
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023178965A1 publication Critical patent/WO2023178965A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence technology such as information processing, and in particular, to an intention recognition method, device, electronic device and storage medium.
  • Intent recognition can also be called intent detection (Intent Detection). It is used to determine which field the input information is used to perform which operation. Its essence is a multi-class classification problem and is widely used in intelligent search and human-computer interaction. interactive technology. One embodiment of intelligent interaction is that intelligent products or applications can understand requirements through intent recognition and provide appropriate responses based on the requirements.
  • the existing intent recognition methods basically adopt the one-size-fits-all principle when processing queries, and do not differentiate between long-tail queries and non-long-tail queries.
  • Two different types of query processing methods The concentration of long-tail queries is low, but the cumulative number is close to infinite.
  • the search volume of a single long-tail query is not large, it has a long-tail effect, and the total search volume is comparable to the non-long-tail query volume in the head. If we do not distinguish the processing methods of two different types of queries, long-tail query and non-long-tail query, and use a unified processing method to understand the query, it will lead to a low accuracy of intent understanding.
  • Embodiments of the present application provide an intention recognition method, device, electronic device and storage medium, which can improve the accuracy of intention understanding.
  • an intent identification method including:
  • the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
  • the intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  • an intention recognition device including:
  • the first sample data acquisition module is used to obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result sorting data;
  • An abstract generalized entity word acquisition module is used to perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words
  • An intent matching generalization dictionary generation module used to logically combine the abstract generalization entity words and the intent matching result sorting data to generate an intent matching generalization dictionary
  • a first intention recognition model building module configured to build a first intention recognition model according to the intention matching generalization dictionary
  • An input data input module to be recognized configured to input the input data to be recognized into the first intention recognition model when it is determined that the input data to be recognized is non-long-tail input data;
  • An intent recognition result output module is configured to output the intent recognition result of the input data to be recognized according to the first intent recognition model.
  • an electronic device including:
  • the memory stores a computer program that can be executed by the at least one processor.
  • the intention recognition method is implemented, including:
  • the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
  • the intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  • a computer-readable storage medium stores computer instructions.
  • the computer instructions are used to implement an intention recognition method when executed by a processor, including:
  • the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
  • the intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  • the embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data
  • the result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
  • Figure 1 is a flow chart of an intention identification method provided in Embodiment 1 of the present application.
  • Figure 2 is a flow chart of an intention identification method provided in Embodiment 2 of the present application.
  • Figure 3 is a schematic diagram of a BERT model training process provided in Embodiment 2 of the present application.
  • Figure 4 is a schematic diagram of an intention recognition device provided in Embodiment 4 of the present application.
  • FIG. 5 shows a schematic structural diagram of an electronic device that can be used to implement embodiments of the present application.
  • AI Artificial Intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
  • Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, mechatronics and other technologies.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometric technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • Figure 1 is a flow chart of an intent recognition method provided in Embodiment 1 of the present application. This embodiment can be applied to the situation of constructing an intent recognition model based on non-long-tail input sample data to perform intent recognition on non-long-tail input data.
  • the method can be executed by an intention recognition device, which can be implemented by software and/or hardware, and can generally be integrated in an electronic device.
  • the electronic device can be a terminal device or a server device.
  • the specific device type of the electronic device is not limited.
  • the method includes the following operations:
  • the first target intention sample data may be sample data used to build the first intention recognition model.
  • the original intent sample data can be the full amount of historical intent data.
  • the intent data may be user intent data, such as user query data, or intent data automatically generated by a device or program, such as a data search instruction issued by a device or a simulated real user issuing query data, etc., in the embodiment of this application
  • the data type and generation method of intent data are not limited.
  • Input sample data is sample data that requires intent to understand. For example, it can be query data input by the user, or query data input by a device or program, etc.
  • the input sample data may be text type data or voice type data. The embodiment of the present application does not limit the data type of the user input sample data.
  • long-tail data refers to non-target data but is related to the target data, and can also bring combined data that can bring search traffic.
  • Non-long tail data refers to target data.
  • the non-long-tail input sample data can be input sample data in a non-long-tail form, that is, the non-long-tail input sample data can be directly used as keywords or directly segmented to obtain multiple keywords for intent understanding.
  • the ranking data of the intent matching results can be the ranking results of the feedback data obtained after understanding the intent of the non-long-tail user input sample data.
  • the intent may be any type of intent, including but not limited to search intent, interaction intent, etc.
  • an object with an intent such as a user, device, or program, it can be simply called an intent output object.
  • the intent may be a search intent.
  • the search intent of the intent output object can be identified based on the search statement, so that the intent output object can be output according to the search intent of the intent output object.
  • the non-long-tail input sample data can be the non-long-tail search statement of the intent output object
  • the intent matching result ranking data can be the operation ranking data of the intent output object according to the feedback intent recognition result.
  • the intent matching result ranking data can be the ranking data of the click frequency of the function module that the user feedbacks on the function module search data of the APP.
  • the intention may be a conversation intention or an interaction intention.
  • the intention of the intention output object can be identified based on the sentence input by the intention output object (which can be text type, speech type, etc.), and an appropriate response can be provided for the intention output object.
  • the non-long-tail input sample data can be the conversational statements of the intent output object
  • the intent matching result ranking data can be the operation ranking data of the intent output object based on the feedback intent recognition results.
  • the intent matching result ranking data can be the user's recognition of the response voice results of the intelligent question and answer system for the dialogue voice data feedback. Ranked data.
  • abstract generalized entity words can be generalized data structures constructed from entity words abstracted from non-long-tail input sample data.
  • entity abstraction After obtaining the non-long-tail input sample data in the first target intention sample data, entity abstraction can be performed on the non-long-tail input sample data.
  • entity abstraction refers to extracting entity words from non-long-tail input sample data to construct abstract generalized entity words based on the extracted entity words.
  • the intent matching generalization dictionary can provide intent matching result sorting data for non-long-tail input sample data to determine the final intent understanding result of non-long-tail input sample data. That is, the intent matching generalization dictionary may be a structured dictionary used to find intent understanding results for non-long-tail input sample data.
  • the data can be sorted based on the abstract generalized entity words corresponding to the non-long-tailed input sample data and the intent matching results, and each non-long-tailed Input sample data to construct a matching dictionary query unit, and then construct a matching dictionary query unit based on each non-long-tail input sample data to construct an intent matching generalized dictionary.
  • the intent matching generalization dictionary can use entity abstraction of non-long-tail input sample data to obtain abstract generalized entity words as the benchmark matching unit, and use the intent matching result sorting data of the same non-long-tail input sample data as The alternative intent understanding results of the benchmark matching unit, thereby combining the benchmark matching unit and each alternative intent understanding result of the same non-long-tail input sample data into a dictionary query in the intent matching generalization dictionary for the non-long-tail input sample data unit.
  • the non-long-tail input sample data of a medical APP is "Why are my legs cramping when I sleep at night?"
  • the abstract generalized entity word obtained for the non-long-tail input sample data can be "at night” "What's going on with sleeping#bodypart##disease#”
  • the sorting data of the intent matching results of the non-long-tail input sample data are: "Function module 01”: 30; "Function module 02”: 20; “Function module 03” :10.
  • the subsequent field value of each functional module can be the number of times the user clicks on the functional module in history.
  • the intent matching generalization dictionary can be set according to the field.
  • an intent matching generalization dictionary is constructed corresponding to a technical field.
  • the intent matching generalization dictionary may also involve multiple fields at the same time, which is not limited in the embodiments of the present application.
  • the first intention recognition model is used to identify the intention of non-long-tail input data.
  • the first intention recognition model is constructed based on the intention matching generalization dictionary.
  • the intention matching generalization dictionary can be directly used as the first intention recognition model to perform intention recognition on non-long-tail input data to obtain the final intention to understand the results.
  • S160 Output the intention recognition result of the input data to be recognized according to the first intention recognition model.
  • the input data to be recognized can be input into the constructed first intention recognition model to identify the non-long-tail input data to be recognized through the first intention recognition model.
  • the intent matching generalization dictionary constructed by sorting the non-long-tail input sample data and its matching intent matching results is used as the first intent recognition model.
  • the first intent recognition model can be used to identify non-long-tail input data. Perform intent recognition to improve the accuracy of understanding the intent of non-long-tail input data.
  • the embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data
  • the result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
  • Figure 2 is a flow chart of an intention identification method provided in Embodiment 2 of the present application.
  • This embodiment is embodied based on the above embodiment.
  • obtaining the first target based on the original intention sample data is given.
  • Method to realize may include:
  • S210 Filter the non-long-tail input sample data from the original intention sample data according to the non-long-tail input data filtering rules.
  • non-long-tail input data filtering rules are also rules used to filter non-long-tail input data.
  • non-long-tail input data filtering rules can be used to limit the number of keywords in the data, that is, when the number of keywords in the original intent sample data is greater than a certain threshold, the data is long-tail input sample data; when When the number of keywords in the original intent sample data is less than or equal to a certain threshold, the data is non-long-tail input sample data.
  • the threshold used to divide long-tail input data and non-long-tail input data can be set according to actual needs, such as 20, etc. The embodiment of the present application does not limit the specific value of the threshold.
  • association intention feedback data can be data fed back to non-long tail input sample data, as well as relevant statistical data of the fed back data, etc.
  • S230 Sort the associated intention feedback data to obtain the intention matching result sorting data.
  • the associated intent feedback data of the non-long-tail input sample data can be further obtained, and the obtained associated intent feedback data can be sorted to obtain the intent matching result ranking data.
  • the click frequency data of the application function module can be sorted in order from high to low click frequency to obtain the intent matching result ranking data.
  • the associated intent feedback data is the response interaction data of the intelligent interaction system to the input data of the intent output object, such as the machine interaction frequency data of query in human-computer dialogue, etc.
  • the response interaction data can be sorted in order from high to low interaction frequency. , get the sorting data of intent matching results. It is understandable that the higher the frequency of clicks or the frequency of machine interaction, the higher the intention output object's recognition of the intention recognition results.
  • the APP can feed back 3 matching functional modules as associations for the non-long-tail input sample data.
  • the intention feedback data are respectively function module 01, function module 02 and function module 03.
  • the number of historical clicks of function module 01 is 30, the number of historical clicks of function module 02 is 20, and the number of historical clicks of function module 03 is 10, then the associated intention feedback data is sorted, and the sorted data of the intention matching results can be: "Function module 01": 30; "Function module 02": 20; "Function module 03": 10.
  • the entity word dictionary may be a dictionary composed of entity words.
  • the initial abstract entity words may be each entity word obtained by abstracting the non-long-tail input sample data.
  • entity abstraction can be performed on the non-long-tail input sample data first according to the entity word dictionary, and each entity word that makes up the non-long-tail input sample data is used as the initial abstract entity word, and the initial abstract entity obtained by abstraction can be further The words are classified and grouped to obtain abstract generalized entity words.
  • the entity word dictionary may include, but is not limited to, entity words such as disease, symptom, department, product, and body part. Assuming that the input sample data is "virgin wood pulp toilet paper”, then the input sample data can be abstracted as “virgin wood pulp#commodity#”, assuming that the input sample data is "zinc gluconate oral solution”, then the input sample data can be abstracted as "Drug##Body Part#Taking Solution”. Furthermore, it is also necessary to classify and group the initial abstract entity words after abstraction. For example: the initial abstract entity word of "drug##body part#taking solution” can be classified as "#drug#
  • the above generalized dictionary of intent matching can perform intent recognition on non-long tail input data based on the DFA (Deterministic Finite Automaton) algorithm.
  • DFA Deterministic Finite Automaton
  • the dictionary element is also the dictionary query unit intended to match the generalized dictionary.
  • the dictionary elements intended to match the generalized dictionary can be, for example, "What's going on when you go to sleep at night #body part # #disease #" and "# Body Part # There are two waves a day #disease# What's going on, what medicine should be taken to relieve it "wait.
  • the input data edit distance calculation module can be used to calculate the edit distance between input data and dictionary elements. It can be understood that the smaller the edit distance is, the closer the input data is to the dictionary elements, that is, the closer the input data is to the dictionary elements.
  • dictionary elements can be used as query matching benchmarks to match input data.
  • the dictionary element constructed based on the user's historical behavior can be: “What's going on with #bodypart##disease# when you sleep at night?"
  • the input non-long-tail data is "What's wrong with leg cramps while sleeping at night” or "What's wrong with leg cramps while sleeping at night”
  • the input data edit distance calculation module can be constructed according to the element structure of the dictionary elements of the intent matching generalization dictionary to calculate the edit distance between the input data and the dictionary elements through the input data edit distance calculation module ( Also called similarity).
  • the first intent recognition model is used to identify the intent of non-long-tail input data.
  • the first intention recognition model may include two modules: an input data editing distance calculation module and an intention matching generalization dictionary.
  • the first intention recognition model may also include an entity word dictionary for entity abstraction.
  • the first intent recognition model can be used to identify intent on non-long-tail input data.
  • the first intention recognition model can first perform entity abstraction on the input query of the intention output object based on the entity word dictionary to obtain the initial abstract entity words, and perform entity classification and grouping on the initial abstract entity words to obtain the final abstract generalized entity words. . Then, the first intent recognition model can calculate the edit distance between the abstract generalized entity words and each dictionary element in the intent matching generalized dictionary. Finally, the first intention recognition model takes the intent included in the dictionary element with the smallest edit distance between the intent matching generalization dictionary and the abstract generalization entity word as the intent of the input query. It is understandable that if the dictionary element with the smallest edit distance between the intent matching generalized dictionary and the abstract generalized entity word includes multiple intents, the first intent can also be selected as the intent of the input query based on the sorting results of each intent. .
  • the second intention recognition model can be used to identify the intention of long-tail input data to obtain the final intention understanding result.
  • building the second intention recognition model may include: pre-training a preset neural network model based on pre-training sample data to obtain a pre-trained neural network model; and obtaining a pre-trained neural network model based on the original intention sample data.
  • Second target intention sample data wherein the second target intention sample data includes long-tail input sample data and intention marking result data; train the pre-trained neural network model according to the second target intention sample data, and obtain Second intention recognition model.
  • the preset neural network model can be any type of neural network model that can realize the intention recognition function.
  • the pre-trained neural network model may be a neural network model obtained by pre-training a preset neural network model.
  • the second target intention sample data may be sample data used to formally train the second intention recognition model.
  • Long-tail input sample data can be input sample data in the long-tail form, which has the characteristics of semantic complexity.
  • the intent-labeled result data may be data that is pre-labeled with intent that matches the long-tail input sample data.
  • a neural network model can be used for intent recognition for long-tail input sample data.
  • the pre-trained neural network model can be pre-trained using pre-training sample data to train the data understanding ability of the pre-set neural network model and obtain the pre-trained neural network model.
  • the second target intention sample data pre-trained neural network model can be further used for training to obtain the second intention recognition model.
  • pre-training the preset neural network model can include two pre-training tasks, one is MLM (Masked Language Model, masked language model) pre-training task, and another is NSP (Next Sentence Prediction, next sentence prediction) pre-training task.
  • MLM Mask Language Model
  • NSP Next Sentence Prediction, next sentence prediction
  • the MLM pre-training task can be understood as a cloze task. You can randomly mask a certain number of words in each sentence (such as 15% of the sentence) and use their context to make predictions. For example, for the pre-training sample data "my dog is hairy" is converted to "my dog is[MASK]".
  • the NSP pre-training task can be understood as a text matching task. Specifically, some sentence pairs A and B can be selected, 50% of the data B is one of the sentence segments of A, and the remaining 50% of the data B is randomly selected from the corpus, so that the network can learn the correlation. For example, suppose sentence A is: Simplify the work process of searching for operation and maintenance personnel and improve the work efficiency of operation and maintenance personnel. One of the short sentences of sentence B can be one of the short sentences of sentence A, and the other short sentence of sentence B can be a randomly selected sentence fragment.
  • sentence B can be: Simplify the workflow of search operation and maintenance personnel, and need to be punctual Have a meal.
  • the above pre-training process can enable the pre-trained neural network model to understand the relationship between two sentences, thereby allowing the pre-trained neural network model to better adapt to the above-mentioned data processing tasks.
  • the preset neural network model is the BERT model
  • the CrossEntropy loss function and BP (Back Propagation) propagation mechanism can be used. Let the model learn and update the network weight parameters independently to implement the training process.
  • the trained BERT model serves as the second intention recognition model.
  • the training process of the BERT model can be seen in Figure 3.
  • BERT is a powerful pre-training model that relies on Transformers as feature extractors. In view of its huge number of parameters and super feature representation capabilities, it can learn deep semantic information in text.
  • Using BERT to embedding long-tail input data can map text information to a high-dimensional vector space, and use embedding vectors to represent the semantic information of long-tail input data.
  • the target intent recognition model is a model that can perform intent recognition on any type of input data.
  • the input data classification results include long-tail input data and non-long-tail input data.
  • the input data to be recognized may be input data that requires intent recognition. For example, it can be query data input in real time by the user, or query data input in real time by a device or program, etc.
  • the input data to be recognized may be text type data or voice type data.
  • the embodiment of the present application does not limit the data type of the input data to be recognized.
  • the input data classification result is also the classification result of the input data to be identified.
  • the input data to be recognized can be classified first to determine whether the input data to be recognized is long-tail input data or non-long-tail input data.
  • classifying the input data to be identified may include: when it is determined that the data length of the input data to be identified is less than or equal to a preset data length threshold, determining that the input data to be identified is The input data classification result of the input data to be identified is non-long tail input data; when it is determined that the data length of the input data to be identified is greater than the preset data length threshold, the input data classification of the input data to be identified is determined The result is long tail input data.
  • the preset data length threshold can be a length threshold used to divide long-tail data and non-long-tail data.
  • the preset data length threshold can be set to 20 or 25, etc., which can be set according to actual needs.
  • the application embodiment does not limit the specific value of the preset data length threshold.
  • the data length of the input data to be recognized can be determined to classify the input data to be recognized based on the data length.
  • the data length can be the number of words or characters in the input data to be recognized. For example, for the input data to be recognized "Why do my legs cramp while sleeping at night", the data length is 12.
  • the data length is 12.
  • the data classification result of the input data to be identified is non-long tail input data; otherwise, the input data of the input data to be identified can be determined.
  • the classification results are long-tail input data.
  • the first intention recognition model of the target intention recognition model can be used to perform intent recognition on non-long-tail input data
  • the second intention recognition model of the target intent recognition model can be used to perform intent recognition on long-tail input data, thereby obtaining the input.
  • Intent identification results of data can be used to perform intent recognition on non-long-tail input data
  • the first intention recognition model can be based on the DFA algorithm of a large number of behaviors, which can not only improve the efficiency of intention recognition, but also has good generalization.
  • the second intention recognition model can well extract the semantic information implicit in long-tail input data, and can better represent its semantic features. Through differentiated processing of long-tail and non-long-tail input data, intentions can be more accurately identified and understood.
  • Figure 4 is a schematic diagram of an intention recognition device provided in Embodiment 4 of the present application.
  • the device includes: a first sample data acquisition module 410, an abstract generalized entity word acquisition module 420, an intent matching generalized dictionary generation module 430, first intention recognition model building module 440, input data input module to be recognized 450 and intention recognition result output module 460, where:
  • the first sample data acquisition module 410 is used to obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long tail input sample data and intention matching result sorting data;
  • the abstract generalized entity word acquisition module 420 is used to perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words
  • the intention matching generalization dictionary generation module 430 is used to logically combine the abstract generalization entity words and the intention matching result sorting data to generate an intention matching generalization dictionary;
  • the first intention recognition model building module 440 is used to build a first intention recognition model according to the intention matching generalization dictionary
  • the input data to be recognized input module 450 is configured to input the input data to be recognized into the first intention recognition model when it is determined that the input data to be recognized is non-long-tail input data;
  • the intent recognition result output module 460 is configured to output the intent recognition result of the input data to be recognized according to the first intent recognition model.
  • the embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data
  • the result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
  • the first sample data acquisition module 410 is specifically configured to: filter the non-long tail input sample data from the original intention sample data according to the non-long tail input data filtering rules; obtain the non-long tail input sample The association intention feedback data of the data is sorted to obtain the intention matching result sorting data.
  • the abstract generalized entity word acquisition module 420 is specifically configured to: perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words; classify and group the initial abstract entity words, Obtain the abstract generalized entity word.
  • the first intention recognition model building module 440 is specifically configured to: build an input data editing distance calculation module according to the dictionary elements of the intention matching generalization dictionary; and build an input data editing distance calculation module according to the input data editing distance calculation module and the intention matching generalization dictionary. dictionary to build the first intention recognition model.
  • the intention recognition device also includes: a preset neural network model pre-training module, used to pre-train the preset neural network model according to the pre-training sample data to obtain a pre-trained neural network model; and obtain the second target intention sample data A module for obtaining second target intention sample data according to the original intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention marking result data; a second intention recognition model acquisition module, using The pre-trained neural network model is trained according to the second target intention sample data to obtain a second intention recognition model; a target intention recognition model construction module is used to train the pre-trained neural network model according to the first intention recognition model and the second intention recognition model.
  • Intent recognition model builds a target intent recognition model.
  • the intention recognition device also includes: an input data acquisition module to be recognized, used to obtain the input data to be recognized; an input data classification module to be recognized, to classify the input data to be recognized, and obtain an input data classification result;
  • the input data classification results include long-tail input data and non-long-tail input data.
  • the input data classification module to be identified is specifically configured to: when it is determined that the data length of the input data to be identified is less than or equal to a preset data length threshold, determine that the input data classification result of the input data to be identified is Non-long-tail input data; when it is determined that the data length of the input data to be identified is greater than the preset data length threshold, it is determined that the input data classification result of the input data to be identified is long-tail input data.
  • the above-mentioned intention recognition device can execute the intention recognition method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
  • the intention identification method provided by any embodiment of this application.
  • the intention recognition device introduced above is a device that can execute the intention recognition method in the embodiment of the present application, based on the intention recognition method introduced in the embodiment of the present application, those skilled in the art can understand the intention recognition in this embodiment.
  • the specific implementation of the device and its various modifications, therefore, how the intention recognition device implements the intention recognition method in the embodiment of the present application will not be described in detail here.
  • a person skilled in the art implements the device used by the intent identification method in the embodiment of the present application, it will fall within the scope of protection of the present application.
  • FIG. 5 shows a schematic structural diagram of an electronic device 10 that can be used to implement embodiments of the present application.
  • Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit the implementation of the present application as described and/or claimed herein.
  • the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores There is a computer program that can be executed by at least one processor.
  • the processor 11 can perform the operation according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. Perform various appropriate actions and processing.
  • RAM 13 various programs and data required for the operation of the electronic device 10 can also be stored.
  • the processor 11, the ROM 12 and the RAM 13 are connected to each other via the bus 14.
  • An input/output (I/O) interface 15 is also connected to bus 14 .
  • the I/O interface 15 Multiple components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc. etc.; and communication unit 19, such as network card, modem, wireless communication transceiver, etc.
  • the communication unit 19 allows the electronic device 10 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
  • Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc.
  • the processor 11 performs various methods and processes described above, such as the intent recognition method.
  • the intent recognition method may be implemented as a computer program, which is tangibly embodied in a computer-readable storage medium, such as the storage unit 18 .
  • part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19.
  • the processor 11 may be configured to perform the intent identification method in any other suitable manner (eg, by means of firmware).
  • Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOC system
  • CPLD load programmable logic device
  • computer hardware firmware, software, and/or a combination thereof.
  • These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor
  • the processor which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • An output device may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • An output device may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • Computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that the computer program, when executed by the processor, causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented.
  • a computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device.
  • Computer-readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be a machine-readable signal medium.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • the systems and techniques described herein may be implemented on an electronic device having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user monitor); and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display)
  • a keyboard and pointing device e.g., a mouse or a trackball
  • Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including (acoustic input, voice input or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
  • Computing systems may include clients and servers.
  • Clients and servers are generally remote from each other and typically interact over a communications network.
  • the relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other.
  • the server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business scalability in traditional physical hosts and VPS services. defect.
  • Embodiment 5 of the present application also provides a computer storage medium that stores a computer program.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer program is used to execute the present invention when executed by a computer processor. Apply the intention recognition method described in any of the above embodiments.
  • the intention identification method includes: obtaining the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long tail input sample data and intention matching result sorting data; Input sample data for entity abstraction to obtain abstract generalized entity words; logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalization dictionary; match the generalization dictionary according to the intent Construct a first intention recognition model; when it is determined that the input data to be recognized is non-long tail input data, input the input data to be recognized into the first intention recognition model; output according to the first intention recognition model The intention recognition result of the input data to be recognized.
  • the computer storage medium in the embodiment of the present application may be any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • any appropriate medium including but not limited to wireless, wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional A procedural programming language, such as the "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer, such as through the Internet using an Internet service provider. ).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The embodiments of the present application relate to the technical field of artificial intelligence. Disclosed are an intent recognition method and apparatus, and an electronic device and a storage medium. The intent recognition method comprises: acquiring first target intent sample data according to original intent sample data, wherein the first target intent sample data comprises non-long-tail input sample data and intent matching result sorting data; performing entity abstraction on the non-long-tail input sample data, so as to obtain an abstract generalized entity word; performing logic combination on the abstract generalized entity word and the intent matching result sorting data, so as to generate an intent matching generalization dictionary; constructing a first intent recognition model according to the intent matching generalization dictionary; when it is determined that input data to be subjected to recognition is non-long-tail input data, inputting said input data into the first intent recognition model; and outputting an intent recognition result of said input data according to the first intent recognition model. The technical solution in the embodiments of the present application can increase the accuracy rate of intent understanding.

Description

一种意图识别方法、装置、电子设备及存储介质An intention recognition method, device, electronic equipment and storage medium
本申请要求于2022年3月25日提交中国专利局、申请号为202210307597.9、申请名称为“一种意图识别方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requests the priority of the Chinese patent application submitted to the China Patent Office on March 25, 2022, with the application number 202210307597.9 and the application title "An intent recognition method, device, electronic device and storage medium", and its entire content is approved by This reference is incorporated into this application.
技术领域Technical field
本申请实施例涉及信息处理等人工智能技术领域,尤其涉及一种意图识别方法、装置、电子设备及存储介质。The embodiments of the present application relate to the field of artificial intelligence technology such as information processing, and in particular, to an intention recognition method, device, electronic device and storage medium.
背景技术Background technique
意图识别也可以称为意图检测(Intent Detection),其用于确定输入的信息用于执行哪一个领域的哪一种操作,其本质属于多元分类问题,广泛应用于搜索及人机交互等智能化交互技术。智能化交互的一种体现在于,智能化产品或应用可以通过意图识别的方式理解需求,并依据需求为提供适当的响应。Intent recognition can also be called intent detection (Intent Detection). It is used to determine which field the input information is used to perform which operation. Its essence is a multi-class classification problem and is widely used in intelligent search and human-computer interaction. interactive technology. One embodiment of intelligent interaction is that intelligent products or applications can understand requirements through intent recognition and provide appropriate responses based on the requirements.
意图识别的重要环节就是处理query(查询请求)。每一个query都隐藏着真实的查询意图,在理解query时,需要使用很多不同策略挖掘背后的需求。因此,如何正确识别query意图,分析感兴趣的内容,并在有限的资源位中展示最感兴趣的内容,对提升智能化交互功能的体验具有重要意义。An important part of intent recognition is processing query (query request). Every query hides the real query intention. When understanding the query, you need to use many different strategies to explore the requirements behind it. Therefore, how to correctly identify the query intent, analyze the content of interest, and display the most interesting content within limited resources is of great significance to improving the experience of intelligent interactive functions.
发明人在实现本申请的过程中,发现现有技术存在如下缺陷:目前,现有的意图识别方法在处理query时,基本采用一刀切的原则,并没有对query区分长尾query和非长尾query两种不同类型query的处理方式。长尾query的集中度低,但是累计数量接近无穷。虽然单个长尾query搜索量不多,但是具有长尾效应,总的搜索量与头部的非长尾query量可以相媲美。如果不区分长尾query和非长尾query两种不同类型query的处理方式,采用统一的处理方式理解query,会导致意图理解准确率较低。In the process of implementing this application, the inventor discovered that the existing technology has the following defects: At present, the existing intent recognition methods basically adopt the one-size-fits-all principle when processing queries, and do not differentiate between long-tail queries and non-long-tail queries. Two different types of query processing methods. The concentration of long-tail queries is low, but the cumulative number is close to infinite. Although the search volume of a single long-tail query is not large, it has a long-tail effect, and the total search volume is comparable to the non-long-tail query volume in the head. If we do not distinguish the processing methods of two different types of queries, long-tail query and non-long-tail query, and use a unified processing method to understand the query, it will lead to a low accuracy of intent understanding.
发明内容Contents of the invention
本申请实施例提供一种意图识别方法、装置、电子设备及存储介质,能够提高意图理解的准确率。Embodiments of the present application provide an intention recognition method, device, electronic device and storage medium, which can improve the accuracy of intention understanding.
根据本申请的一方面,提供了一种意图识别方法,包括:According to one aspect of the present application, an intent identification method is provided, including:
根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
根据本申请的另一方面,提供了一种意图识别装置,包括:According to another aspect of the present application, an intention recognition device is provided, including:
第一样本数据获取模块,用于根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;The first sample data acquisition module is used to obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result sorting data;
抽象泛化实体词获取模块,用于对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;An abstract generalized entity word acquisition module is used to perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
意图匹配泛化字典生成模块,用于对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;An intent matching generalization dictionary generation module, used to logically combine the abstract generalization entity words and the intent matching result sorting data to generate an intent matching generalization dictionary;
第一意图识别模型构建模块,用于根据所述意图匹配泛化字典构建第一意图识别模型;A first intention recognition model building module, configured to build a first intention recognition model according to the intention matching generalization dictionary;
待识别输入数据输入模块,用于在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;An input data input module to be recognized, configured to input the input data to be recognized into the first intention recognition model when it is determined that the input data to be recognized is non-long-tail input data;
意图识别结果输出模块,用于根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。An intent recognition result output module is configured to output the intent recognition result of the input data to be recognized according to the first intent recognition model.
根据本申请的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the present application, an electronic device is provided, the electronic device including:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行时实现意图识别方法,包括:The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the intention recognition method is implemented, including:
根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
根据本申请的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现意图识别方法,包括:According to another aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. The computer instructions are used to implement an intention recognition method when executed by a processor, including:
根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
本申请实施例通过根据原始意图样本数据获取包括非长尾输入样本数据和意图匹配结果排序数据的第一目标意图样本数据后,对非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,并对抽象泛化实体词和意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典,从而根据意图匹配泛化字典构建第一意图识别模型,以利用第一意图识别模型对输入数据结果为非长尾输入数据的待识别输入数据输进行意图识别,输出待识别输入数据的意图识别结果,解决现有意图识别方法存在的意图理解准确率较低的问题,能够提高意图理解的准确率。The embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data The result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will become readily understood from the following description.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本申请实施例一提供的一种意图识别方法的流程图;Figure 1 is a flow chart of an intention identification method provided in Embodiment 1 of the present application;
图2是本申请实施例二提供的一种意图识别方法的流程图;Figure 2 is a flow chart of an intention identification method provided in Embodiment 2 of the present application;
图3是本申请实施例二提供的一种BERT模型训练过程的示意图;Figure 3 is a schematic diagram of a BERT model training process provided in Embodiment 2 of the present application;
图4是本申请实施例四提供的一种意图识别装置的示意图;Figure 4 is a schematic diagram of an intention recognition device provided in Embodiment 4 of the present application;
图5示出了可以用来实施本申请的实施例的电子设备的结构示意图。FIG. 5 shows a schematic structural diagram of an electronic device that can be used to implement embodiments of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those in the technical field to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only These are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of protection of this application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖 不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of this 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 is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of this application can obtain and process relevant data based on artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometric technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
实施例一Embodiment 1
图1是本申请实施例一提供的一种意图识别方法的流程图,本实施例可适用于根据非长尾输入样本数据构建意图识别模型以对非长尾输入数据进行意图识别的情况,该方法可以由意图识别装置来执行,该装置可以由软件和/或硬件的方式来实现,并一般可集成在电子设备中,该电子设备可以是终端设备,也可以是服务器设备,本申请实施例并不对电子设备的具体设备类型进行限定。相应的,如图1所示,该方法包括如下操作:Figure 1 is a flow chart of an intent recognition method provided in Embodiment 1 of the present application. This embodiment can be applied to the situation of constructing an intent recognition model based on non-long-tail input sample data to perform intent recognition on non-long-tail input data. The method can be executed by an intention recognition device, which can be implemented by software and/or hardware, and can generally be integrated in an electronic device. The electronic device can be a terminal device or a server device. Embodiments of the present application The specific device type of the electronic device is not limited. Correspondingly, as shown in Figure 1, the method includes the following operations:
S110、根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据。S110. Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data.
其中,第一目标意图样本数据可以是用于构建第一意图识别模型的样本数据。原始意图样本数据可以是全量的历史意图数据。可选的,意图数据可以是用户意图数据,如用户query数据,也可以是设备或程序自动生成的意图数据,如,设备发出的数据搜索指令或模拟真实用户发出query数据等,本申请实施例并不对意图数据的数据类型以及生成方式进行限定。输入样本数据也即需要意图理解的样本数据,例如可以是用户输入的query数据,也可以是设备或程序等输入的query数据等。输入样本数据可以是文本类型的数据,也可以是语音类型的数据,本申请实施例并不对用户输入样本数据的数据类型进行限制。可以理解的是,长尾数据指的是非目标数据但与目标数据相关的,也可以带来搜索流量的组合型数据。非长尾数据则指的是目标数据。非长尾输入样本数据可以是非长尾形式的输入样本数据,也即,非长尾输入样本数据可以直接作为关键词或直接切分得到多个关键词后进行意图理解。意图匹配结果排序数据可以是对非长尾用户输入样本数据进行意图理解后得到的反馈数据的排序结果。The first target intention sample data may be sample data used to build the first intention recognition model. The original intent sample data can be the full amount of historical intent data. Optionally, the intent data may be user intent data, such as user query data, or intent data automatically generated by a device or program, such as a data search instruction issued by a device or a simulated real user issuing query data, etc., in the embodiment of this application The data type and generation method of intent data are not limited. Input sample data is sample data that requires intent to understand. For example, it can be query data input by the user, or query data input by a device or program, etc. The input sample data may be text type data or voice type data. The embodiment of the present application does not limit the data type of the user input sample data. It can be understood that long-tail data refers to non-target data but is related to the target data, and can also bring combined data that can bring search traffic. Non-long tail data refers to target data. The non-long-tail input sample data can be input sample data in a non-long-tail form, that is, the non-long-tail input sample data can be directly used as keywords or directly segmented to obtain multiple keywords for intent understanding. The ranking data of the intent matching results can be the ranking results of the feedback data obtained after understanding the intent of the non-long-tail user input sample data.
在本申请实施例中,意图可以是任意类型的意图,如可以包括但不限于搜索意图和交互意图等。具有意图的对象如用户、设备或程序后,可以简称为意图输出对象。In this embodiment of the present application, the intent may be any type of intent, including but not limited to search intent, interaction intent, etc. After an object with an intent, such as a user, device, or program, it can be simply called an intent output object.
示例性的,在智能搜索技术领域,意图可以是搜索意图。当意图输出对象需要在网络或应用中搜索相关内容时,针对意图输出对象提供的搜索语句,可以基于搜索语句来识别意图输出对象的搜索意图,以便根据意图输出对象的搜索意图来为意图输出对象推荐相关内容。 相应的,非长尾输入样本数据即可以为意图输出对象的非长尾的搜索语句,意图匹配结果排序数据可以是意图输出对象根据反馈的意图识别结果的操作排序数据。在一个具体的例子中,假设非长尾输入样本数据为APP的功能模块搜索数据,则意图匹配结果排序数据可以是用户对APP针对功能模块搜索数据反馈的功能模块的点击频次的排序数据。For example, in the field of intelligent search technology, the intent may be a search intent. When the intent output object needs to search for relevant content in the network or application, for the search statement provided by the intent output object, the search intent of the intent output object can be identified based on the search statement, so that the intent output object can be output according to the search intent of the intent output object. Recommend relevant content. Correspondingly, the non-long-tail input sample data can be the non-long-tail search statement of the intent output object, and the intent matching result ranking data can be the operation ranking data of the intent output object according to the feedback intent recognition result. In a specific example, assuming that the non-long-tail input sample data is the function module search data of the APP, the intent matching result ranking data can be the ranking data of the click frequency of the function module that the user feedbacks on the function module search data of the APP.
示例性的,在智能交互技术领域,意图可以是对话意图或交互意图。例如在智能问答系统中,可以根据意图输出对象输入的句子(可以是文本类型,也可以是语音类型等)识别意图输出对象的意图,并为意图输出对象提供合适的回应。相应的,非长尾输入样本数据即可以为意图输出对象的对话语句,意图匹配结果排序数据可以是意图输出对象根据反馈的意图识别结果的操作排序数据。在一个具体的例子中,假设非长尾输入样本数据为用户对智能问答系统输入的对话语音数据,则意图匹配结果排序数据可以是用户对智能问答系统针对对话语音数据反馈的响应语音结果的认可度的排序数据。For example, in the field of intelligent interaction technology, the intention may be a conversation intention or an interaction intention. For example, in an intelligent question answering system, the intention of the intention output object can be identified based on the sentence input by the intention output object (which can be text type, speech type, etc.), and an appropriate response can be provided for the intention output object. Correspondingly, the non-long-tail input sample data can be the conversational statements of the intent output object, and the intent matching result ranking data can be the operation ranking data of the intent output object based on the feedback intent recognition results. In a specific example, assuming that the non-long-tail input sample data is the dialogue voice data input by the user to the intelligent question and answer system, the intent matching result ranking data can be the user's recognition of the response voice results of the intelligent question and answer system for the dialogue voice data feedback. Ranked data.
S120、对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词。S120. Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words.
其中,抽象泛化实体词可以是对非长尾输入样本数据抽象得到的实体词构建的泛化数据结构。Among them, abstract generalized entity words can be generalized data structures constructed from entity words abstracted from non-long-tail input sample data.
在得到第一目标意图样本数据中的非长尾输入样本数据之后,可以对非长尾输入样本数据进行实体抽象。所谓实体抽象也即从非长尾输入样本数据中抽取出实体词,以根据抽取的实体词构建抽象泛化实体词。After obtaining the non-long-tail input sample data in the first target intention sample data, entity abstraction can be performed on the non-long-tail input sample data. The so-called entity abstraction refers to extracting entity words from non-long-tail input sample data to construct abstract generalized entity words based on the extracted entity words.
在一个具体的例子中,以电商APP为例说明,当用户输入的非长尾输入样本数据为“原生木浆卫生纸”时,根据该非长尾输入样本数据可以得到的抽象泛化实体词为“原生木浆#商品#”。In a specific example, taking an e-commerce APP as an example, when the non-long-tail input sample data entered by the user is "raw wood pulp toilet paper", the abstract generalized entity words that can be obtained based on the non-long-tail input sample data It is "original wood pulp#commodity#".
S130、对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典。S130. Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary.
其中,意图匹配泛化字典可以对非长尾输入样本数据提供意图匹配结果排序数据,以确定非长尾输入样本数据最终的意图理解结果。也即,意图匹配泛化字典可以是用于对非长尾输入样本数据查找意图理解结果的结构化字典。Among them, the intent matching generalization dictionary can provide intent matching result sorting data for non-long-tail input sample data to determine the final intent understanding result of non-long-tail input sample data. That is, the intent matching generalization dictionary may be a structured dictionary used to find intent understanding results for non-long-tail input sample data.
相应的,在根据非长尾输入样本数据得到对应的抽象泛化实体词之后,即可根据非长尾输入样本数据对应的抽象泛化实体词和意图匹配结果排序数据,对每个非长尾输入样本数据构建匹配的字典查询单元,进而根据各非长尾输入样本数据构建匹配的字典查询单元构建意图匹配泛化字典。Correspondingly, after obtaining the corresponding abstract generalized entity words based on the non-long-tail input sample data, the data can be sorted based on the abstract generalized entity words corresponding to the non-long-tailed input sample data and the intent matching results, and each non-long-tailed Input sample data to construct a matching dictionary query unit, and then construct a matching dictionary query unit based on each non-long-tail input sample data to construct an intent matching generalized dictionary.
在本申请实施例中,意图匹配泛化字典可以利用对非长尾输入样本数据进行实体抽象得到抽象泛化实体词作为基准匹配单元,将同一非长尾输入样本数据的意图匹配结果排序数据作为基准匹配单元的备选意图理解结果,从而将同一非长尾输入样本数据的基准匹配单元和各备选意图理解结果组合为该非长尾输入样本数据的在意图匹配泛化字典中的字典查询单元。In the embodiment of the present application, the intent matching generalization dictionary can use entity abstraction of non-long-tail input sample data to obtain abstract generalized entity words as the benchmark matching unit, and use the intent matching result sorting data of the same non-long-tail input sample data as The alternative intent understanding results of the benchmark matching unit, thereby combining the benchmark matching unit and each alternative intent understanding result of the same non-long-tail input sample data into a dictionary query in the intent matching generalization dictionary for the non-long-tail input sample data unit.
在一个具体的例子中,假设某一医疗APP的非长尾输入样本数据为“晚上睡觉脚抽筋是 怎么回事”,针对该非长尾输入样本数据得到的抽象泛化实体词可以为“晚上睡觉#身体部位##疾病#是怎么回事”,该非长尾输入样本数据的意图匹配结果排序数据为:“功能模块01”:30;“功能模块02”:20;“功能模块03”:10。其中,每个功能模块后续的字段数值可以为用户历史点击该功能模块的次数。例如,针对“功能模块01”:30,表示各个用户在医疗APP中输入“晚上睡觉脚抽筋是怎么回事”的搜索query时,用户对医疗APP反馈的各个功能模块的搜索结果中,对功能模块01点击了30次。可以理解的是,历史点击次数越多,表明该功能模块与用户搜索意图越匹配。相应的,对上述抽象泛化实体词和意图匹配结果排序数据进行逻辑组合,可以得到非长尾输入样本数据为“晚上睡觉脚抽筋是怎么回事”对应的字典查询单元,其数据结构如下:In a specific example, assume that the non-long-tail input sample data of a medical APP is "Why are my legs cramping when I sleep at night?", the abstract generalized entity word obtained for the non-long-tail input sample data can be "at night" "What's going on with sleeping#bodypart##disease#", the sorting data of the intent matching results of the non-long-tail input sample data are: "Function module 01": 30; "Function module 02": 20; "Function module 03" :10. Among them, the subsequent field value of each functional module can be the number of times the user clicks on the functional module in history. For example, for "Function Module 01": 30, it means that when each user enters the search query "What's wrong with leg cramps while sleeping at night" in the medical APP, in the search results of each functional module reported by the user to the medical APP, the function Module 01 was clicked 30 times. It is understandable that the greater the number of historical clicks, the better the functional module matches the user's search intent. Correspondingly, by logically combining the above abstract generalized entity words and the sorted data of intent matching results, we can obtain the dictionary query unit corresponding to the non-long-tail input sample data "Why are my feet cramping while sleeping at night", and its data structure is as follows:
Figure PCTCN2022120942-appb-000001
Figure PCTCN2022120942-appb-000001
可以理解的是,意图匹配泛化字典可以根据领域设置,如一个技术领域对应构建一个意图匹配泛化字典。或者,意图匹配泛化字典还可以同时涉及多个领域,本申请实施例对此并不进行限制。It is understandable that the intent matching generalization dictionary can be set according to the field. For example, an intent matching generalization dictionary is constructed corresponding to a technical field. Alternatively, the intent matching generalization dictionary may also involve multiple fields at the same time, which is not limited in the embodiments of the present application.
S140、根据所述意图匹配泛化字典构建第一意图识别模型。S140. Construct a first intention recognition model according to the intention matching generalization dictionary.
其中,所述第一意图识别模型用于识别非长尾输入数据的意图。Wherein, the first intention recognition model is used to identify the intention of non-long-tail input data.
在本申请实施例中,根据意图匹配泛化字典构建第一意图识别模型,可以是直接将意图匹配泛化字典作为第一意图识别模型,用于对非长尾输入数据进行意图识别,得到最终的意图理解结果。In the embodiment of this application, the first intention recognition model is constructed based on the intention matching generalization dictionary. The intention matching generalization dictionary can be directly used as the first intention recognition model to perform intention recognition on non-long-tail input data to obtain the final intention to understand the results.
S150、在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中。S150. If it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model.
S160、根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。S160: Output the intention recognition result of the input data to be recognized according to the first intention recognition model.
相应的,如果确定待识别输入数据是非长尾输入数据,则可以将待识别输入数据输入至构建的第一意图识别模型中,以通过第一意图识别模型识别非长尾的待识别输入数据。Correspondingly, if it is determined that the input data to be recognized is non-long-tail input data, the input data to be recognized can be input into the constructed first intention recognition model to identify the non-long-tail input data to be recognized through the first intention recognition model.
由此可见,通过针对非长尾输入样本数据和其匹配的意图匹配结果排序数据构建得到的意图匹配泛化字典作为第一意图识别模型,可以通过第一意图识别模型对非长尾的输入数据进行意图识别,从而提高对非长尾的输入数据的意图理解的准确率。It can be seen that the intent matching generalization dictionary constructed by sorting the non-long-tail input sample data and its matching intent matching results is used as the first intent recognition model. The first intent recognition model can be used to identify non-long-tail input data. Perform intent recognition to improve the accuracy of understanding the intent of non-long-tail input data.
本申请实施例通过根据原始意图样本数据获取包括非长尾输入样本数据和意图匹配结果排序数据的第一目标意图样本数据后,对非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,并对抽象泛化实体词和意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典,从而根据意图匹配泛化字典构建第一意图识别模型,以利用第一意图识别模型对输入数据结果为非长尾输入数据的待识别输入数据输进行意图识别,输出待识别输入数据的意图识别结果,解决现有意图识别方法存在的意图理解准确率较低的问题,能够提高意图理解 的准确率。The embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data The result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
实施例二Embodiment 2
图2是本申请实施例二提供的一种意图识别方法的流程图,本实施例以上述实施例为基础进行具体化,在本实施例中,给出了根据原始意图样本数据获取第一目标意图样本数据、对所述非长尾输入样本数据进行实体抽象、根据所述意图匹配泛化字典构建第一意图识别模型以及构建第二意图识别模型和目标意图识别模型的多种具体可选的实现方式。相应的,如图2所示,本实施例的方法可以包括:Figure 2 is a flow chart of an intention identification method provided in Embodiment 2 of the present application. This embodiment is embodied based on the above embodiment. In this embodiment, obtaining the first target based on the original intention sample data is given. Intent sample data, entity abstraction of the non-long-tail input sample data, construction of a first intent recognition model based on the intent matching generalization dictionary, and construction of a second intent recognition model and a target intent recognition model. Method to realize. Correspondingly, as shown in Figure 2, the method in this embodiment may include:
S210、根据非长尾输入数据筛选规则从所述原始意图样本数据中筛选所述非长尾输入样本数据。S210: Filter the non-long-tail input sample data from the original intention sample data according to the non-long-tail input data filtering rules.
其中,非长尾输入数据筛选规则也即用于筛选非长尾的输入数据的规则。Among them, the non-long-tail input data filtering rules are also rules used to filter non-long-tail input data.
可选的,非长尾输入数据筛选规则可以用于限定数据中关键词的数量,也即,当原始意图样本数据中的关键词数量大于一定阈值时,该数据为长尾输入样本数据;当原始意图样本数据中的关键词数量小于或等于一定阈值时,该数据为非长尾输入样本数据。用于划分长尾输入数据和非长尾输入数据的阈值可以根据实际需求设定,如20等,本申请实施例并不对该阈值的具体取值进行限定。Optionally, non-long-tail input data filtering rules can be used to limit the number of keywords in the data, that is, when the number of keywords in the original intent sample data is greater than a certain threshold, the data is long-tail input sample data; when When the number of keywords in the original intent sample data is less than or equal to a certain threshold, the data is non-long-tail input sample data. The threshold used to divide long-tail input data and non-long-tail input data can be set according to actual needs, such as 20, etc. The embodiment of the present application does not limit the specific value of the threshold.
S220、获取所述非长尾输入样本数据的关联意图反馈数据。S220: Obtain the association intention feedback data of the non-long-tail input sample data.
其中,关联意图反馈数据可以是对非长尾输入样本数据反馈的数据,以及反馈的数据的相关统计数据等。Among them, the association intention feedback data can be data fed back to non-long tail input sample data, as well as relevant statistical data of the fed back data, etc.
S230、对所述关联意图反馈数据进行排序,得到所述意图匹配结果排序数据。S230: Sort the associated intention feedback data to obtain the intention matching result sorting data.
当从原始意图样本数据中筛选得到非长尾输入样本数据之后,可以进一步获取非长尾输入样本数据的关联意图反馈数据,并对获取的关联意图反馈数据进行排序,得到意图匹配结果排序数据。可选的,对关联意图反馈数据进行排序时,可以是按照降序的顺序进行排序。After filtering out the non-long-tail input sample data from the original intent sample data, the associated intent feedback data of the non-long-tail input sample data can be further obtained, and the obtained associated intent feedback data can be sorted to obtain the intent matching result ranking data. Optionally, when sorting the association intention feedback data, you can sort the data in descending order.
在一个具体的例子中,假设关联意图反馈数据为应用功能模块的点击频次数据,则可以按照点击频次由高到低的顺序对应用功能模块的点击频次数据进行排序,得到意图匹配结果排序数据。假设关联意图反馈数据为智能交互系统对意图输出对象输入数据的响应交互数据,如人机对话中query的机器交互频次数据等,则可以按照交互频次由高到低的顺序对响应交互数据进行排序,得到意图匹配结果排序数据。可以理解的是,点击频次或机器交互频次越高,表明意图输出对象对意图识别结果的认可度越高。In a specific example, assuming that the associated intent feedback data is the click frequency data of the application function module, the click frequency data of the application function module can be sorted in order from high to low click frequency to obtain the intent matching result ranking data. Assuming that the associated intent feedback data is the response interaction data of the intelligent interaction system to the input data of the intent output object, such as the machine interaction frequency data of query in human-computer dialogue, etc., then the response interaction data can be sorted in order from high to low interaction frequency. , get the sorting data of intent matching results. It is understandable that the higher the frequency of clicks or the frequency of machine interaction, the higher the intention output object's recognition of the intention recognition results.
在一个具体的例子中,假设非长尾输入样本数据为“晚上睡觉脚抽筋是怎么回事”,在历史数据中,APP对该非长尾输入样本数据可以反馈3个匹配的功能模块作为关联意图反馈数据,分别为功能模块01、功能模块02和功能模块03,其中,功能模块01被历史点击的次数为30,功能模块02被历史点击的次数为20,功能模块03被历史点击的次数为10,则对关联意图反馈数据进行排序,得到意图匹配结果排序数据可以为:“功能模块01”:30;“功能模块02”:20;“功能模块03”:10。In a specific example, assume that the non-long-tail input sample data is "Why are my legs cramping when I sleep at night?" In the historical data, the APP can feed back 3 matching functional modules as associations for the non-long-tail input sample data. The intention feedback data are respectively function module 01, function module 02 and function module 03. Among them, the number of historical clicks of function module 01 is 30, the number of historical clicks of function module 02 is 20, and the number of historical clicks of function module 03 is 10, then the associated intention feedback data is sorted, and the sorted data of the intention matching results can be: "Function module 01": 30; "Function module 02": 20; "Function module 03": 10.
S240、根据实体词字典对所述非长尾输入样本数据进行实体抽象,得到初始抽象实体词。S240. Perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words.
其中,实体词字典可以是由实体词构成的字典。初始抽象实体词可以是对非长尾输入样本数据抽象得到的各个实体词。The entity word dictionary may be a dictionary composed of entity words. The initial abstract entity words may be each entity word obtained by abstracting the non-long-tail input sample data.
S250、对所述初始抽象实体词进行分类分组,得到所述抽象泛化实体词。S250. Classify and group the initial abstract entity words to obtain the abstract generalized entity words.
在本申请实施例中,可以首先根据实体词字典对非长尾输入样本数据进行实体抽象,将组成非长尾输入样本数据的各个实体词作为初始抽象实体词,进一步对抽象得到的初始抽象实体词进行分类分组,得到抽象泛化实体词。In the embodiment of this application, entity abstraction can be performed on the non-long-tail input sample data first according to the entity word dictionary, and each entity word that makes up the non-long-tail input sample data is used as the initial abstract entity word, and the initial abstract entity obtained by abstraction can be further The words are classified and grouped to obtain abstract generalized entity words.
在一个具体的例子中,以医疗APP为例说明,实体词字典例如可以包括但不限于疾病、症状、科室、商品以及身体部位等实体词。假设输入样本数据为“原生木浆卫生纸”,则该输入样本数据可以抽象为“原生木浆#商品#”,假设输入样本数据为“葡萄糖酸锌口服溶液”,则该输入样本数据可以抽象为“药品##身体部位#服溶液”。进一步的,还需要对抽象后的初始抽象实体词进行归类分组,例如:“药品##身体部位#服溶液”的初始抽象实体词可以分类为“#药品#|#身体部位#”。也即“#药品#|#身体部位#”为一种类型的抽象泛化实体词,可以用于匹配“葡萄糖酸锌口服溶液”以及“艾草生姜足贴”等类型的输入样本数据。In a specific example, taking a medical APP as an example, the entity word dictionary may include, but is not limited to, entity words such as disease, symptom, department, product, and body part. Assuming that the input sample data is "virgin wood pulp toilet paper", then the input sample data can be abstracted as "virgin wood pulp#commodity#", assuming that the input sample data is "zinc gluconate oral solution", then the input sample data can be abstracted as "Drug##Body Part#Taking Solution". Furthermore, it is also necessary to classify and group the initial abstract entity words after abstraction. For example: the initial abstract entity word of "drug##body part#taking solution" can be classified as "#drug#|#bodypart#". That is, "#pharmaceutical#|#bodypart#" is a type of abstract generalized entity word that can be used to match input sample data of types such as "Zinc Gluconate Oral Solution" and "Mugwort and Ginger Foot Patch".
S260、对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典。S260. Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary.
在一个具体的例子中,以用户query样本数据中包括身体部位和疾病实体词为例说明,假设当前有三个用户query样本数据分别为:“晚上睡觉脚抽筋是怎么回事”、“12指肠糜烂吃什么药好”、“后背一天有两阵发热怎么回事吃啥药缓解”,基于这三个用户query样本数据可以构建的意图匹配泛化字典如下:In a specific example, take the user query sample data including body parts and disease entity words as an example. Suppose there are currently three user query sample data: "What is going on with foot cramps when sleeping at night", "Denumeral 12" "What medicine is good for erosion?" and "What medicine should I take to relieve my back fever twice a day?" The intent matching generalization dictionary that can be constructed based on these three user query sample data is as follows:
Figure PCTCN2022120942-appb-000002
Figure PCTCN2022120942-appb-000002
上述意图匹配泛化字典的数据结果对同时具有身体部位和疾病实体的query具有极强的泛化性。The data results of the above intention matching generalization dictionary have extremely strong generalization for queries that have both body parts and disease entities.
上述意图匹配泛化字典可以基于DFA(Deterministic Finite Automaton,即确定有穷自动机)算法对非长尾的输入数据进行意图识别。The above generalized dictionary of intent matching can perform intent recognition on non-long tail input data based on the DFA (Deterministic Finite Automaton) algorithm.
S270、根据所述意图匹配泛化字典的字典元素构建输入数据编辑距离计算模块。S270. Construct an input data edit distance calculation module according to the dictionary elements of the intent matching generalized dictionary.
其中,字典元素也即意图匹配泛化字典的字典查询单元。示例性的,意图匹配泛化字典的字典元素例如可以是“晚上睡觉#身体部位##疾病#是怎么回事”以及“#身体部位#一天有两阵#疾病#怎么回事吃啥药缓解”等。输入数据编辑距离计算模块可以用于计算输入数据与字典元素之间的编辑距离。可以理解的是,编辑距离越小,表明输入数据与字典元素越相近,也即输入数据与字典元素越匹配。Among them, the dictionary element is also the dictionary query unit intended to match the generalized dictionary. For example, the dictionary elements intended to match the generalized dictionary can be, for example, "What's going on when you go to sleep at night #body part # #disease #" and "# Body Part # There are two waves a day #disease# What's going on, what medicine should be taken to relieve it "wait. The input data edit distance calculation module can be used to calculate the edit distance between input data and dictionary elements. It can be understood that the smaller the edit distance is, the closer the input data is to the dictionary elements, that is, the closer the input data is to the dictionary elements.
可以理解的是,字典元素可以作为查询匹配基准,对输入数据进行匹配。示例性的,基于用户历史行为构建的字典元素可以为:“晚上睡觉#身体部位##疾病#是怎么回事”。当输入的非长尾数据为“晚上睡觉脚抽筋怎么了”或者“夜间睡觉脚抽筋是怎么回事”都可以认为是字典元素“晚上睡觉#身体部位##疾病#是怎么回事”的泛化。也即,“晚上睡觉脚抽筋怎么了”或者“夜间睡觉脚抽筋是怎么回事”在意图匹配泛化字典所匹配到的字典元素均为:“晚上睡觉#身体部位##疾病#是怎么回事”。It can be understood that dictionary elements can be used as query matching benchmarks to match input data. For example, the dictionary element constructed based on the user's historical behavior can be: "What's going on with #bodypart##disease# when you sleep at night?" When the input non-long-tail data is "What's wrong with leg cramps while sleeping at night" or "What's wrong with leg cramps while sleeping at night", it can be considered as a general expression of the dictionary element "What's wrong with sleeping at night#bodypart##disease#" change. That is, "What's wrong with leg cramps while sleeping at night?" or "What's wrong with leg cramps while sleeping at night?" The dictionary elements matched by the intent matching generalization dictionary are: "What's wrong with sleeping at night#bodypart##disease#" thing".
在得到意图匹配泛化字典之后,可以根据意图匹配泛化字典的字典元素的元素结构构建输入数据编辑距离计算模块,以通过输入数据编辑距离计算模块计算输入数据与字典元素之间的编辑距离(也可称为相似度)。After obtaining the intent matching generalization dictionary, the input data edit distance calculation module can be constructed according to the element structure of the dictionary elements of the intent matching generalization dictionary to calculate the edit distance between the input data and the dictionary elements through the input data edit distance calculation module ( Also called similarity).
S280、根据所述输入数据编辑距离计算模块和所述意图匹配泛化字典构建所述第一意图识别模型。S280. Construct the first intention recognition model according to the input data editing distance calculation module and the intention matching generalization dictionary.
其中,第一意图识别模型用于识别非长尾输入数据的意图。Among them, the first intent recognition model is used to identify the intent of non-long-tail input data.
在本申请实施例中,第一意图识别模型可以包括输入数据编辑距离计算模块和意图匹配泛化字典两个模块。除此之外,第一意图识别模型还可以包括用于实体抽象的实体词字典。第一意图识别模型则可以用于对非长尾输入数据进行意图识别。In this embodiment of the present application, the first intention recognition model may include two modules: an input data editing distance calculation module and an intention matching generalization dictionary. In addition to this, the first intention recognition model may also include an entity word dictionary for entity abstraction. The first intent recognition model can be used to identify intent on non-long-tail input data.
具体的,第一意图识别模型可以首先基于实体词字典对意图输出对象的输入query进行实体抽象得到初始抽象实体词,并对初始抽象实体词进行实体归类分组,得到最终的抽象泛化实体词。然后,第一意图识别模型可以计算抽象泛化实体词和意图匹配泛化字典中各个字典元素间的编辑距离。最后,第一意图识别模型将意图匹配泛化字典中和抽象泛化实体词之间编辑距离最小的字典元素包括的意图作为输入query的意图。可以理解的是,如果意图匹配泛化字典中和抽象泛化实体词之间编辑距离最小的字典元素包括的意图有多个,还可以根据各意图的排序结果选择首个意图作为输入query的意图。Specifically, the first intention recognition model can first perform entity abstraction on the input query of the intention output object based on the entity word dictionary to obtain the initial abstract entity words, and perform entity classification and grouping on the initial abstract entity words to obtain the final abstract generalized entity words. . Then, the first intent recognition model can calculate the edit distance between the abstract generalized entity words and each dictionary element in the intent matching generalized dictionary. Finally, the first intention recognition model takes the intent included in the dictionary element with the smallest edit distance between the intent matching generalization dictionary and the abstract generalization entity word as the intent of the input query. It is understandable that if the dictionary element with the smallest edit distance between the intent matching generalized dictionary and the abstract generalized entity word includes multiple intents, the first intent can also be selected as the intent of the input query based on the sorting results of each intent. .
S290、构建第二意图识别模型。S290. Construct a second intention recognition model.
其中,第二意图识别模型可以用于对长尾输入数据进行意图识别,得到最终的意图理解结果。Among them, the second intention recognition model can be used to identify the intention of long-tail input data to obtain the final intention understanding result.
在本申请的一个可选实施例中,构建第二意图识别模型可以包括:根据预训练样本数据对预设神经网络模型进行预训练,得到预训练神经网络模型;根据所述原始意图样本数据获 取第二目标意图样本数据;其中,所述第二目标意图样本数据包括长尾输入样本数据和意图标记结果数据;根据所述第二目标意图样本数据对所述预训练神经网络模型进行训练,得到第二意图识别模型。In an optional embodiment of the present application, building the second intention recognition model may include: pre-training a preset neural network model based on pre-training sample data to obtain a pre-trained neural network model; and obtaining a pre-trained neural network model based on the original intention sample data. Second target intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention marking result data; train the pre-trained neural network model according to the second target intention sample data, and obtain Second intention recognition model.
其中,预设神经网络模型可以是任意类型的可以实现意图识别功能的神经网络模型。预训练神经网络模型可以是对预设神经网络模型进行预训练得到的神经网络模型。第二目标意图样本数据可以是用于正式训练第二意图识别模型的样本数据。长尾输入样本数据可以是长尾形式的输入样本数据,具有语义具有复杂性的特点。意图标记结果数据可以是预先对长尾输入样本数据匹配的意图进行标记的数据。The preset neural network model can be any type of neural network model that can realize the intention recognition function. The pre-trained neural network model may be a neural network model obtained by pre-training a preset neural network model. The second target intention sample data may be sample data used to formally train the second intention recognition model. Long-tail input sample data can be input sample data in the long-tail form, which has the characteristics of semantic complexity. The intent-labeled result data may be data that is pre-labeled with intent that matches the long-tail input sample data.
在本申请实施例中,针对长尾输入样本数据可以采用神经网络模型进行意图识别。具体的,可以首先采用预训练样本数据对预设神经网络模型进行预训练,以训练预设神经网络模型的数据理解能力,得到预训练神经网络模型。在预训练完成后,可以进一步采用第二目标意图样本数据预训练神经网络模型进行训练,得到第二意图识别模型。In this embodiment of the present application, a neural network model can be used for intent recognition for long-tail input sample data. Specifically, the pre-trained neural network model can be pre-trained using pre-training sample data to train the data understanding ability of the pre-set neural network model and obtain the pre-trained neural network model. After the pre-training is completed, the second target intention sample data pre-trained neural network model can be further used for training to obtain the second intention recognition model.
在一个具体的例子中,假设预设神经网络模型为BERT(Bidirectional Encoder Representation from Transformers,一种语言表征模型)模型,则对预设神经网络模型进行预训练可以包括两个预训练任务,一个是MLM(Masked Language Model,掩码语言模型)预训练任务,还有一个是NSP(Next Sentence Prediction,下句预测)预训练任务。其中,MLM预训练任务可以理解成完形填空任务,可以随机mask每一个句子中一定数量(如句子中15%)的词,用其上下文来做预测,例如,针对预训练样本数据“my dog is hairy”转换为“my dog is[MASK]”。此处将“hairy”进行了mask处理。然后采用非监督学习的方法预测mask位置的词是什么。NSP预训练任务可以理解为文本匹配任务。具体的,可以选取一些句子对A和B,其中50%的数据B是A的其中一个断句,剩余50%的数据B是语料库中随机选择的,以使网络学习其中的相关性。示例性的,假设句子A为:简化搜索运维人员的工作流程,提高运维人员的工作效率。句子B的其中一个短句可以为句子A的其中一个短句,句子B的另外一个短句则可以为随机选择的断句,例如,句子B可以为:简化搜索运维人员的工作流程,需要准时吃饭。上述预训练过程可以使得预训练神经网络模型理解两个句子之间的关系,从而能让预训练神经网络模型更好的适应上述数据处理的任务。In a specific example, assuming that the preset neural network model is a BERT (Bidirectional Encoder Representation from Transformers, a language representation model) model, pre-training the preset neural network model can include two pre-training tasks, one is MLM (Masked Language Model, masked language model) pre-training task, and another is NSP (Next Sentence Prediction, next sentence prediction) pre-training task. Among them, the MLM pre-training task can be understood as a cloze task. You can randomly mask a certain number of words in each sentence (such as 15% of the sentence) and use their context to make predictions. For example, for the pre-training sample data "my dog is hairy" is converted to "my dog is[MASK]". Here, "hairy" is masked. Then use unsupervised learning method to predict the word at the mask position. The NSP pre-training task can be understood as a text matching task. Specifically, some sentence pairs A and B can be selected, 50% of the data B is one of the sentence segments of A, and the remaining 50% of the data B is randomly selected from the corpus, so that the network can learn the correlation. For example, suppose sentence A is: Simplify the work process of searching for operation and maintenance personnel and improve the work efficiency of operation and maintenance personnel. One of the short sentences of sentence B can be one of the short sentences of sentence A, and the other short sentence of sentence B can be a randomly selected sentence fragment. For example, sentence B can be: Simplify the workflow of search operation and maintenance personnel, and need to be punctual Have a meal. The above pre-training process can enable the pre-trained neural network model to understand the relationship between two sentences, thereby allowing the pre-trained neural network model to better adapt to the above-mentioned data processing tasks.
在一个具体的例子中,假设预设神经网络模型为BERT模型,则根据第二目标意图样本数据对BERT模型进行训练时,可以通过CrossEntropy损失函数和BP(Back Propagation,反向传播)传播机制,让模型自主学习和更新网络权重参数,实现训练过程,训练后的BERT模型作为第二意图识别模型。其中,BERT模型的训练过程可以参考图3所示。BERT是依托Transformers作为特征抽取器的强大预训练模型,鉴于其巨大的参数量和超强的特征表示能力,可以学习到文本中深层的语义信息。使用BERT对长尾输入数据进行embedding(嵌入),可以将文本信息映射到高维向量空间,使用embedding vector(嵌入向量)表示对长尾输入数据的语义信息。In a specific example, assuming that the preset neural network model is the BERT model, when training the BERT model based on the second target intention sample data, the CrossEntropy loss function and BP (Back Propagation) propagation mechanism can be used. Let the model learn and update the network weight parameters independently to implement the training process. The trained BERT model serves as the second intention recognition model. Among them, the training process of the BERT model can be seen in Figure 3. BERT is a powerful pre-training model that relies on Transformers as feature extractors. In view of its huge number of parameters and super feature representation capabilities, it can learn deep semantic information in text. Using BERT to embedding long-tail input data can map text information to a high-dimensional vector space, and use embedding vectors to represent the semantic information of long-tail input data.
S2110、根据所述第一意图识别模型和所述第二意图识别模型构建目标意图识别模型。S2110. Construct a target intention recognition model according to the first intention recognition model and the second intention recognition model.
其中,目标意图识别模型也即可以对任意类型的输入数据进行意图识别的模型。Among them, the target intent recognition model is a model that can perform intent recognition on any type of input data.
S2120、获取待识别输入数据,对所述待识别输入数据进行分类,得到输入数据分类结果。S2120. Obtain the input data to be identified, classify the input data to be identified, and obtain the input data classification result.
其中,所述输入数据分类结果包括长尾输入数据和非长尾输入数据。Wherein, the input data classification results include long-tail input data and non-long-tail input data.
其中,待识别输入数据可以是需要进行意图识别的输入数据。例如可以是用户实时输入的query数据,也可以是设备或程序等实时输入的query数据等。待识别输入数据可以是文本类型的数据,也可以是语音类型的数据,本申请实施例并不对待识别输入数据的数据类型进行限制。输入数据分类结果也即待识别输入数据的分类结果。The input data to be recognized may be input data that requires intent recognition. For example, it can be query data input in real time by the user, or query data input in real time by a device or program, etc. The input data to be recognized may be text type data or voice type data. The embodiment of the present application does not limit the data type of the input data to be recognized. The input data classification result is also the classification result of the input data to be identified.
在获取到待识别输入数据之后,为了确定对待识别输入数据进行意图识别的模型,可以首先对待识别输入数据进行分类,确定待识别输入数据是长尾输入数据还是非长尾输入数据。After obtaining the input data to be recognized, in order to determine the model for intent recognition of the input data to be recognized, the input data to be recognized can be classified first to determine whether the input data to be recognized is long-tail input data or non-long-tail input data.
在本申请的一个可选实施例中,对所述待识别输入数据进行分类,可以包括:在确定所述待识别输入数据的数据长度小于或等于预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为非长尾输入数据;在确定所述待识别输入数据的数据长度大于所述预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为长尾输入数据。In an optional embodiment of the present application, classifying the input data to be identified may include: when it is determined that the data length of the input data to be identified is less than or equal to a preset data length threshold, determining that the input data to be identified is The input data classification result of the input data to be identified is non-long tail input data; when it is determined that the data length of the input data to be identified is greater than the preset data length threshold, the input data classification of the input data to be identified is determined The result is long tail input data.
其中,预设数据长度阈值可以是用于划分长尾数据和非长尾数据的长度阈值,示例性的,预设数据长度阈值可以设置为20或25等,具体可以根据实际需求设定,本申请实施例并不对预设数据长度阈值的具体数值进行限定。The preset data length threshold can be a length threshold used to divide long-tail data and non-long-tail data. For example, the preset data length threshold can be set to 20 or 25, etc., which can be set according to actual needs. The application embodiment does not limit the specific value of the preset data length threshold.
具体的,可以确定待识别输入数据的数据长度,以通过数据长度对待识别输入数据进行分类。其中,数据长度可以是待识别输入数据中字或字符的数量,如针对待识别输入数据“晚上睡觉脚抽筋是怎么回事”,其数据长度为12。相应的,如果确定待识别输入数据的数据长度小于或等于预设数据长度阈值,则可以确定待识别输入数据的输入数据分类结果为非长尾输入数据;否则,确定待识别输入数据的输入数据分类结果为长尾输入数据。Specifically, the data length of the input data to be recognized can be determined to classify the input data to be recognized based on the data length. Among them, the data length can be the number of words or characters in the input data to be recognized. For example, for the input data to be recognized "Why do my legs cramp while sleeping at night", the data length is 12. Correspondingly, if it is determined that the data length of the input data to be identified is less than or equal to the preset data length threshold, it can be determined that the input data classification result of the input data to be identified is non-long tail input data; otherwise, the input data of the input data to be identified can be determined. The classification results are long-tail input data.
S2130、判断待识别输入数据是否为非长尾输入数据,若是,则执行S2140,否则,执行S2150。S2130. Determine whether the input data to be identified is non-long tail input data. If so, execute S2140. Otherwise, execute S2150.
S2140、将所述待识别输入数据输入至所述第一意图识别模型中,以根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。S2140. Input the input data to be recognized into the first intention recognition model, so as to output the intention recognition result of the input data to be recognized according to the first intention recognition model.
S2150、将所述待识别输入数据输入至所述第二意图识别模型中,以根据所述第二意图识别模型输出所述待识别输入数据的意图识别结果。S2150. Input the input data to be recognized into the second intention recognition model, so as to output the intention recognition result of the input data to be recognized according to the second intention recognition model.
具体的,可以通过目标意图识别模型的第一意图识别模型对非长尾的输入数据进行意图识别,通过目标意图识别模型的第二意图识别模型对长尾的输入数据进行意图识别,从而得到输入数据的意图识别结果。Specifically, the first intention recognition model of the target intention recognition model can be used to perform intent recognition on non-long-tail input data, and the second intention recognition model of the target intent recognition model can be used to perform intent recognition on long-tail input data, thereby obtaining the input. Intent identification results of data.
其中,第一意图识别模型可以基于大量行为的DFA算法,不仅能够提升意图识别效率,还具有很好的泛化性。第二意图识别模型可以很好的提取长尾输入数据隐含的语义信息,可 以更好的表示其语义特征。通过对长尾和非长尾输入数据的差异化处理,可以更加精准识别、理解意图。Among them, the first intention recognition model can be based on the DFA algorithm of a large number of behaviors, which can not only improve the efficiency of intention recognition, but also has good generalization. The second intention recognition model can well extract the semantic information implicit in long-tail input data, and can better represent its semantic features. Through differentiated processing of long-tail and non-long-tail input data, intentions can be more accurately identified and understood.
采用上述技术方案,通过分别构建第一意图识别模型和第二意图识别模型,以根据第一意图识别模型和第二意图识别模型共同组成目标意图识别模型,可以针对长尾输入数据和非长尾输入数据采用不同的模型进行意图识别,能够提高意图理解的准确性和高效性,从而提高用户体验。Using the above technical solution, by constructing the first intention recognition model and the second intention recognition model respectively, and jointly forming a target intention recognition model based on the first intention recognition model and the second intention recognition model, it is possible to target long-tail input data and non-long-tail data. Input data uses different models for intent recognition, which can improve the accuracy and efficiency of intent understanding, thereby improving user experience.
需要说明的是,以上各实施例中各技术特征之间的任意排列组合也属于本申请的保护范围。It should be noted that any permutation and combination of the technical features in the above embodiments also belongs to the protection scope of the present application.
实施例三Embodiment 3
图4是本申请实施例四提供的一种意图识别装置的示意图,如图4所示,所述装置包括:第一样本数据获取模块410、抽象泛化实体词获取模块420、意图匹配泛化字典生成模块430、第一意图识别模型构建模块440、待识别输入数据输入模块450以及意图识别结果输出模块460,其中:Figure 4 is a schematic diagram of an intention recognition device provided in Embodiment 4 of the present application. As shown in Figure 4, the device includes: a first sample data acquisition module 410, an abstract generalized entity word acquisition module 420, an intent matching generalized dictionary generation module 430, first intention recognition model building module 440, input data input module to be recognized 450 and intention recognition result output module 460, where:
第一样本数据获取模块410,用于根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;The first sample data acquisition module 410 is used to obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long tail input sample data and intention matching result sorting data;
抽象泛化实体词获取模块420,用于对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;The abstract generalized entity word acquisition module 420 is used to perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
意图匹配泛化字典生成模块430,用于对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;The intention matching generalization dictionary generation module 430 is used to logically combine the abstract generalization entity words and the intention matching result sorting data to generate an intention matching generalization dictionary;
第一意图识别模型构建模块440,用于根据所述意图匹配泛化字典构建第一意图识别模型;The first intention recognition model building module 440 is used to build a first intention recognition model according to the intention matching generalization dictionary;
待识别输入数据输入模块450,用于在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;The input data to be recognized input module 450 is configured to input the input data to be recognized into the first intention recognition model when it is determined that the input data to be recognized is non-long-tail input data;
意图识别结果输出模块460,用于根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result output module 460 is configured to output the intent recognition result of the input data to be recognized according to the first intent recognition model.
本申请实施例通过根据原始意图样本数据获取包括非长尾输入样本数据和意图匹配结果排序数据的第一目标意图样本数据后,对非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,并对抽象泛化实体词和意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典,从而根据意图匹配泛化字典构建第一意图识别模型,以利用第一意图识别模型对输入数据结果为非长尾输入数据的待识别输入数据输进行意图识别,输出待识别输入数据的意图识别结果,解决现有意图识别方法存在的意图理解准确率较低的问题,能够提高意图理解的准确率。The embodiment of the present application obtains the first target intent sample data including non-long tail input sample data and intent matching result sorting data based on the original intent sample data, and then performs entity abstraction on the non-long tail input sample data to obtain abstract generalized entity words. , and logically combine abstract generalized entity words and intent matching result sorting data to generate an intent matching generalization dictionary, thereby building a first intent recognition model based on the intent matching generalization dictionary to use the first intent recognition model to analyze the input data The result is that the input data to be recognized of non-long-tail input data is input for intent recognition, and the intent recognition result of the input data to be recognized is output. This solves the problem of low accuracy of intent understanding in existing intent recognition methods, and can improve the accuracy of intent understanding. Rate.
可选的,第一样本数据获取模块410具体用于:根据非长尾输入数据筛选规则从所述原始意图样本数据中筛选所述非长尾输入样本数据;获取所述非长尾输入样本数据的关联意图反馈数据;对所述关联意图反馈数据进行排序,得到所述意图匹配结果排序数据。Optionally, the first sample data acquisition module 410 is specifically configured to: filter the non-long tail input sample data from the original intention sample data according to the non-long tail input data filtering rules; obtain the non-long tail input sample The association intention feedback data of the data is sorted to obtain the intention matching result sorting data.
可选的,抽象泛化实体词获取模块420具体用于:根据实体词字典对所述非长尾输入样本数据进行实体抽象,得到初始抽象实体词;对所述初始抽象实体词进行分类分组,得到所述抽象泛化实体词。Optionally, the abstract generalized entity word acquisition module 420 is specifically configured to: perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words; classify and group the initial abstract entity words, Obtain the abstract generalized entity word.
可选的,第一意图识别模型构建模块440具体用于:根据所述意图匹配泛化字典的字典元素构建输入数据编辑距离计算模块;根据所述输入数据编辑距离计算模块和所述意图匹配泛化字典构建所述第一意图识别模型。Optionally, the first intention recognition model building module 440 is specifically configured to: build an input data editing distance calculation module according to the dictionary elements of the intention matching generalization dictionary; and build an input data editing distance calculation module according to the input data editing distance calculation module and the intention matching generalization dictionary. dictionary to build the first intention recognition model.
可选的,意图识别装置还包括:预设神经网络模型预训练模块,用于根据预训练样本数据对预设神经网络模型进行预训练,得到预训练神经网络模型;第二目标意图样本数据获取模块,用于根据所述原始意图样本数据获取第二目标意图样本数据;其中,所述第二目标意图样本数据包括长尾输入样本数据和意图标记结果数据;第二意图识别模型获取模块,用于根据所述第二目标意图样本数据对所述预训练神经网络模型进行训练,得到第二意图识别模型;目标意图识别模型构建模块,用于根据所述第一意图识别模型和所述第二意图识别模型构建目标意图识别模型。Optionally, the intention recognition device also includes: a preset neural network model pre-training module, used to pre-train the preset neural network model according to the pre-training sample data to obtain a pre-trained neural network model; and obtain the second target intention sample data A module for obtaining second target intention sample data according to the original intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention marking result data; a second intention recognition model acquisition module, using The pre-trained neural network model is trained according to the second target intention sample data to obtain a second intention recognition model; a target intention recognition model construction module is used to train the pre-trained neural network model according to the first intention recognition model and the second intention recognition model. Intent recognition model builds a target intent recognition model.
可选的,意图识别装置还包括:待识别输入数据获取模块,用于获取待识别输入数据;待识别输入数据分类模块,用于对所述待识别输入数据进行分类,得到输入数据分类结果;其中,所述输入数据分类结果包括长尾输入数据和非长尾输入数据。Optionally, the intention recognition device also includes: an input data acquisition module to be recognized, used to obtain the input data to be recognized; an input data classification module to be recognized, to classify the input data to be recognized, and obtain an input data classification result; Wherein, the input data classification results include long-tail input data and non-long-tail input data.
可选的,待识别输入数据分类模块具体用于:在确定所述待识别输入数据的数据长度小于或等于预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为非长尾输入数据;在确定所述待识别输入数据的数据长度大于所述预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为长尾输入数据。Optionally, the input data classification module to be identified is specifically configured to: when it is determined that the data length of the input data to be identified is less than or equal to a preset data length threshold, determine that the input data classification result of the input data to be identified is Non-long-tail input data; when it is determined that the data length of the input data to be identified is greater than the preset data length threshold, it is determined that the input data classification result of the input data to be identified is long-tail input data.
上述意图识别装置可执行本申请任意实施例所提供的意图识别方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请任意实施例提供的意图识别方法。The above-mentioned intention recognition device can execute the intention recognition method provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in this embodiment, please refer to the intention identification method provided by any embodiment of this application.
由于上述所介绍的意图识别装置为可以执行本申请实施例中的意图识别方法的装置,故而基于本申请实施例中所介绍的意图识别方法,本领域所属技术人员能够了解本实施例的意图识别装置的具体实施方式以及其各种变化形式,所以在此对于该意图识别装置如何实现本申请实施例中的意图识别方法不再详细介绍。只要本领域所属技术人员实施本申请实施例中意图识别方法所采用的装置,都属于本申请所欲保护的范围。Since the intention recognition device introduced above is a device that can execute the intention recognition method in the embodiment of the present application, based on the intention recognition method introduced in the embodiment of the present application, those skilled in the art can understand the intention recognition in this embodiment. The specific implementation of the device and its various modifications, therefore, how the intention recognition device implements the intention recognition method in the embodiment of the present application will not be described in detail here. As long as a person skilled in the art implements the device used by the intent identification method in the embodiment of the present application, it will fall within the scope of protection of the present application.
实施例四Embodiment 4
图5示出了可以用来实施本申请的实施例的电子设备10的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。FIG. 5 shows a schematic structural diagram of an electronic device 10 that can be used to implement embodiments of the present application. Electronic devices are intended to refer to various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are examples only and are not intended to limit the implementation of the present application as described and/or claimed herein.
如图5所示,电子设备10包括至少一个处理器11,以及与至少一个处理器11通信连接的存储器,如只读存储器(ROM)12、随机访问存储器(RAM)13等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器11可以根据存储在只读存储器(ROM)12中的计算机程序或者从存储单元18加载到随机访问存储器(RAM)13中的计算机程序,来执行各种适当的动作和处理。在RAM 13中,还可存储电子设备10操作所需的各种程序和数据。处理器11、ROM 12以及RAM 13通过总线14彼此相连。输入/输出(I/O)接口15也连接至总线14。As shown in Figure 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores There is a computer program that can be executed by at least one processor. The processor 11 can perform the operation according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. Perform various appropriate actions and processing. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via the bus 14. An input/output (I/O) interface 15 is also connected to bus 14 .
电子设备10中的多个部件连接至I/O接口15,包括:输入单元16,例如键盘、鼠标等;输出单元17,例如各种类型的显示器、扬声器等;存储单元18,例如磁盘、光盘等;以及通信单元19,例如网卡、调制解调器、无线通信收发机等。通信单元19允许电子设备10通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc. etc.; and communication unit 19, such as network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
处理器11可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器11的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器11执行上文所描述的各个方法和处理,例如意图识别方法。 Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the intent recognition method.
在一些实施例中,意图识别方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元18。在一些实施例中,计算机程序的部分或者全部可以经由ROM 12和/或通信单元19而被载入和/或安装到电子设备10上。当计算机程序加载到RAM 13并由处理器11执行时,可以执行上文描述的意图识别方法的一个或多个步骤。备选地,在其他实施例中,处理器11可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行意图识别方法。In some embodiments, the intent recognition method may be implemented as a computer program, which is tangibly embodied in a computer-readable storage medium, such as the storage unit 18 . In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the intent recognition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the intent identification method in any other suitable manner (eg, by means of firmware).
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip implemented in a system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or a combination thereof. These various embodiments may include implementation in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor The processor, which may be a special purpose or general purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
用于实施本申请的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that the computer program, when executed by the processor, causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented. A computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本申请的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user monitor); and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and may be provided in any form, including (acoustic input, voice input or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., A user's computer having a graphical user interface or web browser through which the user can interact with implementations of the systems and technologies described herein), or including such backend components, middleware components, or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communications network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。Computing systems may include clients and servers. Clients and servers are generally remote from each other and typically interact over a communications network. The relationship of client and server is created by computer programs running on corresponding computers and having a client-server relationship with each other. The server can be a cloud server, also known as cloud computing server or cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business scalability in traditional physical hosts and VPS services. defect.
实施例五Embodiment 5
本申请实施例五还提供一种存储计算机程序的计算机存储介质,计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机程序在由计算机处理器执行时用于执行本申请上述实施例任一所述的意图识别方法。Embodiment 5 of the present application also provides a computer storage medium that stores a computer program. The computer-readable storage medium may be non-volatile or volatile. The computer program is used to execute the present invention when executed by a computer processor. Apply the intention recognition method described in any of the above embodiments.
其中,意图识别方法包括:根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;根据所述意图匹配泛化字典构建第一意图识别模型;在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入 数据输入至所述第一意图识别模型中;根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。Wherein, the intention identification method includes: obtaining the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long tail input sample data and intention matching result sorting data; Input sample data for entity abstraction to obtain abstract generalized entity words; logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalization dictionary; match the generalization dictionary according to the intent Construct a first intention recognition model; when it is determined that the input data to be recognized is non-long tail input data, input the input data to be recognized into the first intention recognition model; output according to the first intention recognition model The intention recognition result of the input data to be recognized.
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM,或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium in the embodiment of the present application may be any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer disks, hard drives, random access memory (RAM), read only memory (Read Only Memory) , ROM), Erasable Programmable Read Only Memory (Erasable Programmable Read Only Memory, EPROM, or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or the above Any suitable combination. As used herein, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。Program code embodied on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional A procedural programming language, such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In situations involving remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer, such as through the Internet using an Internet service provider. ).
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请的技术方案所期望的结果,本文在此不进行限制。It should be understood that various forms of the process shown above may be used, with steps reordered, added or deleted. For example, each step described in this application can be executed in parallel, sequentially, or in a different order. As long as the desired results of the technical solution of this application can be achieved, there is no limitation here.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the scope of protection of the present application. It will be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions are possible depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application shall be included in the protection scope of this application.

Claims (20)

  1. 一种意图识别方法,其中,包括:An intent identification method, including:
    根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
    对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
    对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
    根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
    在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
    根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  2. 根据权利要求1所述的方法,其中,所述根据原始意图样本数据获取第一目标意图样本数据,包括:The method according to claim 1, wherein said obtaining the first target intention sample data according to the original intention sample data includes:
    根据非长尾输入数据筛选规则从所述原始意图样本数据中筛选所述非长尾输入样本数据;Filter the non-long-tail input sample data from the original intention sample data according to the non-long-tail input data filtering rules;
    获取所述非长尾输入样本数据的关联意图反馈数据;Obtain the association intention feedback data of the non-long-tail input sample data;
    对所述关联意图反馈数据进行排序,得到所述意图匹配结果排序数据。The associated intention feedback data is sorted to obtain the intention matching result sorting data.
  3. 根据权利要求1所述的方法,其中,所述对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,包括:The method according to claim 1, wherein said performing entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words includes:
    根据实体词字典对所述非长尾输入样本数据进行实体抽象,得到初始抽象实体词;Perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words;
    对所述初始抽象实体词进行分类分组,得到所述抽象泛化实体词。Classify and group the initial abstract entity words to obtain the abstract generalized entity words.
  4. 根据权利要求1所述的方法,其中,所述根据所述意图匹配泛化字典构建第一意图识别模型,包括:The method according to claim 1, wherein said constructing a first intention recognition model according to the intention matching generalization dictionary includes:
    根据所述意图匹配泛化字典的字典元素构建输入数据编辑距离计算模块;Construct an input data edit distance calculation module according to the dictionary elements of the generalized dictionary matched with the intention;
    根据所述输入数据编辑距离计算模块和所述意图匹配泛化字典构建所述第一意图识别模型。The first intention recognition model is constructed according to the input data editing distance calculation module and the intention matching generalization dictionary.
  5. 根据权利要求1所述的方法,其中,还包括:The method of claim 1, further comprising:
    根据预训练样本数据对预设神经网络模型进行预训练,得到预训练神经网络模型;Pre-train the preset neural network model based on the pre-training sample data to obtain the pre-trained neural network model;
    根据所述原始意图样本数据获取第二目标意图样本数据;其中,所述第二目标意图样本数据包括长尾输入样本数据和意图标记结果数据;Obtain second target intention sample data according to the original intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention mark result data;
    根据所述第二目标意图样本数据对所述预训练神经网络模型进行训练,得到第二意图识别模型;Train the pre-trained neural network model according to the second target intention sample data to obtain a second intention recognition model;
    根据所述第一意图识别模型和所述第二意图识别模型构建目标意图识别模型。A target intention recognition model is constructed according to the first intention recognition model and the second intention recognition model.
  6. 根据权利要求1至5中任一项所述的方法,其中,在所述将所述待识别输入数据输入至所述第一意图识别模型中之前,还包括:The method according to any one of claims 1 to 5, wherein before inputting the input data to be recognized into the first intention recognition model, it further includes:
    获取待识别输入数据;Get the input data to be recognized;
    对所述待识别输入数据进行分类,得到输入数据分类结果;其中,所述输入数据分类结果包括长尾输入数据和非长尾输入数据。The input data to be identified is classified to obtain an input data classification result; wherein the input data classification result includes long-tail input data and non-long-tail input data.
  7. 根据权利要求6所述的方法,其中,所述对所述待识别输入数据进行分类,包括:The method according to claim 6, wherein classifying the input data to be identified includes:
    在确定所述待识别输入数据的数据长度小于或等于预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为非长尾输入数据;When it is determined that the data length of the input data to be identified is less than or equal to the preset data length threshold, determine that the input data classification result of the input data to be identified is non-long tail input data;
    在确定所述待识别输入数据的数据长度大于所述预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为长尾输入数据。When it is determined that the data length of the input data to be identified is greater than the preset data length threshold, it is determined that the input data classification result of the input data to be identified is long-tail input data.
  8. 一种意图识别装置,其中,包括:An intention recognition device, which includes:
    第一样本数据获取模块,用于根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;The first sample data acquisition module is used to obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result sorting data;
    抽象泛化实体词获取模块,用于对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;An abstract generalized entity word acquisition module is used to perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
    意图匹配泛化字典生成模块,用于对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;An intent matching generalization dictionary generation module, used to logically combine the abstract generalization entity words and the intent matching result sorting data to generate an intent matching generalization dictionary;
    第一意图识别模型构建模块,用于根据所述意图匹配泛化字典构建第一意图识别模型;A first intention recognition model building module, configured to build a first intention recognition model according to the intention matching generalization dictionary;
    待识别输入数据输入模块,用于在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;An input data input module to be recognized, configured to input the input data to be recognized into the first intention recognition model when it is determined that the input data to be recognized is non-long-tail input data;
    意图识别结果输出模块,用于根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。An intent recognition result output module is configured to output the intent recognition result of the input data to be recognized according to the first intent recognition model.
  9. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device includes:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行时实现意图识别方法,包括:A memory communicatively connected with the at least one processor; wherein the memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the intention recognition method is implemented, include:
    根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
    对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
    对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
    根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
    在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
    根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  10. 根据权利要求9所述的电子设备,其中,所述根据原始意图样本数据获取第一目标意图样本数据,包括:The electronic device according to claim 9, wherein the obtaining the first target intention sample data according to the original intention sample data includes:
    根据非长尾输入数据筛选规则从所述原始意图样本数据中筛选所述非长尾输入样本数据;Filter the non-long-tail input sample data from the original intention sample data according to the non-long-tail input data filtering rules;
    获取所述非长尾输入样本数据的关联意图反馈数据;Obtain the association intention feedback data of the non-long-tail input sample data;
    对所述关联意图反馈数据进行排序,得到所述意图匹配结果排序数据。The associated intention feedback data is sorted to obtain the intention matching result sorting data.
  11. 根据权利要求9所述的电子设备,其中,所述对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,包括:The electronic device according to claim 9, wherein said performing entity abstraction on said non-long-tail input sample data to obtain abstract generalized entity words includes:
    根据实体词字典对所述非长尾输入样本数据进行实体抽象,得到初始抽象实体词;Perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words;
    对所述初始抽象实体词进行分类分组,得到所述抽象泛化实体词。Classify and group the initial abstract entity words to obtain the abstract generalized entity words.
  12. 根据权利要求9所述的电子设备,其中,所述根据所述意图匹配泛化字典构建第一意图识别模型,包括:The electronic device according to claim 9, wherein said constructing a first intention recognition model according to the intention matching generalization dictionary includes:
    根据所述意图匹配泛化字典的字典元素构建输入数据编辑距离计算模块;Construct an input data edit distance calculation module according to the dictionary elements of the generalized dictionary matched with the intention;
    根据所述输入数据编辑距离计算模块和所述意图匹配泛化字典构建所述第一意图识别模型。The first intention recognition model is constructed according to the input data editing distance calculation module and the intention matching generalization dictionary.
  13. 根据权利要求9所述的电子设备,其中,还包括:The electronic device according to claim 9, further comprising:
    根据预训练样本数据对预设神经网络模型进行预训练,得到预训练神经网络模型;Pre-train the preset neural network model based on the pre-training sample data to obtain the pre-trained neural network model;
    根据所述原始意图样本数据获取第二目标意图样本数据;其中,所述第二目标意图样本数据包括长尾输入样本数据和意图标记结果数据;Obtain second target intention sample data according to the original intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention mark result data;
    根据所述第二目标意图样本数据对所述预训练神经网络模型进行训练,得到第二意图识别模型;Train the pre-trained neural network model according to the second target intention sample data to obtain a second intention recognition model;
    根据所述第一意图识别模型和所述第二意图识别模型构建目标意图识别模型。A target intention recognition model is constructed according to the first intention recognition model and the second intention recognition model.
  14. 根据权利要求9至13中任一项所述的电子设备,其中,在所述将所述待识别输入数据输入至所述第一意图识别模型中之前,还包括:The electronic device according to any one of claims 9 to 13, wherein before inputting the input data to be recognized into the first intention recognition model, it further includes:
    获取待识别输入数据;Get the input data to be recognized;
    对所述待识别输入数据进行分类,得到输入数据分类结果;其中,所述输入数据分类结果包括长尾输入数据和非长尾输入数据;Classify the input data to be identified to obtain input data classification results; wherein the input data classification results include long-tail input data and non-long-tail input data;
    所述对所述待识别输入数据进行分类,包括:Classifying the input data to be identified includes:
    在确定所述待识别输入数据的数据长度小于或等于预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为非长尾输入数据;When it is determined that the data length of the input data to be identified is less than or equal to the preset data length threshold, determine that the input data classification result of the input data to be identified is non-long tail input data;
    在确定所述待识别输入数据的数据长度大于所述预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为长尾输入数据。When it is determined that the data length of the input data to be identified is greater than the preset data length threshold, it is determined that the input data classification result of the input data to be identified is long-tail input data.
  15. 一种计算机存储介质,其中,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现意图识别方法,包括:A computer storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement an intention recognition method when executed by a processor, including:
    根据原始意图样本数据获取第一目标意图样本数据;其中,所述第一目标意图样本数据包括非长尾输入样本数据和意图匹配结果排序数据;Obtain the first target intention sample data according to the original intention sample data; wherein the first target intention sample data includes non-long-tail input sample data and intention matching result ranking data;
    对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词;Perform entity abstraction on the non-long-tail input sample data to obtain abstract generalized entity words;
    对所述抽象泛化实体词和所述意图匹配结果排序数据进行逻辑组合,以生成意图匹配泛化字典;Logically combine the abstract generalized entity words and the intent matching result sorting data to generate an intent matching generalized dictionary;
    根据所述意图匹配泛化字典构建第一意图识别模型;Construct a first intention recognition model according to the intention matching generalization dictionary;
    在确定待识别输入数据为非长尾输入数据的情况下,将所述待识别输入数据输入至所述第一意图识别模型中;When it is determined that the input data to be recognized is non-long-tail input data, input the input data to be recognized into the first intention recognition model;
    根据所述第一意图识别模型输出所述待识别输入数据的意图识别结果。The intent recognition result of the input data to be recognized is output according to the first intent recognition model.
  16. 根据权利要求15所述的计算机存储介质,其中,所述根据原始意图样本数据获取第一目标意图样本数据,包括:The computer storage medium according to claim 15, wherein the obtaining the first target intention sample data according to the original intention sample data includes:
    根据非长尾输入数据筛选规则从所述原始意图样本数据中筛选所述非长尾输入样本数据;Filter the non-long-tail input sample data from the original intention sample data according to the non-long-tail input data filtering rules;
    获取所述非长尾输入样本数据的关联意图反馈数据;Obtain the association intention feedback data of the non-long-tail input sample data;
    对所述关联意图反馈数据进行排序,得到所述意图匹配结果排序数据。The associated intention feedback data is sorted to obtain the intention matching result sorting data.
  17. 根据权利要求15所述的计算机存储介质,其中,所述对所述非长尾输入样本数据进行实体抽象,得到抽象泛化实体词,包括:The computer storage medium according to claim 15, wherein said performing entity abstraction on said non-long-tail input sample data to obtain abstract generalized entity words includes:
    根据实体词字典对所述非长尾输入样本数据进行实体抽象,得到初始抽象实体词;Perform entity abstraction on the non-long-tail input sample data according to the entity word dictionary to obtain initial abstract entity words;
    对所述初始抽象实体词进行分类分组,得到所述抽象泛化实体词。Classify and group the initial abstract entity words to obtain the abstract generalized entity words.
  18. 根据权利要求15所述的计算机存储介质,其中,所述根据所述意图匹配泛化字典构建第一意图识别模型,包括:The computer storage medium according to claim 15, wherein said constructing a first intention recognition model according to the intention matching generalization dictionary includes:
    根据所述意图匹配泛化字典的字典元素构建输入数据编辑距离计算模块;Construct an input data edit distance calculation module according to the dictionary elements of the generalized dictionary matched with the intention;
    根据所述输入数据编辑距离计算模块和所述意图匹配泛化字典构建所述第一意图识别模型。The first intention recognition model is constructed according to the input data editing distance calculation module and the intention matching generalization dictionary.
  19. 根据权利要求15所述的计算机存储介质,其中,还包括:The computer storage medium of claim 15, further comprising:
    根据预训练样本数据对预设神经网络模型进行预训练,得到预训练神经网络模型;Pre-train the preset neural network model based on the pre-training sample data to obtain the pre-trained neural network model;
    根据所述原始意图样本数据获取第二目标意图样本数据;其中,所述第二目标意图样本数据包括长尾输入样本数据和意图标记结果数据;Obtain second target intention sample data according to the original intention sample data; wherein the second target intention sample data includes long-tail input sample data and intention mark result data;
    根据所述第二目标意图样本数据对所述预训练神经网络模型进行训练,得到第二意图识别模型;Train the pre-trained neural network model according to the second target intention sample data to obtain a second intention recognition model;
    根据所述第一意图识别模型和所述第二意图识别模型构建目标意图识别模型。A target intention recognition model is constructed according to the first intention recognition model and the second intention recognition model.
  20. 根据权利要求16至19中任一项所述的计算机存储介质,其中,在所述将所述待识别输入数据输入至所述第一意图识别模型中之前,还包括:The computer storage medium according to any one of claims 16 to 19, wherein before inputting the input data to be recognized into the first intention recognition model, it further includes:
    获取待识别输入数据;Get the input data to be recognized;
    对所述待识别输入数据进行分类,得到输入数据分类结果;其中,所述输入数据分类结果包括长尾输入数据和非长尾输入数据;Classify the input data to be identified to obtain input data classification results; wherein the input data classification results include long-tail input data and non-long-tail input data;
    所述对所述待识别输入数据进行分类,包括:Classifying the input data to be identified includes:
    在确定所述待识别输入数据的数据长度小于或等于预设数据长度阈值的情况下,确定所 述待识别输入数据的输入数据分类结果为非长尾输入数据;When it is determined that the data length of the input data to be identified is less than or equal to the preset data length threshold, it is determined that the input data classification result of the input data to be identified is non-long tail input data;
    在确定所述待识别输入数据的数据长度大于所述预设数据长度阈值的情况下,确定所述待识别输入数据的输入数据分类结果为长尾输入数据。When it is determined that the data length of the input data to be identified is greater than the preset data length threshold, it is determined that the input data classification result of the input data to be identified is long-tail input data.
PCT/CN2022/120942 2022-03-25 2022-09-23 Intent recognition method and apparatus, and electronic device and storage medium WO2023178965A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210307597.9 2022-03-25
CN202210307597.9A CN114661910A (en) 2022-03-25 2022-03-25 Intention identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023178965A1 true WO2023178965A1 (en) 2023-09-28

Family

ID=82032829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120942 WO2023178965A1 (en) 2022-03-25 2022-09-23 Intent recognition method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114661910A (en)
WO (1) WO2023178965A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661910A (en) * 2022-03-25 2022-06-24 平安科技(深圳)有限公司 Intention identification method and device, electronic equipment and storage medium
CN115248847B (en) * 2022-09-22 2022-12-16 竹间智慧科技(北京)有限公司 Search data set construction method and device, electronic equipment and storage medium
CN117591662B (en) * 2024-01-19 2024-03-29 川投信息产业集团有限公司 Digital enterprise service data mining method and system based on artificial intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268348A (en) * 2013-05-28 2013-08-28 中国科学院计算技术研究所 Method for identifying user query intention
US20190205384A1 (en) * 2017-12-28 2019-07-04 Beijing Baidu Netcom Science And Technology Co., Ltd. Search method and device based on artificial intelligence
CN110399609A (en) * 2019-06-25 2019-11-01 众安信息技术服务有限公司 Intension recognizing method, device, equipment and computer readable storage medium
CN112182323A (en) * 2020-09-18 2021-01-05 北京三快在线科技有限公司 Category prediction method and device, electronic equipment and storage medium
US20210141820A1 (en) * 2019-11-13 2021-05-13 International Business Machines Corporation Omnichannel virtual assistant using artificial intelligence
CN113780007A (en) * 2021-10-22 2021-12-10 平安科技(深圳)有限公司 Corpus screening method, intention recognition model optimization method, equipment and storage medium
CN114661910A (en) * 2022-03-25 2022-06-24 平安科技(深圳)有限公司 Intention identification method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268348A (en) * 2013-05-28 2013-08-28 中国科学院计算技术研究所 Method for identifying user query intention
US20190205384A1 (en) * 2017-12-28 2019-07-04 Beijing Baidu Netcom Science And Technology Co., Ltd. Search method and device based on artificial intelligence
CN110399609A (en) * 2019-06-25 2019-11-01 众安信息技术服务有限公司 Intension recognizing method, device, equipment and computer readable storage medium
US20210141820A1 (en) * 2019-11-13 2021-05-13 International Business Machines Corporation Omnichannel virtual assistant using artificial intelligence
CN112182323A (en) * 2020-09-18 2021-01-05 北京三快在线科技有限公司 Category prediction method and device, electronic equipment and storage medium
CN113780007A (en) * 2021-10-22 2021-12-10 平安科技(深圳)有限公司 Corpus screening method, intention recognition model optimization method, equipment and storage medium
CN114661910A (en) * 2022-03-25 2022-06-24 平安科技(深圳)有限公司 Intention identification method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114661910A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
WO2023178965A1 (en) Intent recognition method and apparatus, and electronic device and storage medium
EP4060565A1 (en) Method and apparatus for acquiring pre-trained model
US20220004714A1 (en) Event extraction method and apparatus, and storage medium
US20220318275A1 (en) Search method, electronic device and storage medium
US20210312139A1 (en) Method and apparatus of generating semantic feature, method and apparatus of training model, electronic device, and storage medium
CN112507715A (en) Method, device, equipment and storage medium for determining incidence relation between entities
CN111709247A (en) Data set processing method and device, electronic equipment and storage medium
JP7096919B2 (en) Entity word recognition method and device
US20230196716A1 (en) Training multi-target image-text matching model and image-text retrieval
CN113553412B (en) Question-answering processing method, question-answering processing device, electronic equipment and storage medium
US20220358292A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
US20220129448A1 (en) Intelligent dialogue method and apparatus, and storage medium
CN112784589B (en) Training sample generation method and device and electronic equipment
JP7369228B2 (en) Method, device, electronic device, and storage medium for generating images of user interest
JP7357114B2 (en) Training method, device, electronic device and storage medium for living body detection model
JP2022091122A (en) Generalization processing method, apparatus, device, computer storage medium, and program
CN112560461A (en) News clue generation method and device, electronic equipment and storage medium
CN113010678A (en) Training method of classification model, text classification method and device
JP2023060846A (en) Model determination method, apparatus, electronic device, and memory
WO2023174189A1 (en) Method and apparatus for classifying nodes of graph network model, and device and storage medium
US20230070966A1 (en) Method for processing question, electronic device and storage medium
CN116226533A (en) News associated recommendation method, device and medium based on association prediction model
WO2022227760A1 (en) Image retrieval method and apparatus, electronic device and computer-readable storage medium
WO2022228127A1 (en) Element text processing method and apparatus, electronic device, and storage medium
CN113553415B (en) Question-answer matching method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22933017

Country of ref document: EP

Kind code of ref document: A1