A long text-based intent recognition method, device, equipment and storage medium

CN115688769BActive Publication Date: 2026-09-22SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211436516.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-09-22
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

[0004]上述语音交互方法是只能适用于实时的短对话场景,即只适用于短文本的单一意图识别,无法适用于长文本的多层次的意图识别

Benefits of technology

[0039]本发明实施例的技术方案,通过获取用户发送的长文本;将所述长文本拆分为至少两个子句;通过预设知识库模型,分别对各子句进行意图识别,以得到多个意图结果;根据多个意图结果确定所述长文本的主业务场景,解决现有技术无法准确的对长文本进行多层次意图识别的问题,实现对长文本进行全面准确的意图识别的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115688769B_ABST
    Figure CN115688769B_ABST
Patent Text Reader

Abstract

The application discloses a long-text-based intention recognition method and device, equipment and a storage medium. The method comprises the following steps: acquiring a long text sent by a user; splitting the long text into at least two clauses; performing intention recognition on each clause respectively through a preset knowledge base model to obtain multiple intention results; determining a main business scenario of the long text according to the multiple intention results; and inputting the main business scenario and each intention result into a preset reply model to generate a reply text. The method can perform multi-level semantic recognition on the long text based on the preset knowledge base model, recognize multiple intention results, and generate a reply text based on the multiple intention results, thereby solving the problem that the prior art cannot accurately perform multi-level intention recognition on the long text, and achieving the effect that the long text can be comprehensively and accurately recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to artificial intelligence technology, and in particular to an intent recognition method, apparatus, device and storage medium based on long text. Background Technology

[0002] With the widespread adoption of the internet and the globalization of information, online shopping has become an indispensable part of daily life. Cross-border e-commerce, as a new type of international trade, has also experienced rapid development due to its low cost, low risk, agility, and diversification. To provide consumers with more convenient consumer information and after-sales service, customer service has become crucial to the operation of cross-border e-commerce platforms.

[0003] Customer service in existing technologies is typically implemented based on voice interaction. Figure 1 A flowchart illustrating a voice interaction method provided by existing technology, such as... Figure 1 As shown, the system uses speech recognition to transcribe the user's voice into text; the semantic parsing module interprets the text into intents and slots; the dialogue management module selects the dialogue flow to be executed based on the intent; if the dialogue flow requires interaction with the user, the language generation module is triggered to generate natural language for interaction with the user; and the language synthesis module synthesizes the natural language into speech and broadcasts it to the user.

[0004] The above-mentioned voice interaction method is only applicable to real-time short dialogue scenarios, that is, it is only applicable to the single intent recognition of short texts, and cannot be applied to the multi-level intent recognition of long texts. Summary of the Invention

[0005] This invention provides an intent recognition method, apparatus, device, and storage medium based on long text, so as to achieve comprehensive and accurate intent recognition of long text and generate corresponding response text.

[0006] In a first aspect, embodiments of the present invention provide an intent recognition method based on long text, characterized in that it includes:

[0007] Get the long text sent by the user;

[0008] The long text is split into at least two clauses;

[0009] By using a pre-set knowledge base model, the intent of each clause is identified to obtain multiple intent results;

[0010] The main business scenario of the long text is determined based on multiple intent results;

[0011] The main business scenario and the results of each intent are input into the preset response model to generate the response text.

[0012] Furthermore, the main business scenario and the results of each intent are input into a preset response model to generate response text, including:

[0013] The main business scenario, the results of each intent, and the user profile data of the user are input into the preset response model to generate the response text.

[0014] Furthermore, the main business scenario and the results of each intent are input into a preset response model to generate response text, including:

[0015] The main business scenario, the results of each intent, and the user sentiment factors determined based on the long text are input into a preset response model to generate a response text.

[0016] Furthermore, the preset knowledge base model includes at least two business scenarios; each business scenario corresponds to at least one scenario map element; each scenario map element corresponds to at least one standard question; each standard question corresponds to at least one extended question; and each standard question corresponds to at least one keyword element vocabulary.

[0017] Furthermore, the business scenarios include at least one of the following: returns and exchanges, goods delivery expediting, problem complaints, and product inquiries; the scenario map elements include one of the following: problem description, expected solution, emotional expression, and evaluation.

[0018] Furthermore, by using a pre-defined knowledge base model, intent recognition is performed on each clause to obtain multiple intent results, including:

[0019] Based on the extended questions of the business scenario in the pre-defined knowledge base model, similarity matching is performed with each clause;

[0020] If the similarity matching result meets the set requirements, then obtain the standard question and scene map elements corresponding to the matched extended question;

[0021] If the similarity matching result does not meet the set requirements, then based on the key element words of the business scenario in the preset knowledge base model, the similarity matching is performed with the clause respectively, and the standard question and scene map elements corresponding to the matched key element words are obtained.

[0022] The acquired standard questions and scene map elements are determined as the intent results of the clauses.

[0023] Furthermore, the intent results include the standard questions and scene map elements matched by the clauses in the preset knowledge base model, as well as their respective matching scores; then, based on multiple intent results, the main business scenario of the long text is determined to include:

[0024] Based on the standard questions and scene map elements matched by each clause, as well as their respective matching scores, the main business scenario corresponding to the long text is determined.

[0025] Furthermore, the long text is the email text initiated by the user to customer service.

[0026] Furthermore, before splitting the long text into at least two clauses, the process also includes:

[0027] The long text is then subjected to layout recognition and language normalization.

[0028] Secondly, embodiments of the present invention also provide an intent recognition device based on long text, the device comprising:

[0029] The acquisition module is used to acquire long texts sent by users;

[0030] A splitting module is used to split the long text into at least two clauses;

[0031] The recognition module is used to identify the intent of each clause using a preset knowledge base model, so as to obtain multiple intent results;

[0032] The determination module is used to determine the main business scenario of the long text based on multiple intent results;

[0033] The generation module is used to input the main business scenario and the results of each intent into a preset response model to generate response text.

[0034] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0035] At least one processor; and

[0036] A memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the long text-based intent recognition method according to any embodiment of the present invention.

[0038] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute and implement the long text-based intent recognition method described in any embodiment of the present invention.

[0039] The technical solution of this invention involves acquiring a long text sent by a user; splitting the long text into at least two clauses; performing intent recognition on each clause using a preset knowledge base model to obtain multiple intent results; and determining the main business scenario of the long text based on the multiple intent results. This solves the problem that existing technologies cannot accurately perform multi-level intent recognition on long texts, and achieves the effect of comprehensive and accurate intent recognition on long texts. Attached Figure Description

[0040] Figure 1 A flowchart illustrating a voice interaction method provided by existing technology;

[0041] Figure 2 This is a flowchart illustrating an intent recognition method based on long text provided in Embodiment 1 of the present invention.

[0042] Figure 3 This is a flowchart illustrating an intent recognition method based on long text provided in Embodiment 2 of the present invention;

[0043] Figure 4 This is a flowchart illustrating an intent recognition method based on long text provided in Embodiment 3 of the present invention;

[0044] Figure 5 This is an example flowchart of an intent recognition method based on long text provided in Embodiment 4 of the present invention;

[0045] Figure 6 This is a schematic diagram of the structure of an intent recognition device based on long text provided in Embodiment 5 of the present invention;

[0046] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of the present invention. Detailed Implementation

[0047] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0048] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.

[0049] Example 1

[0050] Figure 2 This is a flowchart illustrating an intent recognition method based on long text provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where a chatbot responds to long texts sent by a user, and the method can be executed by an electronic device. Figure 2 As shown, the method specifically includes the following steps:

[0051] S110. Obtain the long text sent by the user.

[0052] Users can send long text messages in various ways, such as via email or text message. The content of these long text messages can include product descriptions and feedback.

[0053] In this embodiment, the method of obtaining long text sent by the user is not specifically limited. For example, long text emails sent by the user can be obtained from the system mailbox, or long text messages sent by the user can be obtained from chat software.

[0054] S120. The long text is split into at least two clauses.

[0055] Long texts can include content related to scenarios such as explanations of reasons, emotional expressions, and product reviews. Some users may use long texts to express multiple intentions and needs, and directly interpreting long texts semantically would result in the loss of some context and meaning. Therefore, it is necessary to break down long texts into clauses.

[0056] In this embodiment, long text can be divided into multiple clauses through sentence splitting. Each clause is a complete sentence. The specific method of long text splitting is not limited here; for example, long text can be split based on punctuation marks, or it can be split using a sliding window method.

[0057] It should be noted that before splitting the long text into at least two clauses, if the long text is an email, layout recognition and language normalization can be performed on the email; if the long text is a message, language normalization can be performed on the message. S130. Through a preset knowledge base model, intent recognition is performed on each clause to obtain multiple intent results.

[0058] In this embodiment, the preset knowledge base model can be a business scenario map pre-set based on expert experience or big data statistics. The preset knowledge base model may include a business scenario list, a standard question list, an extended question list, and a key element list. Specifically, the business scenario list may include at least two main scenarios; the scenario map element list may include at least one scenario map element; the extended question list may include at least one extended question; and the key element list may include at least one key element.

[0059] Furthermore, the preset knowledge base model includes at least two business scenarios; each business scenario corresponds to at least one scenario map element; each scenario map element corresponds to at least one standard question; each standard question corresponds to at least one extended question; and each standard question corresponds to at least one keyword element vocabulary.

[0060] Among them, business scenario can be understood as the business scenario of long text content; scenario map element can be understood as the element under the business scenario; standard question can be a sentence that clearly expresses the user's intent; extended question can be other expressions of standard question; key element can be slot value, and one standard question can correspond to multiple slot values.

[0061] The relationship between the standard question and the extended questions can be 1:N, where N is a positive integer greater than 1. For example, if the standard question is "goods damaged or defective", the corresponding extended questions can include "the received item is broken", "the received item is damaged", and "the received item is broken", and the corresponding key elements can include "broken", "damaged", and "broken", etc.

[0062] In one embodiment, the business scenario includes at least one of the following: returns and exchanges, goods delivery expediting, problem complaints, and product inquiries; the scenario map elements include one of the following: problem description, expected solution, emotional expression, and evaluation.

[0063] It should be noted that the scene map elements set for different business scenarios can be different. For example, the scene map elements set for a product consultation scenario may include product description, points of interest, and question categories.

[0064] For example, Table 1 shows an example of a preset knowledge base model:

[0065]

[0066] Table 1

[0067] In this embodiment, the process of performing intent recognition on each clause using a preset knowledge base model to obtain multiple intent results can include the following two methods:

[0068] Method 1: In the preset knowledge base model, perform intent recognition on each clause based on possible business scenarios to obtain multiple intent results.

[0069] Among them, the possible business scenarios can be the business scenarios that the long text may belong to based on the pre-estimated values ​​of each clause, and the number of possible business scenarios can be one or more.

[0070] Method 2: In the preset knowledge base model, perform intent recognition on each clause based on all business scenarios to obtain multiple intent results.

[0071] S140. Determine the main business scenario of the long text based on multiple intent results.

[0072] In this embodiment, based on the voting statistics of the matched business scenarios according to multiple intent results, the business scenario with the highest number of votes is taken as the main business scenario of the long text.

[0073] S150. Input the main business scenario and each intent result into the preset response model to generate response text.

[0074] The preset response model can be a pre-set serialization production model, such as a seq2seq model. The response text can be the text sent by the chatbot to the user; it can be the body of an email or the content of a message, meaning it can be sent to the user via email or a message.

[0075] In this embodiment, the determined main business scenario and each intention result can be input into the preset response model to generate response text; alternatively, the determined main business scenario, each intention result, and user profile data can be input into the preset response model to generate response text; alternatively, the determined main business scenario, each intention result, and user emotional factors can be input into the preset response model to generate response text.

[0076] In this embodiment, personalized dialogue can be generated based on the T5 model. Based on the text-to-text task, the corresponding response text and the confidence score for each response text can be output. The number of response texts can be one or more.

[0077] The technical solution of this embodiment first obtains a long text sent by the user; secondly, it splits the long text into at least two clauses; then, it uses a preset knowledge base model to perform intent recognition on each clause to obtain multiple intent results; next, it determines the main business scenario of the long text based on the multiple intent results; finally, it inputs the main business scenario and each intent result into a preset response model to generate a response text. This method can perform multi-level semantic recognition on long text based on a preset knowledge base model, and provide a response based on the identified intent results and the determined main scenario.

[0078] Optionally, the long text is the email text initiated by the user to customer service.

[0079] The long text refers to the longer text of the email sent by the user to customer service.

[0080] Optionally, before splitting the long text into at least two clauses, the method further includes: performing layout recognition and language normalization on the long text.

[0081] The layout recognition process can include extracting information such as the email body, email title, sender, and order number. Language normalization processing can include language identification and language conversion.

[0082] Since cross-border e-commerce platforms come from different countries, emails may be in different languages, such as English, German, French, and Spanish. Upon receiving an email, the system can automatically identify the language and then translate it into Chinese text for further processing. This avoids the need to maintain multiple knowledge bases and rely on language experts.

[0083] Optionally, the above method further includes: determining whether to manually review the response text based on the confidence level of the response text.

[0084] If the confidence level of the generated response text is greater than a preset value, then the response text will not undergo manual review; if the confidence level of the generated response text is less than the preset value, then the response text will undergo manual review. Manual review includes manually modifying and confirming the response text to obtain the final response text.

[0085] This embodiment determines whether manual review is required based on the confidence level of the response text, which can effectively reduce the number of manual reviews and save labor costs. Furthermore, it can effectively solve the problem of long waiting times for users caused by delayed responses due to the significant time required for manual review.

[0086] Example 2

[0087] Figure 3This is a flowchart illustrating an intent recognition method based on long text, provided in Embodiment 2 of the present invention. Embodiment 2 optimizes the methods described above. In this embodiment, a preset knowledge base model is used to perform intent recognition on each clause to obtain multiple intent results, further specifying the method. For details not covered in this embodiment, please refer to Embodiment 1.

[0088] like Figure 3 As shown in the schematic diagram of the intent recognition method based on long text provided in Embodiment 2 of the present invention, the method includes the following steps:

[0089] S210, Obtain the long text sent by the user.

[0090] S220. Perform layout recognition and language normalization on the long text.

[0091] S230. The long text is split into at least two clauses.

[0092] S240. Based on the extended questions of the business scenario in the preset knowledge base model, perform similarity matching with each clause.

[0093] In this step, similarity matching can be performed between each clause and each extended question of all business scenarios in the preset knowledge base model. That is, similarity matching is performed between each extended word of all business scenarios in the preset knowledge base model.

[0094] In this step, one or more possible business scenarios can be estimated in advance based on clauses. For example, for long email texts, the email subject and content are identified through layout recognition; element extraction is performed on the email subject and content, i.e., keywords are extracted using element extraction technology; and one or more possible business scenarios are estimated in advance based on the keywords.

[0095] Similarity matching can be used to calculate semantic similarity. It's understandable that each clause needs to undergo similarity matching, and the process is identical for each clause. The following explanation uses a single clause as an example.

[0096] It should be noted that the execution of S251 and S252 in the following text is not in any particular order, and one of them can be executed.

[0097] S251. If the similarity matching result meets the set requirements, then obtain the standard question and scene map elements corresponding to the matched extended question.

[0098] The similarity matching results can take various forms. They can include the matching score between the clause and the matched extended question, as well as the accuracy rate of the extended question matched by the clause. If a clause matches multiple extended questions, the extended question with the highest matching score can be selected as the matched extended question.

[0099] In this step, if the matching score of a clause with the matched extended question is greater than a preset threshold, the standard question and scene map elements corresponding to the matched extended question can be obtained from the preset knowledge base model.

[0100] For example, if the content of clause 1 is "I have tried to pull out the needle, but I can't.", after matching clause 1 with all the extended questions of all business scenarios in the preset knowledge base model, the matched extended question is "The shelf is broken and I can't pull it out," with a matching score of 0.8 and a preset threshold of 0.5. Since 0.8 > 0.5, the standard question "Goods damage failure" and the corresponding scenario map element "Problem description" corresponding to "The shelf is broken and I can't pull it out" can be obtained from the preset knowledge base model. If the content of clause 2 is "I am very disappointed. Can you send a replacement as soon as possible?", after matching clause 2 with all the extended questions of all business scenarios in the preset knowledge base model, the matched extended question is "Please send a new one as soon as possible," with a matching score of 0.6. Since 0.6 > 0.5, the standard question "Goods expediting" and the corresponding scenario map element "Expected solution" corresponding to "Please send a new one as soon as possible" can be obtained from the preset knowledge base model.

[0101] S252. If the similarity matching result does not meet the set requirements, then based on the key element words of the business scenario in the preset knowledge base model, perform similarity matching with the clause respectively, and obtain the standard question and scene map elements corresponding to the matched key element words.

[0102] In this step, if the matching score of a clause with the matched extended question is less than or equal to a preset threshold, then based on the key element words of the business scenario in the preset knowledge base model, similarity matching is performed with the elements of the clause, and the standard question and scene map elements corresponding to the matched key element words are obtained. If multiple key element words are matched after similarity matching, the key element word with the highest matching score is selected as the matched key element word.

[0103] For example, if the content of clause 3 is "or I can send it back and get a full refund", clause 3 is matched with each extended question of all business scenarios in the preset knowledge base model, and the matched extended question is "apply for a full refund". The matching score is 0.3. Since 0.3 < 0.5, the element "full refund" of clause 3 can be matched with each key element in the preset knowledge base model to determine the matched key element as "refund". The standard question corresponding to the key element "refund" is obtained from the preset knowledge base model as "refund" and the corresponding scenario map element is "expected solution".

[0104] S260. The obtained standard questions and scene map elements are determined as the intent result of the clause.

[0105] For example, if the standard question obtained is "refund" and the scene map element obtained is "expected solution", then "expected solution is refund" can be used as the intent result of clause 3.

[0106] S270. Determine the main business scenario of the long text based on multiple intent results.

[0107] In this step, the business scenario that each clause hits can be determined based on the intent result of each clause, and the business scenario with the most hits is taken as the main business scenario of the long text.

[0108] For example, based on the standard question and scene map elements matched by clause 1, the business scenario matched by clause 1 can be determined to be: returns and exchanges; based on the standard question and scene map elements matched by clause 2, the business scenario matched by clause 2 can be determined to be: goods delivery expediting; based on the standard question and scene map elements matched by clause 3, the business scenario matched by clause 2 can be determined to be: returns and exchanges; since two out of the three clauses match the business scenario of "returns and exchanges", "returns and exchanges" can be taken as the main business scenario.

[0109] In one embodiment, the intent result includes the standard questions and scene map elements matched by the clauses in the preset knowledge base model, as well as their respective matching scores. Then, determining the main business scenario of the long text based on multiple intent results includes: determining the main business scenario corresponding to the long text based on the standard questions and scene map elements matched by each clause, as well as their respective matching scores.

[0110] For example, if the business scenarios with the most matched clauses are determined to be "returns and exchanges" and "goods delivery expediting" based on the standard questions and scene map elements matching each clause, then the business scenario with the highest total matching score can be taken as the main business scenario corresponding to the long text. S280, Input the main business scenario and each intent result into the preset response model to generate the response text.

[0111] The second embodiment of the present invention provides an intent recognition method based on long text, which specifies the process of generating multiple intent results and the process of determining the main business scenario. The method can match each clause according to the extended questions, standard questions, key elements and map scene elements in the preset knowledge base model, so as to more accurately and comprehensively determine the intent results and the main business scenario.

[0112] Example 3

[0113] Figure 4 This is a flowchart illustrating a long-text-based intent recognition method according to Embodiment 3 of the present invention. Embodiment 3 optimizes the methods described above. In this embodiment, the main business scenario and the results of each intent are input into a preset response model to generate response text, further optimizing the process. For details not covered in this embodiment, please refer to Embodiments 1 and 2.

[0114] like Figure 4 As shown in the schematic diagram of the intent recognition method based on long text provided in Embodiment 2 of the present invention, the method includes the following steps:

[0115] S310, Get the long text sent by the user.

[0116] S320. Split the long text into at least two clauses.

[0117] S330. Using a pre-set knowledge base model, perform intent recognition on each clause to obtain multiple intent results.

[0118] S340. Determine the main business scenario of the long text based on multiple intent results.

[0119] In the following steps, S351 and S352 do not distinguish the execution order; you can choose to execute one of the steps.

[0120] S351. Input the main business scenario, the results of each intent, and the user profile data of the user into the preset response model to generate the response text.

[0121] User profile data can be determined based on existing user information in the system, and users can be tagged based on their account behavior in history, such as the irritable tag.

[0122] In this embodiment, based on the main business scenario and the results of each intent, and combined with user profile data, the response text can be generated more accurately.

[0123] For example, if user profile data indicates that the user is easily angered, frequently complains, and often gives negative reviews, then the generated response text should be polite and courteous.

[0124] S352. Input the main business scenario, the results of each intent, and the user sentiment factors determined based on the long text into the preset response model to generate the response text.

[0125] Among them, user emotional factors can be used to characterize the user's current emotional state, and user emotional factors can be identified from long texts based on emotion recognition algorithms.

[0126] In this embodiment, by combining user emotional factors with the main business scenario and the results of each intent, the generated response text can be made more humanized.

[0127] For example, if the user's emotional factor is determined to be anger, the response text may include soothing words.

[0128] Furthermore, when the message is subsequently pushed to someone for review, an emotion tag can be added to the reply text to prompt staff to pay more attention and prioritize the processing.

[0129] The third embodiment of this invention provides an intent recognition method based on long text, which specifies the process of generating response text. This method generates response text by combining user profile data or user emotional factors based on the main business scenario and the results of each intent, making the generated response text more humanized and able to better cater to user preferences, which is conducive to improving user satisfaction.

[0130] Example 4

[0131] Based on the technical solutions of the above embodiments, this invention provides a specific implementation method.

[0132] Figure 5 Here is an example flowchart of an intent recognition method based on long text provided in Embodiment 4 of the present invention, as follows: Figure 5 As shown, the method may include the following steps:

[0133] The system receives multilingual emails by acquiring long texts sent by users and normalizes the language of the emails. It then breaks down the email content into clauses. Through scene mapping, it performs intent graph recognition, using a pre-defined knowledge base model to identify the intent of each clause, obtaining multiple intent results. After determining the main business scenario as "exchange application," it inputs "return / exchange application" and multiple intent results into a sub-module. This sub-module summarizes objective factors such as product issues, return / exchange time, and new product requirements, as well as sentiment factors (user emotional factors) and user profile information (user profile data). The summarized information is then sent to the dialogue response system (pre-defined response model), outputting the response script and confidence level. Finally, the response content is obtained through manual review.

[0134] Example 5

[0135] Figure 6 This is a schematic diagram of an intent recognition device based on long text provided in Embodiment 5 of the present invention. The device is applicable to situations where robot customer service replies to long texts sent by users. The device can be implemented by software and / or hardware and is generally integrated into an electronic device.

[0136] like Figure 6 As shown, the device includes: an acquisition module 110, a splitting module 120, an identification module 130, a determination module 140, and a generation module 150.

[0137] The acquisition module 110 is used to acquire long text sent by the user;

[0138] The splitting module 120 is used to split the long text into at least two clauses;

[0139] The recognition module 130 is used to perform intent recognition on each clause using a preset knowledge base model to obtain multiple intent results;

[0140] The determination module 140 is used to determine the main business scenario of the long text based on multiple intent results;

[0141] The generation module 150 is used to input the main business scenario and the results of each intent into a preset response model to generate response text.

[0142] In this embodiment, the device first acquires the long text sent by the user through the acquisition module 110; then, the splitting module 120 splits the long text into at least two clauses; then, the recognition module 130 performs intent recognition on each clause using a preset knowledge base model to obtain multiple intent results; then, the determination module 140 determines the main business scenario of the long text based on the multiple intent results; finally, the generation module 150 inputs the main business scenario and each intent result into a preset response model to generate a response text.

[0143] Furthermore, the preset knowledge base model includes at least two business scenarios; each business scenario corresponds to at least one scenario map element; each scenario map element corresponds to at least one standard question; each standard question corresponds to at least one extended question; and each standard question corresponds to at least one keyword element vocabulary.

[0144] Based on the above optimizations, the business scenarios include at least one of the following: returns and exchanges, goods delivery expediting, problem complaints, and product inquiries; the scenario map elements include one of the following: problem description, expected solution, emotional expression, and evaluation.

[0145] In accordance with the above-mentioned optimizations, the identification module 130 includes a first matching submodule, an acquisition submodule, a second matching submodule, and a determination submodule;

[0146] The first matching submodule is used to perform similarity matching between each clause and each extended question of the business scenario in the preset knowledge base model.

[0147] The acquisition submodule is used to acquire the standard question and scene map elements corresponding to the matched extended question if the similarity matching result meets the set requirements;

[0148] The second matching submodule is used to perform similarity matching with the clauses based on the key element words of the business scenario in the preset knowledge base model if the similarity matching result does not meet the set requirements, and obtain the standard question and scene map elements corresponding to the matched key element words.

[0149] The determination submodule is used to determine the intent result of the clause based on the acquired standard questions and scene map elements.

[0150] Furthermore, the intent result includes the standard questions and scene map elements matched by the clauses in the preset knowledge base model, as well as their respective matching scores. Then, the determining module 140 is specifically used to: determine the main business scenario corresponding to the long text based on the standard questions and scene map elements matched by each clause, as well as their respective matching scores.

[0151] Furthermore, the generation module 150 includes a first generation submodule and a second generation submodule;

[0152] The first generation submodule is used to: input the main business scenario, the results of each intent, and the user profile data of the user into a preset response model to generate response text.

[0153] The second generation submodule is used to: input the main business scenario and the results of each intent, as well as the user sentiment factors determined based on the long text, into a preset response model to generate response text.

[0154] Furthermore, the device also includes a processing module for: performing layout recognition and language normalization processing on the long text before splitting the long text into at least two clauses.

[0155] The intent recognition device for long text provided in the embodiments of the present invention can execute the intent recognition method for long text provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0156] Example 6

[0157] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment Six of the present invention, as shown below. Figure 6As shown, the electronic device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the electronic device can be one or more. Figure 6 Taking a processor 70 as an example; the processor 70, memory 71, input device 72, and output device 73 in the electronic device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.

[0158] The memory 71, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the long text-based intent recognition method in this embodiment of the invention (e.g., the information acquisition module 110, splitting module 120, recognition module 130, determination module 140, and generation module 150 in the long text-based intent recognition device). The processor 70 executes various functional applications and data processing of the device / terminal / server by running the software programs, instructions, and modules stored in the memory 71, thereby realizing the aforementioned long text-based intent recognition method.

[0159] The memory 71 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 71 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 71 may further include memory remotely located relative to the processor 70, which can be connected to the device / terminal / server via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0160] Input device 72 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 73 may include display devices such as a display screen.

[0161] Example 7

[0162] Embodiment 7 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform an intent recognition method based on long text, the method comprising:

[0163] Get the long text sent by the user;

[0164] The long text is split into at least two clauses;

[0165] By using a pre-set knowledge base model, the intent of each clause is identified to obtain multiple intent results;

[0166] The main business scenario of the long text is determined based on multiple intent results;

[0167] The main business scenario and the results of each intent are input into the preset response model to generate the response text.

[0168] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the long text-based intent recognition method provided in any embodiment of the present invention.

[0169] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0170] It is worth noting that in the embodiments of the search device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0171] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. An intent recognition method based on long text, characterized in that, include: Get the long text sent by the user; The long text is split into at least two clauses; By using a pre-set knowledge base model, the intent of each clause is identified based on the business scenario to obtain multiple intent results; The main business scenario of the long text is determined based on multiple intent results; The main business scenario and the results of each intent are input into a preset response model to generate response text; Specifically, the process involves using a pre-defined knowledge base model to perform intent recognition on each clause based on the business scenario, resulting in multiple intent results, including: Based on the extended questions of the business scenario in the pre-defined knowledge base model, similarity matching is performed with each clause; If the similarity matching result meets the set requirements, then obtain the standard question and scene map elements corresponding to the matched extended question; If the similarity matching result does not meet the set requirements, then based on the key element words of the business scenario in the preset knowledge base model, the similarity matching is performed with the clause respectively, and the standard question and scene map elements corresponding to the matched key element words are obtained. The acquired standard questions and scene map elements are determined as the intent results of the clauses.

2. The method according to claim 1, characterized in that, The main business scenario and the results of each intent are input into a preset response model to generate response text, including: The main business scenario, the results of each intent, and the user profile data of the user are input into the preset response model to generate the response text.

3. The method according to claim 1 or 2, characterized in that, The main business scenario and the results of each intent are input into a preset response model to generate response text, including: The main business scenario, the results of each intent, and the user sentiment factors determined based on the long text are input into a preset response model to generate a response text.

4. The method according to claim 1, characterized in that, The preset knowledge base model includes at least two business scenarios; each business scenario corresponds to at least one scenario map element; each scenario map element corresponds to at least one standard question; each standard question corresponds to at least one extended question; and each standard question corresponds to at least one keyword element vocabulary.

5. The method according to claim 4, characterized in that: The business scenarios include at least one of the following: returns and exchanges, expedited shipments, problem complaints, and product inquiries; Scene map elements include one of the following: problem description, expected solution, emotional expression, and evaluation.

6. The method according to claim 4, characterized in that, The intent result includes the standard questions and scene map elements matched by the clause in the preset knowledge base model, as well as their respective matching scores; Based on multiple intent results, the main business scenarios for the long text are determined to include: Based on the standard questions and scene map elements matched by each clause, as well as their respective matching scores, the main business scenario corresponding to the long text is determined.

7. The method according to claim 1, characterized in that, The long text refers to the email text sent by the user to customer service.

8. The method according to claim 7, characterized in that, Before splitting the long text into at least two clauses, the following is also included: The long text is then subjected to layout recognition and language normalization.

9. An intent recognition device based on long text, characterized in that, include: The acquisition module is used to acquire long texts sent by users; A splitting module is used to split the long text into at least two clauses; The recognition module is used to identify the intent of each clause based on the business scenario using a preset knowledge base model, so as to obtain multiple intent results; The determination module is used to determine the main business scenario of the long text based on multiple intent results; The generation module is used to input the main business scenario and the results of each intent into a preset response model to generate response text; Specifically, the identification module is used to: perform similarity matching between each extended question of the business scenario in the preset knowledge base model and each clause; if the similarity matching result meets the set requirements, then obtain the standard question and scene map element corresponding to the matched extended question; If the similarity matching result does not meet the set requirements, then based on the key element words of the business scenario in the preset knowledge base model, the similarity matching is performed with the clause respectively, and the standard question and scene map elements corresponding to the matched key element words are obtained. The acquired standard questions and scene map elements are determined as the intent results of the clauses.

10. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the long text-based intent recognition method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the long text-based intent recognition method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Multi-intention response method and device, computer equipment and storage medium

    CN111930950A

  • Statement intention recognition method, statement response method, statement intention recognition device, statement response device and electronic equipment

    CN113887224A