Multi-threaded concurrent clarification and multi-round dialogue logic processing method, device and equipment

By adopting multi-threaded concurrent processing methods of clarification and multi-round dialogue judgment in the intelligent question-and-answer system, the problems of long processing time, complex logic and low efficiency in the existing system are solved, and more efficient processing and response are achieved.

CN119621254BActive Publication Date: 2025-05-23CHINA MERCHANTS HLDG INT INFORMATION TECH COMPANY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510157184.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-23
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

The existing intelligent question-and-answer system adopts serial processing method, and cannot process clarification and judgments in parallel and multiple rounds of dialogue judgments, resulting in long processing time, complex logic and low efficiency, and cannot meet the needs of high concurrency environments.

Method used

The clarification and multi-round dialogue logic processing method of multi-thread concurrency is adopted, and the clarification judgment is performed by the first thread and the second thread performs multi-round dialogue judgment is performed, and the results are integrated for processing.

Benefits of technology

Through multi-threaded concurrent processing, the possibility of logical confusion is reduced, the total processing time is reduced, and the system's response speed and processing efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621254B_ABST
    Figure CN119621254B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of intelligent question answering, and discloses a multi-threaded concurrent clarification and multi-round dialogue logic processing method, device and equipment. The method includes: in response to the user's input, judging whether the current conversation has a historical context; if the current conversation has a historical context, respectively performing clarification judgment through a first thread, and performing multi-round dialogue judgment through a second thread; obtaining and integrating the results of the clarification judgment and the multi-round dialogue judgment; performing corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment. In the above manner, the processing of clarification logic and multi-round dialogue logic is made clearer by using multi-threaded concurrent execution, reducing the possibility of logical confusion, while reducing the total processing time, and improving the response speed and processing efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent question answering, and particularly to a method, device and equipment for multi-threaded concurrent clarification and multi-round dialogue logic processing. Background Art

[0002] In an intelligent question answering system, the questions raised by users may be incomplete, unclear or require context to be understood. Existing intelligent question answering systems usually adopt a serial processing method, first performing a clarification judgment on the user input question and then performing a multi-round dialogue judgment, or vice versa. The main disadvantages of this method are: Unable to process in parallel: The clarification judgment and the multi-round dialogue judgment cannot be carried out simultaneously, resulting in an extended processing time. High logical complexity: Serial logical processing requires passing states between multiple steps, which is prone to logical errors. Lack of optimization: It is not optimized for improving the response speed and processing efficiency and cannot meet the requirements in a high-concurrency environment.

[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main object of the present invention is to provide a method, device and equipment for multi-threaded concurrent clarification and multi-round dialogue logic processing, aiming to solve the technical problems that the serial processing method adopted by the current intelligent question answering system has the disadvantages of inability to process in parallel, complex logic and low efficiency.

[0005] To achieve the above object, the present invention provides a method for multi-threaded concurrent clarification and multi-round dialogue logic processing, and the method for multi-threaded concurrent clarification and multi-round dialogue logic processing includes the following steps:

[0006] In response to the user input, determine whether there is historical context in the current session;

[0007] If there is historical context in the current session, respectively execute the clarification judgment through the first thread and execute the multi-round dialogue judgment through the second thread;

[0008] Obtain and integrate the results of the clarification judgment and the multi-round dialogue judgment;

[0009] Execute corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment.

[0010] In some embodiments, the method further includes:

[0011] If there is no historical context in the current session, execute the clarification judgment through a single thread and do not execute the multi-round dialogue judgment.

[0012] In some embodiments, the clarification judgment is to call a clarification function to determine whether the user's question needs clarification. The clarification function is combined with a large model call to return whether clarification is needed and a counter-question of clarification according to a preset Prompt template.

[0013] In some embodiments, the multi-round dialogue judgment is to call a multi-round judgment function, use specific prompt words, combine the historical dialogue content, call the big model to determine whether the current question is related to the historical dialogue and whether it needs to be rewritten, and determine whether it is a multi-round dialogue and the new question after rewriting based on the judgment result.

[0014] In some embodiments, the performing corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment includes:

[0015] If the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is a multi-round dialogue, the original question corresponding to the user's input is combined with the historical context to rewrite the dialogue to update the original question.

[0016] In some embodiments, the method further comprises:

[0017] If the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is not a multi-round dialogue, a clarifying question is generated and fed back to the user.

[0018] In some embodiments, the method further comprises:

[0019] If the clarification is determined to be unnecessary, the original question is processed based on the user's input.

[0020] In addition, to achieve the above-mentioned purpose, the present invention also proposes a multi-thread concurrent clarification and multi-round dialogue logic processing device, the multi-thread concurrent clarification and multi-round dialogue logic processing device comprising:

[0021] A receiving module, configured to determine whether a historical context exists in the current session in response to a user input;

[0022] A judgment module, configured to perform clarification judgment through the first thread and perform multi-round dialogue judgment through the second thread respectively if the current conversation has a historical context;

[0023] A reading module is used to obtain and integrate the results of clarification judgment and multi-round dialogue judgment;

[0024] The processing module is used to perform corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment.

[0025] In some embodiments, the judgment module is used to perform clarification judgment through a single thread and not perform multi-round dialogue judgment if there is no historical context in the current conversation.

[0026] In addition, to achieve the above-mentioned objectives, the present invention also proposes a multi-threaded concurrent clarification and multi-round dialogue logic processing device, which includes: a memory, a processor, and a multi-threaded concurrent clarification and multi-round dialogue logic processing program stored in the memory and executable on the processor, wherein the multi-threaded concurrent clarification and multi-round dialogue logic processing program is configured to implement the steps of the multi-threaded concurrent clarification and multi-round dialogue logic processing method as described above.

[0027] The present invention responds to the user's input and determines whether the current conversation has a historical context; if the current conversation has a historical context, the first thread performs a clarification judgment and the second thread performs a multi-round dialogue judgment; obtains and integrates the results of the clarification judgment and the multi-round dialogue judgment; and performs corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment. In the above manner, the processing of the clarification logic and the multi-round dialogue logic is clearer by using multi-threaded concurrent execution, reducing the possibility of logical confusion, while reducing the total processing time, and improving the response speed and processing efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flowchart diagram of a first embodiment of the multi-thread concurrent clarification and multi-round dialogue logic processing method of the present invention;

[0029] Figure 2 It is a schematic diagram of the overall solution flow in the multi-threaded concurrent clarification and multi-round dialogue logic processing method of the present invention;

[0030] Figure 3 It is a schematic diagram of a function processing flow of judging whether a user's question needs clarification and asking a corresponding question in the multi-thread concurrent clarification and multi-round dialogue logic processing method of the present invention;

[0031] Figure 4 It is a schematic diagram of a function processing flow for judging whether a question is related to a historical conversation and rewriting the corresponding function in the multi-thread concurrent clarification and multi-round conversation logic processing method of the present invention;

[0032] Figure 5 It is a structural block diagram of the first embodiment of the multi-thread concurrent clarification and multi-round dialogue logic processing device of the present invention.

[0033] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0034] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0035] The embodiment of the present invention provides a multi-threaded concurrent clarification and multi-round dialogue logic processing method, referring to Figure 1 , Figure 1 The figure is a flowchart diagram of a first embodiment of a multi-thread concurrent clarification and multi-round dialogue logic processing method of the present invention.

[0036] In this embodiment, the multi-threaded concurrent clarification and multi-round dialogue logic processing method includes the following steps:

[0037] Step S10: In response to the user's input, determine whether there is a historical context in the current session.

[0038] In this embodiment, the execution subject of this embodiment is a multi-threaded concurrent clarification and multi-round dialogue logic processing device, wherein the multi-threaded concurrent clarification and multi-round dialogue logic processing device has functions such as data processing, data communication and program running. The multi-threaded concurrent clarification and multi-round dialogue logic processing device can be a computer terminal device or other network device, and of course it can also be other devices with similar functions, and this embodiment does not limit this.

[0039] It should be noted that in intelligent question-answering systems, questions raised by users may be incomplete, unclear, or require context to be understood. Existing intelligent question-answering systems usually adopt a serial processing approach, first clarifying the questions input by the user, and then conducting multiple rounds of dialogue judgments, or vice versa. The main disadvantages of this approach are: Inability to process in parallel: Clarification judgments and multiple rounds of dialogue judgments cannot be performed at the same time, resulting in longer processing time. High logical complexity: Serial logic processing requires the transfer of status between multiple steps, which is prone to logical errors. Lack of optimization: It has not been optimized to improve response speed and processing efficiency, and cannot meet the needs of a high-concurrency environment.

[0040] In order to solve the above technical problems, in this embodiment, in response to the user's input, it is determined whether the current conversation has a historical context; if the current conversation has a historical context, a clarification judgment is performed through the first thread, and a multi-round dialogue judgment is performed through the second thread; the results of the clarification judgment and the multi-round dialogue judgment are obtained and integrated; and corresponding processing is performed based on the results of the clarification judgment and the multi-round dialogue judgment. In the above manner, the processing of the clarification logic and the multi-round dialogue logic is clearer by using multi-threaded concurrent execution, reducing the possibility of logical confusion, while reducing the total processing time, and improving the response speed and processing efficiency of the system. Specifically, it can be implemented in the following manner.

[0041] In this embodiment, this embodiment first combines Figure 2The overall process of this solution is described as follows. First, it receives the user's input, initializes variables, then determines whether there is historical conversation context, and then creates a thread pool to execute the judgment concurrently. After obtaining the thread execution result, it integrates the judgment and returns the processing result.

[0042] In the specific implementation, in this embodiment, it is necessary to first receive the user's input. The user's input includes the question entered by the user, the current conversation turn, and the context of the previous conversation, which are passed as parameters to the intelligent question-answering system. Then, variables are initialized. Specifically, it is whether clarification is required, initially set to no; whether it is a multi-round conversation, initially set to no; the rhetorical question for clarification, initially an empty string; and the new user question that may be rewritten, initially the user's question. Then, based on the conversation situation, it is first determined whether there is historical context in the current conversation.

[0043] Step S20: If there is historical context in the current conversation, then the clarification judgment is executed through the first thread and the multi-round conversation judgment is executed through the second thread respectively.

[0044] It should be understood that if there is historical context in the current conversation, it means it is a multi-round conversation situation. In this embodiment, the historical context of the current conversation can also be processed to obtain content applicable to the multi-round conversation judgment. For the situation with historical context, two logical judgments of clarification and multi-round conversation need to be made. In this embodiment, the clarification judgment is executed through the first thread and the multi-round conversation judgment is executed through the second thread.

[0045] Specifically, the clarification judgment in this embodiment is to call the clarification function to determine whether the user's question needs clarification. The clarification function is combined with the large model call and returns whether clarification is needed and the rhetorical question for clarification according to the preset Prompt template. The function process for judging whether the user's question needs clarification and the corresponding rhetorical question can refer to Figure 3 As shown, the specific process is to receive the user's query question, use regular expressions to detect whether the query content contains Chinese characters, select the Chinese / English prompt template, insert the "query question" into the selected prompt template to generate the complete prompt content, send the generated prompt content to the large model interface, and request to return specific key parts (such as return, question, reasoning process), calculate the time from sending the request to receiving the response, and record it as the "query processing time". If the returned response code is not 0 (indicating an error), then return that "whether supplementation is required" is no, an empty string, and the query processing time. Call the parsing function to extract the required values from the answer content, including "whether supplementation is required" and the "rhetorical question". If the parsing is successful, return the boolean value of "whether supplementation is required", the content of the rhetorical question, and the query processing time.

[0046] Furthermore, the multi-round dialogue judgment is to call the multi-round judgment function, use specific prompt words, combine the historical dialogue content, call the big model to judge whether the current question is related to the historical dialogue and whether it needs to be rewritten, and determine whether it is a multi-round dialogue and the new question after rewriting based on the judgment result. The function corresponding to whether the question is related to the historical dialogue and rewriting can be referred to Figure 4 As shown, the specific process is to receive user query questions and historical contexts, insert "historical question and answer content" and "current query" into the multi-round dialogue prompt template, generate complete prompt content, send the generated prompt content to the large model interface, and request to return specific key parts (such as return, question, reasoning process), calculate the time from sending the request to receiving the response, and record it as "multi-round dialogue processing time", if the returned response code is not 0 (indicating an error), then return "whether it is related to history" as no, an empty string and the multi-round dialogue processing time, call the parsing function to extract the required values ​​from the answer content, including "whether it is related to history" and "new query questions", and if the parsing is successful, return the "whether it is related to history" Boolean value, the content of the new query question, and the multi-round dialogue processing time.

[0047] Furthermore, if there is no historical context, there is no need to perform multiple rounds of dialogue judgment. Therefore, in this embodiment, the clarification judgment is performed through a single thread, and the specific clarification judgment logic is the same as above.

[0048] Step S30: Obtain and integrate the results of clarification judgment and multi-round dialogue judgment.

[0049] Step S40: Execute corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment.

[0050] In the specific implementation, it is divided into three situations. Specifically, if the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is a multi-round dialogue, the original question corresponding to the user's input is combined with the historical context for dialogue rewriting to update the original question. If the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is not a multi-round dialogue, a clarifying question is generated and fed back to the user. If the clarification judgment is that clarification is not needed, it is processed based on the original question corresponding to the user's input.

[0051] In this embodiment, in response to the user's input, it is determined whether the current conversation has a historical context; if the current conversation has a historical context, a clarification judgment is performed through the first thread, and a multi-round dialogue judgment is performed through the second thread; the results of the clarification judgment and the multi-round dialogue judgment are obtained and integrated; and corresponding processing is performed based on the results of the clarification judgment and the multi-round dialogue judgment. In the above manner, the processing of the clarification logic and the multi-round dialogue logic is made clearer by using multi-threaded concurrent execution, reducing the possibility of logical confusion, while reducing the total processing time, and improving the response speed and processing efficiency of the system.

[0052] Reference Figure 5 , Figure 5 It is a structural block diagram of the first embodiment of the multi-thread concurrent clarification and multi-round dialogue logic processing device of the present invention.

[0053] like Figure 5 As shown, the multi-threaded concurrent clarification and multi-round dialogue logic processing device proposed in the embodiment of the present invention includes:

[0054] A receiving module 10, configured to determine whether a historical context exists in the current session in response to a user input;

[0055] A judgment module 20, configured to perform clarification judgment through a first thread and perform multi-round dialogue judgment through a second thread if the current conversation has a historical context;

[0056] A reading module 30, used to obtain and integrate the results of clarification judgment and multi-round dialogue judgment;

[0057] The processing module 40 is used to perform corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment.

[0058] In this embodiment, in response to the user's input, it is determined whether the current conversation has a historical context; if the current conversation has a historical context, a clarification judgment is performed through the first thread, and a multi-round dialogue judgment is performed through the second thread; the results of the clarification judgment and the multi-round dialogue judgment are obtained and integrated; and corresponding processing is performed based on the results of the clarification judgment and the multi-round dialogue judgment. In the above manner, the processing of the clarification logic and the multi-round dialogue logic is made clearer by using multi-threaded concurrent execution, reducing the possibility of logical confusion, while reducing the total processing time, and improving the response speed and processing efficiency of the system.

[0059] In some embodiments, the judgment module 20 is configured to perform clarification judgment through a single thread and not perform multi-round dialogue judgment if there is no historical context in the current conversation.

[0060] In some embodiments, the clarification judgment is to call a clarification function to determine whether the user's question needs clarification. The clarification function is combined with a large model call to return whether clarification is needed and a counter-question of clarification according to a preset Prompt template.

[0061] In some embodiments, the multi-round dialogue judgment is to call a multi-round judgment function, use specific prompt words, combine the historical dialogue content, call the big model to determine whether the current question is related to the historical dialogue and whether it needs to be rewritten, and determine whether it is a multi-round dialogue and the new question after rewriting based on the judgment result.

[0062] In some embodiments, the processing module 40 is used to rewrite the dialogue by combining the original question corresponding to the user's input with the historical context to update the original question if the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is a multi-round dialogue.

[0063] In some embodiments, the processing module 40 is configured to generate a clarification question and feed back to the user if the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is not a multi-round dialogue.

[0064] In some embodiments, the processing module 40 is used to process the original question based on the user's input if the clarification is determined to be unnecessary.

[0065] An embodiment of the present application also provides a multi-threaded concurrent clarification and multi-round dialogue logic processing device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus, and the memory is used to store the multi-threaded concurrent clarification and multi-round dialogue logic processing program; the processor is used to implement the above-mentioned multi-threaded concurrent clarification and multi-round dialogue logic processing method when executing the program stored in the memory.

[0066] The communication bus mentioned in the multi-thread concurrent clarification and multi-round dialogue logic processing device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0067] The communication interface is used for communication between the multi-threaded concurrent clarification and multi-round dialogue logic processing device and other devices.

[0068] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0069] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0070] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0071] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

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

[0073] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0074] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0075] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0076] In addition, for technical details not fully described in this embodiment, reference may be made to the multi-threaded concurrent clarification and multi-round dialogue logic processing method provided in any embodiment of the present invention, which will not be repeated here.

[0077] In addition, 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 system 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 system. 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 system including the element.

[0078] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0079] 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 invention is essentially 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 a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0080] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

[0081] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above method.

Claims

1. A multi-threaded concurrent clarification and multi-round dialogue logic processing method, characterized in that: The multi-threaded concurrent clarification and multi-round dialogue logic processing method includes: In response to the user's input, determining whether there is a historical context for the current session; If the current conversation has a historical context, a clarification judgment is performed through the first thread, and a multi-round dialogue judgment is performed through the second thread. The clarification judgment is to call a clarification function to determine whether the user's question needs clarification. The clarification function is combined with the big model call, and according to the preset Prompt template, it returns whether clarification is needed and the rhetorical question for clarification. The multi-round dialogue judgment is to call a multi-round judgment function, use specific prompt words, and combine the historical dialogue content to call the big model to determine whether the current question is related to the historical dialogue and whether it needs to be rewritten. According to the judgment result, it is determined whether it is a multi-round dialogue and the new question after rewriting; Obtain and integrate the results of clarification judgments and multi-round dialogue judgments; Corresponding processing is performed based on the results of clarification judgment and multi-round dialogue judgment.

2. The multi-threaded concurrent clarification and multi-round dialogue logic processing method as claimed in claim 1, characterized in that: The method further comprises: If the current conversation does not have a historical context, the clarification judgment is performed through a single thread, and the multi-round dialogue judgment is not performed.

3. The multi-threaded concurrent clarification and multi-round dialogue logic processing method as claimed in claim 1, characterized in that: The corresponding processing is performed based on the results of the clarification judgment and the multi-round dialogue judgment, including: If the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is a multi-round dialogue, the original question corresponding to the user's input is combined with the historical context to rewrite the dialogue to update the original question.

4. The multi-threaded concurrent clarification and multi-round dialogue logic processing method as claimed in claim 3, characterized in that: The method further comprises: If the result of the clarification judgment is that clarification is needed and the result of the multi-round dialogue judgment is that it is not a multi-round dialogue, a clarifying question is generated and fed back to the user.

5. The multi-threaded concurrent clarification and multi-round dialogue logic processing method as claimed in claim 3, characterized in that: The method further comprises: If the clarification is determined to be unnecessary, the original question is processed based on the user's input.

6. A multi-threaded concurrent clarification and multi-round dialogue logic processing device, characterized in that: The multi-thread concurrent clarification and multi-round dialogue logic processing device comprises: A receiving module, configured to determine whether a historical context exists in the current session in response to a user input; A judgment module, for performing clarification judgment through the first thread and multi-round dialogue judgment through the second thread respectively if there is a historical context in the current conversation, wherein the clarification judgment is to call a clarification function to judge whether the user's question needs clarification, and the clarification function is called in combination with the big model, and returns whether clarification is needed and a rhetorical question for clarification according to a preset Prompt template; the multi-round dialogue judgment is to call a multi-round judgment function, use a specific prompt word, and call the big model in combination with the historical dialogue content to judge whether the current question is related to the historical dialogue and whether it needs to be rewritten, and determine whether it is a multi-round dialogue and the new question after rewriting according to the judgment result; A reading module is used to obtain and integrate the results of clarification judgment and multi-round dialogue judgment; The processing module is used to perform corresponding processing based on the results of the clarification judgment and the multi-round dialogue judgment.

7. The multi-threaded concurrent clarification and multi-round dialogue logic processing device according to claim 6, characterized in that: The judgment module is used to perform clarification judgment through a single thread and not perform multi-round dialogue judgment if there is no historical context in the current conversation.

8. A multi-threaded concurrent clarification and multi-round dialogue logic processing device, characterized in that: The multi-threaded concurrent clarification and multi-round dialogue logic processing device includes: a memory, a processor, and a multi-threaded concurrent clarification and multi-round dialogue logic processing program stored in the memory and executable on the processor, wherein the multi-threaded concurrent clarification and multi-round dialogue logic processing program is configured to implement the steps of the multi-threaded concurrent clarification and multi-round dialogue logic processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligent response method and device and electronic equipment

    CN113449093A

  • Man-machine interaction type query optimization method and system for incomplete query

    CN118643060A