Intention determination method and device, equipment, storage medium and program product
The intent determination method improves dialogue system accuracy by generating and analyzing intention paths with natural language reasoning, addressing the limitations of traditional text classification in capturing user intentions.
Patent Information
- Application Number
- CN202410891033.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Current dialogue systems face challenges in accurately determining user intent due to reliance on traditional text classification processing, which fails to meet evolving user needs and capture real user intentions effectively.
An intent determination method that generates a first intention path, inserts empty intentions, and identifies adjacent intents to achieve comprehensive and accurate intent recognition by using natural language reasoning technology.
Enhances the accuracy of intent recognition by integrating natural language reasoning, allowing for precise determination of user intentions through a method that includes generating and analyzing intention paths and adjacent intents.
Smart Images

Figure CN119149728A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intent recognition, and in particular to an intent determination method, apparatus, device, storage medium and program product. Background Art
[0002] With the rapid development of computer technology and Internet technology, the ways of information interaction between humans and computers have become increasingly diverse, so dialogue systems have emerged and have been rapidly popularized and applied in people's daily lives.
[0003] At present, with the diversification of information types and lifestyles, people have also put forward higher requirements for the intelligence of dialogue systems. However, in the current dialogue system, how to perform intent recognition is an important core link. However, the current intent recognition method is usually based on text classification processing technology. Obviously, this traditional intent recognition method has been difficult to meet people's ever-changing requirements for dialogue systems, resulting in the current dialogue system's accuracy in user intent recognition still needs to be improved, which also makes it difficult for the current dialogue system to capture the real needs of users. Summary of the invention
[0004] Based on this, it is necessary to provide an intention determination method, apparatus, computer device, computer-readable storage medium and computer program product that can comprehensively and accurately determine the intention of the second character in the target scene in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for determining intent. The method comprises:
[0006] generating a first intention path according to the intention of the first character in the target scenario;
[0007] Insert the empty intention into the first intention path to obtain the second intention path;
[0008] Identify the intent adjacent to the empty intent in the second intent path, and obtain a first intent recognition result of the empty intent;
[0009] The intention of the second character in the target scene is determined based on the first intention recognition result.
[0010] In a second aspect, the present application also provides an intention determination device. The device comprises:
[0011] A generation module, used for generating a first intention path according to the intention of the first character in the target scene;
[0012] An insertion module, used for inserting a vacant intention into the first intention path to obtain a second intention path;
[0013] A recognition module, used to recognize the intent adjacent to the empty intent in the second intent path, and obtain a first intent recognition result of the empty intent;
[0014] The first determination module is used to determine the intention of the second character in the target scene based on the first intention recognition result.
[0015] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements some or all of the steps described in any method of the first aspect of the present application.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps described in any method of the first aspect of the present application.
[0017] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0018] The above-mentioned intention determination method, device, computer equipment, storage medium and computer program product, in order to comprehensively encompass the intention paths of the first character and the second character in the target scene, therefore generates a first intention path according to the intention of the first character in the target scene, in order to be able to identify the intention of the second character based on the first intention path corresponding to the intention of the first character in the target scene, therefore inserting an empty intention in the first intention path to obtain a second intention path, and identifying the intention adjacent to the empty intention in the second intention path to obtain a first intention recognition result of the empty intention, and finally being able to accurately determine the intention of the second character in the target scene based on the first intention recognition result. Using the method provided in the embodiment of the present application, by inserting an empty intention in the first intention path corresponding to the intention of the first character in the target scene to obtain a second intention path, and by identifying the intention adjacent to the empty intention in the second intention path, thus, finally being able to comprehensively and accurately determine the intention of the second character in the target scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A diagram of an application environment of an intention determination method in one embodiment;
[0020] Figure 2 A flowchart of a method for determining intent in one embodiment;
[0021] Figure 3A flowchart of a method for determining intent in another embodiment;
[0022] Figure 4 A structural block diagram of an apparatus for determining intent in one embodiment;
[0023] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0024] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] It should be noted that in the following description, the terms "first, second and third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first, second and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0027] The intention determination method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0028] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an IoT device, and a portable wearable device. The IoT device may be a smart speaker, a smart TV, a smart air conditioner, and a smart vehicle-mounted device, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc.
[0029] The server 104 may be an independent physical server or a service node in a blockchain system. A peer-to-peer (P2P) network is formed between the service nodes in the blockchain system. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP).
[0030] In addition, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0031] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.
[0032] At present, the training of dialogue systems mainly relies on natural language processing technology, and natural language processing technology is generally concentrated in the following categories: semantic similarity processing technology, text classification processing technology, and natural language reasoning technology. Among them, although natural language reasoning technology can be incorporated into the category of text classification processing technology, in fact, the judgment of natural language reasoning technology is quite different from simple text classification. Natural language reasoning technology needs to judge the correspondence between the semantic premise and the components of the hypothetical text, so as to further judge the implicit relationship between the text as a whole.
[0033] Specifically, natural language inference technology is mainly used to determine the reasoning relationship between texts, that is, to determine the text implication relationship. The text implication relationship describes the reasoning relationship between two texts, where one text is the premise text and the other text is the hypothesis text. If the hypothesis text can be inferred from the premise text, then the premise text implies the hypothesis text. It can be seen that the identification of text implication relationship is mainly to determine whether there is an implication relationship between the premise text and the hypothesis text. For example, the premise text is "a dog playing a Frisbee game in the snow". At the same time, there are three hypothesis texts. The first hypothesis text is "an animal is playing with plastic toys outdoors in the cold", the second hypothesis text is "a cat is washing its face with its front paws", and the third hypothesis text is "a pet is playing a game of fetching with its owner". Obviously, the first hypothesis text can be inferred from the premise text, the second hypothesis text conflicts with the premise text, and the third hypothesis text is neither an implication relationship nor a conflict relationship with the premise text. Therefore, at this time, the premise text implies the first hypothesis text.
[0034] At present, intent recognition is an important link in the training process of the dialogue system, and the current intent recognition is usually based on text classification processing technology. Therefore, if natural language reasoning technology can also be integrated into the intent recognition link in the training process of the dialogue system, it will help improve the efficiency of determining the intention of the corresponding role in the corresponding scene.
[0035] Based on this, in one embodiment, Figure 2 As shown, a method for determining intent is provided, which can be Figure 1 The method is performed by a server or a terminal in the embodiment, or by a server and a terminal in collaboration. Figure 1 The following steps are used as an example to illustrate the terminal execution in:
[0036] Step 202: Generate a first intention path according to the intention of the first character in the target scene.
[0037] Among them, the roles may include agents and customers. Agents can be the outgoing caller or the answering party. Similarly, customers can also be the outgoing caller or the answering party. Furthermore, agents may include telemarketing agents, mediation agents, collection agents, follow-up agents, etc., and customers may include lenders, complainants, consultants, etc.
[0038] The first role and the second role may have a corresponding role relationship. For example, when the first role is a collection agent, the second role may be a lender, when the first role is a mediation agent, the second role may be a complainant, and similarly, the first role may be a complainant and the second role may be a mediation agent.
[0039] The first role is a role with known intentions, and the number of the first role may be more than one; the second role is a role whose intention needs to be determined, that is, the second role is a role with unknown intentions.
[0040] The target scenario may be a call scenario. For example, the call scenario may be a call visit to a customer after sales, or a call visit based on the complaint handling result.
[0041] An intention path may refer to a linear flow path of the intention of a corresponding character in a target scene, and thus, a first intention path may refer to a linear flow path between the intentions of a first character.
[0042] In one embodiment, the terminal determines the intention of the first character in the target scenario through the call record between the first character and the second character. The call record may correspond to the target scenario. The call record may be a voice call record, a text call record, or a call record in other forms. The call record only needs to record the call information between the first character and the second character, and the presentation form of the call record is not limited here.
[0043] Exemplarily, when the call record is in the form of a voice call record, the voice call record can be converted into a text call record, and then the intention of the first character in the target scenario can be determined in the text call record.
[0044] In one embodiment, the terminal obtains the call record between the first role and the second role in response to a request for determining the intention of the second role initiated by the user on the terminal.
[0045] Among them, the call records can have identifiers of different roles, so as to represent the correspondence between the call records and the roles through the identifiers of each role. In one embodiment, when the terminal obtains the call records between the first role and the second role, it includes: determining and obtaining the call records having the first role identifier corresponding to the first role and the second role identifier corresponding to the second role, so as to obtain the call records between the first role and the second role.
[0046] Optionally, the intention of the first character in the target scene may be stored locally in the terminal, so that the terminal may obtain the intention of the first character in the target scene from the local storage, and then generate a first intention path according to the intention of the first character in the target scene.
[0047] Step 204, inserting a vacant intention into the first intention path to obtain a second intention path.
[0048] The insertion of a vacant intention in the first intention path may be to insert a vacant intention between adjacent intentions of the first character in the first intention path, thereby obtaining the second intention path based on the intentions adjacent to the vacant intention and the vacant intention; further, the vacant intention may be inserted between adjacent intentions in the first intention path and after the last intention in the first intention path. Based on this, there may be one or two intentions adjacent to the vacant intention in the first intention path.
[0049] The intentions adjacent to the empty intention may refer to the intentions to the left and right of the empty intention in the first intention path relative to the intention path direction; the number of intentions adjacent to an empty intention is less than two. For example, there are two intentions adjacent to the empty intention at a non-terminal position in the first intention path, and there is only one intention adjacent to the empty intention at the terminal position in the first intention path.
[0050] The last intention in the first intention path refers to an intention that appears at the very end of the first intention path along the direction of the intention path; the intention path direction may be from left to right along the intention path.
[0051] For example, a first intention path generated based on the first character's intentions A, B, C, D and E is: ABCDE, and the direction of the intention path is A→…→E. Then intention A and intention B, intention B and intention C, intention C and intention D, intention D and intention E are all adjacent intentions, and intention E is the last intention in the first intention path. Therefore, empty intentions are inserted between adjacent intentions in the first intention path and after the last intention in the first intention path, and the first intention path with inserted empty intentions is: A-empty intention-B-empty intention-C-empty intention-D-empty intention-E-empty intention.
[0052] The second intention path includes the intention of the first role and the vacant position intention.
[0053] Step 206, identifying the intent adjacent to the vacant intent in the second intent path, and obtaining a first intent recognition result of the vacant intent.
[0054] Among them, identifying the intention adjacent to the empty intention in the second intention path can be to separately identify the contents of two intentions located on the left and right of the empty intention in the second intention path, and then obtain the first intention recognition result of the empty intention based on the contents of the two intentions located on the left and right of the empty intention.
[0055] In one embodiment, a first adjacent intention and a second adjacent intention of an empty intention are selected in a second intention path; intention recognition is performed on the first adjacent intention to obtain a second intention recognition result of the empty intention; intention recognition is performed on the second adjacent intention to obtain a third intention recognition result of the second adjacent intention; and the first intention recognition result is determined based on the second intention recognition result and the third intention recognition result.
[0056] Among them, the first adjacent intention of the vacant intention can be the intention located on the left side of the vacant intention relative to the direction of the intention path; similarly, the second adjacent intention of the vacant intention can be the intention located on the right side of the vacant intention relative to the direction of the intention path.
[0057] Optionally, the first adjacent intention and / or the second adjacent intention of the vacant intention in the second intention path can be identified by determining the intention recognition method through the sentence type of the intention adjacent to the vacant intention, and identifying the intention adjacent to the vacant intention based on the determined intention recognition method to obtain the first intention recognition result of the vacant intention; or the first adjacent intention and / or the second adjacent intention of the vacant intention can be identified based on the intention recognition model to obtain the first intention recognition result of the vacant intention.
[0058] Optionally, the intent recognition is performed on the first adjacent intent, and the intent recognition is performed on the first adjacent intent based on the sentence type of the first adjacent intent to obtain a second intent recognition result of the vacancy intent.
[0059] Optionally, performing intent recognition on the second adjacent intent may be performing intent recognition on the second adjacent intent based on an intent recognition model to obtain a third intent recognition result of the second adjacent intent.
[0060] Optionally, the first intention recognition result is determined based on the second intention recognition result and the third intention recognition result, and the second intention recognition result may play a leading role in determining the first intention recognition result, while the third intention recognition result plays a guiding role in determining the first intention recognition result. Exemplarily, the third intention recognition result may be used to correct the second intention recognition result to determine the first intention recognition result, so that the second intention recognition result and the third intention recognition result jointly determine the first intention recognition result that can accurately connect the previous and the next in terms of the meaning of the intention.
[0061] In this embodiment, when identifying the intention adjacent to the empty intention in the second intention path and obtaining the first intention recognition result of the empty intention, the first adjacent intention and the second adjacent intention of the empty intention are selected in the second intention path, and the first adjacent intention and the second adjacent intention are respectively recognized to obtain the second intention recognition result of the empty intention and the third intention recognition result of the second adjacent intention, and then the first intention recognition result is determined based on the second intention recognition result and the third intention recognition result. Thus, the first intention recognition result that can accurately connect the previous and the next intention in terms of the meaning of the intention is determined by the second intention recognition result and the third intention recognition result, thereby improving the accuracy of intention determination.
[0062] Exemplarily, identifying the intention adjacent to the vacant intention in the second intention path can be done by determining the intention recognition method through the sentence type of the intention adjacent to the vacant intention, and identifying the intention adjacent to the vacant intention based on the determined intention recognition method to obtain a first intention recognition result for the vacant intention; or it can be done by identifying the intention adjacent to the vacant intention based on an intention recognition model to obtain a first intention recognition result for the vacant intention.
[0063] Step 208: Determine the intention of the second character in the target scene based on the first intention recognition result.
[0064] Among them, the first intention recognition result corresponds to the empty space intention. Therefore, the first intention recognition result is actually the intention of the second character in the target scene.
[0065] Optionally, similarity may be determined for the first intention recognition result, and intention merging processing may be performed based on the similarity, so that the intention of the second character in the target scene does not have repeated intentions or high-similarity intentions.
[0066] In one embodiment, after determining the intention of the second character in the target scene, the terminal stores the intention of the second character in the target scene locally in the terminal, thereby realizing the process of the second character in the target scene being transformed from a character with unknown intention to a character with known intention.
[0067] The number of roles of the second role may be more than one.
[0068] In one embodiment, after determining the intention of the second character in the target scene based on the first intention recognition result, the above method may also include: determining the intention set of the second character in the target scene based on the intention of the second character in the target scene. The intention set of the second character obtained based on the embodiment of the present application can be used to evaluate the accuracy of the intention set of the second character obtained by other means, and can also be used as a reference for combined reasoning of the intentions of other characters. It can also be used for text data enhancement so that the training data set of the subsequent intention recognition model is expanded to improve the model effect.
[0069] In the above-mentioned intention determination method, in order to comprehensively encompass the intention paths of the first character and the second character in the target scene, a first intention path is generated according to the intention of the first character in the target scene. In order to identify the intention of the second character based on the first intention path corresponding to the intention of the first character in the target scene, a vacant intention is inserted into the first intention path to obtain a second intention path, and the intention adjacent to the vacant intention in the second intention path is identified to obtain a first intention recognition result of the vacant intention, and finally the intention of the second character in the target scene can be accurately determined based on the first intention recognition result. Using the method provided in an embodiment of the present application, by inserting a vacant intention into the first intention path corresponding to the intention of the first character in the target scene to obtain a second intention path, and by identifying the intention adjacent to the vacant intention in the second intention path, thus, finally the intention of the second character in the target scene can be comprehensively and accurately determined.
[0070] In one embodiment, if the sentence type of the first adjacent intent is a first preset sentence type, a target text is selected from the first adjacent intent, and the second intent recognition result includes the target text. The process of determining the sentence type of the first adjacent intent can be implemented by a trained sentence classification model. The trained sentence classification model can be obtained by classifying and training the annotated text and sentences, so the terminal can determine the sentence type of the first adjacent intent based on the trained sentence classification model.
[0071] Exemplarily, the first preset sentence type may include a yes-no question, a positive-negative question, and a specific question.
[0072] Yes-no question refers to general question sentences. For example, if the first adjacent intent is "Are you Xiao Ming?", then the sentence type is determined to be a yes-no question according to the first adjacent intent. Then, one of "yes", "no", "Xiao Ming himself" and "not Xiao Ming himself" can be selected as the target text, and the selected target text is used as the second intent recognition result.
[0073] Positive and negative question sentences refer to sentences that put both the positive (affirmation) and negative (negation) aspects of a matter in one question. For example, if the first adjacent intent is "Can you repay the loan on time?", then the sentence type is determined to be a positive and negative question sentence according to the first adjacent intent. Then, one of "Can repay the loan on time" or "Cannot repay the loan on time" can be selected as the target text, and the selected target text is used as the second intent recognition result.
[0074] A specific question sentence is a question sentence that expects the person being questioned to answer the question. For example, if the first adjacent intent is "Do you think the moon is round or square?", then the sentence type is determined to be a specific question sentence according to the first adjacent intent. In this case, one of "The moon is round" or "The moon is square" can be selected as the target text, and the selected target text is used as the second intent recognition result.
[0075] In this embodiment, when the sentence type of the first adjacent intention is the first preset sentence type, the target text is selected from the first adjacent intention, so that the second intention recognition result of the vacant intention includes the target text. It can be seen that determining the second intention recognition result including the target text based on the sentence type of the first adjacent intention can significantly improve the determination efficiency of the second intention recognition result.
[0076] In one embodiment, if the sentence type of the first adjacent intention is the second preset sentence type, the first adjacent intention is input into the semantic component recognition model for semantic component recognition to obtain the semantic components in the first adjacent intention; the semantic components whose occurrence frequency meets the preset frequency condition are selected as key semantic components, wherein the second intention recognition result includes the key semantic components.
[0077] The second preset sentence type may be another sentence type different from the first preset sentence type. For example, when the sentence type of the first adjacent intention includes yes or no question, positive or negative question, and specific question, the second preset sentence type is another sentence type except yes or no question, positive or negative question, and specific question.
[0078] The sememe recognition model is a model used to identify the smallest meaning unit that constitutes semantics, that is, a model used to identify sememes.
[0079] The purpose of inputting the first adjacent intention into the semantic element recognition model for semantic element recognition is to recognize the semantic element of the first adjacent intention, that is, to recognize the semantic element of the first adjacent intention based on the semantic element recognition model that can realize semantic element recognition. Semantic element recognition is to group a group of words in the same semantic field together and analyze, compare and describe them from the perspective of semantic elements.
[0080] The frequency of occurrence of a semantic element in the first adjacent intention may be more than once. If a semantic element has a higher frequency of occurrence, it means that the semantic element has a more important meaning in the first adjacent intention. Therefore, the preset frequency condition may be that the frequency of occurrence is greater than or equal to the first preset frequency. Thus, the terminal selects the semantic element whose frequency of occurrence is greater than or equal to the first preset frequency as the key semantic element.
[0081] In this embodiment, when the sentence type of the first adjacent intention is the second preset sentence type, the first adjacent intention is input into the semantic element recognition model for semantic element recognition to obtain the semantic elements in the first adjacent intention, and finally the semantic elements whose occurrence frequency meets the preset frequency condition are selected as the key semantic elements. Thus, the second intention recognition result of the vacant intention includes the key semantic elements. It can be seen that determining the second intention recognition result including the key semantic elements based on the sentence type of the first adjacent intention can significantly improve the determination accuracy of the second intention recognition result.
[0082] It can be seen that based on the first preset sentence type and the second preset sentence type, for different sentence types of the first adjacent intention, the second intention recognition with accurate and logical vacant intention can be finally determined, thereby avoiding the undesirable situation that the inference intention is inaccurate and illogical, and then ensuring that the subsequent intention of the second character in the target scene is comprehensive and accurate.
[0083] In one embodiment, the second adjacent intent is segmented to obtain the segmentation of the second adjacent intent; through the intent recognition model, the segmentation of the second adjacent intent is feature extracted to obtain a segmentation feature vector and a segmentation weight vector; the segmentation feature vector and the segmentation weight vector are recognized to obtain the named entity of the second adjacent intent, wherein the third intent recognition result includes the named entity.
[0084] Among them, word segmentation is a basic step in natural language processing (NLP), which involves dividing a text string into smaller words in dimension. Words can be words, phrases, symbols, or any other meaningful basic units in a language. The purpose of word segmentation for the second adjacent intent is to eventually obtain the named entity of the second adjacent intent.
[0085] The word segmentation feature vector represents each word in the text as a point in a multidimensional space. Each dimension in this multidimensional space corresponds to a feature value, and the feature value of each word constitutes the word segmentation feature vector.
[0086] The word weight vector is a quantitative representation of the importance or contribution of each word in the text. The word weight can be determined based on the word frequency, TF-IDF (Term Frequency-Inverse Document Frequency) or other weight distribution strategies of each word.
[0087] Named entities are words in text that refer to specific objects or concepts in the real world. Named entities include names of people, places, organizations, time, quantities, or other entity types.
[0088] In the present embodiment, in the process of obtaining the third intention recognition result of the second adjacent intention, the second adjacent intention is segmented to obtain the word segmentation of the second adjacent intention, and then the word segmentation of the second adjacent intention is feature extracted through the intention recognition model to obtain the word segmentation feature vector and the word segmentation weight vector, and finally the named entity of the second adjacent intention is obtained by identifying the word segmentation feature vector and the word segmentation weight vector. Thus, the third intention recognition result includes the named entity. It can be seen that determining the third intention recognition result including the named entity based on the word segmentation processing method can significantly improve the determination accuracy of the third intention recognition result, and then can more accurately cooperate with the second intention recognition result to jointly determine the first intention recognition result with higher accuracy.
[0089] In one embodiment, the intention of the first character in the target scene is obtained; the intention of the first character in the target scene is sorted to obtain an intention sequence; and the first intention path is determined according to the intention sequence.
[0090] In one embodiment, the intentions of the first character in the target scene are numbered for m rounds to obtain m numbering sets, where m is a positive integer; the intentions of the first character in the target scene are sorted according to the intention numbers in the m numbering sets to obtain m intention sequences; wherein the intention sequences correspond one-to-one to the second intention paths; based on the first intention recognition results of the empty intentions in the m second intention paths, the m intention groups of the second character in the target scene are determined.
[0091] The intention of the first character in the target scenario may be acquired by the terminal through the call record between the first character and the second character.
[0092] Optionally, in the process of performing m rounds of numbering processing on the intentions of the first character in the target scene, the total occurrence frequency of part or all of the intentions of the first character in the target scene in the corresponding numbering set may be more than once, and the continuous occurrence frequency may also be more than once.
[0093] In one embodiment, m rounds of numbering processing are performed on the intention of the first character in the target scene to obtain m number sets, including: determining the total occurrence frequency and continuous occurrence frequency of the intention of the first character in the target scene in each round of numbering processing; wherein the total occurrence frequency is greater than or equal to the second preset frequency, and the continuous occurrence frequency is less than or equal to the third preset frequency; based on the total occurrence frequency and continuous occurrence frequency of the intention in each round of numbering processing, m number sets are obtained.
[0094] Among them, the total frequency of occurrence of an intention in a round of numbering processing refers to the total frequency of the same intention appearing in different positions in the corresponding intention sequence during the round of numbering processing. The continuous frequency of occurrence of an intention in a round of numbering processing refers to the frequency of the same intention repeating uninterruptedly at a certain position in the corresponding intention sequence during the round of numbering processing; the continuous frequency of occurrence is less than or equal to the third preset frequency, which means that the frequency of a certain intention of the first character repeating uninterruptedly at a certain position cannot exceed the third preset frequency. Intentions appearing at different positions in the same intention sequence, and intentions repeating uninterruptedly at a certain position in the same intention sequence, all have corresponding intention numbers, and each intention number may be different.
[0095] Exemplarily, the second preset frequency may be 1 or other values. When the second preset frequency is 1, the intention of the first character in the target scene appears at least once in different intention sequences, thereby ensuring that the intention of the first character in the target scene can be covered as much as possible. The third preset frequency may be 3 or other values, thereby avoiding the undesirable situation that the intention interaction between the first character and the second character in the target scene is meaningless due to the continuous appearance of the same intention at too high a frequency.
[0096] Optionally, when the terminal determines the total occurrence frequency and the continuous occurrence frequency of an intent in a certain round of numbering processing, the total occurrence frequency and / or the continuous occurrence frequency of an intent in different rounds of numbering processing may be different.
[0097] For example, an intention sequence generated based on the first character's intention A, intention B and intention C is: ABBBCB, then the total occurrences of intention A, intention B and intention C are 1, 4 and 1 respectively, and the consecutive occurrences of intention A, intention B and intention C are 1, 3 and 1 respectively.
[0098] In this embodiment, based on the total occurrence frequency and continuous occurrence frequency of the intention in each round of numbering processing, in the process of obtaining m intention sequences, there is uncertainty in the total occurrence frequency of the intention, the uncertainty in the continuous occurrence frequency of the intention and the uncertainty in the appearance position of the intention, so that a large number of possible results of the intention sequence can be generated, which can more comprehensively cover the intention interaction between the first character and the second character in the target scene.
[0099] In the process of performing m rounds of numbering processing on the intentions of the first character in the target scene, the order of appearance of the intentions may be different, that is, the m intention sets may each correspond to a different intention numbering method.
[0100] The intention sequence corresponds to the second intention path one by one, that is, each intention sequence corresponds to a different second intention path, so the number of second intention paths is the same as the number of intention sequences. Specifically in the embodiment of the present application, the number of intention sequences and the number of second intention paths are both m.
[0101] Optionally, the intention group of the second character in the target scenario may refer to all intentions that may appear in a single call record between the second character and the first character in the target scenario.
[0102] In this embodiment, the intention of the first character in the target scene is obtained, and then m rounds of numbering processing are performed to obtain m numbering sets, and then the first intention of the first character in the target scene is sorted according to the intention numbers in the m numbering sets to obtain m intention sequences, and each intention sequence in the m intention sequences corresponds to the second intention path one by one, so that based on the first intention recognition result of the empty intention in the m second intention paths, the m intention groups of the second character in the target scene can be determined. It can be seen that the embodiment of the present application can obtain m intention sequences that cover the intention interaction of the first character in the target scene as comprehensively as possible by combining the numbering processing and sorting processing of the intention, and further, it can also make the m intention groups of the second character in the target scene obtained subsequently also have the comprehensiveness of the intention interaction situation.
[0103] In one embodiment, for each of the m intention groups, the first similarity between the intentions in the intention group is determined; in each intention group, the intentions whose first similarity reaches a similarity threshold are merged to obtain the intention merging result of each intention group; based on the intention merging result of each intention group, the intention set of the second character in the target scene is determined.
[0104] The intentions whose first similarity reaches the similarity threshold include highly similar intentions and identical intentions. The intention set of the second character in the target scene includes multiple intentions of multiple second characters in the target scene.
[0105] The intent set may include all the intents of the corresponding role and the interpretation of each intent, so that the intent set of the second role in the target scenario includes all the intents of the second role in the target scenario and the interpretation of each intent. For example, when the second role is a collection agent in a collection scenario, the intent set of the second role may include the intents of "collection" and "remind of repayment date" and the corresponding interpretations. For example, when the second role is a return visit agent in a scenario where after-sales service returns to customers, the intent set of the second role may include the intent of "returning to the product usage experience" and the corresponding interpretation; when the second role is a return visit agent in a scenario where the complaint handling results are returned, the intent set of the second role may include the intent of "tracking the complaint handling results" and the corresponding interpretation.
[0106] The intents whose first similarity reaches the similarity threshold are merged in order to reduce the similarity of intents in different intent groups and avoid highly similar or identical intents in the same intent group, thereby obtaining an intent merging result without data redundancy.
[0107] In this embodiment, the intentions in each intention group whose first similarity reaches a similarity threshold are merged, and then the intention set of the second character in the target scene is determined based on the intention merging result of each intention group. Thus, by reducing the intention similarity in each intention group, the accuracy of the intention set of the second character in the target scene that is finally determined can be significantly improved while also reducing the data redundancy of the intention set.
[0108] In one embodiment, the number of the above-mentioned intention recognition results is n; determine the second similarity between the n intention recognition results; among the n intention recognition results, merge the intention recognition results whose second similarity reaches the similarity threshold to obtain a first merged intention recognition result; determine the intention of the second character in the target scene based on the first merged intention recognition result.
[0109] Among them, the intention recognition results whose second similarity reaches the similarity threshold include highly similar intention recognition results and identical intention recognition results. The first merged intention recognition result refers to the intention result with lower data redundancy or no data redundancy after merging n intention recognition results. The intention set of the second character in the target scene includes multiple intentions of multiple second characters in the target scene.
[0110] The intention recognition results whose second similarity reaches the similarity threshold are merged in order to reduce the similarity of intentions in different intention recognition results, avoid highly similar or identical intentions in different intention recognition results, and further avoid the undesirable situation that there is data redundancy in the intention of the determined second character in the target scene.
[0111] In this embodiment, the intention recognition results whose second similarity reaches the similarity threshold are merged, and then the intention of the second character in the target scene is determined based on the first merged intention recognition result. In this way, by reducing the intention similarity between different intention recognition results, the accuracy of the intention set of the second character in the target scene that is finally determined can be improved while also reducing the data redundancy of the intention set.
[0112] In one embodiment, similarity is calculated for intentions adjacent to the vacant intention to obtain a third similarity; among the intentions adjacent to the vacant intention, the intentions whose third similarity reaches a similarity threshold are merged to obtain a second merged intention recognition result; based on the first merged intention recognition result and the second merged intention recognition result, the intention of the second character in the target scene is determined.
[0113] Among them, the second merged intention recognition result refers to the intention result with lower data redundancy or no data redundancy after the intentions adjacent to the empty intention are merged.
[0114] Optionally, the intent features may be obtained by extracting text features from each intent, thereby converting the intent features into vector form, and then determining the similarity between the intents in vector form through cosine similarity, Euclidean distance or other algorithms for evaluating vector similarity to determine the first similarity, the second similarity and the third similarity.
[0115] It can be seen that if the intents with the first similarity reaching the similarity threshold in each intent group are merged, the intent recognition results with the second similarity reaching the similarity threshold are also merged, and the intents with the third similarity reaching the similarity threshold in the intents adjacent to the empty intention are merged, it can reduce the similarity of the intents in each intent group and the similarity of the intents between different intent recognition results. Furthermore, by continuously reducing the data redundancy that may exist in the intent determination process, it is possible to further avoid the undesirable situation that the final determined second character's intent set in the target scene has data redundancy.
[0116] In one embodiment, the above-mentioned identifying the intention adjacent to the vacant intention in the second intention path to obtain the first intention recognition result of the vacant intention includes: identifying the second merged intention recognition result to obtain the first intention recognition result of the vacant intention.
[0117] In this embodiment, based on the first merged intention recognition result with low data redundancy or no data redundancy, and the second merged intention recognition result with low data redundancy or no data redundancy, the intention of the second character in the target scene is jointly determined. It can be seen that the intention of the second character in the target scene finally determined by the embodiment of the present application also has low data redundancy or no data redundancy, and the data quality is improved by avoiding the existence of data redundancy.
[0118] The application process of the above intention determination method is described below in conjunction with a detailed embodiment. The intention determination method is applied in a terminal, and the application process is as follows:
[0119] (1) The process of determining the first intention path
[0120] Obtain the first character's intention in the target scenario;
[0121] The intentions of the first character in the target scene are numbered for m rounds to obtain m number sets, where m is a positive integer;
[0122] According to the intention numbers in the m number sets, the intentions of the first character in the target scene are sorted respectively to obtain m intention sequences; wherein the intention sequences correspond to the second intention paths one by one;
[0123] A first intention path is determined based on the intention sequence.
[0124] (2) The process of determining the second intention path
[0125] Insert the empty intention into the first intention path to obtain the second intention path;
[0126] (3) Determination process of the first intention recognition result
[0127] Select the first adjacent intention and the second adjacent intention of the empty intention in the second intention path;
[0128] If the sentence type of the first adjacent intention is the first preset sentence type, the target text is selected from the first adjacent intention, and the second intention recognition result includes the target text; if the sentence type of the first adjacent intention is the second preset sentence type, the first adjacent intention is input into the semantic element recognition model for semantic element recognition to obtain the semantic elements in the first adjacent intention; the semantic elements whose occurrence frequency meets the preset frequency condition are selected as key semantic elements, wherein the second intention recognition result includes the key semantic elements;
[0129] The second adjacent intent is segmented to obtain the segmentation of the second adjacent intent; through the intent recognition model, the segmentation of the second adjacent intent is feature extracted to obtain the segmentation feature vector and the segmentation weight vector;
[0130] Identify the word segmentation feature vector and the word segmentation weight vector to obtain a named entity of the second adjacent intent, wherein the third intent recognition result includes the named entity;
[0131] Determine the first intention recognition result according to the second intention recognition result and the third intention recognition result;
[0132] (4) The process of determining the second character’s intention set in the target scene
[0133] Based on the first intention recognition results of the empty intention in the m second intention paths, determine the m intention groups of the second character in the target scene;
[0134] For each of the m intent groups, determine a first similarity between the intents in the intent group;
[0135] In each intent group, the intents whose first similarity reaches the similarity threshold are merged to obtain the intent merging result of each intent group;
[0136] Based on the intention merging result of each intention group, the intention set of the second character in the target scene is determined.
[0137] In this embodiment, the intent sequence is obtained by numbering the intents and sorting the intents through the set to determine the first intent path, so that more possible first intent paths are covered; the second intent path is obtained by inserting the vacant intent in the first intent path, and the first adjacent intent and the second adjacent intent of the vacant intent are respectively determined by sentence pattern determination and word segmentation to determine the first intent recognition result of the vacant intent, so that the first intent recognition result of the vacant intent is logical and accurate; through the first intention world results of the vacant intent in the m second intention paths, the m intent groups of the second character in the target scene are determined, and the intents with higher similarity in each of the m intent groups are merged, and finally the intent set of the second character in the target scene is determined based on the intent merging results of each intent group. It can be seen that the final determined intent set of the second character in the target scene can be comprehensive and accurate through the embodiment of the present application.
[0138] In one embodiment, Figure 3 As shown, the present application provides a method for determining intention, which is used to determine the intention of a role in a collection scenario. Figure 1 The terminal execution in includes the following steps:
[0139] Step 302: In order to determine the lender's intention set in the collection scenario and improve the dialogue system in the collection scenario, the user specifies all the roles involved, namely the collection agents and lenders, on the terminal to which the intention determination method provided in the embodiment of the present application is applied.
[0140] Step 304: Obtain all calls involving only the collection agent and the lender from the call records of the collection scenario.
[0141] Step 306: Obtain the intention set of the collection agent in the collection scenario.
[0142] Step 308: Generate a collection agent intention path according to the total occurrence frequency and the occurrence position of the intention of the collection agent in the intention set in the collection scenario.
[0143] Step 310: hollow out the space between every two intentions in the collection agent intention path to leave a vacant intention for the lender in the collection agent intention path.
[0144] Step 312: Generate a first intention recognition result for each vacancy intention according to the intentions of the two collection agents before and after each vacancy intention to obtain the lender intention path.
[0145] Step 314: The intention recognition results in the lender's intention path are merged to finally determine the lender's intention in the collection scenario, and then generate an intention set based on the lender's intention in the collection scenario.
[0146] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0147] Based on the same inventive concept, the embodiment of the present application also provides an intention determination device for implementing the intention determination method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more embodiments of the intention determination device provided below can refer to the limitations of the intention determination method above, and will not be repeated here.
[0148] In one embodiment, Figure 4 As shown, an intention determination device is provided, including: a generation module 402, an insertion module 404, an identification module 406 and a first determination module 408, wherein:
[0149] A generating module 402, configured to generate a first intention path according to the intention of the first character in the target scene;
[0150] Insertion module 404, used for inserting a vacant intention into the first intention path to obtain a second intention path;
[0151] An identification module 406 is used to identify the intent adjacent to the empty intent in the second intent path, and obtain a first intent recognition result of the empty intent;
[0152] The first determination module 408 is used to determine the intention of the second character in the target scene based on the first intention recognition result.
[0153] In one embodiment, the above-mentioned identification module 406 is also used to select the first adjacent intention and the second adjacent intention of the vacant intention in the second intention path; perform intention recognition on the first adjacent intention to obtain the second intention recognition result of the vacant intention; perform intention recognition on the second adjacent intention to obtain the third intention recognition result of the second adjacent intention; determine the first intention recognition result based on the second intention recognition result and the third intention recognition result.
[0154] In one embodiment, the recognition module 406 is further configured to select a target text from the first adjacent intent when the sentence type of the first adjacent intent is a first preset sentence type, and the second intent recognition result includes the target text.
[0155] In one embodiment, the above-mentioned recognition module 406 is also used to input the first adjacent intention into the semantic component recognition model for semantic component recognition if the sentence type of the first adjacent intention is the second preset sentence type, so as to obtain the semantic components in the first adjacent intention; and select the semantic components whose occurrence frequency meets the preset frequency condition as the key semantic components, wherein the second intention recognition result includes the key semantic components.
[0156] In one embodiment, the above-mentioned recognition module 406 is also used to perform word segmentation processing on the second adjacent intent to obtain the word segmentation of the second adjacent intent; through the intention recognition model, feature extraction is performed on the word segmentation of the second adjacent intent to obtain a word segmentation feature vector and a word segmentation weight vector; the word segmentation feature vector and the word segmentation weight vector are recognized to obtain the named entity of the second adjacent intent, wherein the third intent recognition result includes the named entity.
[0157] In one embodiment, the generation module 402 is further used to obtain the intention of the first character in the target scene; sort the intention of the first character in the target scene to obtain an intention sequence; and determine the first intention path according to the intention sequence.
[0158] In one embodiment, the generating module 402 is further used to perform m rounds of numbering processing on the intentions of the first character in the target scene to obtain m numbering sets, where m is a positive integer; sort the intentions of the first character in the target scene according to the intention numbers in the m numbering sets to obtain m intention sequences; wherein the intention sequences correspond to the second intention paths one by one;
[0159] The first determination module 408 is further configured to determine m intention groups of the second character in the target scene based on the first intention recognition results of the empty intentions in the m second intention paths.
[0160] like Figure 4 As shown, in one embodiment, the above-mentioned device also includes a second determination module 410, which is used to determine, for each of the m intention groups, a first similarity between the intentions in the intention group; in each intention group, merge the intentions whose first similarity reaches a similarity threshold to obtain an intention merging result for each intention group; based on the intention merging result of each intention group, determine the intention set of the second character in the target scene.
[0161] In one embodiment, the number of the above-mentioned intention recognition results is n; the above-mentioned first determination module 408 is also used to determine the second similarity between the n intention recognition results; among the n intention recognition results, the intention recognition results whose second similarity reaches the similarity threshold are merged to obtain a first merged intention recognition result; and the intention of the second character in the target scene is determined based on the first merged intention recognition result.
[0162] like Figure 4 As shown, in one embodiment, the apparatus further includes a merging module 412, which is used to calculate the similarity of the intentions adjacent to the vacant intention to obtain a third similarity; among the intentions adjacent to the vacant intention, the intentions whose third similarity reaches a similarity threshold are merged to obtain a second merged intention recognition result;
[0163] The first determination module 408 is further configured to determine the intention of the second character in the target scene based on the first combined intention recognition result and the second combined intention recognition result.
[0164] Each module in the above-mentioned intention determination device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0165] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store intention data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an intention determination method is implemented.
[0166] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an intention determination method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0167] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0168] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0169] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0170] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0172] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining intent, characterized in that: The method comprises: generating a first intention path according to the intention of the first character in the target scenario; Inserting a vacant intention into the first intention path to obtain a second intention path; Identify the intent adjacent to the empty intent in the second intent path, and obtain a first intent recognition result of the empty intent; The intention of the second character in the target scene is determined based on the first intention recognition result.
2. The method according to claim 1, characterized in that The identifying the intent adjacent to the empty intent in the second intent path to obtain a first intent recognition result of the empty intent includes: Selecting the first adjacent intention and the second adjacent intention of the empty intention in the second intention path; Performing intention recognition on the first adjacent intention to obtain a second intention recognition result of the vacant intention; Performing intent recognition on the second adjacent intent to obtain a third intent recognition result of the second adjacent intent; The first intention recognition result is determined according to the second intention recognition result and the third intention recognition result.
3. The method according to claim 2, characterized in that The performing intention recognition on the first adjacent intention to obtain a second intention recognition result of the vacant intention includes: If the sentence type of the first adjacent intention is a first preset sentence type, a target text is selected from the first adjacent intention, and the second intention recognition result includes the target text.
4. The method according to claim 2, characterized in that: The performing intention recognition on the first adjacent intention to obtain a second intention recognition result of the vacant intention includes: If the sentence type of the first adjacent intention is the second preset sentence type, inputting the first adjacent intention into a semantic element recognition model for semantic element recognition to obtain semantic elements in the first adjacent intention; The semantic element whose occurrence frequency meets a preset frequency condition is selected as the key semantic element, wherein the second intention recognition result includes the key semantic element.
5. The method according to claim 2, characterized in that: The performing intention recognition on the second adjacent intention to obtain a third intention recognition result of the second adjacent intention includes: Performing word segmentation processing on the second adjacent intent to obtain word segmentation of the second adjacent intent; By using the intent recognition model, feature extraction is performed on the word segmentation of the second adjacent intent to obtain a word segmentation feature vector and a word segmentation weight vector; The word segmentation feature vector and the word segmentation weight vector are identified to obtain a named entity of the second adjacent intent, wherein the third intent recognition result includes the named entity.
6. The method according to claim 1, characterized in that The generating a first intention path according to the intention of the first character in the target scene includes: Obtain the first character's intention in the target scenario; Sorting the intentions of the first role in the target scenario to obtain an intention sequence; A first intention path is determined according to the intention sequence.
7. The method according to claim 6, characterized in that The step of sorting the intentions of the first character in the target scene to obtain an intention sequence includes: Perform m rounds of numbering processing on the intentions of the first character in the target scene to obtain m numbering sets, where m is a positive integer; According to the intention numbers in the m number sets, the intentions of the first character in the target scene are sorted respectively to obtain m intention sequences; wherein the intention sequences correspond to the second intention paths one by one; The determining the intention of the second character in the target scene based on the first intention recognition result includes: Based on the first intention recognition results of the empty intentions in the m second intention paths, m intention groups of the second character in the target scene are determined.
8. The method according to claim 7, characterized in that The method further comprises: For each of the m intent groups, determining a first similarity between the intents in the intent group; In each of the intent groups, the intents whose first similarity reaches the similarity threshold are merged to obtain an intent merging result of each intent group; Based on the intention merging result of each intention group, determine the intention set of the second role in the target scene.
9. The method according to claim 1, characterized in that: The number of the intention recognition results is n; and determining the intention of the second character in the target scene based on the first intention recognition result includes: Determining a second similarity between the n intent recognition results; Among the n intention recognition results, the intention recognition results whose second similarity reaches the similarity threshold are merged to obtain a first merged intention recognition result; The intention of the second character in the target scene is determined based on the first combined intention recognition result.
10. The method according to claim 9, characterized in that The method further comprises: Calculate the similarity of the intentions adjacent to the empty intention to obtain a third similarity; Among the intentions adjacent to the empty intention, merging the intentions whose third similarity reaches the similarity threshold to obtain a second merged intention recognition result; The determining the intention of the second character in the target scene based on the first combined intention recognition result includes: Based on the first combined intention recognition result and the second combined intention recognition result, determine the intention of the second character in the target scene.
11. An intention determination device, characterized in that: The device comprises: A generation module, used for generating a first intention path according to the intention of the first character in the target scene; An insertion module, used for inserting a vacant intention into the first intention path to obtain a second intention path; an identification module, configured to identify an intention adjacent to the vacant intention in the second intention path, and obtain a first intention recognition result of the vacant intention; The first determination module is used to determine the intention of the second character in the target scene based on the first intention recognition result.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Knowledge base generation method and device, electronic equipment and computer readable storage medium
CN116150387A
Target intention recognition method and system and electronic equipment
CN117056687A
Method and system for updating an intent space and estimating intent based on an intent space
US20170097966A1
System and method for prediction based preemptive generation of dialogue content
US20190251957A1
Unsupervised induction of user intents from conversational customer service corpora
US20210103634A1
