A method and system for processing multi-turn dialogues

By adopting multiple rounds of dialogue processing methods and systems based on LangChain in the intelligent customer service system, and using domain-specific language models and API calls, the problem of insufficient language understanding and complex transaction processing in the fields of ticketing and taxation is solved, and an efficient and accurate solution is achieved.

CN119783687APending Publication Date: 2025-04-08WUXI BAISHANG ZHONGWANG DATA TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411799131.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Traditional intelligent customer service systems are difficult to provide accurate solutions when handling ticketing and tax-related tasks, mainly due to their shortcomings in professional field language understanding, multiple rounds of dialogue management and complex transaction processing.

Method used

Using a multi-round dialogue processing method and system based on LangChain, a domain-specific language model is used to analyze user input, determine user intentions and extract key entities, and call the relevant ticketing or tax management system API based on user intentions and dialogue strategies to generate response results.

Benefits of technology

By optimizing language understanding results and dialogue strategies, we can quickly adapt to professional needs in the ticketing and taxation fields, handle continuous complex dialogues, provide precise solutions, and improve user experience and service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783687A_ABST
    Figure CN119783687A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and system for processing multi-round dialogues, which includes the following steps: receiving a user's query input, using a domain-specific language model to parse the user's input content, determine the user's intent, and extract key entities from the input content; determining a dialogue strategy based on user intent, historical interactions, and business logic; based on user intent and dialogue strategy, obtaining the data required for the conversation by calling the API of the relevant ticketing or tax management system, generating a response result based on the data, and returning the response result to the user. The embodiment of the present application uses a domain-specific language model to optimize the understanding result, and based on user intent and dialogue strategy, calls the API of the relevant ticketing or tax management system, which can quickly adapt to the professional needs of the ticketing and taxation fields, handle continuous complex dialogues, and provide precise solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and specifically relates to a method and system for processing multiple rounds of dialogue. Background Art

[0002] With the advancement of artificial intelligence and natural language processing (NLP) technology, intelligent customer service systems have been widely used in many industries. However, when dealing with complex businesses in specific areas such as ticketing and taxation, the limitations of traditional intelligent customer service systems have gradually emerged.

[0003] Currently, most intelligent customer service systems are based on a preset question-and-answer library, which mainly uses rule matching or simple machine learning models to identify user intent and generate corresponding answers. However, when dealing with ticketing and tax-related tasks, users' questions usually contain rich context and industry terms, and existing intelligent customer service systems are difficult to provide accurate solutions.

[0004] Application Contents

[0005] The purpose of the embodiments of the present application is to provide a method and system for processing multi-round dialogues to address the defect that the prior art is difficult to provide an accurate solution.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] In a first aspect, a method for processing a multi-round dialogue is provided, comprising the following steps:

[0008] Receive the user's query input, use a domain-specific language model to parse the user's input content, determine the user's intent, and extract key entities from the input content; the domain-specific language model is a language model for ticketing and taxation obtained through chain logic training based on the custom prompt provided by LangChain;

[0009] Determine a dialogue strategy based on the user intent, historical interactions, and business logic;

[0010] Based on the user intention and the dialogue strategy, the data required for the conversation is obtained by calling the API of the relevant ticketing or tax management system, and a response result is generated according to the data, and the response result is returned to the user.

[0011] In a second aspect, a multi-round dialogue processing system is provided, including:

[0012] The parsing module is used to receive the user's query input, parse the user's input content using a domain-specific language model, determine the user's intent, and extract key entities from the input content; the domain-specific language model is a language model for ticketing and taxation obtained through chain logic training based on the custom prompt provided by LangChain;

[0013] A determination module, used to determine a dialogue strategy based on the user intention, historical interactions and business logic;

[0014] The response module is used to obtain the data required for the session by calling the API of the relevant ticketing or tax management system based on the user intention and the dialogue strategy, generate a response result according to the data, and return the response result to the user.

[0015] The embodiment of the present application uses a domain-specific language model to optimize the understanding results, and based on user intent and dialogue strategies, calls the API of the relevant ticketing or tax management system, which can quickly adapt to the professional needs in the ticketing and tax fields, handle continuous complex dialogues, and provide accurate solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flow chart of a method for processing multiple rounds of dialogues provided in an embodiment of the present application;

[0017] Figure 2 It is an architectural diagram of the overall technical solution provided by the embodiment of the present application;

[0018] Figure 3 It is a structural diagram of a multi-round dialogue processing system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 creative work are within the scope of protection of this application.

[0020] The main challenges facing intelligent customer service in the ticketing and tax fields include:

[0021] 1. Complex domain knowledge: The ticketing and tax fields are full of complex terminology and unique business rules. The customer service system needs to have highly specialized knowledge and natural language processing capabilities.

[0022] 2. Multi-round dialogue and context understanding requirements: In ticketing and tax consultation, users often have multiple rounds of questions and answers. There are contextual associations between questions. The system needs to track the context of the dialogue to provide coherent answers.

[0023] 3. Multi-step processing of complex tasks: For example, in ticket consultation, users may need to check ticket prices, book tickets, confirm taxes and other multi-step operations; in tax consultation, users may be involved in complex matters such as checking tax rates and applying for tax refunds.

[0024] 4. Dynamic adaptability and feedback learning needs: As business rules and customer needs continue to change, intelligent customer service systems need to have real-time adaptive learning capabilities to optimize answer quality and user experience.

[0025] There are several types of intelligent customer service in the prior art:

[0026] 1) Intelligent customer service based on rules and templates

[0027] Implementation: This solution is usually based on a set of fixed rules and preset question and answer templates. When a user enters a question, the system determines the intent through keyword matching or simple rules, and then returns the corresponding answer based on the preset answer template.

[0028] Advantages and disadvantages: This method is low-cost and suitable for simple business scenarios. However, in complex fields such as ticketing and taxation, the flexibility of this solution is seriously insufficient and it cannot accurately handle multiple rounds of dialogue and complex transaction requirements. In addition, the recognition accuracy of user intentions is low, and when users ask non-standard questions, the solution is prone to failure.

[0029] 2) Intelligent customer service based on machine learning models

[0030] Implementation: Some intelligent customer service solutions have begun to apply machine learning models to identify user intent and extract key entities. Such systems usually improve their ability to understand user questions by training general intent recognition models and entity extraction models.

[0031] Pros and Cons: This solution is effective in handling simple tasks and common areas, and can provide more flexible answers than rule matching. However, in areas that require specific industry knowledge, such as ticketing and taxation, general models are difficult to meet the needs of accurate understanding and answers, and often cannot achieve multi-step processing of complex transactions. In addition, general models are difficult to track conversation context in real time, and answers lack coherence.

[0032] 3) Intelligent customer service based on deep learning and pre-trained language models

[0033] Implementation: In recent years, some intelligent customer service solutions have begun to use large pre-trained language models (such as GPT, BERT, etc.), and fine-tune them with a small amount of industry data, so that the customer service system can generate more flexible and natural answers. Such systems have a certain ability to understand context.

[0034] Pros and Cons: This solution performs well in understanding natural language and can generate contextually relevant responses. However, such pre-trained models lack sufficient industry knowledge in professional fields such as ticketing and taxation, and their understanding of professional terminology and business rules is still limited. In addition, such solutions usually only focus on single-round dialogues and simple tasks, cannot handle complex multi-step transactions, and have limited support for external system integration, making it difficult to meet the needs of real-time information acquisition and updating in ticketing and taxation businesses.

[0035] The technical solution provided in the embodiments of the present application is to solve the following problems:

[0036] Insufficient understanding of professional language: Traditional intelligent customer service systems lack an in-depth understanding of professional terms and expressions in specific fields such as ticketing and taxation, resulting in low accuracy in understanding user intent and processing related entities, and are unable to effectively meet user needs.

[0037] Lack of conversation coherence and context management: Traditional systems can usually only handle single-round questions and answers, lack the ability to track multi-round, context-related conversations, and find it difficult to maintain consistency in continuous conversations, thus affecting the coherence and naturalness of the user experience.

[0038] Insufficient processing capabilities for complex transactions: Ticketing and tax services usually involve complex transactions with multiple steps. Traditional customer service systems find it difficult to effectively perform these complex tasks (such as booking, cancellation, order changes, and tax calculations) and lack the ability to integrate real-time data with external systems.

[0039] Insufficient dynamic adaptability of user feedback: Traditional customer service systems find it difficult to dynamically adjust response strategies or optimize models based on user feedback, and are unable to achieve adaptive learning, which results in limitations in service quality and user satisfaction.

[0040] In the following, in conjunction with the accompanying drawings, a method for processing multiple rounds of dialogue provided by an embodiment of the present application is described in detail through specific embodiments and application scenarios.

[0041] like Figure 1 FIG. 1 is a flow chart of a method for processing a multi-round dialogue provided by an embodiment of the present application, and the method includes the following steps:

[0042] Step 101 , receiving a query input from a user, parsing the user's input content using a domain-specific language model, determining the user's intent, and extracting key entities from the input content.

[0043] Among them, the domain-specific language model is a language model for the ticketing and taxation fields obtained through training based on the custom prompt and chain logic provided by LangChain.

[0044] Step 102: Determine a dialogue strategy based on the user intention, historical interactions, and business logic.

[0045] Step 103, based on the user intention and the dialogue strategy, obtain the data required for the session by calling the API of the relevant ticketing or tax management system, generate a response result according to the data, and return the response result to the user.

[0046] In this embodiment, multiple conversation chains and task chains can be set according to specific needs in the ticketing and taxation fields.

[0047] Accordingly, a task chain can be constructed by calling a dedicated ticketing API through LangChain, which includes a flight query chain, a booking confirmation chain, and a ticket refund chain, and each task chain consists of multiple independent task units; through the tax rate query chain and the tax refund processing chain, combined with LangChain's Prompt engineering technology, user needs can be identified and the corresponding calculation logic can be dynamically generated; combined with LangChain's multi-task execution capabilities, the task execution order can be adjusted according to task dependencies and real-time feedback.

[0048] In this embodiment, after the response text is returned to the user, historical information in multiple rounds of dialogues can be associated through context segmentation and tracking indexing technology to keep tracking of context information in multiple rounds of dialogues.

[0049] Furthermore, after generating a response result based on the data and returning the response result to the user, common user problems and needs can be identified through analysis of historical conversation data, and the domain-specific language model can be optimized based on user feedback and the results of conversation analysis.

[0050] In addition, after receiving the user's query input, the user's input content can also be detected for sensitive words; if the input content contains sensitive words, the sensitive words are replaced with preset content; after generating a response result based on the data, it can also be checked whether the response result contains sensitive words; if the response result contains sensitive words, the response result is updated; further, the conversation data can also be statistically analyzed to identify the frequency and type of sensitive words; and the sensitive word library can be updated regularly.

[0051] The embodiment of the present application uses a domain-specific language model to optimize the understanding results, and based on user intent and dialogue strategies, calls the API of the relevant ticketing or tax management system, which can quickly adapt to the professional needs in the ticketing and tax fields, handle continuous complex dialogues, and provide accurate solutions.

[0052] In the embodiment of this application, a LangChain-based intelligent customer service solution is provided, which is suitable for multi-round dialogues and complex task processing in the ticketing and taxation fields. Through the organic combination of natural language processing, dialogue management, task execution and adaptive learning modules, high-precision question and answer, multi-step task execution and user feedback-driven intelligent optimization in professional fields are achieved. Figure 2 As shown, the overall technical solution of the embodiment of the present application includes the following four core modules:

[0053] 1. Natural Language Understanding (NLU) Module

[0054] The natural language understanding module is mainly composed of domain-specific language models and refined intent recognition and entity extraction models, which improves the system's semantic understanding capabilities in the ticketing and taxation fields. The system's algorithm design is unique in the following aspects:

[0055] Domain-adaptive language model optimization: Based on the custom prompt and chain logic provided by LangChain, the language models in the ticketing and taxation fields are trained to have high accuracy and robustness in professional terminology and multi-round dialogues.

[0056] Dynamic context management algorithm: Through context chunking and tracking index technology, the system can associate historical information in multiple rounds of conversations.

[0057] Task chain scheduling algorithm: Combining LangChain's multi-task execution capabilities, a dynamic priority scheduling algorithm is designed, which can adjust the task execution order according to task dependencies and real-time feedback, thereby improving the processing efficiency of complex transactions.

[0058] 2. Dialogue Management System

[0059] The dialogue management module can handle multi-round and complex dialogue scenarios, and achieve a coherent user interaction experience through dynamic tracking of context.

[0060] Dialogue strategy engine: Develops appropriate response strategies based on user intent, historical interactions, and business logic to ensure that the system can provide reasonable responses based on user context and business needs.

[0061] Context tracking: This module keeps track of context information during multiple rounds of conversations. By analyzing the intent and context of the current conversation, it ensures that the system can associate the information provided by the previous user, making the answers more coherent and consistent, and improving the naturalness of the conversation.

[0062] 3. Task execution unit

[0063] This system is designed with multiple conversation chains and task chains to meet the specific needs of ticketing and taxation to realize the automated processing of complex business logic.

[0064] Ticketing operation: LangChain calls the dedicated ticketing API to build a task chain, including flight query chain, booking confirmation chain and refund chain. Each task chain consists of multiple independent task units to ensure that tasks are executed in dependent order.

[0065] Tax operations: The system has designed a tax rate query chain and a tax refund processing chain, combined with LangChain's Prompt engineering technology, to accurately identify user needs and dynamically generate corresponding calculation logic. In addition, LangChain's tool integration capabilities enable the system to dynamically call external knowledge bases and real-time data sources to meet the needs of tax policy updates and ticketing timeliness.

[0066] 4. User feedback and adaptive learning module

[0067] The user feedback and adaptive learning module continuously optimizes the system's response strategy by collecting and analyzing user satisfaction and conversation data.

[0068] User satisfaction evaluation: Evaluate user satisfaction through analysis of direct feedback and conversation content, and collect suggestions and comments for improving system performance.

[0069] Adaptive learning module: Dynamically optimizes intent recognition and dialogue strategies based on user feedback and interaction to adapt to changing user needs and industry characteristics, enabling the system to adaptively improve service quality and user experience.

[0070] Accordingly, the process implementation method of the embodiment of the present application is mainly divided into four stages: natural language understanding, dialogue management, task execution, and user feedback and adaptive learning. Through the collaborative work of these stages, the embodiment of the present application can provide users with intelligent and coherent ticketing and tax services. The specific process is as follows:

[0071] Natural language understanding stage:

[0072] 1. User input reception: The system receives query input from the user, usually a natural language query or request, such as "I want to book a flight" or "What is the VAT rate?"

[0073] 2. Intent recognition and entity extraction: The natural language understanding (NLU) module parses the user's input, determines the user's intent, and extracts key entities.

[0074] If the user's request involves ticketing, the system will identify their intent as related to ticketing operations.

[0075] If the user's request involves taxes (such as tax rate inquiry, tax refund application), the system will identify their intent and extract relevant entity information, such as tax type or amount.

[0076] 3. Domain model assistance: Based on user intent, domain-specific language models further optimize the understanding results to ensure that the system can correctly parse and understand professional terms and expressions in the ticketing and tax fields.

[0077] Dialogue management phase:

[0078] 1. Context management: The dialog management system checks the current user's dialog context to ensure that the system can track previously provided information in multiple rounds of dialog. For example, a user may ask about tax refunds right after completing a tax rate query, and the system will associate the two requests based on the context.

[0079] 2. Strategy formulation: Based on the identified user intent, context information, and historical interaction records, the dialogue strategy engine generates an appropriate response strategy. For example, the system may need to further ask the user for information such as departure date, destination, or tax-related details to prepare for subsequent task execution.

[0080] 3. Response generation: The system generates preliminary response content on the basis of ensuring the completeness of information. For simple queries, the system directly outputs the results; for complex tasks, the system turns to the task execution stage after clarifying the user's needs.

[0081] Task execution phase:

[0082] 1. API call: The task execution unit calls the ticketing or tax system through the integrated API to obtain or update relevant data in real time. For example, check flight availability, obtain the latest tax rate information, or calculate ticket taxes.

[0083] 2. Multi-step transaction processing: When a multi-step task needs to be executed, the task execution unit will process each operation in sequence. For example, in ticket booking, the system will first confirm the flight information, then calculate the tax and display it to the user, and finally complete the booking. For tax applications, the system will check the user's tax information, confirm the refund amount, etc.

[0084] 3. Task result feedback: After the task is completed, the system will clearly feedback the results to the user. For example, if the user inquires about the flight and completes the reservation, the system will display the reservation confirmation information; if the user applies for a tax refund, the system will provide the processing progress and the estimated arrival time.

[0085] User feedback and adaptive learning stage:

[0086] 1. User satisfaction collection: The system evaluates service quality based on user dialogue performance and satisfaction feedback (for example, through ratings, reviews, etc.) to obtain user feedback on the quality of answers.

[0087] 2. Conversation analysis: By analyzing past conversation data, the adaptive learning module will identify common user problems and needs, thereby optimizing the intent recognition and entity extraction models. For conversations with low user satisfaction, the system will locate the cause of the problem and analyze improvement points.

[0088] 3. Model optimization and strategy adjustment: Based on user feedback and the results of conversation analysis, the adaptive learning module dynamically adjusts the intent recognition algorithm and conversation strategy. The system will regularly optimize the answer content and process to meet the ever-changing user needs and improve the quality of question and answer and user experience.

[0089] The embodiment of this application aims to provide efficient and intelligent ticketing and tax processing solutions through an intelligent customer service system based on LangChain. Specifically, the embodiment of this application mainly includes the following steps, each of which contains detailed processes and precautions to ensure the smooth operation of the system and user satisfaction.

[0090] 1. User input preprocessing

[0091] 1.1 User input collection: Users input queries or requests through client interfaces (such as web pages, mobile applications, etc.).

[0092] 1.2 Sensitive word detection: After receiving user input, the system immediately detects sensitive words in the text.

[0093] Use sensitive word dictionaries and machine learning models to detect inappropriate content in input.

[0094] If the input contains sensitive words, the system will process them according to the policy, such as replacing them with "***" or prompting the user to pay attention.

[0095] 1.3 Format input: Standardize user input to ensure consistent text format and prepare for subsequent processing.

[0096] 2. Natural Language Understanding (NLU) Module

[0097] 2.1 Intent Recognition: Use domain-specific language models to analyze user input and identify user intent (such as checking tickets, applying for tax refunds, etc.).

[0098] 2.2 Entity extraction: Extract relevant entity information such as date, time, location, etc. from user input to form structured data.

[0099] 2.3 Context Management: Maintain context information based on the user’s multi-round conversation history to improve the continuity of the conversation.

[0100] 3. Dialogue Management System

[0101] 3.1 Dialogue strategy formulation: Formulate corresponding dialogue strategies based on the identified user intentions and context information.

[0102] The system generates preset response templates for different intentions.

[0103] Adjust response strategies based on user feedback to better meet user needs.

[0104] 3.2 Response generation: Generate natural language response text based on user intent and dialogue strategy.

[0105] 3.3 Sensitive word monitoring: Before generating a response, check again whether the response content contains sensitive words to ensure the compliance of the information.

[0106] 4. Task execution unit

[0107] 4.1 API call: Based on user request, call the API of the relevant ticketing or tax management system.

[0108] Obtain required data (such as ticketing information, tax policies, etc.) in real time and process it.

[0109] Process multi-step transactions (such as ticket booking, refund application) to ensure the compliance and correctness of each step.

[0110] 4.2 Sensitivity check: During the execution of the task, the sensitivity of input and output data is continuously monitored to ensure that no sensitive information is leaked.

[0111] 4.3 Log Recording: Record each operation and its results in detail, including user requests, system responses, sensitive word triggers, and other information for subsequent analysis.

[0112] 5. User Feedback and Adaptive Learning

[0113] 5.1 User satisfaction evaluation: After the conversation ends, the system sends a satisfaction survey to the user to collect user feedback.

[0114] 5.2 Data Analysis: Analyze user feedback and identify common user problems and needs.

[0115] Conduct statistical analysis on conversation data to identify the frequency and type of sensitive words.

[0116] 5.3 Model and strategy optimization: Based on feedback and analysis results, continuously optimize the intent recognition model and dialogue strategy.

[0117] Update the sensitive word database to improve the recognition accuracy of sensitive words.

[0118] Adjust conversation strategies to improve user satisfaction.

[0119] 6. System maintenance and updates

[0120] 6.1 Regular updates: Regularly update sensitive word libraries, intent recognition models, and related systems to ensure that the system continues to comply with the latest regulations and user needs.

[0121] 6.2 Performance monitoring: Monitor the operating status of the system, including response time, user feedback, etc., to promptly identify and resolve potential problems.

[0122] 6.3 Security Audit: Audit the processing of sensitive data to ensure that the system complies with data privacy and security requirements.

[0123] The embodiment of this application uses LangChain as the core technology framework, which has the following differences and advantages compared with the traditional intelligent customer service framework:

[0124] 1. Stronger context processing capabilities: Compared with frameworks that only support single-round question-answering (such as rule-based Rasa or Dialogflow), LangChain provides context tracking capabilities for multiple rounds of conversations, enabling the system to handle continuous and complex conversations.

[0125] 2. Support for field customization: Traditional frameworks usually rely on preset templates and keyword matching, while LangChain provides flexible prompt engineering and chain calling mechanisms that can quickly adapt to professional needs in the ticketing and taxation fields.

[0126] 3. Task Scheduling Capabilities: Compared to frameworks based on simple logic trees (such as Botpress), LangChain’s multi-task chain scheduling algorithm can efficiently manage multi-step transaction execution, especially in complex tasks such as ticket booking and tax filing.

[0127] like Figure 3 FIG. 1 is a schematic diagram of a structure of a multi-round dialogue processing system provided in an embodiment of the present application, including:

[0128] The parsing module 310 is used to receive the user's query input, use a domain-specific language model to parse the user's input content, determine the user's intention, and extract key entities from the input content; the domain-specific language model is a language model for the ticketing and taxation fields obtained by training based on the custom prompt and chain logic provided by LangChain.

[0129] The determination module 320 is used to determine the dialogue strategy based on the user intention, historical interactions and business logic.

[0130] The response module 330 is used to obtain the data required for the session by calling the API of the relevant ticketing or tax management system based on the user intention and the dialogue strategy, generate a response result according to the data, and return the response result to the user.

[0131] In this embodiment, the above system further includes:

[0132] The association module is used to associate historical information in multiple rounds of dialogue through context segmentation and tracking indexing technology, and keep track of context information in multiple rounds of dialogue.

[0133] A setup module for setting up multiple conversation chains and task chains for specific needs in the areas of ticketing and taxation;

[0134] Accordingly, the response module 330 is specifically used to build a task chain by calling the dedicated ticketing API through LangChain, wherein the task chain includes a flight query chain, a booking confirmation chain and a ticket refund chain, and each task chain is composed of multiple independent task units; through the tax rate query chain and the tax refund processing chain, combined with LangChain's Prompt engineering technology, user needs are identified and corresponding calculation logic is dynamically generated; combined with LangChain's multi-task execution capability, the task execution order is adjusted according to task dependencies and real-time feedback.

[0135] Furthermore, the above system further includes:

[0136] The optimization module is used to identify common user problems and needs by analyzing historical conversation data, and optimize the domain-specific language model based on user feedback and the results of conversation analysis.

[0137] The detection module is used to detect sensitive words in the user's input content; if the input content contains sensitive words, replace the sensitive words with preset content; check whether the response result contains sensitive words; if the response result contains sensitive words, update the response result;

[0138] The update module is used to perform statistical analysis on conversation data, identify the frequency and type of sensitive words, and regularly update the sensitive word library.

[0139] The embodiment of the present application uses a domain-specific language model to optimize the understanding results, and based on user intent and dialogue strategies, calls the API of the relevant ticketing or tax management system, which can quickly adapt to the professional needs in the ticketing and tax fields, handle continuous complex dialogues, and provide accurate solutions.

[0140] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned multi-round dialogue processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0141] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0143] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for processing a multi-round dialogue, characterized in that: The following steps are involved: Receive the user's query input, use a domain-specific language model to parse the user's input content, determine the user's intent, and extract key entities from the input content; the domain-specific language model is a language model for ticketing and taxation obtained through chain logic training based on the custom prompt provided by LangChain; Determine a dialogue strategy based on the user intent, historical interactions, and business logic; Based on the user intention and the dialogue strategy, the data required for the conversation is obtained by calling the API of the relevant ticketing or tax management system, and a response result is generated according to the data, and the response result is returned to the user.

2. The method according to claim 1, characterized in that: After returning the response text to the user, the method further includes: Through context segmentation and tracking indexing technology, historical information in multiple rounds of dialogue is associated and context information is tracked in multiple rounds of dialogue.

3. The method according to claim 1, characterized in that Also includes: Set up multiple dialogue chains and task chains to meet specific needs in the ticketing and tax fields; Based on the user intent and the dialog strategy, the data required for the dialog is obtained by calling the API of the relevant ticketing or tax management system, specifically including: The task chain is constructed by calling the dedicated ticketing API through LangChain. The task chain includes the flight query chain, the booking confirmation chain and the ticket refund chain, and each task chain consists of multiple independent task units; Through the tax rate query chain and tax refund processing chain, combined with LangChain's Prompt engineering technology, user needs are identified and corresponding calculation logic is dynamically generated; Combined with LangChain's multi-task execution capabilities, the task execution order is adjusted according to task dependencies and real-time feedback.

4. The method according to claim 1, characterized in that: After generating a response result according to the data and returning the response result to the user, the method further includes: By analyzing historical conversation data, common user questions and needs are identified, and based on user feedback and the results of conversation analysis, the domain-specific language model is optimized.

5. The method according to claim 1, characterized in that After receiving the query input from the user, the method further includes: Detect sensitive words in user input; When the input content contains sensitive words, the sensitive words are replaced with preset content; After generating a response result according to the data, the method further includes: Check whether the response result contains sensitive words; If the response result contains sensitive words, update the response result; The method further comprises: Conduct statistical analysis on conversation data to identify the frequency and type of sensitive words; Update the sensitive word library regularly.

6. A multi-round dialogue processing system, characterized in that: include: The parsing module is used to receive the user's query input, parse the user's input content using a domain-specific language model, determine the user's intent, and extract key entities from the input content; the domain-specific language model is a language model for ticketing and taxation obtained through chain logic training based on the custom prompt provided by LangChain; A determination module, used to determine a dialogue strategy based on the user intention, historical interactions and business logic; The response module is used to obtain the data required for the session by calling the API of the relevant ticketing or tax management system based on the user intention and the dialogue strategy, generate a response result according to the data, and return the response result to the user.

7. The system according to claim 6, characterized in that Also includes: The association module is used to associate historical information in multiple rounds of dialogue through context segmentation and tracking indexing technology, and keep track of context information in multiple rounds of dialogue.

8. The system according to claim 6, characterized in that Also includes: A setup module for setting up multiple conversation chains and task chains for specific needs in the areas of ticketing and taxation; The response module is specifically used to build a task chain by calling a dedicated ticketing API through LangChain. The task chain includes a flight query chain, a booking confirmation chain and a ticket refund chain, and each task chain is composed of multiple independent task units; through the tax rate query chain and the tax refund processing chain, combined with LangChain's Prompt engineering technology, user needs are identified and corresponding calculation logic is dynamically generated; combined with LangChain's multi-task execution capability, the task execution order is adjusted according to task dependencies and real-time feedback.

9. The system according to claim 6, characterized in that Also includes: The optimization module is used to identify common user problems and needs by analyzing historical conversation data, and optimize the domain-specific language model based on user feedback and the results of conversation analysis.

10. The system according to claim 6, characterized in that The detection module is used to detect sensitive words in the user's input content; if the input content contains sensitive words, replace the sensitive words with preset content; check whether the response result contains sensitive words; if the response result contains sensitive words, update the response result; Update module to perform statistical analysis on conversation data and identify the frequency and type of sensitive words; Update the sensitive word library regularly.

Citation Information

Cited By

  • Multi-round questioning method and system around story theme

    CN121119147A

  • A multi-round questioning method and system centered around the theme of the story

    CN121119147B

  • Dialogue management method, electronic equipment and computer readable storage medium

    CN121581067A

  • A dialogue management method, an electronic device and a computer readable storage medium

    CN121581067B