Dialogue processing method and device, electronic equipment and readable storage medium

By introducing multiple sub-task nodes and a jump check mechanism into the task-oriented dialogue system, the problem of simple processing logic in the existing dialogue management module is solved, enabling adaptation to complex dialogue scenarios and improving the fluency of user communication.

CN118626589BActive Publication Date: 2026-07-24SHENZHEN ZHUIYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN ZHUIYI TECH CO LTD
Filing Date
2024-06-03
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, the dialogue management module of a task-oriented dialogue system can only handle single dialogue needs, and its processing logic is simple, making it unable to adapt to complex task-oriented dialogue scenarios.

Method used

By defining the target task operation process, it is divided into multiple consecutive sub-task nodes, including extraction unit, jump check unit, call unit and response unit. It processes and responds to the user's input request information, and enriches the processing logic through the jump check mechanism to adapt to complex scenarios.

Benefits of technology

It can handle complex dialogue needs, improve the fluency of user communication, avoid repeated questions, reduce system configuration complexity, and adapt to diverse dialogue scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626589B_ABST
    Figure CN118626589B_ABST
Patent Text Reader

Abstract

The application provides a dialogue processing method and device, electronic equipment and a readable storage medium, wherein the method comprises: determining a target task operation process according to first request information, which is used to indicate a plurality of sub-task nodes comprising an extraction unit, a jump checking unit, a calling unit and a reply unit in sequence, extracting and outputting first task information by the extraction unit, determining whether to jump to a second sub-task node according to the first task information by the jump checking unit, if not, calling an external processing module according to the first task information by the calling unit to obtain a calling result, and generating a first reply script according to the calling result and the first task information by the reply unit. The application processes different dialogue contents in the dialogue scene, thereby coping with complex dialogue requirements. In the process of processing each sub-task node, jump checking is performed before calling the external processing module, thereby enriching the task node processing logic and adapting to complex task-type dialogue scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, and more specifically, to a dialogue processing method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] In task-oriented dialogue systems, pipeline workflows offer advantages such as high controllability and reliable output. Pipeline-based task-oriented dialogue consists of voice and language functions. The voice function handles the conversion between natural language and speech, while the language function handles the task logic. The language function includes a parsing module, a dialogue management module, and a decoding module. The parsing module converts natural language into machine-understandable semantics. The dialogue management module updates the dialogue state based on the parsed semantics and provides responses according to preset strategies. The decoding module converts the responses provided by the dialogue management module back into natural language, thus responding to the user's request.

[0003] In existing technologies, the parsing module in language functions is usually implemented using intent slot templates, the dialogue management module is usually implemented using state machine patterns, and the decoding module is implemented using speech templates.

[0004] However, the state machine pattern used in the dialogue management module can only handle single dialogue needs, and its simple processing logic cannot adapt to complex task-oriented dialogue scenarios. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a dialogue processing method, apparatus, electronic device, and readable storage medium, so as to solve the problem that the prior art can only handle a single dialogue requirement and has simple processing logic.

[0006] To achieve the above objectives, the technical solution adopted in this application is as follows:

[0007] Firstly, this application provides a dialogue processing method, the method comprising:

[0008] Based on the first request information input by the user in the current dialogue, the target task operation flow is determined. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence: an extraction unit, a jump check unit, a call unit, and a reply unit.

[0009] The extraction unit in the first subtask node extracts and outputs the first task information corresponding to the first request information;

[0010] The jump check unit in the first sub-task node determines whether to jump to the second sub-task node for processing based on the first task information. If not, the call unit in the first sub-task node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first sub-task node generates a first reply script based on the call result and the first task information. The first reply script includes a reply to the first request information and a question.

[0011] Optionally, after the response unit in the first subtask node generates the first response script based on the call result and the first task information, the method further includes:

[0012] The extraction unit in the first subtask node extracts and outputs the second task information corresponding to the second request information;

[0013] The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the second task information;

[0014] If so, the jump check unit in the first sub-task node sends a task start instruction to the second sub-task node, which is used to instruct the second sub-task node to perform task processing.

[0015] Optionally, the task initiation instruction includes: the second task information and the first task information;

[0016] The method further includes:

[0017] The extraction unit in the second sub-task node extracts and outputs the third task information based on the first task information and the second task information;

[0018] The jump check unit, call unit, and reply unit in the second subtask node process the request information in sequence to obtain and output a response to the second request information.

[0019] Optionally, the step of extracting and outputting the first task information corresponding to the first request information by the extraction unit in the first sub-task node includes:

[0020] The extraction unit in the first subtask node inputs the first request information into the pre-trained large language model to obtain the first task information.

[0021] Optionally, the step of the jump checking unit in the first sub-task node determining whether to jump to the second sub-task node for processing based on the first task information includes:

[0022] A preset judgment condition sequence is obtained by the jump check unit in the first subtask node, and the judgment condition sequence includes multiple judgment conditions arranged in order of priority;

[0023] The judgment conditions in the judgment condition sequence are traversed. For the current judgment condition, if the jump check unit in the first sub-task node determines that the first task information meets the current judgment condition, then the process jumps to the second sub-task node for processing; otherwise, the process continues to traverse the next judgment condition.

[0024] Optionally, the step of the calling unit in the first sub-task node calling an external processing module to obtain the calling result based on the first task information includes:

[0025] The calling unit in the first subtask node determines whether to call the application programming interface based on the first task information;

[0026] If so, the first task information is sent to the external processing module through the application programming interface, and the call result is obtained from the external processing module through the application programming interface.

[0027] Optionally, the response unit in the first subtask node generates a first response script based on the call result and the first task information, including:

[0028] The response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script.

[0029] Optionally, determining the target task operation flow based on the first request information input by the user in the current dialogue includes:

[0030] Determine the request keywords based on the first request information;

[0031] Traverse the task operation process database. Based on the current task operation process, determine whether the current task operation process includes the request keyword. If it does, use the current task operation process as the target task operation process.

[0032] Secondly, this application provides a dialogue processing apparatus, the apparatus comprising:

[0033] The determination module is used to determine the target task operation flow based on the first request information input by the user in the current dialogue. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence, an extraction unit, a jump check unit, a call unit, and a reply unit.

[0034] The extraction module is used to extract and output the first task information corresponding to the first request information by the extraction unit in the first subtask node;

[0035] The response module is used to determine whether to jump to the second sub-task node for processing based on the first task information by the jump check unit in the first sub-task node. If not, the call unit in the first sub-task node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first sub-task node generates a first response script based on the call result and the first task information. The first response script includes a reply to the first request information and a question.

[0036] Optionally, the response module further includes:

[0037] The extraction unit in the first subtask node extracts and outputs the second task information corresponding to the second request information;

[0038] The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the second task information;

[0039] If so, the jump check unit in the first sub-task node sends a task start instruction to the second sub-task node, which is used to instruct the second sub-task node to perform task processing.

[0040] Optionally, the task initiation instruction includes: the second task information and the first task information;

[0041] Optionally, the response module further includes:

[0042] The extraction unit in the second sub-task node extracts and outputs the third task information based on the first task information and the second task information;

[0043] The jump check unit, call unit, and reply unit in the second subtask node process the request information in sequence to obtain and output a response to the second request information.

[0044] Optionally, the extraction module specifically includes:

[0045] The extraction unit in the first subtask node inputs the first request information into the pre-trained large language model to obtain the first task information.

[0046] Optionally, the response module specifically includes:

[0047] A preset judgment condition sequence is obtained by the jump check unit in the first subtask node, and the judgment condition sequence includes multiple judgment conditions arranged in order of priority;

[0048] The judgment conditions in the judgment condition sequence are traversed. For the current judgment condition, if the jump check unit in the first sub-task node determines that the first task information meets the current judgment condition, then the process jumps to the second sub-task node for processing; otherwise, the process continues to traverse the next judgment condition.

[0049] Optionally, the response module specifically includes:

[0050] The calling unit in the first subtask node determines whether to call the application programming interface based on the first task information;

[0051] If so, the first task information is sent to the external processing module through the application programming interface, and the call result is obtained from the external processing module through the application programming interface.

[0052] Optionally, the response module specifically includes:

[0053] The response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script.

[0054] Optionally, the determining module specifically includes:

[0055] Determine the request keywords based on the first request information;

[0056] Traverse the task operation process database. Based on the current task operation process, determine whether the current task operation process includes the request keyword. If it does, use the current task operation process as the target task operation process.

[0057] Thirdly, this application provides an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the dialogue processing method described above.

[0058] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the dialogue processing method described above.

[0059] The beneficial effects of this application are as follows: Based on the first request information input by the user in the current dialogue, a target task operation flow is determined. This target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. The extraction unit in the first sub-task node extracts and outputs the first task information corresponding to the first request information. The jump check unit in the first sub-task node determines whether to jump to the second sub-task node for processing based on the first task information. If not, the calling unit in the first sub-task node calls an external processing module based on the first task information to obtain the call result. The reply unit in the first sub-task node generates a first reply script based on the call result and the first task information. This embodiment, by determining the target task operation flow and its sub-task nodes, allows each sub-task node to process and reply to different dialogue content in different dialogue scenarios, thereby handling complex dialogue requirements. Furthermore, during the processing of each sub-task node, a jump check is performed before calling the external processing module to determine whether to jump to the next sub-task node, thus enriching the processing logic of the task nodes to adapt to complex task-oriented dialogue scenarios and reducing the complexity of system configuration through the jump mechanism. The response script not only includes answers to the initial request but also questions related to that request, thereby improving the fluency of communication with users and preventing them from asking repeated questions. Attached Figure Description

[0060] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a schematic diagram illustrating an application scenario of a dialogue processing method provided in an embodiment of this application;

[0062] Figure 2 This is a flowchart illustrating a dialogue processing method proposed in an embodiment of this application;

[0063] Figure 3 This is a flowchart illustrating another task-oriented dialogue processing method provided in an embodiment of this application;

[0064] Figure 4 This is a flowchart illustrating another dialogue processing method provided in an embodiment of this application;

[0065] Figure 5 This is a schematic diagram of the structure of a dialogue processing device provided in an embodiment of this application;

[0066] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0068] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0069] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0070] In existing technologies, the parsing module in language functions is typically implemented using intent slot templates. Intent triggering within the intent slot module usually employs semantic matching based on similar sentences, while slots are implemented using rule modules such as regular expressions, or using named entity recognition methods based on neural networks. The dialogue management module is typically implemented using a state machine pattern, and the decoding module uses dialogue templates. Specifically, a fixed dialogue template is configured for each state machine node corresponding to each task state, and each node requires output according to the configured dialogue template.

[0071] However, the similar phrases used in the intent slot module only consider the user's current response and do not take into account the context of the entire conversation to provide an appropriate response. For example, when the user's response is, "Do you have any recommendations?", the similar phrase method cannot determine whether the user needs to inquire about a restaurant or a movie theater, etc.

[0072] Furthermore, due to the highly diverse real-world scenarios of user responses and the limited coverage of regular expressions, significant manpower is required for maintenance. Regular expressions also cannot extract the correct slots based on the context of the dialogue. The state machine pattern used in the dialogue management module can only handle single dialogue needs, offering simple logic but failing to adapt to complex task-oriented dialogue scenarios. For example, if a user's response is, "The second to last one looks good, please help me choose this one," regular expressions cannot determine which one is the second to last. While this deficiency can be addressed using named entity recognition technology in neural networks, using neural networks requires a large number of training samples and different training methods for different scenarios, making practical implementation difficult.

[0073] For the reasons mentioned above, the state machine pattern used in the dialogue management module can only handle single dialogue needs, and its simple processing logic cannot adapt to complex task-oriented dialogue scenarios. Ensuring the correctness of task execution logic requires a large number of complex nodes, making its setup and subsequent maintenance difficult. Furthermore, the responses based on script templates are too rigid and inflexible, reducing the customer experience.

[0074] Based on this, this application proposes a dialogue processing method. This method first obtains the user's input of a first request information, then determines the target task operation flow based on this request information. The target task operation flow represents that the current dialogue can be divided into multiple consecutive sub-task nodes for processing. Then, according to the order of the sub-task nodes, the first sub-task node proposes and outputs the first task information corresponding to the first request information. Next, based on the first sub-task information, it is determined whether to jump to the second sub-task node for processing. If not, the first sub-task node calls an external processing module to obtain the processing result, and generates a first response script based on the processing result and the first task information, replying to the user. In this application, the sub-task nodes are determined by defining the target task operation flow. Each sub-task node processes and responds to different dialogue content in the dialogue scenario, thus handling complex conversational needs. Furthermore, during the processing of each sub-task node, a jump check is performed before calling the external processing module to determine whether to jump to another sub-task node, thereby enriching the processing logic to adapt to complex task-oriented dialogue scenarios.

[0075] Before introducing the specifics of dialogue processing methods, let's first discuss their application scenarios. For example... Figure 1As shown, the dialogue processing method is applied to the server. Users express their needs to the server using natural language. The server processes the user's needs, generates a response script, and displays the response script to the user. Optionally, users can express their needs via voice or text input, and the server can also output a response script via voice or text input.

[0076] Figure 2 This is a flowchart illustrating a dialogue processing method proposed in an embodiment of this application. Next, refer to... Figure 2 A detailed introduction to dialogue processing methods is provided.

[0077] S201. Based on the first request information input by the user in the current dialogue, determine the target task operation flow. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence: extraction unit, jump check unit, call unit, and reply unit.

[0078] The first request is the first question entered by the user when initiating a task-based dialogue. As an optional implementation, the target task operation flow can be pre-set. Different task-based dialogues have different corresponding task operation flows, including variations in the number and type of sub-task nodes.

[0079] For example, if the user's first request is "Help me buy a plane ticket from Beijing to Shanghai", and the target task operation flow is a pre-set ticket purchase task operation flow, then from the moment the user starts inputting the first request, the execution sequence will be: query remaining tickets sub-task node, lock remaining tickets sub-task node, and purchase plane ticket sub-task node.

[0080] As another alternative implementation, task operation processes that meet the requirements indicated by the first request information can be selected from the task operation process database, and the task operation process can be used as the target task operation process.

[0081] S202, The extraction unit in the first subtask node extracts and outputs the first task information corresponding to the first request information.

[0082] Optionally, the extraction unit included in the subtask node can be an information extractor, used to extract task information from the request information sent by the user based on the task description. Here, the task description is a description of the task that the current subtask node needs to complete. For example, the task description can be expressed in natural language, such as: "What you need to do is clarify the user's departure point, destination, and time range; after the call is completed, you need to confirm with the user whether they want to buy tickets."

[0083] For example, if the user's first request is: "Please help me check flight tickets from Beijing to Shanghai tomorrow," then the first task information extracted by the extraction unit is: departure point is Beijing, destination is Shanghai, and time is tomorrow. Additionally, according to the task description, the first task information also includes: asking whether to book a ticket.

[0084] It is worth mentioning that the absolute time in the first request information can be obtained based on the current absolute time. For example, if the current time is January 1, 2000, then the time in the first task information is January 2, 2000.

[0085] As an optional implementation, the first task information can be represented in the form of JSON Schema, thereby improving the overall integrity of information collection and avoiding information contradictions that may arise from the fragmentation of old technical information.

[0086] S203. The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the first task information. If not, the call unit in the first subtask node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first subtask node generates the first reply script based on the call result and the first task information. The first reply script includes the reply to the first request information and the question.

[0087] Optionally, the jump check unit in the first subtask node can determine whether to jump to the second subtask node based on preset judgment conditions and the first task information. The preset judgment conditions could be, for example, whether the first task information includes the user's ID number and name. For instance, if the user's first request information is: "Please help me book a flight from Beijing to Shanghai tomorrow. My name is Xiao Wang, and my ID number is ABC," then the user will directly jump to the second subtask node for processing via the jump check unit.

[0088] Optionally, if the judgment condition is not met, the calling unit in the first subtask node calls information from an external processing module based on the first task information to obtain the call result. The external calling module can be a database that the current server can access. The call result can be information related to the first task information. For example, if the first task information is: departure point is Beijing, destination is Shanghai, time is January 2, 2000, and the query is whether to book a ticket, then the call result could be all flight information from Beijing to Shanghai on January 2, 2000.

[0089] As an optional implementation, it can be determined whether an external processing module needs to be called based on the first task information. If not, there will be no call result in this node. For example, if the task in the first sub-task node is to obtain the user's departure point, destination, and time range, but the first request information does not include the departure point, destination, or time range, then the first task information lacks the departure point, destination, or time range, and the calling unit cannot call the external processing module. The first response message could be: "May I ask where you departed from?"

[0090] Optionally, the system can determine whether to call an external processing module based on the first task information using a pre-trained large language model. If no external processing module needs to be called, the output will be empty.

[0091] Optionally, the first response is in natural language, including the content of the call result and the content of the first request information. For example, if the calling unit obtains flight information A, B, and C for flights from Beijing to Shanghai on January 2, 2000, and the first task information is: departure point Beijing, destination Shanghai, date January 2, 2000, and a question about booking tickets, then the first response could be: "Hello, the flight information you require is as follows: Flight Information A, Flight Information B, and Flight Information C. Do you need to book tickets?"

[0092] In this embodiment, based on the first request information input by the user in the current dialogue, a target task operation flow is determined. This flow indicates multiple consecutive sub-task nodes corresponding to the current dialogue. The extraction unit in the first sub-task node extracts and outputs the first task information corresponding to the first request. The jump check unit in the first sub-task node determines whether to jump to the second sub-task node for processing based on the first task information. If not, the calling unit in the first sub-task node calls an external processing module based on the first task information to obtain the call result. Finally, the reply unit in the first sub-task node generates a first reply based on the call result and the first task information. This embodiment addresses complex dialogue requirements by determining the target task operation flow and its sub-task nodes. Each sub-task node processes and replies to different dialogue content in different dialogue scenarios. Furthermore, during the processing of each sub-task node, a jump check is performed before calling the external processing module to determine whether to jump to the next sub-task node. This enriches the processing logic of the task nodes to adapt to complex task-oriented dialogue scenarios and reduces the complexity of system configuration through the jump mechanism. The response script not only includes answers to the initial request but also questions related to that request, thereby improving the fluency of communication with users and preventing them from asking repeated questions.

[0093] Figure 3This is a flowchart illustrating another task-oriented dialogue processing method provided in an embodiment of this application. Figure 3 As shown, after step S203 above, where the response unit in the first subtask node generates the first response script based on the call result and the first task information, the following steps can also be performed:

[0094] S301, The extraction unit in the first subtask node extracts and outputs the second task information corresponding to the second request information.

[0095] Optionally, after generating the first response, a second request message input by the user is received. This second request message may be a request from the user to reply to the first response. The extraction unit of the first sub-task node extracts and outputs the second task information.

[0096] For example, if the first response information is: "Hello, the flight information you need is as follows: Flight information A, Flight information B and Flight information C. Do you need to book tickets?", then the second request information is: "Yes, please help me book tickets. My name is Xiao Wang and my ID number is ABC." Then the second task information can be: Name is Xiao Wang and ID number is ABC.

[0097] S302, The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the second task information.

[0098] For example, after the jump check unit detects that the second task information includes the user's name and ID number, it determines to jump to the second sub-task node for processing.

[0099] S303. If so, the jump check unit in the first sub-task node sends a task start instruction to the second sub-task node. The task start instruction is used to instruct the second sub-task node to perform task processing.

[0100] Optionally, if it is necessary to jump to the second sub-task node, the task processing is performed in the second sub-task node according to the task initiation instruction. Specifically, processing begins from the extraction unit in the second sub-task node.

[0101] As an optional implementation, if the jump check unit determines that it will not jump to the second subtask node, the calling unit and the reply unit in the first subtask node will continue to perform the next step of processing.

[0102] It is worth noting that after the jump is implemented in the first sub-task node, the second sub-task node is started. During the processing of the second sub-task node, if the task information meets the judgment condition of the jump check unit in the second sub-task node, a task start instruction is sent to the third sub-task node so that the third sub-task node can execute the task processing. This process is repeated sequentially until the last sub-task node in the target task operation flow is reached.

[0103] In this embodiment, after the response unit in the first sub-task node generates the first response script based on the call result and the first task information, the extraction unit in the first sub-task node extracts and outputs the second task information. The jump check unit in the first sub-task node then determines whether to jump to the second sub-task node for processing based on the second task information, thereby enabling the state machine in this embodiment to handle more complex task logic. If so, the jump check unit in the first sub-task node sends a task start instruction to the second sub-task node, which instructs the second sub-task node to perform task processing. This embodiment achieves a continuous jump mechanism in the task-based dialogue processing flow by immediately sending a task start instruction to the next sub-task node after the jump check unit's judgment condition is met.

[0104] As an optional implementation, in step S303 above, the task initiation instruction includes: second task information and first task information.

[0105] Specifically, in the second sub-task node, the task start instruction includes second task information and first task information; in the third sub-task node, the task start instruction includes third task information, second task information, and first task information. In other words, the task start instruction includes task information indicating the sub-task node to be started, as well as historical task information.

[0106] The following uses the second subtask node as an example to introduce the dialogue processing method:

[0107] Optionally, the extraction unit in the second subtask node extracts and outputs the third task information based on the first task information and the second task information.

[0108] Optionally, unlike the first subtask node, the extraction unit of the second subtask node extracts not only based on the second task information, but also based on historical task information, such as the first task information, to obtain and output the third task information.

[0109] For example, the third task information includes: name is Xiao Wang, ID number is ABC, and he wants to buy a plane ticket from Beijing to Shanghai on January 2, 2000.

[0110] Optionally, the jump check unit, call unit, and reply unit in the second subtask node process the request in sequence to obtain and output a response to the second request information.

[0111] Optionally, the jump check unit in the second subtask node determines whether to jump to the third subtask node for processing based on the third task information. If not, the call unit in the second subtask node calls the external processing module to obtain the call result based on the third task information, and the reply unit in the second subtask node generates a second reply script based on the call result and the third task information. The second reply script includes a reply to the second request information and a question.

[0112] In this embodiment, the task initiation instruction includes second task information and first task information. Then, the extraction unit in the second sub-task node extracts and outputs third task information based on the first and second task information. The jump check unit, invocation unit, and response unit in the second sub-task node process this information sequentially to obtain and output a response to the second request information. In this embodiment, the extraction unit combines the task information of the current sub-task node with historical task information, thereby ensuring that the response content is contextualized within the task-based dialogue, outputting an accurate answer and improving the natural fluency of the user experience.

[0113] As an optional implementation, in step S202 above, the extraction unit in the first subtask node extracts and outputs the first task information corresponding to the first request information, which can specifically be done as follows:

[0114] The extraction unit in the first subtask node inputs the first request information into the pre-trained large language model to obtain the first task information.

[0115] Specifically, the large language model is pre-set in each task operation process. In the first sub-task node, the large language model is set through the task description: You are a professional extractor, and your task is to extract information based on the provided task description and the first request information. If no content is extracted, the first task information is set to empty.

[0116] As an optional implementation, the second subtask node can be set as follows: You are a professional extractor, and your task is to extract information based on the provided task description, first task information, and first request information. If the first task information is empty, the historical information is set to empty. If no content is extracted, the second task information is set to empty.

[0117] With the above settings, the large language model can extract the corresponding task information from each request. Furthermore, since historical task information is considered during the extraction process, the final extracted task information is more accurate.

[0118] In this embodiment, the first task information is obtained through a pre-trained large language model, thereby providing underlying support for semantic understanding and improving processing efficiency.

[0119] As an optional implementation, in step S203 above, the specific implementation steps of the jump checking unit in the first sub-task node determining whether to jump to the second sub-task node for processing based on the first task information include:

[0120] Optionally, a preset judgment condition sequence is obtained by the jump check unit in the first subtask node, the judgment condition sequence including multiple judgment conditions arranged in order of priority.

[0121] Optionally, multiple judgment conditions are pre-set, and priorities are set according to the importance and logical order of the judgment conditions. Then, the judgment conditions are sorted according to their priorities to obtain a judgment condition sequence.

[0122] Optionally, the judgment conditions in the judgment condition sequence are traversed. For the current judgment condition, if the jump check unit in the first subtask node determines that the first task information meets the current judgment condition, then the process jumps to the second subtask node for processing; otherwise, the process continues to traverse the next judgment condition.

[0123] As an optional implementation, if the first task information does not meet all the judgment conditions, it cannot jump to the second sub-task node for processing, and is still processed by the first sub-task node.

[0124] For example, the judgment condition sequence may include: judgment condition 1, judgment condition 2, and judgment condition 3. Judgment condition 1 may be: whether the first task information includes a name and ID number; judgment condition 2 may be: whether the first task information includes an ID number; and judgment condition 3 may be: whether the first task information includes a name. Judgment condition 1 has a higher priority than judgment condition 2, which in turn has a higher priority than judgment condition 3. The jump check module first determines whether the first task information includes a name and ID number. If it does, it jumps to the second sub-task node for processing. Otherwise, it determines whether the first task information includes an ID number. If it does, it jumps to the second sub-task node for processing. Otherwise, it determines whether the first task information includes a name. If it does, it jumps to the second sub-task node for processing; if it does not, it continues processing at the first sub-task node.

[0125] In this embodiment, the jump check unit in the first subtask node obtains a preset sequence of judgment conditions with priority order, traverses the judgment conditions in the sequence, and for the current judgment condition encountered, if the jump check unit in the first subtask node determines that the first task information meets the current judgment condition, it jumps to the second subtask node for processing; otherwise, it continues to traverse the next judgment condition. Thus, multiple judgment conditions are used to determine whether to jump, enabling the subtask node to handle more complex task logic, improving the processing capacity of a single subtask node, and reducing system deployment and maintenance costs.

[0126] Next, the specific method by which the calling unit in the first subtask node calls the external processing module to obtain the call result based on the first task information in step S203 above will be described:

[0127] Optionally, the calling unit in the first subtask node determines whether to call the application programming interface based on the first task information.

[0128] This allows for the pre-setting of multiple application programming interfaces (APIs) that the first subtask node can call, along with their modes. Specifically, the API modes can be represented using the OpenAI Function Calling specification.

[0129] As an optional implementation, after determining that an application programming interface needs to be called based on the first task information, the calling unit can also determine the application programming interface to be called from a pre-configured list of multiple application programming interfaces to be called based on the first task information.

[0130] As an optional implementation, during the processing of the second subtask node, the calling unit in the second subtask node calls the external processing module to obtain the call result based on the first task information and the second task information.

[0131] Optionally, if so, the first task information is sent to the external processing module through the application programming interface, and the call result is obtained from the external processing module through the application programming interface.

[0132] Specifically, after the first task information is sent to the external processing module, the external processing module can retrieve and output the call result based on the first task information.

[0133] In this embodiment, the calling unit in the first subtask node determines whether to call the application programming interface based on the first task information. If so, the first task information is sent to the external processing module through the application programming interface, and the calling result is obtained from the external processing module through the application programming interface. Thus, it can independently collect and call external information without requiring a lot of cooperation.

[0134] As an optional implementation, the specific steps in step S203 above, where the response unit in the first subtask node generates the first response script based on the call result and the first task information, are as follows:

[0135] Optionally, the response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script.

[0136] Optionally, the first response can be in natural language, thus providing users with a better conversational experience.

[0137] It is worth mentioning that the large language model used in the response unit is the same as the large language model used in the extraction unit.

[0138] In this embodiment, the response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script, thereby conducting a complete dialogue process and simplifying the complex system configuration.

[0139] As an optional implementation, step 201 above, which involves determining the target task operation flow based on the first request information input by the user in the current dialogue, includes the following specific steps:

[0140] Optionally, the request keyword can be determined based on the first request information.

[0141] In this process, a pre-trained large language model can be used to extract keywords from the first request information to obtain the request keywords.

[0142] For example, if the first request information is: "Please help me book a flight from Beijing to Shanghai tomorrow," then the request keyword could be: book flight.

[0143] Optionally, the task operation process in the task operation process database is traversed. Based on the current task operation process that is traversed, it is determined whether the current task operation process includes the request keyword. If it does, the current task operation process is used as the target task operation process.

[0144] As an optional implementation, each task operation process can include a process keyword. When traversing the current task operation process, it is determined whether the process keyword and the request keyword in the current task operation process are consistent. If they are consistent, the current task operation process is taken as the target task operation process.

[0145] In this embodiment, the request keyword is determined based on the first request information, the task operation process in the task operation process database is traversed, and the current task operation process is determined to include the request keyword based on the current task operation process. If it includes the request keyword, the current task operation process is used as the target task operation process, thereby realizing fully automatic processing of various types of task-based dialogues and expanding the applicability of dialogue processing methods.

[0146] As an optional implementation method, Figure 4 This is a flowchart illustrating another dialogue processing method provided in an embodiment of this application. Next, through... Figure 4 The following describes part of the dialogue processing method: First, the user inputs the first request information. The extraction unit extracts and outputs the first task information based on the first request information. The jump check unit determines whether to jump to the second sub-task node based on the first task information. If a jump is made, a task start instruction is sent to the second sub-task node. If no jump is made, the calling unit calls an external processing module based on the first task information, obtains the call result, and the response unit generates and outputs the first response script based on the call result and the first task information. Then, the system waits for the user to input the second request information based on the first response script. Upon receiving the second request information, the extraction unit in the first sub-task node extracts and outputs the second task information. Then, the jump check unit determines whether to jump to the second sub-task node based on the second task information. If yes, a task start instruction is sent; otherwise, the task processing continues in the first sub-task node. When the second subtask node receives the task start instruction, its extraction unit extracts and outputs the third task information based on the first and second task information included in the task start instruction. Then, the jump check unit, call unit, and reply unit in the second subtask node process the information in sequence to obtain and output a response to the second request information.

[0147] The above processing steps are executed sequentially until the last sub-task node in the target task operation flow is reached. The reply from the sub-task node's response unit may also include the question: "Do you have any other questions?" If the user replies "yes", the task operation flow and subsequent steps are determined again to complete a new task-type dialogue.

[0148] Based on the same inventive concept, this application also provides a dialogue processing device corresponding to the dialogue processing method. Since the principle of the device in this application to solve the problem is similar to the dialogue processing method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0149] Reference Figure 5 As shown, Figure 5 This is a schematic diagram of a dialogue processing device provided in an embodiment of this application. The device includes: a determining module 501, an extracting module 502, and a replying module 503; wherein:

[0150] The determination module 501 is used to determine the target task operation flow based on the first request information input by the user in the current dialogue. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence, an extraction unit, a jump check unit, a call unit, and a reply unit.

[0151] Extraction module 502 is used to extract and output the first task information corresponding to the first request information by the extraction unit in the first subtask node;

[0152] The response module 503 is used to determine whether to jump to the second sub-task node for processing based on the first task information by the jump check unit in the first sub-task node. If not, the call unit in the first sub-task node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first sub-task node generates the first reply script based on the call result and the first task information. The first reply script includes the reply to the first request information and the question.

[0153] Optionally, the response module 503 also includes:

[0154] The extraction unit in the first subtask node extracts and outputs the second task information corresponding to the second request information;

[0155] The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the second task information.

[0156] If so, the jump check unit in the first subtask node sends a task start instruction to the second subtask node. The task start instruction is used to instruct the second subtask node to perform task processing.

[0157] Optionally, the task initiation instruction includes: second task information and first task information;

[0158] Optionally, the response module 503 also includes:

[0159] The extraction unit in the second subtask node extracts and outputs the third task information based on the first task information and the second task information;

[0160] The second subtask node is processed sequentially by the jump check unit, the call unit, and the reply unit to obtain and output a response to the second request information.

[0161] Optionally, the extraction module 502 specifically includes:

[0162] The extraction unit in the first subtask node inputs the first request information into the pre-trained large language model to obtain the first task information.

[0163] Optionally, response module 503 specifically includes:

[0164] The jump check unit in the first subtask node obtains a preset judgment condition sequence, which includes multiple judgment conditions arranged in order of priority.

[0165] The system iterates through the judgment conditions in the sequence. For the current judgment condition, if the jump check unit in the first subtask node determines that the first task information meets the current judgment condition, it jumps to the second subtask node for processing; otherwise, it continues to iterate through the next judgment condition.

[0166] Optionally, response module 503 specifically includes:

[0167] The calling unit in the first subtask node determines whether to call the application programming interface based on the first task information;

[0168] If so, the first task information is sent to the external processing module through the application programming interface (API), and the call result is obtained from the external processing module through the API.

[0169] Optionally, response module 503 specifically includes:

[0170] The response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script.

[0171] Optionally, module 501 specifically includes:

[0172] Determine the request keywords based on the first request information;

[0173] Traverse the task operation process database. Based on the current task operation process, determine whether the current task operation process includes the request keyword. If it does, use the current task operation process as the target task operation process.

[0174] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0175] This application also provides an electronic device, such as... Figure 6 The diagram shown is a schematic representation of an electronic device structure provided in an embodiment of this application, including: a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions executable by the processor 601 (e.g., ...). Figure 5 The device in the middle determines the execution instructions corresponding to the module 501, the extraction module 502, and the reply module 503, etc. When the computer device is running, the processor 601 and the memory 602 communicate through the bus, and when the machine-readable instructions are executed by the processor 601, the above-mentioned dialogue processing method is performed.

[0176] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described dialogue processing method.

[0177] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0178] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0179] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A dialogue processing method, characterized in that, The method includes: Based on the first request information input by the user in the current dialogue, the target task operation flow is determined. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence: an extraction unit, a jump check unit, a call unit, and a reply unit. The extraction unit in the first subtask node extracts and outputs the first task information corresponding to the first request information; The jump check unit in the first sub-task node determines whether to jump to the second sub-task node for processing based on the first task information. If not, the call unit in the first sub-task node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first sub-task node generates a first reply script based on the call result and the first task information. The first reply script includes a reply to the first request information and a question.

2. The dialogue processing method according to claim 1, characterized in that, After the response unit in the first subtask node generates the first response script based on the call result and the first task information, the method further includes: The extraction unit in the first subtask node extracts and outputs the second task information corresponding to the second request information; The jump check unit in the first subtask node determines whether to jump to the second subtask node for processing based on the second task information; If so, the jump check unit in the first sub-task node sends a task start instruction to the second sub-task node, which is used to instruct the second sub-task node to perform task processing.

3. The dialogue processing method according to claim 2, characterized in that, The task initiation instruction includes: the second task information and the first task information; The method further includes: The extraction unit in the second sub-task node extracts and outputs the third task information based on the first task information and the second task information; The jump check unit, call unit, and reply unit in the second subtask node process the request information in sequence to obtain and output a response to the second request information.

4. The dialogue processing method according to claim 1, characterized in that, The step of extracting and outputting the first task information corresponding to the first request information by the extraction unit in the first sub-task node includes: The extraction unit in the first subtask node inputs the first request information into the pre-trained large language model to obtain the first task information.

5. The dialogue processing method according to claim 1, characterized in that, The step of the jump check unit in the first sub-task node determining whether to jump to the second sub-task node for processing based on the first task information includes: A preset judgment condition sequence is obtained by the jump check unit in the first subtask node, and the judgment condition sequence includes multiple judgment conditions arranged in order of priority; The judgment conditions in the judgment condition sequence are traversed. For the current judgment condition, if the jump check unit in the first sub-task node determines that the first task information meets the current judgment condition, then the process jumps to the second sub-task node for processing; otherwise, the process continues to traverse the next judgment condition.

6. The dialogue processing method according to claim 1, characterized in that, The step of obtaining the call result by calling an external processing module based on the first task information by the calling unit in the first sub-task node includes: The calling unit in the first subtask node determines whether to call the application programming interface based on the first task information; If so, the first task information is sent to the external processing module through the application programming interface, and the call result is obtained from the external processing module through the application programming interface.

7. The dialogue processing method according to claim 1, characterized in that, The response unit in the first subtask node generates a first response script based on the call result and the first task information, including: The response unit in the first subtask node inputs the call result and the first request information into the pre-trained large language model to obtain the first response script.

8. The dialogue processing method according to any one of claims 1-7, characterized in that, The step of determining the target task operation flow based on the first request information input by the user in the current dialogue includes: Determine the request keywords based on the first request information; Traverse the task operation process database. Based on the current task operation process, determine whether the current task operation process includes the request keyword. If it does, use the current task operation process as the target task operation process.

9. A dialogue processing device, characterized in that, The device includes: The determination module is used to determine the target task operation flow based on the first request information input by the user in the current dialogue. The target task operation flow is used to indicate multiple consecutive sub-task nodes corresponding to the current dialogue. Each sub-task node includes, in sequence, an extraction unit, a jump check unit, a call unit, and a reply unit. The extraction module is used to extract and output the first task information corresponding to the first request information by the extraction unit in the first subtask node; The response module is used to determine whether to jump to the second sub-task node for processing based on the first task information by the jump check unit in the first sub-task node. If not, the call unit in the first sub-task node calls the external processing module to obtain the call result based on the first task information, and the reply unit in the first sub-task node generates a first reply script based on the call result and the first task information. The first reply script includes a reply to the first request information and a question.

10. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when the electronic device is in operation, are executed by the processor to perform the steps of the dialogue processing method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the dialogue processing method as described in any one of claims 1 to 8.