Intention recognition method and device, equipment and medium
By performing intent type determination and targeted processing on the input text, including keyword extraction, multi-semantic generative decomposition, and semantic completion, the problem of inaccurate intent recognition in existing technologies has been solved, achieving more efficient and accurate intent recognition.
Patent Information
- Application Number
- CN202510961861.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies suffer from inaccuracy and low efficiency in identifying complex intents, especially in handling multiple and ambiguous intents.
By determining the intent type of the input text, different processing methods are used to handle single intent, multiple intent, and fuzzy intent, including keyword extraction, multi-semantic generative decomposition, and semantic completion. A reinforcement learning model is used to filter candidate retrieval texts to improve recognition accuracy.
It improves the accuracy and efficiency of recognizing complex intents, and enhances the flexibility and accuracy of intent recognition, especially in handling multiple and ambiguous intents.
Smart Images

Figure CN120973944A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intent recognition, and particularly relates to an intent recognition method and device, equipment and a medium. BACKGROUND
[0002] Intent recognition is one of the core research problems in the field of artificial intelligence and data models, for example, how to accurately determine the user intent based on the user input text information has become a challenge.
[0003] Since the essence of text intent recognition is a text multi-classification problem, the current mainstream method is to use various text classification models to encode the text first, then further mine the text features through the encoding layer, and finally obtain the final intent recognition result through the decoding layer.
[0004] However, in actual application, the existing scheme often has problems such as low efficiency and low accuracy in recognizing complex intent.
[0005] Therefore, there is an urgent need for an efficient and accurate intent recognition method. SUMMARY
[0006] The present application provides an intent recognition method, device, equipment and medium to solve the problem of low accuracy of intent recognition in the prior art.
[0007] In a first aspect, the present application provides an intent recognition method, which comprises:
[0008] obtaining a first input text; judging the intent type based on the first input text, the intent type including single intent, multiple intent and ambiguous intent; determining a first processing mode based on the intent type judgment result; processing the first input text using the first processing mode to obtain a target input text; and performing intent recognition based on the target input text to obtain an intent recognition result.
[0009] The above method, the embodiments of the present application mainly propose the overall flow of intent type judgment, multi-semantics generation type splitting and semantic completion task module. For the current complex or unclear language semantics, the method of different processing for different types of problems after complex intent type classification of the text can better solve the problem of inaccurate complex intent recognition.
[0010] In one possible design, the determining of the first processing mode based on the intent type judgment result comprises:
[0011] determining that the first input text is of a first intent type; and determining a first processing mode corresponding to the first intent type based on a mapping relationship between intent types and processing modes.
[0012] In a possible design, when the first intent type is a multi-intent type, the processing of the first input text by using the first processing manner to obtain a target input text includes:
[0013] performing keyword extraction on the first input text to obtain a first keyword list; performing multi-intent sentence splitting and reconstruction based on the first keyword list and the first input text to obtain at least two second input texts; and taking the at least two second input texts as the target input texts, where the second input text is a single-intent text.
[0014] The above method, the embodiments of the present application propose an overall process including multi-intent key node extraction and multi-semantic generative splitting based on multi-intent keywords for intent recognition of multi-intent type texts. For the current complex semantic problem, the method simplifies complex semantic questions and improves the subsequent intent recognition accuracy by performing semantic-based generative splitting on complex semantic texts.
[0015] In a possible design, the performing of multi-intent sentence splitting and reconstruction based on the first keyword list and the first input text to obtain at least two second input texts includes:
[0016] The performing of multi-intent sentence splitting and reconstruction based on the first keyword list and the first input text to obtain at least two third input texts, where the third input text is a multi-intent text; performing keyword extraction on each third input text to obtain a corresponding second keyword list; and continuing to perform multi-intent sentence splitting and reconstruction based on each second keyword list and the corresponding third input text until the second input text is obtained.
[0017] In a possible design, when the first intent type is a fuzzy intent type, the processing of the first input text by using the first processing manner to obtain a target input text includes:
[0018] performing semantic completion on the first input text to obtain a plurality of candidate retrieval texts; performing screening on the plurality of candidate retrieval texts based on a reinforcement learning model to obtain a fourth input text; and taking the fourth input text as the target input text.
[0019] As an example, the embodiments of the present application can input the first input text into a semantic completion model to obtain the plurality of candidate retrieval texts.
[0020] As an example, the semantic completion model described in the embodiments of the present application is based on a large number of input fuzzy intent question sentences combined with detailed function descriptions of the intent as input data of the model, and all possible completion results of the fuzzy intent as label data, so as to constitute a training data set obtained by training.
[0021] The above method, the embodiments of the present application propose an overall process including semantic completion and completion semantic text screening based on reinforcement learning for intent recognition of fuzzy intent text. For the current problem of unclear semantics, the method generates multiple semantic completions based on intent description for fuzzy semantic text, and then screens the completion semantic question sentences that do not meet the requirements through reinforcement learning, to obtain semantic completion text that is more consistent with the application scenario and more accurate.
[0022] In a possible design, the semantic completion on the first input text to generate multiple candidate retrieval texts includes:
[0023] Based on the first input text, all intents in the corresponding field are determined, and detailed function descriptions of all intents are constructed to obtain a first data set. Based on the first input text, all possible intent completion results are obtained to obtain a second data set. Based on the first data set and the second data set, a third data set is obtained. The third data set is input into a text generation model to obtain multiple candidate retrieval texts.
[0024] In a possible design, the screening of the multiple candidate retrieval texts based on the reinforcement learning model to obtain a fourth input text includes:
[0025] Based on the reinforcement learning model, a reward value corresponding to each candidate retrieval text is determined. The candidate retrieval text with a reward value exceeding a first threshold value in the candidate retrieval text is determined as the fourth input text. Or, based on the reinforcement learning model, a screening requirement of the first input text is determined. The reinforcement learning model determines the fourth input text from the multiple candidate retrieval texts based on the screening requirement.
[0026] As an example, the reinforcement learning model described in the embodiments of the present application is trained based on the input behavior state and the corresponding reward value size obtained.
[0027] In a second aspect, the present application further provides an intent recognition device, the device comprising:
[0028] An acquisition module is configured to acquire a first input text.
[0029] The processing module is configured to determine an intent type based on the first input text, the intent type including a single intent, a multi-intent, and a fuzzy intent; determine a first processing mode based on the intent type determination result; process the first input text using the first processing mode to obtain a target input text; and perform intent recognition based on the target input text to obtain an intent recognition result.
[0030] In a third aspect, the present application further provides an intent recognition system, which comprises:
[0031] The intent determination module is configured to determine an intent type of the first input text as a first intent type.
[0032] The processing module is configured to determine, when the first intent type is a multi-intent, input the first input text into a multi-intent processing module to obtain a second input text; or, when the first intent type is a single intent, obtain an intent recognition result based on the first input text; or, when the first intent type is a fuzzy intent, input the first input text into a fuzzy intent processing module to obtain a fourth input intent.
[0033] The processing module is further configured to perform intent recognition based on the second input text as a target input text to obtain an intent recognition result; or, perform intent recognition based on the fourth input text as a target input text to obtain an intent recognition result.
[0034] In a possible design, the intent determination module is specifically configured to:
[0035] determine the first input text as a first intent type; and determine a first processing mode corresponding to the first intent type based on a mapping relationship between intent types and processing modes.
[0036] In a possible design, the multi-intent processing module is specifically configured to:
[0037] extract a first keyword list from the first input text; perform multi-intent sentence splitting and reconstruction based on the first keyword list and the first input text to obtain at least two second input texts; and input the at least two second input texts as the target input texts, the second input texts being single-intent texts.
[0038] In a possible design, the multi-intent processing module is specifically configured to:
[0039] The first input text is input into the fuzzy intent processing module, and the fuzzy intent processing module is used for performing semantic analysis on the first input text to obtain a first keyword list; the first input text is input into a text reconstruction model, and the text reconstruction model is used for performing multi-intent sentence splitting reconstruction on the first input text based on the first keyword list and the first input text to obtain at least two third input texts, the third input texts being multi-intent texts; each third input text is input into the fuzzy intent processing module, and the fuzzy intent processing module is used for performing keyword extraction on each third input text to obtain a corresponding second keyword list; each second keyword list and the corresponding third input text are input into the text reconstruction model, and the text reconstruction model is used for continuing to perform multi-intent sentence splitting reconstruction based on each second keyword list and the corresponding third input text until the second input text is obtained.
[0040] In a possible design, the fuzzy intent processing module is specifically configured to:
[0041] The first input text is input into a semantic completion model, and the semantic completion model is used for performing semantic completion on the first input text to obtain a plurality of candidate retrieval texts; the plurality of candidate retrieval texts are input into a reinforcement learning model, and the reinforcement learning model is used for screening the plurality of candidate retrieval texts to obtain a fourth input text; and the fourth input text is used as the target input text.
[0042] In a possible design, the fuzzy intent processing module is specifically configured to:
[0043] A first data set is obtained by determining all intents in a corresponding domain based on the first input text and constructing detailed function descriptions of all intents; a second data set is obtained by acquiring all possible intent completion results based on the first input text; a third data set is obtained based on the first data set and the second data set; and the third data set is input into a text generation model to obtain a plurality of candidate retrieval texts.
[0044] In a possible design, the fuzzy intent processing module is specifically configured to:
[0045] A reward value corresponding to each candidate retrieval text is determined based on the reinforcement learning model; a candidate retrieval text with a reward value exceeding a first threshold value in the candidate retrieval texts is determined as the fourth input text; or
[0046] The screening requirement of the first input text is determined based on the reinforcement learning model; and the fourth input text is determined from the plurality of candidate retrieval texts based on the screening requirement by the reinforcement learning model.
[0047] In a fourth aspect, the present application further provides an electronic device, which comprises at least a processor and a memory, and the processor is used to execute the computer program stored in the memory to realize the steps of the intent recognition method described above.
[0048] In a fifth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the intent recognition method described above.
[0049] In a sixth aspect, an embodiment of the present application provides a chip, which comprises a computer program and a processor, and is used for executing the method in the first aspect and any design thereof.
[0050] In addition, the technical effects brought by the second aspect to the sixth aspect and any design thereof can refer to the technical effects brought by the different design manners in the first aspect, which will not be repeated here.
[0051] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and achieved by means of the structures particularly pointed out in the written description and claims hereof as well as the appended drawings. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0053] Figure 1 An application scenario schematic diagram provided by an embodiment of the present application;
[0054] Figure 2 An intent recognition system architecture schematic diagram provided by the present application;
[0055] Figure 3 Another intent recognition system architecture schematic diagram provided by an embodiment of the present application;
[0056] Figure 4 Another intent recognition system architecture schematic diagram provided by an embodiment of the present application;
[0057] Figure 5 A method schematic diagram of intent recognition provided by an embodiment of the present application;
[0058] Figure 6 A structure schematic diagram of an intent judgment model provided by an embodiment of the present application;
[0059] Figure 7 A flow schematic diagram of intent judgment provided by an embodiment of the present application;
[0060] Figure 8 A flow schematic diagram of intent processing provided by an embodiment of the present application;
[0061] Figure 9 A structure schematic diagram of a keyword extraction model provided by an embodiment of the present application;
[0062] Figure 10 A structural schematic diagram of a multi-semantics generation split model provided for an embodiment of the present application;
[0063] Figure 11 A structural schematic diagram of a coding and decoding model provided for an embodiment of the present application;
[0064] Figure 12 A flowchart of multi-intent processing provided for an embodiment of the present application;
[0065] Figure 13 Another flowchart of multi-intent processing provided for an embodiment of the present application;
[0066] Figure 14 A flowchart of fuzzy intent processing provided for an embodiment of the present application;
[0067] Figure 15 A flowchart of constructing a data set provided for an embodiment of the present application;
[0068] Figure 16 A structural schematic diagram of a screening model provided for an embodiment of the present application;
[0069] Figure 17 A flowchart of candidate text screening provided for an embodiment of the present application;
[0070] Figure 18 A structural schematic diagram of an intent recognition device provided for an embodiment of the present application;
[0071] Figure 19 Another structural schematic diagram of an intent recognition device provided for an embodiment of the present application;
[0072] Figure 20 A hardware component structural schematic diagram of a computing device for an embodiment of the present application. DETAILED DESCRIPTION
[0073] For the convenience of those skilled in the art to understand, some terms related to the present application are explained first as follows.
[0074] (1) Experience Replay:
[0075] Experience Replay is a technique in Reinforcement Learning (RL) that addresses the issues of data correlation and non-stationary distribution. The core idea of Experience Replay is to store the history of agent-environment interactions (states, actions, rewards, etc.) in a memory buffer (Replay Buffer), and then randomly sample from it for training, rather than using the latest generated experience directly.
[0076] (2) Deep Q-Network (DQN):
[0077] DQN is a reinforcement learning algorithm that combines deep neural networks and Q-Learning, used to solve decision-making problems in high-dimensional state spaces (such as image input). The core of DQN is to use a neural network to approximate the Q function (action value function) in Q-Learning, replacing the traditional table storage method, so that it can handle high-dimensional states (such as screen pixels of Atari games).
[0078] Among them, DQN involves two key technologies: Experience Replay and Fixed Target Network.
[0079] (3) Fixed Target Network:
[0080] Fixed Target Network is used to calculate the target Q value using an independent Target Q-Network, avoiding frequent changes in the target value (TD Target) during training. Every certain number of steps, the Main Q-Network is copied to the Target Network. This helps to reduce the fluctuations in the target value, making the training more stable.
[0081] It should be noted that the acquisition, storage, use, processing, etc. of data in the embodiments of the present application comply with the relevant provisions of national laws and regulations.
[0082] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents a "or" relationship between the associated objects before and after it.
[0083] The application scenarios described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems as new application scenarios appear. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two. In the description of the embodiments of the present application, "first", "second", and the like are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.
[0084] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0085] Intention recognition is one of the core research problems in the field of artificial intelligence and related data models, for example, how to accurately determine the user's intention based on the user's input text information has become a challenge. However, the current mainstream intention recognition method often has the problems of low recognition accuracy and low efficiency in recognizing complex intentions.
[0086] For example, the related art generally uses the same model to process simple intention questions and complex intention questions, which reduces the recognition accuracy of the model when facing complex intention questions, and the training model structure for intention judgment is simple, and the recognition effect is poor when processing long text. For another example, the related art uses the same processing method for multi-intention and single-intention sentences, without special processing for multi-intention questions, resulting in poor recognition effect of multi-intention questions.
[0087] In general, the defects of traditional technology include insufficient flexibility, low recognition accuracy, insufficient understanding of complex intentions, poor real-time updating capability, and limited efficiency when processing large data. These shortcomings make the traditional method unable to cope with increasingly complex intention inputs, and unable to provide accurate and effective intention recognition.
[0088] Therefore, there is an urgent need for an efficient and accurate intention recognition method to better improve the user experience.
[0089] Based on this, the embodiment of the present application provides an intention recognition method and related device, which can recognize simple single intention and complex multi-intention based on different processing methods of question characteristics according to different question type difficulties, thereby effectively solving the problem of inaccurate complex intention recognition. In addition, the embodiment of the present application can also propose a method of generating multiple semantic completions based on intention description for fuzzy intention questions, which better solves the problem of fuzzy intention recognition. The method and device of the present application are based on the same inventive concept, and the implementation of the device and the method can be mutually referred to because the principles of the method and the device for solving problems are similar, and the repeated parts will not be described again.
[0090] The intention recognition method in the embodiment of the present application can be realized by software, hardware, or a combination of software and hardware. In the following, the electronic device is taken as an example to introduce the intention recognition method of the embodiment of the present application.
[0091] Referring to Figure 1 As shown in the figure, it is a possible application scenario diagram applicable to the embodiment of the present application. The application scenario includes at least an electronic device 110 and a database 120. The number of the electronic device 110 in the embodiment of the present application can be one or more, and the electronic device 110 can be a terminal device 111 or a server 112, which is not specifically limited here.
[0092] The electronic device 110 has the function of intention recognition based on input description statements. The electronic device 110 can include an intention recognition model 130, so as to more efficiently and accurately recognize the intention through the intention recognition model 130; or the electronic device 110 can connect the intention recognition model 130 externally, so as to more efficiently and accurately recognize the intention through the intention recognition model 130.
[0093] The intention recognition model 130 is used for intention recognition based on input statements and outputs the intention recognition result.
[0094] As an example, the intention recognition model described in the embodiment of the present application is obtained by feature training according to a large number of simple single intentions and question characteristics corresponding to the simple single intentions, and complex multi-intentions and question characteristics corresponding to the complex multi-intentions.
[0095] As an example, the intention recognition model described in the embodiment of the present application can also be obtained by feature training based on a large number of fuzzy intention descriptions and corresponding intention results.
[0096] The terminal device 111 can be a mobile phone, a computer, a smart voice interactive device, a vehicle-mounted terminal, etc., but is not limited thereto.
[0097] The server 112 can be a background server for transaction services, providing corresponding transaction services for transaction participants. The server 112 can be a stand-alone physical server, a server cluster composed of multiple physical servers, or a distributed system. The server 112 can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, and the like. The terminal device 111 and the server 112 can be directly or indirectly connected through wired or wireless communication. The present application does not make any limitation here.
[0098] The server 112 and / or the terminal device 111 can be associated with a database 120. The database 120 is used to store relevant data of transaction services. The database 120 can be an internal database in the server 120 and / or the terminal device 111, or an external database established on a third-party platform, without any limitation here. The database 120 in the present application can store, but is not limited to, one or more of the following: all intents in the application field, detailed function descriptions of all intents, keyword information, training data sets, and the like.
[0099] The intent recognition method in the present application can be applied to electronic devices, such as servers, or terminal devices, or executed by interaction between terminal devices and servers.
[0100] Referring to Figure 2 The present application also provides an intent recognition system architecture, which can include one or more execution modules such as an intent judgment module 210, a multi-intent processing module 220, a fuzzy intent processing module 230, and an intent recognition module 240, without any specific limitation here.
[0101] The intent judgment module 210 is used to determine whether the user's intent is an explicit intent based on the user's question, so as to perform different processing based on different intent conditions.
[0102] In some implementations, when the present application performs different processing based on different intent conditions, if it is determined that the intent condition is a single intent, no processing is performed and it directly enters the final intent. If it is determined that the intent condition is a multi-intent condition, it enters the multi-intent processing module and performs corresponding processing based on the multi-intent processing method. If it is determined that the intent condition is a non-explicit intent, it enters the fuzzy intent processing module and performs corresponding processing based on the fuzzy intent processing method.
[0103] The multi-intent processing module 220 is configured to perform keyword search of the input sentence under parallel conditions, and if there is a keyword for parallel search, the original sentence is split into multiple texts based on the existing keyword for parallel search by using a large model, and the multi-intent description in a sentence is first split into multiple single-intent descriptions to obtain the target input text.
[0104] As an example, referring to Figure 3 The multi-intent processing module 220 can be further divided into a keyword extraction module 221 and a multi-semantics generation and splitting module 222.
[0105] The keyword extraction module 221 is configured to extract keyword splitting nodes from the multi-intent sentence, so as to split and reconstruct the multi-intent sentence by using the multi-semantics generation and splitting module.
[0106] The multi-semantics generation and splitting module 222 is configured to split and reconstruct the multi-semantics text by using the keyword splitting nodes obtained by the keyword extraction module and the original sentence.
[0107] The fuzzy intent processing module 230 is configured to complete the intent of the fuzzy intent sentence to generate at least multiple possible candidate search texts, and perform text screening on the multiple possible candidate search texts by using reinforcement learning to obtain the target input text.
[0108] As an example, the fuzzy intent processing module 230 can generate multiple possible candidate search texts by using a large model based on domain data.
[0109] As an example, the at least multiple possible candidate search texts generated by the fuzzy intent processing module 230 can be multiple possible single-intent descriptions obtained by completing in different directions.
[0110] As an example, referring to Figure 4 The fuzzy intent processing module 230 can be further divided into a semantic completion module 231 and a screening module 232.
[0111] The semantic completion module 231 is configured to generate multiple possible candidate search texts by performing a small amount of text continuation on the original sentence when the intent of the original sentence is not clear.
[0112] The screening module 232 is configured to filter out the candidate texts that do not meet the requirements by using reinforcement learning-based screening on the multiple candidate search texts generated by the semantic completion module.
[0113] The intent recognition module 240 is configured to perform intent recognition on the target input text to obtain a final intent recognition result.
[0114] It should be noted that the above-described intent recognition device and system are only an example of an embodiment of the present application and do not constitute a limitation on the embodiments of the present application. The device and system can be adjusted as appropriate according to actual conditions.
[0115] As shown in FIG. 1, which is a flowchart of an intent recognition method according to an embodiment of the present application. The method can be applied to an electronic device, and the specific process is as follows: Figure 5
[0116] S501, obtaining a first input text.
[0117] S502, performing intent type judgment based on the first input text.
[0118] As an example, the intent type described in the embodiments of the present application includes single intent, multiple intent, and ambiguous intent.
[0119] S503, determining a first processing mode based on the intent type judgment result.
[0120] In some implementations, the embodiments of the present application determine that the first input text is of a first intent type; then, based on the mapping relationship between the intent type and the processing mode, a first processing mode corresponding to the first intent type is determined.
[0121] For example, if it is a single intent, no processing is performed and it directly enters the final intent recognition; for example, if it is a multiple intent, it enters a multiple intent processing module; for example, if it is an ambiguous intent, it enters an ambiguous intent processing module.
[0122] S504, processing the first input text using the first processing mode to obtain a target input text.
[0123] In some implementations, the first processing mode for processing the first input text is not the same for different intent type scenarios, and is not limited to the following several:
[0124] Intent type scenario 1: the first intent type is a multiple intent type.
[0125] In some implementations, when the first intent type is a multi-intent type, keyword extraction can be performed on the first input text to obtain a first keyword list; based on the first keyword list and the first input text, multi-intent sentence splitting and reconstruction is performed to obtain at least two second input texts; the at least two second input texts are taken as the target input texts, and the second input texts are single-intent texts.
[0126] Further, in the process of obtaining the second input text by processing the first input text, the embodiments of the present application can undergo keyword extraction and multi-intent sentence splitting and reconstruction once, or multiple times.
[0127] For example, based on the first keyword list and the first input text, the embodiments of the present application perform multi-intent sentence splitting and reconstruction to obtain at least two third input texts, and the third input texts are multi-intent texts. At this time, since the obtained third input texts are not single-intent texts, keyword extraction is continued on each third input text to obtain a corresponding second keyword list; then, based on each second keyword list and the corresponding third input text, multi-intent sentence splitting and reconstruction is continued until the second input text is obtained.
[0128] Intent type scenario 2: the first intent type is a fuzzy intent type.
[0129] In some implementations, when the first intent type is a fuzzy intent type, semantic completion can be performed on the first input text to generate a plurality of candidate retrieval texts; the plurality of candidate retrieval texts are filtered based on a reinforcement learning model to obtain a fourth input text; and the fourth input text is taken as the target input text.
[0130] As an example, the embodiments of the present application can determine all intents in the corresponding field based on the first input text, and construct detailed function descriptions of all intents to obtain a first data set; obtain all possible intent completion results based on the first input text to obtain a second data set; obtain a third data set based on the first data set and the second data set; and input the third data set into a text generation model to obtain a plurality of candidate retrieval texts.
[0131] As an example, the embodiments of the present application can determine a reward value corresponding to each candidate retrieval text based on the reinforcement learning model; and determine a candidate retrieval text with a reward value exceeding a first threshold value in the candidate retrieval texts as a second input text.
[0132] S505, based on the target input text, intent recognition is performed to obtain an intent recognition result.
[0133] Through the above method, the embodiment of the application mainly proposes the overall process of the intent type judgment, multi-semantics generation type splitting and semantic completion task module. In view of the current language semantic complexity or unclear problem, the method of different processing after complex intent type classification of the text is better to solve the problem of inaccurate complex intent recognition.
[0134] In order to better introduce the embodiment of the application, the related details involved in the embodiment of the application will be introduced in detail based on different module processing scenarios, which are not limited to the following examples:
[0135] Scenario one, intent judgment.
[0136] The embodiment of the application can perform intent judgment on the input text based on a neural network model.
[0137] As an example, the embodiment of the application performs intent judgment on the input text mainly for intent classification, and the specific classification is not limited to single intent, multi-intent and fuzzy intent, etc. It can be understood that the intent classification of the embodiment of the application can be adjusted according to actual conditions, for example, it can also include fuzzy multi-intent, etc.
[0138] As an example, the embodiment of the application can use a deep pyramid convolutional neural network (DPCNN), a very deep convolutional neural network (VDCNN), a text recurrent neural network (TextRNN) based text processing model, a graph neural network (GraphNN), a hierarchical attention network (HAN) and other network models for intent judgment.
[0139] As an example, the embodiment of the application provides an example of implementing intent judgment by using a TextRNN model, wherein the model structure of the TextRNN model used to implement intent judgment can be as shown in Figure 6
[0140] As shown in Figure 7 , it is a flowchart of intent judgment provided by the embodiment of the application, which can include the following steps:
[0141] S701: input the text to the intent judgment model.
[0142] For example, [w1, w2, …, w i ] shown in the above Figure 6 may be represented as an input text.
[0143] S702: Obtain word encoding of the input text through an Embedding Layer.
[0144] S703: Obtain final text encoding through a bidirectional encoding layer and a connection layer.
[0145] S704: Obtain a text classification result through a softmax layer projection.
[0146] Through the above method, the embodiments of the present application aim at the current language semantic complexity or unclear problem, and the present application classifies the complex intention type of the text and processes different types of problems in different ways, so as to solve the problem of inaccurate complex intention recognition.
[0147] Scenario two, multi-intention processing.
[0148] Among them, the multi-intention processing of the embodiments of the present application is mainly used to split and reconstruct the complex multi-intention text based on semantics into multiple simple single-intention texts. For example, the embodiments of the present application can first acquire the node keywords that need to be split through a keyword extraction module, which is used to guide the subsequent multi-semantic generative splitting, and then split the multi-intention sentence through a multi-semantic generative splitting module by combining the keyword list obtained by the keyword extraction module.
[0149] As shown in Figure 8 , it is a flowchart of multi-intention processing provided by the embodiments of the present application, which can include the following steps:
[0150] S801: Acquire an input text.
[0151] S802: Determine whether the input text is a multi-intention based on the input text, if yes, execute S803, if no, execute S804.
[0152] S803: Extract keywords from the input text to obtain a keyword list.
[0153] The keyword list described in the embodiments of the present application can include at least one keyword. For example, the embodiments of the present application can extract the keyword nodes [Key1, Key2, …, Key i ] that form multi-intentions in multi-intention questions, which are used to guide the next generative multi-semantic splitting operation based on semantics.
[0154] S804: Output a result based on the input text.
[0155] S805: performing multi-intent sentence splitting based on the input text and the keyword list to obtain at least two split sentences.
[0156] For example, the embodiment of the present application can split the original input text into i query sentences [Query1, Query2, …, Query i ] based on the semantic splitting of the multi-intent keyword nodes [Key1, Key2, …, Key i ].
[0157] S806: continue to perform S802-S806 on the at least two split sentences respectively until the output results of all split sentences are obtained.
[0158] For example, the embodiment of the present application can split the original input text into i query sentences [Query1, Query2, …, Query i ] based on the semantic splitting of the multi-intent keyword nodes [Key1, Key2, …, Key i ].
[0159] Further, in order to better introduce the multi-intent processing process provided by the embodiment of the present application, the keyword extraction and multi-semantic generation splitting steps involved in the multi-intent processing process are introduced in detail below. The multi-intent processing process of the embodiment of the present application can be specifically performed by a keyword extraction module and a multi-semantic generation splitting module.
[0160] In some implementations, the keyword extraction module of the embodiment of the present application can extract the node keywords that need to be split by using a NER model. For example, the keyword extraction module can use a combination model including but not limited to BiLSTM-CRF, a model based on Transformer such as BERT, RoBERTa, GPT, etc.
[0161] For example, taking the BiLSTM-CRF combination model as an example, the model structure diagram for extracting the node keywords that need to be split by using the BiLSTM-CRF model in the embodiment of the present application can be as shown in Figure 9 For example, assuming that the label emission score (emission_score) obtained after the input text [w0, w2, …, w i ] passes through the last linear transformation of the encoding layer is x = [x0, x1, x2, …, x n ], and the label sequence is y = [y0, y1, y2, …, y n ]. Wherein, assuming that the number of labels is k, the length of the text is n, and the final result will have N = k n paths, then use S iThe score of the i-th path, and the probability of the label sequence appearing can be calculated by the following formula 1.
[0162]
[0163] wherein P(S i ) represents the probability of the i-th path appearing, S i represents the score of the i-th path, is an accumulation formula that accumulates the scores of all N=k n paths.
[0164] As an example, the real decoding corresponding to the label corresponds to the score S real The calculation formula can be represented by the following formula 2, which is a specific implementation of the above formula 1:
[0165]
[0166] wherein P(S real ) represents the score of the real decoding corresponding to the i-th label, is an accumulation formula that accumulates the scores of all N=k n paths, and S real represents the real score of the i-th label.
[0167] As an example, the calculation formula of the loss function of the BiLSTM-CRF model used by the embodiment of the application for keyword extraction can be represented by the following formula 3:
[0168]
[0169] As an example, when the model is optimized by applying the above formula 3, the model can be optimized by minimizing the loss value, i.e., maximizing the probability value.
[0170] In some implementations, the multi-semantics generation splitting module can use an Enc-Dec architecture. For example, the multi-semantics generation splitting module can use an Enc-Dec architecture to combine the extracted keyword nodes and the user question based on semantics for multi-semantics generation splitting after the keyword extraction module, and the structure of the Enc-Dec architecture can be as follows: Figure 10As shown. For example, the Enc-Dec architecture can include a word embedding module for word embedding of the input user question and keyword nodes for subsequent encoding and decoding; the Enc-Dec architecture can also include a deep encoder and a deep decoder. Wherein the deep encoder can be formed by stacking multiple layers of encoders, and the encoder level can be deepened to obtain better results according to actual conditions. The encoder network here can use, but not limited to, Transformer, VanillaTransformer, Compressive Transformers, Transformer-XL, etc. The structure of the deep decoder is the same as the deep encoder, and the deep decoder is formed by stacking multiple layers of decoders. The decoder level can be deepened to obtain better results according to actual conditions. The encoder network here can use, but not limited to, Transformer, VanillaTransformer, Compressive Transformers, Transformer-XL, etc.
[0171] For example, the Vanilla Transformer is taken as an example, and the embodiment of the application provides a structure diagram of multi-semantics generative splitting using a Vanilla Transformer model as the encoder and the decoder in the above Figure 10 . As shown in Figure 11 . Wherein, the Embedding embedding layer in the above Figure 11 can jointly use Token Embedings, Segment Embeddings, and Position Embddings as the input of the model; the deep encoder in the above Figure 11 can increase the number of stacked modules according to the complexity of the requirements; the deep decoder in the above Figure 11 can increase the number of stacked modules according to the complexity of the requirements.
[0172] The following two examples are selected to illustrate the process of multi-intent processing:
[0173] As shown in Figure 12 , it is a flowchart of multi-intent processing provided by the embodiment of the application, which can include the following steps:
[0174] S1201: The user inputs the question "view the video with number A and number B".
[0175] S1202: Based on the input question, the keyword result is A and B.
[0176] S1203: input the input question and the keywords into the multi-semantics generation and splitting module.
[0177] For example, the information form input into the multi-semantics generation and splitting module can be represented as:
[0178] [{“key”:“number”,“value”:“A”,“content”:“view the video with number A and the video with number B”}, {“key”:“number”,“value”:“B”,“content”:“view the video with number A and the video with number B”}].
[0179] S1204: obtain the final splitting result through the multi-semantics generation and splitting module.
[0180] For example, the splitting result in the S1204 is as follows:
[0181] [“view the video with number A”, “view the video with number B”].
[0182] S1205: perform intent judgment on the splitting result, determine that there is no multi-intent part in the splitting result, and obtain the final result.
[0183] As shown in FIG. 13, another multi-intent processing flow provided by the embodiment of the present application can include the following steps: Figure 13
[0184] S1301: a user inputs a question “view the video with number A and the video with number B respectively today and yesterday”.
[0185] In the question in the S1301, there are multiple multi-intent nodes.
[0186] S1302: obtain the keyword result as today and yesterday based on the input question.
[0187] S1303: input the input question and the keywords into the multi-semantics generation and splitting module.
[0188] For example, the information form input into the multi-semantics generation and splitting module can be represented as:
[0189] [{“key”:“today”,“content”:“view the video with number A and the video with number B respectively today and yesterday”}, {“key”:“yesterday”,“content”:“view the video with number A and the video with number B respectively today and yesterday”}].
[0190] S1304: obtain the splitting result 1 through the multi-semantics generation and splitting module.
[0191] For example, the splitting result 1 in S1304 is as follows:
[0192] [“View today’s videos numbered A and B respectively”, “View yesterday’s videos numbered A and B respectively”].
[0193] S1305: Perform intent judgment on the splitting result 1, determine that there are still parts with multiple intents in the splitting result 1, and continue to repeat the above operation to obtain the final splitting result 2.
[0194] For example, the splitting result 2 is as follows:
[0195] ["View today's video number A", "View today's video number B", "View yesterday's video number A", "View yesterday's video number B"].
[0196] S1306: Perform intent judgment on the splitting result 2 to determine that none of the splitting results 2 contain multiple intents, and obtain the final result.
[0197] Using the methods described above, this application proposes an overall process for intent recognition of multi-intent type text, including extraction of key nodes of multiple intents and multi-semantic generative decomposition based on multi-intent keywords. Addressing the current problem of semantic complexity, this method simplifies complex semantic questions and improves the accuracy of subsequent intent recognition by performing semantically generative decomposition on semantically complex text.
[0198] Scenario 3: Handling ambiguous intentions.
[0199] In this application embodiment, the fuzzy intent processing is mainly used to complete the text intent by briefly writing the text with ambiguous intent according to different dimensions, thereby generating multiple possible candidate texts. Finally, the generated candidate texts are filtered by the filtering module to obtain the final semantic completion statement.
[0200] like Figure 14 As shown, it is a flowchart illustrating a process for handling ambiguous intents according to an embodiment of this application, which may include the following steps:
[0201] S1401: Get the input text.
[0202] S1402: Perform semantic completion based on the input text to obtain at least one candidate completed statement.
[0203] S1403: Filter the at least one candidate completion statement to obtain at least one target completion statement.
[0204] Further, in order to better introduce the fuzzy intention processing process provided by the embodiments of the present application, the following will be introduced in detail based on the steps of semantic completion and sentence screening involved in the fuzzy intention processing process. Among them, the fuzzy intention processing process of the embodiments of the present application can be specifically executed through a semantic completion module and a screening module.
[0205] In some implementations, the semantic completion module of the embodiments of the present application can adopt a prompt description based manner, combine the fuzzy intention sentence with the detailed functional description of all intentions to construct a data set, so that the data set can be used for prompt learning to perform semantic based intention completion on the fuzzy intention or as training data to pre-train a semantic completion model.
[0206] As shown in the flowchart of constructing a data set provided by the embodiments of the present application, it can include the following steps: Figure 15
[0207] S1501: Determine all intentions in the application field.
[0208] Among them, the step S1501 can provide a basis for subsequent construction of intention function description and intention completion by determining all intentions in the application field.
[0209] For example, suppose all intentions used in the application field are: query point, video playback, task assignment, etc.
[0210] S1502: Based on all intentions in the application field, construct detailed functional description of all intentions to obtain a first data set.
[0211] Among them, the step S1502 can provide a basis for subsequent construction of data set by constructing detailed functional description of all intentions.
[0212] The construction steps of the training data are as follows:
[0213] For example, suppose the detailed functional description of all intentions (i.e. the first data set) constructed is as follows:
[0214] "Query point: can query the camera point meeting the corresponding conditions by specifying the camera name, camera position, time, etc.", "Video playback: can play the corresponding video by specifying the camera number and camera position", "Task assignment: can assign the corresponding task by specifying the task name and task recipient".
[0215] S1503: Give all possible intention completion results of the fuzzy intention sentence to obtain a second data set.
[0216] Among them, the all possible intention completion results obtained by the step S1503 can provide a basis for subsequent construction of data set.
[0217] S1504: Construct a third data set based on the first data set and the second data set.
[0218] As an example, the third data set can be used as a corpus of a semantic completion module for prompt learning or model training data.
[0219] As an example, the first data set can be used as a prompt description to select a part of the ambiguous intent from the prompt learning based on the data set, and the second data set can be used as an example in the prompt to complete the intent of the ambiguous intent question.
[0220] As an example, the first data set and the ambiguous intent question input by the user can be used as input data of the model, and the corresponding second data set can be used as label data to form a training set for training to obtain a text intent completion model for the ambiguous intent question during model training based on the data set.
[0221] As an example, the third data set can be a training data set. For example, assuming that the detailed function description of all intents constructed in the above step S1502 is content, the ambiguous intent question is [Q1, Q2, …, Qn], and the ambiguous intent question Q can correspond to the intent completion result [[Q n ,Q 11 ,Q 12 ,…,Q 1n ],[Q 21 ,Q 22 ,…,Q 2n ],…], the content and each Q i can be used as a training set, and the corresponding [Q i1 ,Q i2 ,…,Q in ] can be used as a label for training.
[0222] In some implementations, the screening module of the present application can perform intent screening based on reinforcement learning on the k completed intent texts obtained by the above semantic completion module to obtain the final completed intent question that meets the requirements. The screening module can use Q-learning, DQN, A3C, DDPG, IQN, but is not limited thereto.
[0223] Taking DQN as an example, the screening module of the present application can use a DQN model to perform candidate text screening operations, wherein a structure diagram for implementing candidate text screening based on the DQN model can be as shown in Figure 16 .
[0224] As Figure 17 shown, the embodiment of the present application provides a simple flowchart of the training of a screening model such as a DQN model, aiming to train a model for screening candidate texts. The obtained model can make decisions on whether to retain the candidate texts. The process can include the following steps:
[0225] S1701: Initialize the Q network parameters, and copy them to the target Q network.
[0226] S1702: Use the initialized Q network to generate training data through the experience replay component.
[0227] S1703: Return the current state as the input of the Q network to obtain the Q values corresponding to all actions that can be taken in the current state.
[0228] S1704: Select the action to be executed according to the greedy (ε-greedy) strategy and output it to the experience replay component to obtain the action.
[0229] S1705: Interact with the environment using the obtained action, and obtain the next state and the reward.
[0230] S1706: Store the state data, the reward data, and part or all of the training data generated by the experience replay component.
[0231] S1707: Randomly select a batch of training data from the stored data.
[0232] As an example, the format of the training data in the embodiment of the present application can be represented as (S, A, R, S’), where S represents the current state, A represents the current action, R represents the current reward, and S’ represents the next state.
[0233] S1708: Input the current state S in the training data into the Q network to obtain the Q values corresponding to all actions in the current state, and store them.
[0234] For example, select the Q value corresponding to A and store it.
[0235] The stored in the embodiment of the present application can be used for subsequent calculation of loss (loss value).
[0236] S1709: Input the next state S’ in the training data into the target network (target Q), calculate the Q values corresponding to all actions in the next state, and select the maximum Q value Q max, calculate targetQ.
[0237] As an example, the calculation formula for calculating targetQ in the embodiments of the present application can be as shown in the following formula 4:
[0238] targetQ = R ′ + γmax(Q(S t+1 ,a)) = R ′ + γQ max Formula 4
[0239] Wherein, the target Q represents the output result of the target network, R ′ represents the reward of the next state, Q max represents the maximum Q value, S t+1 represents the next state, a represents the Action of the next state, and γ represents the hyperparameter.
[0240] S1710: Based on the obtained predicted Q value (Predicted Q-Value, ) and the target Q value (Target Q-Value, Q max ), calculate the mean square error loss (MSE Loss).
[0241] As an example, the calculation formula for calculating the mean square error loss in the embodiments of the present application can be as shown in the following formula 5:
[0242]
[0243] S1711: Continuously repeat S1708-S1711 to update the Q network parameters.
[0244] S1712: After T time steps, copy the Q network weight to the target Q network.
[0245] Through the above method, the embodiments of the present application propose an overall process including semantic completion and completion semantic text filtering based on reinforcement learning for intent recognition of fuzzy intent text. For the current unclear semantic problem, the method generates multiple semantic completions based on intent description for fuzzy semantic text first, and then filters the completion semantic question that does not meet the requirements through reinforcement learning, so as to obtain more accurate semantic completion text that meets the application scenario.
[0246] Based on the same inventive concept, the embodiments of the present application also provide an electronic device. The electronic device can perform the steps or operations in the intent recognition method provided by any one of the above embodiments and achieve the same technical effects. In this embodiment, the structure of the electronic device can be as follows Figure 18As shown, the electronic device 1800 includes a memory 1801, a communication module 1803, and one or more processors 1802.
[0247] The memory 1801 is configured to store computer programs executed by the processor 1802. The memory 1801 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and programs required for running the instant messaging function, etc. The data storage area can store various instant messaging information and operation instruction sets, etc.
[0248] The memory 1801 can be a volatile memory, such as a random-access memory (RAM). The memory 1801 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Alternatively, the memory 1801 can be any other medium capable of carrying or storing desired computer programs in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 1801 can be a combination of the above memories.
[0249] The processor 1802 can include one or more central processing units (CPUs) or digital processing units, etc. The processor 1802 is configured to invoke the computer programs stored in the memory 1801 to implement the above-mentioned intent recognition method.
[0250] The communication module 1803 is configured to communicate with electronic devices and other servers.
[0251] The specific connection medium between the memory 1801, the communication module 1803, and the processor 1802 is not limited in the embodiments of the present application. In the embodiments of the present application, Figure 18 the memory 1801 and the processor 1802 are connected through a bus 1804. The bus 1804 is described as a thick line in Figure 18 the embodiments of the present application, and the connection modes between other components are only schematically described and are not limited thereto. The bus 1804 can be divided into an address bus, a data bus, and a control bus. For the convenience of description, Figure 18 only one thick line is used to describe the bus 1804 in the embodiments of the present application, but it is not described that there is only one bus or only one type of bus.
[0252] The computer storage medium stored in the memory 1801 stores computer executable instructions for implementing the intent recognition method of the embodiments of the present application. The processor 802 is configured to execute the above-mentioned intent recognition method.
[0253] Based on the same inventive concept, the embodiments of the present application provide another intent recognition device 1900.
[0254] Figure 19 A structural schematic diagram of an intent recognition device provided by the embodiments of the present application is shown in FIG. 19. As shown in FIG. 19, the device includes: Figure 19
[0255] The acquisition module 1901 is configured to acquire a first input text.
[0256] The processing module 1902 is configured to perform intent type judgment based on the first input text, the intent type including single intent, multiple intents, and ambiguous intent; determine a first processing mode based on the intent type judgment result; process the first input text using the first processing mode to obtain a target input text; and perform intent recognition based on the target input text to obtain an intent recognition result.
[0257] In a possible design, the processing module 1902 is specifically configured to:
[0258] determine that the first input text is of a first intent type; and determine a first processing mode corresponding to the first intent type based on a mapping relationship between intent types and processing modes.
[0259] In a possible design, the processing module 1902 is specifically configured to:
[0260] perform keyword extraction on the first input text to obtain a first keyword list; perform split reconstruction of multiple-intent sentences based on the first keyword list and the first input text to obtain at least two second input texts; and take the at least two second input texts as the target input texts, the second input texts being single-intent texts.
[0261] In a possible design, the processing module 1902 is specifically configured to:
[0262] The split reconstruction of the multiple-intent sentences is performed based on the first keyword list and the first input text to obtain at least two third input texts, the third input texts being multiple-intent texts; keyword extraction is continuously performed on each third input text to obtain a corresponding second keyword list; and split reconstruction of the multiple-intent sentences is continuously performed based on each second keyword list and the corresponding third input text until the second input texts are obtained.
[0263] In a possible design, the processing module 1902 is specifically configured to:
[0264] perform semantic completion on the first input text to generate a plurality of candidate search texts, perform screening on the plurality of candidate search texts based on a reinforcement learning model to obtain a fourth input text, and take the fourth input text as the target input text.
[0265] In a possible design, the processing module 1902 is specifically configured to:
[0266] determine all intents in a corresponding domain based on the first input text, and construct detailed function descriptions of all intents to obtain a first data set, obtain all possible intent completion results based on the first input text to obtain a second data set, obtain a third data set based on the first data set and the second data set, and input the third data set into a text generation model to obtain a plurality of candidate search texts.
[0267] In a possible design, the processing module 1902 is specifically configured to:
[0268] determine a reward value corresponding to each candidate search text based on the reinforcement learning model, and determine a candidate search text with a reward value exceeding a first threshold value in the candidate search texts as the fourth input text, or
[0269] determine a screening requirement of the first input text based on the reinforcement learning model, and determine the fourth input text from the plurality of candidate search texts based on the screening requirement.
[0270] Based on the same inventive concept, the embodiment of the present application provides a computer readable storage medium, and a computer program product includes computer program code, which, when running on a computer, causes the computer to perform the communication method as any one of the foregoing. Since the principle and intention of the above computer readable storage medium for solving the problem are similar to those of the intention recognition method, the implementation of the above computer readable storage medium can be referred to the implementation of the method, and the repeated parts will not be described here.
[0271] The computing device 2000 according to this embodiment of the present application will be described below with reference to Figure 20 . Figure 20 The computing device 2000 is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0272] As Figure 20The computing device 2000 is shown in the form of a general-purpose computing device. The components of computing device 2000 can include, but are not limited to, one or more processors 2001, one or more storage devices 2002, and a bus 2003 that connects the various system components, including the storage devices 2002 and the processor 2001.
[0273] The bus 2003 represents one or more of any of several bus structures, including a memory bus or memory controller, a peripheral bus, a processor or local bus, using any of a variety of bus architectures.
[0274] The storage devices 2002 can include a readable medium, such as one or more volatile or non-volatile memory devices, such as a random access memory (RAM) 2021, and / or a cache memory 2022. The storage devices 2002 can also include a read-only memory (ROM) 2023.
[0275] The storage devices 2002 can also include a program / utility 2025 having a set (at least one) of program modules 2024, including an operating system, one or more application programs, other program modules, and program data, each of which can be executed by the processor 2001 using the operating system. Each of these examples, or a subset thereof, can be included in the program / utility 2025.
[0276] The computing device 2000 can also communicate with one or more external devices 2004, such as a keyboard, a pointing device, etc., via an input / output (I / O) interface 2005. The computing device 2000 can also communicate with one or more devices, such as a router, a modem, etc., via a network adapter 2006. As shown, the network adapter 2006 is in communication with the bus 2003 via the I / O interface 2005. It should be appreciated that the computing device 2000 can be connected to one or more networks, such as a LAN, a WAN, a public network, such as the Internet, etc., via the network adapter 2006. Figure 20 As shown, the network adapter 2006 is in communication with the bus 2003 via the I / O interface 2005. It should be appreciated that the computing device 2000 can be connected to one or more networks, such as a LAN, a WAN, a public network, such as the Internet, etc., via the network adapter 2006.
[0277] Based on the same inventive concept, the embodiments of the present application also provide an intent recognition system, which can include the foregoing electronic device and the intent recognition model, and the various modules introduced above. The electronic device can perform the intent recognition method performed by the electronic device in any of the foregoing embodiments.
[0278] The method in the present application can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, the processes or functions described in the present application are performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, a core network device, an OAM or other programmable devices.
[0279] The computer readable storage medium can be an implementation of the computer program product, i.e., the present application also provides a computer readable storage medium including a computer program, which, when executed by a processor, implements any of the above-mentioned intent recognition methods.
[0280] The computer programs or instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer programs or instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired or wireless means. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape; an optical medium, such as a digital video disc; and a semiconductor medium, such as a solid state disk. The computer readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile storage media.
[0281] The above embodiments of the present application are introduced from the perspective of the electronic device as the execution subject. To implement the functions in the above embodiments of the present application, the electronic device can include hardware structures and / or software modules, and implement the above functions in the form of hardware structures, software modules, or hardware structures plus software modules. Whether a certain function is implemented in the form of hardware structure, software module, or hardware structure plus software module depends on specific application of the technical solution and design constraints.
[0282] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code thereon for use by or in connection with an instruction execution system. For the purposes of this description, a computer usable or computer readable storage medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
[0283] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. An intention recognition method characterized by, The method comprises: obtaining a first input text; judging an intent type based on the first input text, the intent type comprising a single intent, a multiple intent, and a fuzzy intent; determining a first processing mode based on the intent type judgment result; processing the first input text using the first processing mode to obtain a target input text; performing intent recognition based on the target input text to obtain an intent recognition result.
2. The method of claim 1, wherein, The method comprises: determining that the first input text is of a first intent type; and determining a first processing mode corresponding to the first intent type based on a mapping relationship between intent types and processing modes.
3. The method of claim 2, wherein, When the first intent type is a multiple intent type, the method comprises: extracting keywords from the first input text to obtain a first keyword list; splitting and reconstructing a multiple intent sentence based on the first keyword list and the first input text to obtain at least two second input texts; and taking the at least two second input texts as the target input texts, wherein each second input text is a single intent text.
4. The method of claim 3, wherein, The method comprises: splitting and reconstructing a multiple intent sentence based on the first keyword list and the first input text to obtain at least two third input texts, wherein each third input text is a multiple intent text; continuously extracting keywords from each third input text to obtain a corresponding second keyword list; continuously splitting and reconstructing a multiple intent sentence based on each second keyword list and the corresponding third input text until the second input text is obtained.
5. The method of claim 2, wherein, When the first intent type is a fuzzy intent type, the method comprises: performing semantic completion on the first input text to generate a plurality of candidate retrieval texts; filtering the plurality of candidate retrieval texts based on a reinforcement learning model to obtain a fourth input text; and taking the fourth input text as the target input text.
6. The method of claim 5, wherein, The method comprises: determining all intents in a corresponding domain based on the first input text, and constructing detailed function descriptions of all intents to obtain a first data set; obtaining all possible intent completion results based on the first input text to obtain a second data set; obtaining a third data set based on the first data set and the second data set; inputting the third data set into a text generation model to obtain a plurality of candidate retrieval texts.
7. The method of claim 6, wherein, The method comprises: determining a reward value corresponding to each candidate retrieval text based on the reinforcement learning model; determining a candidate retrieval text with a reward value exceeding a first threshold value in the candidate retrieval texts as the fourth input text; or determine a screening requirement of the first input text based on the reinforcement learning model; and determine the fourth input text from the plurality of candidate retrieval texts based on the screening requirement.
8. An intention recognition apparatus characterized by comprising: The apparatus comprises: an obtaining module configured to obtain a first input text; a processing module configured to determine an intent type based on the first input text, the intent type comprising a single intent, a multi-intent, and a fuzzy intent; determine a first processing mode based on the intent type determination result; process the first input text using the first processing mode to obtain a target input text; and perform intent recognition based on the target input text to obtain an intent recognition result.
9. An intention recognition system, characterized by, The system comprises: an intent determination module configured to determine an intent type of a first input text as a first intent type; a processing module configured to, when the first intent type is determined as a multi-intent, input the first input text into a multi-intent processing module to obtain a second input text; or, when the first intent type is determined as a single intent, obtain an intent recognition result based on the first input text; or, when the first intent type is determined as a fuzzy intent, input the first input text into a fuzzy intent processing module to obtain a fourth input intent; the processing module is further configured to perform intent recognition based on the second input text as a target input text to obtain an intent recognition result; or perform intent recognition based on the fourth input text as a target input text to obtain an intent recognition result.
10. An electronic device, comprising: The electronic device comprises at least a processor and a memory, and the processor is configured to implement the steps of the intent recognition method of any one of claims 1-7 when executing a computer program stored in the memory.
11. A computer readable storage medium characterized by, The computer program is stored in the memory and is executed by the processor to implement the steps of the intent recognition method of any one of claims 1-7.
Citation Information
Patent Citations
Ten-thousand-level intention classification method and device, storage medium and electronic equipment
CN110704641A
Multi-intention response method and device, computer equipment and storage medium
CN111930950A
Intention recognition method and electronic equipment
CN113377899A
Semantic understanding method and device
CN117034957A
Intelligent question and answer method and device, electronic equipment and readable storage medium
CN118113851A
Cited By
Elderly semantic recognition system constructed based on corpus
CN121438829A
