Intention recognition method and device, equipment, storage medium and program product

The session text features are extracted through multiple text processing models and selected suitable models for intent recognition, which solves the complexity of intent recognition problem of session text and achieves accurate intent recognition effect.

CN119691123APending Publication Date: 2025-03-25MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411771794.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In a conversation scenario, the logical relationship between statements in the conversation text is complex, and existing intention recognition models are difficult to accurately identify the intent of the conversation text.

Method used

Feature extraction of session text through various text processing models, and appropriate text processing models are determined for intent recognition. Specific steps include: extracting features of multiple text processing models, determining the session process based on the session intent, matching the features to select an appropriate text processing model, and finally identifying the intent based on the model.

Benefits of technology

It realizes accurate identification of session text intent and is suitable for session scenarios with complex logical relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691123A_ABST
    Figure CN119691123A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition method and device, equipment, a storage medium and a program product, which can select a proper text processing model for a session text to perform feature extraction so as to accurately recognize the intention of the session text based on the extracted text features. The intention recognition method comprises the steps of performing feature extraction on a first session text through multiple text processing models to obtain multiple first text features; determining a first session process based on the session intention of the first session text, the first session process comprising a plurality of process nodes, each process node corresponding to a first intention, and each first intention corresponding to a second text feature; according to the first matching degree of each first text feature and each second text feature, determining a first text feature matched with the second text feature from the first text features; and performing intention recognition on the first session text based on a first text processing model corresponding to the matched first text feature to obtain a second intention of the first session text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to an intent recognition method, device, storage medium and program product. Background Art

[0002] Natural Language Processing (NLP) tasks mainly focus on understanding the basic semantics of language, including but not limited to text similarity detection (Semantic textual similarity, STS), long text classification, natural language reasoning and other text processing tasks. In order to meet the needs of various tasks, a large number of text processing models have emerged. Due to the differences in the performance of different text processing models, in order to improve the accuracy of intent recognition, it is necessary to select a suitable text processing model for intent recognition. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an intent recognition method, apparatus, device, storage medium and program product for selecting a suitable text processing model for the conversation text to be processed to extract text features, so that intent recognition can be performed based on the extracted text features to accurately identify the intent of the conversation text.

[0004] In order to achieve the above objectives, the present application embodiment adopts the following technical solutions: In a first aspect, an embodiment of the present application provides an intent recognition method, comprising: Extracting features through multiple text processing models to obtain multiple first text features, each first text feature being extracted by one text processing model; Determine a first conversation process based on the conversation intent of the first conversation text, where the first conversation process includes a plurality of process nodes, each process node corresponds to a first intent, and each first intent corresponds to a second text feature; Matching the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature; Determining, according to the first matching degree, a first text feature that matches the second text feature from the first text feature; Determine a first text processing model corresponding to the matched first text feature from the multiple text processing models; The first conversation text is subjected to intent recognition based on the first text processing model to obtain a second intent of the first conversation text.

[0005] In a second aspect, an embodiment of the present application provides an intention recognition device, including: A first processing module is used to extract features through multiple text processing models to obtain multiple first text features, each of which is extracted by one text processing model; A first determination module, configured to determine a first conversation process based on a conversation intent of the first conversation text, wherein the first conversation process includes a plurality of process nodes, each process node corresponds to a first intent, and each first intent corresponds to a second text feature; A first matching module, used for matching the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature; A second determination module, configured to determine, from the first text features, a first text feature that matches the second text feature according to the first matching degree; A third determination module, configured to determine a first text processing model corresponding to the matched first text feature from the multiple text processing models; The first recognition module is used to perform intent recognition on the first conversation text based on the first text processing model to obtain a second intent of the first conversation text.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, including: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the intention recognition method provided in the first aspect.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the intent recognition method provided in the first aspect.

[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps in the intent recognition method provided in the first aspect.

[0009] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: Considering that in the conversation scenario, the logical relationship between the sentences contained in the conversation text is complex, it is difficult to accurately identify the intention of the conversation text through the existing intention recognition model, and the text features of the conversation text are fine-grained features containing semantic information. Therefore, a text processing model is used to extract features from the conversation text, and the intention of the conversation text can be accurately identified based on the extracted text features. On this basis, considering that there are multiple existing text processing models, and the performance of each text processing model is different, a text processing model suitable for the conversation text is selected from multiple text processing models for the intention recognition of the conversation text. Specifically, on the one hand, the first conversation text is feature extracted by multiple text processing models to obtain multiple first text features, each of which is extracted by a text processing model, and the multiple first text features can be used to determine the intention of the first conversation text; on the other hand, the first conversation process is determined based on the conversation intention of the first conversation text, and the first conversation process includes multiple process nodes, each process node corresponds to a first intention, and each first intention corresponds to a second text feature. These first intentions are the intentions that the first conversation text may contain. On this basis, based on the first matching degree between each first text feature and each second text feature, we can reversely deduce which text features are needed to obtain the possible intention of the first conversation text, that is, determine the first text feature that matches the second text feature from multiple first text features. The first text processing model corresponding to this type of first text feature is the text processing model suitable for the first conversation text. Further, by performing intent recognition on the first conversation text based on the first text processing model, the second intention of the first conversation text can be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of an intent recognition method provided for an embodiment of the present application; Figure 2 A schematic diagram of a first conversation process provided for an embodiment of the present application; Figure 3 A schematic diagram of a knowledge graph provided for an embodiment of the present application; Figure 4 A schematic diagram of the structure of an intention recognition device provided for one embodiment of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0012] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.

[0013] Explanation of relevant terms: Attention: It is a mechanism that captures long-range dependencies by focusing on different parts of the input vector.

[0014] Textual Entailment: also known as textual entailment. Simply put, textual entailment describes the inference relationship between two texts, where one text is a premise and the other text is a hypothesis. If the hypothesis can be inferred from the premise, then the premise is considered to imply the hypothesis. This is similar to the implication relationship in first-order logic. The main goal of recognizing textual entailment (RTE) is to judge the premise and hypothesis to determine whether there is an implication relationship. Textual entailment recognition is formally a text classification problem, and the categories can include entailment, conflict, and neutrality. For example, the premise is "A dog is playing with a Frisbee in the snow", and the first hypothesis is "A dog is playing with toys in cold weather", which has an implication relationship with the premise; the second hypothesis is "A cat is washing its face with its front paws", which has a conflict relationship with the premise; and the third hypothesis is "A pet is playing happily with its owner", which has a neutral relationship with the premise, that is, it has neither an implication relationship nor a conflict relationship.

[0015] As mentioned above, there are a large number of text processing models in the field of natural language processing. Commonly used text processing models include single-label text classification models, multi-label text classification models, entity recognition models, etc. These text processing models have different functions and performances. For example, the single-label text classification model has the advantages of high classification efficiency and output labels that meet the requirements of language simplicity, but there is a disadvantage of information loss; the labels output by the multi-label text classification model contain rich information, but are not suitable for texts with a single intent; the entity recognition model recognizes entity information in the text and can assist in the identification of the text's intent, etc. Since each text processing model has different functions and performances, it is necessary to select a suitable text processing model when identifying the intent of the text.

[0016] In a conversation scenario, different conversation texts are generated by the interaction between different speakers. The logical relationships between the sentences contained in the conversation texts are complex. The intention of the conversation text is often composed of the intentions of the sentences it contains. The text processing model applicable to each sentence may be different. The text features of the conversation text are fine-grained features containing semantic information. Therefore, a text processing model is used to extract features from the conversation text. Based on the extracted text features, the intention of the conversation text can be accurately identified. In this case, how to select a suitable text processing model to extract features from the conversation text so as to accurately identify the intention of the conversation text based on the extracted text features is a difficult problem that needs to be solved urgently.

[0017] The applicant has studied the intentions of a large number of conversation texts and found that in business scenarios, the parties in the conversation usually follow the set conversation process until the final conversation intention is reached. For example, the conversation of resource recycling business usually follows the following conversation process: the agent greets the user first, then verifies the user's identity (the agent expresses his intention) Figure 1 ), if the authentication fails, the agent ends the session; if the authentication succeeds, the agent informs the user that the borrowed resources have expired and asks the user whether they can return the resources on time (the agent expresses his / her willingness to return the resources). Figure 2 ); after receiving the user's affirmative answer (the user expresses his / her Figure 1 ) after which the agent ends the call; after receiving a negative or ambiguous answer from the user (the user expresses his / her opinion Figure 2 ) After that, the agent conducts a second or even more rounds of inquiries (the agent expresses his / her opinion Figure 3 ), until the user commits to returning the resource (session intent is achieved).

[0018] Based on this, the embodiment of the present application proposes an intention recognition method, which is as follows: on the one hand, a plurality of first text features are obtained by extracting features from the first conversation text through a plurality of text processing models, and each first text feature is extracted by a text processing model, and a plurality of first text features can be used to determine the intention of the first conversation text; on the other hand, the first conversation process is determined based on the conversation intention of the conversation text, and the first conversation process includes a plurality of process nodes, each process node corresponds to a first intention, and each first intention corresponds to a second text feature, and these first intentions are the intentions that the first conversation text may contain. On this basis, based on the first matching degree between each first text feature and each second text feature, it is possible to reversely deduce which text features are needed to obtain the possible intention of the first conversation text, that is, to determine the first text feature that matches the second text feature from a plurality of first text features, and the first text processing model corresponding to this type of first text feature is a text processing model suitable for intention recognition of the first conversation text, and further based on the first text processing model, the first conversation text is subjected to feature extraction, and the second intention of the first conversation text can be accurately identified based on the extracted text features.

[0019] It should be understood that the intent recognition methods provided in the embodiments of the present application can be performed by electronic devices. The electronic devices referred to herein may include terminal devices, such as smart phones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, smart watches, vehicle terminals, aircraft, etc.; or, the electronic devices may also include servers, such as independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide cloud computing services.

[0020] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0021] See also Figure 1 , is a flow chart of an intention recognition method provided by an embodiment of the present application, the method comprising the following steps: S102, extracting features from the first conversation text using a plurality of text processing models to obtain a plurality of first text features.

[0022] Each first text feature is extracted by a text processing model, and the type of the text feature is determined by the text processing model used to extract the text feature.

[0023] The above-mentioned multiple text processing models may include, for example, but are not limited to: a single-label text classification model, a multi-label text classification model, and various types of entity recognition models. For each text processing model, after the first conversation text is input into the text processing model, the corresponding first text features may be obtained. The above-mentioned multiple first text features may include, for example, but are not limited to: a category label of a single-level label structure, a category label of a multi-level label structure, an entity in the text, etc.

[0024] Among them, the first text feature extracted by the single-label text classification model is a category label of a single-level label structure, such as "affirmation". The first text feature extracted by the multi-label text classification model is a category label of a multi-level label structure, such as "affirmation|promise to repay|repay on time". The first text feature extracted by the entity recognition model includes the entity in the first conversation text and the location information of the entity. For example, after the first conversation text "book a flight from Beijing to Shanghai" is input into the entity recognition model, the first text feature obtained is {O, O, B-LOC, I-LOC, O, B-LOC, I-LOC, O, B-OBJ, I-OBJ}, where O represents a non-entity character, B represents the first character belonging to an entity, I represents a non-first character belonging to an entity, LOC represents that the entity type is a location, and OBJ represents that the entity type is an object.

[0025] In practical applications, the first conversation text may be all conversation texts from the conversation to avoid missing important information in the conversation and ensure that the first text processing model finally selected can accurately identify all intentions of the first conversation text.

[0026] The first conversation text may also be a portion of the conversation text extracted from the conversation, for example, the first sentence and the last sentence in the conversation are deleted to obtain the first conversation text. Since the first sentence of a conversation is usually a greeting and the last sentence is usually a closing statement, such sentences usually do not contain valid information. By using the conversation text obtained after deleting such sentences as the first conversation text, the amount of calculation can be reduced, thereby improving the calculation efficiency and reducing the calculation resources.

[0027] S104: Determine a first conversation process based on the conversation intention of the first conversation text.

[0028] The conversation intention of the first conversation text is used to indicate the purpose to be achieved through the first conversation text, that is, the ultimate intention of the first conversation text. For example, if the agent prompts the user to promise to return the resources in time through the conversation with the user, then the conversation intention of the first conversation text between the two is "promote the user to promise to return the resources in time". The conversation intention of the first conversation text can be determined in various appropriate ways, and the embodiments of the present application are not limited to this.

[0029] Considering that after the session intent is realized through a conversation, one party of the conversation will actively end the conversation, so the session intent usually reflects at a relatively later position in the conversation text. For this reason, in one embodiment, the session intent of the first conversation text is determined based on the keywords of the statements at the relatively later position in the first conversation text.

[0030] For example, the first conversation text is as follows:

[0031] Obtain the last 3 statements adjacent to the closing statement "User: Okay, goodbye." from the above first conversation text: "Agent: Sir, I fully understand your difficulties... Please feel free to contact us at any time", and extract the keywords "tomorrow" and "repayment" from these statements, and then determine that the session intent is "The user promises to repay tomorrow".

[0032] In another embodiment, the first conversation text is the conversation text between the user and the agent. Correspondingly, the session intent of the first conversation text is determined by the following method: based on the sentence pattern of the first statement in the first conversation text and the third keyword of the first statement, determine the intent of the first statement; based on the sentence pattern of the second statement in the first conversation text and the fourth keyword of the second statement, determine the intent of the second statement; based on the intent of the first statement and the intent of the second statement, determine the session intent of the first conversation text. Wherein, the first statement is the statement belonging to the agent, and the second statement is the statement belonging to the user and located between the first statements.

[0033] The sentence pattern can include, for example, but not limited to: judgment sentence, declarative sentence, passive sentence, interrogative sentence, elliptical sentence, negative sentence, affirmative sentence, etc. The sentence pattern of the statement can be obtained through various sentence pattern detection techniques commonly used in the art, and the embodiments of the present application do not limit this. For example, words indicating sentence patterns (such as "ba", "bei", "ma", etc.) can be matched with the words in the statement to obtain the sentence pattern of the sentence pattern.

[0034] Since the keywords of the statement reflect the content of the statement, and the sentence pattern of the statement can assist in reflecting the tone of the conversant (such as affirmative, negative, interrogative, rhetorical question, etc.), the intent of the statement can be obtained by combining the two. For example, if the statement contains the keyword "repayment date" and the sentence pattern of the statement is an interrogative sentence, it can be determined that the intent of the statement is "asking about the repayment date".

[0035] After obtaining the intent of each first statement, the session intent of the first conversation text can be determined based on the frequency of occurrence of the intent of each first statement and the intent of the second statement located after the first statement.

[0036] For example, in a resource recycling business scenario, agents often ask users whether they can return resources on time, and in most conversations, when the agent's inquiry receives an affirmative answer from the user, the call is usually ended; when the agent's inquiry receives a negative answer from the user, the agent usually conducts a second or even more rounds of inquiries, such as repeating the same words or changing the sentence structure. To this end, if the intention of the first sentence is "asking the user whether they can return the resources on time", and the intention of the second sentence after the first sentence is an affirmative answer to repaying on time, then the conversation intention of the first conversation text is determined to be "promoting the user to commit to returning the resources on time"; if the intention of the second sentence after the first sentence is a negative answer or an uncertain answer to returning the resources on time, then determine whether the intention "asking the user whether they can return the resources on time" appears in the first sentence after the second sentence, and if this intention appears, then determine the conversation intention of the first conversation text to be "promoting the user to commit to returning the resources on time".

[0037] In the above implementation, the conversation intention is determined more accurately by combining the sentence patterns and keywords of the agent's sentences and the sentence patterns and keywords of the user's sentences in the first conversation text.

[0038] As mentioned above, in business scenarios, such as resource recovery business scenarios, the parties to the conversation usually follow the set conversation process when conducting the conversation until the final conversation intention is reached. The conversation process includes the intentions expressed by the parties to the conversation to achieve the conversation intention. In an embodiment of the present application, the first conversation process refers to the conversation process followed by the formation of the first conversation text. The first conversation process includes multiple process nodes. Each process node corresponds to a first intention. These first intentions are the intentions that the first conversation text may include.

[0039] For example, Figure 2 An example of a first conversation flow is shown. The first conversation flow includes Figure 1 ~Intention 11 corresponds to the process nodes respectively, among which, intention Figure 1 ~ Figure 4 The corresponding process nodes are used to implement the conversation meaning Figure 1 , and Figure 1 ~ Figure 3 And Meaning Figure 5 ~The process node corresponding to intent 9 is used to implement the conversation intent Figure 2 Among them, Figure 1 ~Intention 11 and conversational intention Figure 1 ~ Conversational meaning Figure 2 As shown below: meaning Figure 1 :Verify user identity meaning Figure 2 :User confirms identity meaning Figure 3 : Ask whether you can repay on time meaning Figure 4 :User confirms repayment on time meaning Figure 5 :The user has not confirmed that the repayment will be made on time Intention 6: Inform the consequences of late repayment Intention 7: User applies for delayed repayment date Intention 8: Agree to a 1-day delay Intention 9: User commits to delay repayment Intent 10: User denies identity Intent 11: End the call Conversational meaning Figure 1 :Users promise to repay on time Conversational meaning Figure 2 :Users promise to delay repayment for 1 day The first session flow may be obtained in various appropriate ways, which is not limited in this embodiment of the present application.

[0040] Each conversation scenario has a corresponding, pre-set plurality of second conversation flows, each second conversation flow includes a plurality of flow nodes of the conversation scenario, and each flow node corresponds to an intention. To this end, in one embodiment, any second conversation flow can be selected from the plurality of second conversation flows of the conversation scenario to which the first conversation text belongs as the first conversation flow.

[0041] In another embodiment, a second conversation flow having a corresponding conversation intention identical to that of the first conversation text may be selected from a plurality of second conversation flows of the conversation scenario to which the first conversation text belongs as the first conversation flow.

[0042] For example, the conversation scenario to which the first conversation text belongs is a resource recovery business scenario, and the corresponding multiple second conversation processes include: conversation process 1, conversation process 2, and conversation process 3. Assuming that the conversation intention of the first conversation text is that the user promises to return the resources on time, and the conversation intention corresponding to conversation process 1 includes the user's promise to return the resources on time, then conversation process 1 is determined as the first conversation process.

[0043] In another embodiment, in order to make the first conversation flow more closely match the actual conversation flow of the first conversation text, so that the first text processing model determined based on this can be used to more accurately identify the intention of the first conversation text, the first conversation flow is obtained in the following manner: Step A1, obtaining a plurality of second conversation processes of the conversation scenario to which the first conversation text belongs.

[0044] Step A2, matching the first keyword of the first conversation text with the second keyword corresponding to the process node in each second conversation process, to obtain a second matching degree between the first conversation text and each second conversation process.

[0045] The first keyword refers to the keyword in the first conversation text. For each second conversation process, each process node in the second conversation process also has a corresponding keyword, called the second keyword. For each process node, the second keyword corresponding to the process node refers to the keyword used to describe the first intention corresponding to the process node. The second keyword corresponding to each process node can be pre-set according to actual needs. For example, if the first intention corresponding to a process node is "query resource return date", the second keywords corresponding to the process node include "query", "check", "resource return deadline", "resource return date", "deadline", "how long until expiration", etc.

[0046] For each second conversation process, the first keyword is matched with the second keyword corresponding to the process node in the second conversation process to obtain the number of process nodes in the second conversation process that match the first keyword; based on the number, the second matching degree between the first conversation text and the second conversation process is determined.

[0047] For example, for each process node in the second conversation process, if the second keyword corresponding to the process node matches the first keyword, then it is determined that the process node matches the first keyword. The above number is positively correlated with the first matching degree. Exemplarily, the above number can be used as the first matching degree.

[0048] Step A3, selecting, from multiple second conversation flows, a second conversation flow whose second matching degree is greater than or equal to the first preset matching degree and whose corresponding conversation intention is the same as the conversation intention of the first conversation text as the first conversation flow.

[0049] For example, the conversation scenario to which the first conversation text belongs is a resource recovery business scenario, and the corresponding multiple second conversation processes include: conversation process 1, conversation process 2, and conversation process 3. Assuming that the second matching degree between conversation process 2 and the first conversation text is greater than or equal to the first preset matching degree, and the conversation intention corresponding to conversation process 2 is the same as the first conversation intention of the first conversation text, conversation process 2 is determined as the first conversation process.

[0050] S106: Match the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature.

[0051] The first conversation process includes multiple process nodes, each process node corresponds to a first intent, so after extracting features for each first intent, the second text features corresponding to each first intent can be obtained. Optionally, the first intent corresponding to each process node and the second text features of the first intent are known.

[0052] The purpose of matching each first text feature with each second text feature is to determine which text processing models can extract the second text feature, or the first text feature that matches the second text feature, so that the text processing model that can obtain these text features is determined as the first text processing model.

[0053] Optionally, when there is one second text feature, there is also only one first text feature that matches the second text feature. The text feature may be obtained through one text processing model or through multiple text processing models. In this case, the number of first text processing models is one, but there may be many first text processing models.

[0054] Optionally, when there are multiple second text features, there are also multiple first text features that match the second text features. Each text feature may be obtained through one text processing model or through multiple text processing models. In this case, there are multiple first text processing models, and the final result may be a model combination, in which each text processing model in the model combination is used to extract a first text feature that matches the second text feature. There may also be multiple model combinations, and the first text features finally obtained by each model combination are the same.

[0055] S108: Determine, according to the first matching degree, a first text feature that matches the second text feature from the first text features.

[0056] The matching of two text features may be achieved by using various matching techniques, such as calculating the distance between the vectors of the two text features, etc., which is not limited in the embodiments of the present application.

[0057] For each second text feature, after obtaining the first matching degree between each first text feature and the second text feature, a first text feature whose first matching degree with the second text feature is greater than or equal to a second preset matching degree is selected from multiple first text features as the first text feature matching the second text feature.

[0058] For example, the above-mentioned multiple first text features include text feature 1, text feature 2 and text feature 3, where the first matching degree between text feature 1 and the second text feature is greater than or equal to the second preset matching degree, then text feature 1 is determined as the first text feature matching the second text feature, that is, text feature 1 can be used to determine the first intention corresponding to the second text feature.

[0059] S110: Determine a first text processing model corresponding to the matched first text feature from a plurality of text processing models.

[0060] Specifically, the multiple text processing models include text processing model 1 to text processing model n, wherein the matched first text feature is extracted by text processing model 1 and text processing model 2, and text processing model 1 and text processing model 2 are determined as the first text processing model.

[0061] S112, performing intent recognition on the first conversation text based on the first text processing model to obtain a second intent of the first conversation text.

[0062] Specifically, the above S112 may include the following steps: S1101, based on the first text processing model, extract features from the first conversation text to obtain third text features.

[0063] As an example, when the number of the first text processing model is one, feature extraction may be performed on each sentence in the first conversation text based on the first text processing model to obtain the third text feature.

[0064] As another example, when there are multiple first text processing models, the above S1101 includes the following steps: Step A1, based on the first conversation process, determine the first order of the first intention corresponding to each first text processing model.

[0065] The first intention is obtained based on the first text feature extracted by the corresponding first text processing model.

[0066] For example, Figure 2 As an example of the first conversation process shown in FIG. 1 , assuming that the first text processing model includes text processing model 1 to text processing model 6, the first text feature extracted based on text processing model 1 can be obtained. Figure 1 Based on the first text feature extracted by text processing model 2 and text processing model 3, the meaning Figure 2 Based on the first text feature extracted by text processing model 4 and text processing model 5, the meaning Figure 3 Based on the first text feature extracted by the text processing model 6, the meaning Figure 4 ,meaning Figure 1 ~ Figure 4 The order of the corresponding process nodes in the first session process is as follows: Figure 1 → Figure 2 → Figure 3 → Figure 4 .

[0067] Step A2: Based on the first order, multiple first text processing models are combined to obtain at least one first combination.

[0068] For example, continuing with the above example, Figure 1 → Figure 2 → Figure 3 → Figure 4 By combining text processing models 1 to 6 in the order of , we can get the following four first combinations: The first combination 1: text processing model 1, text processing model 2, text processing model 4, text processing model 6; The first combination 2: text processing model 1, text processing model 3, text processing model 4, text processing model 6; The first combination 3: text processing model 1, text processing model 2, text processing model 5, text processing model 6; The first combination 4: text processing model 1, text processing model 3, text processing model 5, text processing model 6.

[0069] Step A3: Determine a second combination matching the first conversation text from at least one first combination.

[0070] In the above step A3, as an example, any first combination can be selected as the second combination matching the first conversation text.

[0071] As another example, for each first combination, feature extraction is performed on the second conversation text based on the first combination to obtain multiple fourth text features, and each fourth text feature is extracted by processing a first text; based on the multiple fourth text features, the third intention of the second conversation text is determined; based on the third intention of the second conversation text and the intention label of the second conversation text, the score of the first combination is determined; and a first combination with a score greater than or equal to a preset score is selected from at least one first combination as a second combination that matches the first conversation text.

[0072] The second conversation text refers to a conversation text similar to the first conversation text. For example, the second conversation text and the first conversation text belong to the same conversation scene, or the second conversation text and the first conversation text belong to the same conversation scene and the text length is the same as the first conversation text, or the second conversation text is the same as the first conversation flow matched by the second conversation text, etc., which is not limited in the embodiments of the present application.

[0073] For example, taking the first combination 1 as an example, since the meaning corresponding to the text processing model 1 Figure 1 The sentences usually appear in the first 1 / 4 position of a conversation text, so the sentences in the first 1 / 4 position of the second conversation text are input into the text processing model 1 for feature extraction to obtain the corresponding fourth text feature. Based on the fourth text feature, the intention of the sentences in the first 1 / 4 position can be determined.

[0074] Similarly, since the meaning of text processing model 2 Figure 2 For a sentence that usually appears in the middle front 1 / 4 of a conversation text, the sentence in the middle front 1 / 4 of the second conversation text is input into the text processing model 2 to obtain the corresponding fourth text feature. Based on the fourth text feature, the intention of the sentence in the middle front 1 / 4 can be determined.

[0075] Since the meaning of text processing model 4 Figure 3 A sentence that usually appears in the middle and back 1 / 4 of a conversation text is input into the text processing model 4 to obtain the corresponding fourth text feature. Based on the fourth text feature, the intention of the sentence in the middle and back 1 / 4 can be determined.

[0076] Since the text processing model 6 corresponds to Figure 4 The sentence that usually appears in the last 1 / 4 of a conversation text is input into the text processing model 6 to obtain the corresponding fourth text feature. Based on the fourth text feature, the intention of the sentence in the last 1 / 4 can be determined.

[0077] Furthermore, the intentions of these sentences are spliced ​​in chronological order to obtain the third intention of the second conversation text.

[0078] The intention tag of the second conversation text refers to the intention annotated for the second conversation text.

[0079] The score of the first combination is used to indicate the accuracy of the first combination in identifying the intent of the second conversation text, and can be used as a reference for the accuracy of the first conversation text in identifying the intent. The score of the first combination can be determined in various appropriate ways, which is not limited in the present embodiment.

[0080] As an example, a similarity calculation is performed between the third intent of the second conversation text and the intent label, and the calculation result is used as the score of the first combination.

[0081] For example, the third intention of the second conversation text includes "verify user identity", "user confirms identity", and "ask when to repay", and the intention tags of the second conversation text include "verify whether the user is borrowing", "user confirms borrowing", and "ask about the repayment date", then the similarity between the two is determined to be 90%, and then the score of the first combination is determined to be 90 points.

[0082] As another example, the second conversation text and its third intention may be input into a pre-trained evaluation model to obtain a third matching degree between the second conversation text and its third intention, and then the third matching degree is determined as the score of the first combination. The evaluation model is obtained by training the model using the sample text and its intention as input and the matching degree between the sample text and its intention as output.

[0083] As another example, a first logical relationship between the third intentions of the second conversation text is determined; a second logical relationship between the intention tags of the second conversation text is determined; and the first logical relationship is compared with the second logical relationship to obtain a score of the first combination.

[0084] Specifically, the logical relationship between intentions can be expressed by using the inference relationship between texts, which can be obtained through various logical relationship analysis techniques in the art. Figure 1 "Expressing understanding for the lack of cash flow" and meaning Figure 2 The overlapping part between "in view of the fact that it cannot be turned over, apply for delayed return of resources" is "turnover", based on which it can be analyzed that the logical relationship between the two intentions is a causal relationship.

[0085] The score of the first combination is positively correlated with the similarity between the first logical relationship and the second logical relationship. Exemplarily, the similarity between the first logical relationship and the second logical relationship can be used as the score of the first combination.

[0086] In the above method, the comparison result between the above-mentioned first logical relationship and the above-mentioned second logical relationship can reflect the accuracy and flow smoothness of the first combination for intention recognition, and the score of the first combination is determined based on this, so as to select the first combination with a score greater than or equal to the preset score as the first model combination, which can ensure that the first model combination can be adapted to the logic of the first conversation text, thereby determining that the intention of the first conversation text is more accurate and the logic is smoother.

[0087] Step A4: Based on the first text processing model in the second combination, feature extraction is performed on the first conversation text to obtain a third text feature.

[0088] Specifically, for each first text processing model in the second combination, based on the position where the first intention corresponding to the first text processing model usually appears in a conversation text, the sentence corresponding to the first text processing model is determined from the first conversation text, and the sentence is input into the first text processing model for feature extraction to obtain the corresponding third text feature.

[0089] S1102: Determine a second intention of the first conversation text based on the third text feature.

[0090] For example, assuming that the second combination is the first combination 1, since the meaning of the text processing model 1 Figure 1 The sentence usually appears in the first 1 / 4 position of a conversation text, so the sentence in the first 1 / 4 position of the first conversation text is input into the text processing model 1 for feature extraction to obtain the corresponding third text feature. Based on the third text feature, the intention of the sentence in the first 1 / 4 position can be determined. For example, if the third text feature contains the entity "Product A" and the text label "inquiry", the intention of the sentence in the first 1 / 4 position can be determined to be "inquiry about the price of Product A".

[0091] Similarly, since the meaning of text processing model 2 Figure 2 For sentences that usually appear in the second 1 / 4 position of a conversation text, the sentence in the second 1 / 4 position of the first conversation text is input into the text processing model 2 to obtain the corresponding third text feature. Based on the third text feature, the intention of the sentence in the second 1 / 4 position can be determined.

[0092] Since the meaning of text processing model 4 Figure 3 For sentences that usually appear at the third 1 / 4 position of a conversation text, the sentence at the third 1 / 4 position of the first conversation text is input into the text processing model 4 to obtain the corresponding third text feature. Based on the third text feature, the intention of the sentence at the third 1 / 4 position can be determined.

[0093] Since the text processing model 6 corresponds to Figure 4 For a sentence that usually appears at the fourth 1 / 4 position of a conversation text, the sentence at the fourth 1 / 4 position of the first conversation text is input into the text processing model 6 to obtain the corresponding third text feature. Based on the third text feature, the intention of the sentence at the fourth 1 / 4 position can be determined.

[0094] Furthermore, the intentions of these sentences are concatenated in chronological order to obtain the second intention of the first conversation text.

[0095] The embodiment of the present application shows some implementation methods of the above S110. Of course, it should be understood that the above S110 can also be implemented in other ways, and the embodiment of the present application does not limit this.

[0096] In another embodiment, after the above S110, the above intention recognition method may further include: S112, create a first node corresponding to each first intent, and a second node corresponding to each first text processing model in the second combination.

[0097] S114: Based on the connection relationship between the process nodes corresponding to each first intention, create a first connection edge between the first nodes corresponding to different first intentions.

[0098] S116: Create a second connection edge between the second node and the first node based on the first intention obtained from the first text feature extracted by each first text processing model.

[0099] S118, generating a knowledge graph based on the first node, the second node, the first connecting edge and the second connecting edge.

[0100] For example, Figure 2 As an example of the first conversation process shown in FIG. 1 , it is assumed that the second combination includes text processing model 1, text processing model 2, and text processing model 4, wherein text processing model 1 corresponds to the meaning Figure 1 , text processing model 2 corresponds to Figure 2 , text processing model 4 corresponds to Figure 3 , text processing model 6 corresponds to Figure 4 Through the above method, we can generate Figure 3 The knowledge graph shown in FIG. 1 , wherein the circular node represents the first node, the rectangular node represents the second node, the solid line represents the first connection table, and the dotted line represents the second connection edge.

[0101] In addition, the knowledge graph may also include more nodes and connecting edges, which can be set according to actual needs, and the embodiments of the present application do not limit this. For example, the knowledge graph may also include but is not limited to at least one of the following: a third node corresponding to the conversation intention in the first conversation process, a third connecting edge between the third node and the first node, a fourth node representing the input information of the first text processing model, a fifth node representing the third text feature extracted by the first text processing model, a third connecting edge between the fourth node and the second node, a fourth connecting edge between the fifth node and the second node, and so on.

[0102] The knowledge graph created in the above manner can intuitively reflect the relationship between the first conversation process, the intentions corresponding to the process nodes in the first conversation process, and the first text processing model, thereby facilitating the business party to perform related business processing.

[0103] The intention recognition method provided by one or more embodiments of the present application takes into account that in a conversation scenario, the logical relationship between the sentences contained in the conversation text is complex, and it is difficult to accurately recognize the intention of the conversation text through the existing intention recognition model, and the text features of the conversation text are fine-grained features containing semantic information. For this reason, a text processing model is used to extract features from the conversation text, and the intention of the conversation text can be accurately identified based on the extracted text features. On this basis, considering that there are multiple existing text processing models, and the performance of each text processing model is different, for this reason, a text processing model suitable for the conversation text is selected from multiple text processing models for the intention recognition of the conversation text. Specifically, on the one hand, a plurality of first text features are obtained by extracting features from the first conversation text through multiple text processing models, and each first text feature is extracted by a text processing model, and the plurality of first text features can be used to determine the intention of the first conversation text; on the other hand, the first conversation process is determined based on the conversation intention of the first conversation text, and the first conversation process includes multiple process nodes, each process node corresponds to a first intention, and each first intention corresponds to a second text feature. These first intentions are the intentions that the first conversation text may contain. On this basis, based on the first matching degree between each first text feature and each second text feature, we can reversely deduce which text features are needed to obtain the possible intention of the first conversation text, that is, determine the first text feature that matches the second text feature from multiple first text features. The first text processing model corresponding to this type of first text feature is the text processing model suitable for the first conversation text. Further, by performing intent recognition on the first conversation text based on the first text processing model, the second intention of the first conversation text can be accurately identified.

[0104] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0105] Based on the same inventive concept, the present application embodiment also provides an intention recognition device. Figure 4 , which is a schematic diagram of the structure of an intention recognition device provided by an embodiment of the present application. In a software implementation, the intention recognition device 400 may include: a first processing module 410, a first determination module 420, a first matching module 430, a second determination module 440, a third determination module 450 and a first recognition module 460.

[0106] The first processing module 410 is used to perform feature extraction through multiple text processing models to obtain multiple first text features, where each first text feature is extracted by one text processing model.

[0107] The first determination module 420 is used to determine a first conversation process based on the conversation intention of the first conversation text, where the first conversation process includes multiple process nodes, each process node corresponds to a first intention, and each first intention corresponds to a second text feature.

[0108] The first matching module 430 is used to match the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature.

[0109] The second determining module 440 is configured to determine, according to the first matching degree, a first text feature matching the second text feature from among the first text features.

[0110] The third determination module 450 is used to determine a first text processing model corresponding to the matched first text feature from the multiple text processing models.

[0111] The first recognition module 460 is used to perform intent recognition on the first conversation text based on the first text processing model to obtain a second intent of the first conversation text.

[0112] In another embodiment, the first determining module is used to: Acquire multiple second conversation processes of the conversation scenario to which the first conversation text belongs; Matching the first keyword of the first conversation text with the second keyword corresponding to the process node in each second conversation process to obtain a second matching degree between the first conversation text and each second conversation process; From the multiple second conversation flows, a second conversation flow whose second matching degree is greater than or equal to the first preset matching degree and whose corresponding conversation intention is the same as the conversation intention of the first conversation text is taken as a first conversation flow matching the first conversation text.

[0113] In another embodiment, the first conversation text is a conversation text between the user and the agent; The conversation intention of the first conversation text is determined in the following manner: Determine the intention of the first sentence based on the sentence pattern of the first sentence in the first conversation text and the third keyword of the first sentence; the first sentence is a sentence belonging to the seat; Determining the intention of a second sentence based on a sentence pattern of a second sentence in the first conversation text and a fourth keyword of the second sentence, wherein the second sentence belongs to the user and is located after the first sentence; Based on the intent of the first sentence and the intent of the second sentence, a conversation intent of the first conversation text is determined.

[0114] In another embodiment, the first identification module is used to: Based on the first text processing model, feature extraction is performed on the first conversation text to obtain a third text feature; Based on the third text feature, a second intention of the first conversation text is determined.

[0115] In another embodiment, the number of the first text processing models is multiple; When the first recognition module extracts features from the first conversation text based on the first text processing model to obtain third text features, the first recognition module performs the following steps: Based on the first conversation process, determining a first order of first intents corresponding to each first text processing model, where the first intent is obtained based on a first text feature extracted from the corresponding first text processing model; Based on the first order, combining a plurality of the first text processing models to obtain at least one first combination; Determining, from the at least one first combination, a second combination matching the first conversation text; Based on the first text processing model in the second combination, feature extraction is performed on the first conversation text to obtain a third text feature.

[0116] In another embodiment, when the first recognition module determines the second combination matching the first conversation text from the at least one first combination, the first recognition module performs the following steps: For each first combination, extracting features from the second conversation text based on the first combination to obtain a plurality of fourth text features, each of which is extracted by a first text processing model; Determining a third intention of the second conversation text based on the plurality of fourth text features; determining a score of the first combination based on the third intent of the second conversation text and the intent label of the second conversation text; A first combination having a score greater than or equal to a preset score is selected from the at least one first combination as a second combination matching the first conversation text.

[0117] In another embodiment, when the first combination module determines the score of the first combination based on the third intent of the second conversation text and the intent tag of the second conversation text, the first combination module performs the following steps: determining a first logical relationship between the third intentions of the second conversation text; Determining a second logical relationship between the intention tags of the second conversation text; The first logical relationship is compared with the second logical relationship to obtain a score of the first combination.

[0118] Obviously, the intention recognition device 400 provided in the embodiment of the present application can be used as the above Figure 1 The execution subject of the intention recognition method shown in the figure can realize the intention recognition device in Figure 1 The functions realized are as follows. Since the principles are the same, they will not be described in detail.

[0119] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 5 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0120] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0121] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0122] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an intention recognition device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Extracting features through multiple text processing models to obtain multiple first text features, each first text feature being extracted by one text processing model; Determine a first conversation process based on the conversation intent of the first conversation text, where the first conversation process includes a plurality of process nodes, each process node corresponds to a first intent, and each first intent corresponds to a second text feature; Matching the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature; Determining, according to the first matching degree, a first text feature that matches the second text feature from the first text feature; Determine a first text processing model corresponding to the matched first text feature from the multiple text processing models; The first conversation text is subjected to intent recognition based on the first text processing model to obtain a second intent of the first conversation text.

[0123] The above application Figure 1The method performed by the intention recognition device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0124] The electronic device may also perform Figure 1 The method and the intention recognition device are implemented in Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0125] Of course, in addition to software implementation, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0126] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations: Extracting features through multiple text processing models to obtain multiple first text features, each first text feature being extracted by one text processing model; Determine a first conversation process based on the conversation intent of the first conversation text, where the first conversation process includes a plurality of process nodes, each process node corresponds to a first intent, and each first intent corresponds to a second text feature; Matching the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature; Determining, according to the first matching degree, a first text feature that matches the second text feature from the first text feature; Determine a first text processing model corresponding to the matched first text feature from the multiple text processing models; The first conversation text is subjected to intent recognition based on the first text processing model to obtain a second intent of the first conversation text.

[0127] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the intent identification method provided in the embodiment of the present application.

[0128] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0129] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0130] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0132] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for intention recognition, characterized in that: include: Extracting features from the first conversation text using multiple text processing models to obtain multiple first text features, each of which is extracted by one text processing model; Determine a first conversation process based on a conversation intent of the first conversation text, wherein the first conversation process includes a plurality of process nodes, each process node corresponds to a first intent, and each first intent corresponds to a second text feature; Matching the first text feature with the second text feature to obtain a first matching degree between each first text feature and each second text feature; Determining, according to the first matching degree, a first text feature that matches the second text feature from the first text feature; Determine a first text processing model corresponding to the matched first text feature from the multiple text processing models; The first conversation text is subjected to intent recognition based on the first text processing model to obtain a second intent of the first conversation text.

2. The method according to claim 1, characterized in that: The determining of the first conversation process based on the conversation intention of the first conversation text includes: Acquire multiple second conversation processes of the conversation scenario to which the first conversation text belongs; Matching the first keyword of the first conversation text with the second keyword corresponding to the process node in each second conversation process to obtain a second matching degree between the first conversation text and each second conversation process; From the multiple second conversation flows, a second conversation flow whose second matching degree is greater than or equal to the first preset matching degree and whose corresponding conversation intention is the same as the conversation intention of the first conversation text is taken as a first conversation flow matching the first conversation text.

3. The method according to claim 1, characterized in that The first conversation text is a conversation text between the user and the agent; the conversation intention of the first conversation text is determined by: Determine the intention of the first sentence based on the sentence pattern of the first sentence in the first conversation text and the third keyword of the first sentence, where the first sentence belongs to the agent; Determining the intention of a second sentence based on a sentence pattern of a second sentence in the first conversation text and a fourth keyword of the second sentence, wherein the second sentence belongs to the user and is located after the first sentence; Based on the intent of the first sentence and the intent of the second sentence, a conversation intent of the first conversation text is determined.

4. The method according to claim 1, characterized in that: The performing intent recognition on the first conversation text based on the first text processing model to obtain a second intent of the first conversation text includes: Based on the first text processing model, feature extraction is performed on the first conversation text to obtain a third text feature; Based on the third text feature, a second intention of the first conversation text is determined.

5. The method according to claim 4, characterized in that The number of the first text processing models is multiple; and the feature extraction of the first conversation text based on the first text processing model to obtain the third text feature includes: Based on the first conversation process, determining a first order of first intents corresponding to each first text processing model, where the first intent is obtained based on a first text feature extracted from the corresponding first text processing model; Based on the first order, combining a plurality of the first text processing models to obtain at least one first combination; Determining, from the at least one first combination, a second combination matching the first conversation text; Based on the first text processing model in the second combination, feature extraction is performed on the first conversation text to obtain a third text feature.

6. The method according to claim 5, characterized in that The step of determining, from the at least one first combination, a second combination matching the first conversation text comprises: For each first combination, extracting features from the second conversation text based on the first combination to obtain a plurality of fourth text features, each of which is extracted by a first text processing model; Determining a third intention of the second conversation text based on the plurality of fourth text features; determining a score of the first combination based on the third intent of the second conversation text and the intent label of the second conversation text; A first combination having a score greater than or equal to a preset score is selected from the at least one first combination as a second combination matching the first conversation text.

7. The method according to claim 6, characterized in that The determining the score of the first combination based on the third intent of the second conversation text and the intent label of the second conversation text includes: determining a first logical relationship between the third intentions of the second conversation text; Determining a second logical relationship between the intention tags of the second conversation text; The first logical relationship is compared with the second logical relationship to obtain a score of the first combination.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the intention recognition method as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the intention recognition method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute part or all of the steps in the intention recognition method according to any one of claims 1 to 7.