Dialogue direction control method and device, equipment, storage medium and program product
By judging the triggering conditions and chronological relationship of the dialogue stage conversion in intelligent marketing, updating the dialogue stage and generating response text, the problem of dialogue stage backtracking in intelligent marketing is solved, and the forward control of the dialogue stage and the directional improvement of the dialogue process is achieved.
Patent Information
- Application Number
- CN202510183000.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, when customers issue cross-stage problems in smart marketing, it may lead to backtracking of dialogue phases.
By obtaining the pending dialogue text, it is determined whether the trigger condition for dialogue phase conversion is met. If it is met, the actual dialogue phase is updated according to the chronological relationship between the candidate dialogue phase and the current actual dialogue phase, and the response text is generated based on the updated dialogue phase.
It realizes forward control of the dialogue stage in intelligent marketing, avoids backtracking of the dialogue stage, and improves the directionality and efficiency of the dialogue process.
Smart Images

Figure CN120196713A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method, device, equipment, storage medium and program product for controlling the direction of a conversation. Background Art
[0002] Intelligent autonomous marketing has been used in multiple industries. The intelligent autonomous marketing in the prior art is implemented based on a multi-agent framework, and different role switches in different conversation stages are created through multi-agents to achieve conversation driving, which is applied to sales scenarios. However, in a marketing scenario, a customer may issue diverse and disorderly questions. When the customer issues a cross-stage question in the prior art, it may lead to the problem of conversation stage backtracking. Summary of the Invention
[0003] The present invention provides a method, device, equipment, storage medium and program product for controlling the direction of a conversation, so as to solve the defect of conversation stage backtracking in intelligent marketing in the prior art and achieve forward control of the conversation stage in intelligent marketing.
[0004] The present invention provides a method for controlling the direction of a conversation, including: Obtaining a conversation text to be processed, and determining whether a trigger condition for conversation stage conversion is satisfied based on the conversation text to be processed; If it is satisfied, obtaining the chronological relationship between the candidate conversation stage corresponding to the trigger condition and the current actual conversation stage, and determining an update result of the actual conversation stage based on the chronological relationship; Determining a response text for the conversation text to be processed based on the update result of the actual conversation stage.
[0005] According to a method for controlling the direction of a conversation provided by the present invention, the determining an update result of the actual conversation stage based on the chronological relationship includes: When the candidate conversation stage is earlier than the actual conversation stage, keeping the actual conversation stage unchanged; When the candidate conversation stage is later than the actual conversation stage, updating the actual conversation stage to the candidate conversation stage.
[0006] According to a method for controlling the direction of a conversation provided by the present invention, the obtaining the chronological relationship between the candidate conversation stage corresponding to the trigger condition and the current actual conversation stage includes: Obtaining a first identification variable corresponding to the candidate conversation stage corresponding to the trigger condition and a second identification variable corresponding to the current actual conversation stage; Determining the chronological relationship based on the magnitude relationship between the first identification variable and the second identification variable.
[0007] A method for controlling the direction of a conversation provided by the present invention, determining a response text for the to-be-processed conversation text based on the update result of the actual conversation stage, includes: Obtain the prompt words of the conversation stage corresponding to the update result of the actual conversation stage; Determine whether the to-be-processed conversation text hits a preset tool; If it hits, call the preset tool to generate the response text of the to-be-processed conversation text; If it does not hit, input the to-be-processed conversation text and the prompt words into a large language model, and obtain the response text output by the large language model; Among them, the prompt words of the conversation stage reflect the task objectives of the conversation stage.
[0008] A method for controlling the direction of a conversation provided by the present invention, before obtaining the to-be-processed conversation text, includes: Receive a setting instruction; Based on the setting instruction, determine the default text and the parameters of the large language model, and the default text is the conversation opening text; Register the call interface of the preset tool.
[0009] A method for controlling the direction of a conversation provided by the present invention, before registering the call interface of the preset tool, includes: Determine the preset tool based on the task objectives of each conversation stage.
[0010] The present invention also provides a conversation direction control device, including: A stage conversion judgment module, configured to obtain a to-be-processed conversation text, and determine whether a trigger condition for conversation stage conversion is satisfied based on the to-be-processed conversation text; A stage update module, configured to, if satisfied, obtain the chronological relationship between the candidate conversation stage corresponding to the trigger condition and the current actual conversation stage, and determine an update result for the actual conversation stage based on the chronological relationship; A response module, configured to determine a response text for the to-be-processed conversation text based on the update result of the actual conversation stage.
[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the conversation direction control method as described in any one of the above when executing the computer program.
[0012] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the conversation direction control method as described in any one of the above is implemented.
[0013] The present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the dialogue direction control method as described in any one of the above.
[0014] The dialogue direction control method, device, equipment, storage medium and program product provided by the present invention, wherein the method includes: obtaining a dialogue text to be processed, and determining whether a dialogue stage transition trigger condition is satisfied based on the dialogue text to be processed; if satisfied, obtaining the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determining an update result of the actual dialogue stage based on the chronological relationship; and determining a response text for the dialogue text to be processed based on the update result of the actual dialogue stage. In this way, by adding a judgment on the chronological relationship of the dialogue stage when triggering the dialogue stage transition in the dialogue process, the technical effect of controlling the direction of the dialogue stage can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 is a schematic flowchart of the dialogue direction control method provided by the present invention.
[0017] Figure 2 is a schematic diagram of assistant configuration in the dialogue direction control method provided by the present invention.
[0018] Figure 3 is a schematic diagram of tool configuration in the dialogue direction control method provided by the present invention.
[0019] Figure 4 is a schematic diagram of the process of generating a response text in the dialogue direction control method provided by the present invention.
[0020] Figure 5 is a schematic diagram of the dialogue stage in the dialogue direction control method provided by the present invention.
[0021] Figure 6 is a schematic structural diagram of the dialogue direction control device provided by the present invention.
[0022] Figure 7 is a schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0024] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0025] It should also be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0026] It should be further understood that the term "and / or" used in the specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0027] As used in this specification and the appended claims, the term "if" may be interpreted as "when", "once", "in response to determining" or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]" according to the context.
[0028] Intelligent autonomous marketing has been used in multiple industries. The intelligent autonomous marketing in the prior art is implemented based on a multi-agent framework, and different role switches in different dialogue stages are created through multiple agents to achieve dialogue driving and are applied to sales scenarios. However, in the marketing scenario, customers may issue diverse and disorderly questions. When customers issue cross-stage questions in the prior art, it may lead to the problem of dialogue stage backtracking.
[0029] Aiming at the defect of dialogue stage backtracking in intelligent marketing in the prior art, the present invention provides a dialogue direction control method, device, equipment, storage medium and program product to achieve forward control of the dialogue stage in intelligent marketing.
[0030] The following combination Figures 1-5Describe the conversation direction control method provided by the present invention. As Figure 1 shown, the conversation direction control method includes the steps of: S110. Obtain the conversation text to be processed, and determine whether the trigger condition for conversation stage transition is satisfied based on the conversation text to be processed; S120. If it is satisfied, obtain the chronological relationship between the candidate conversation stage corresponding to the trigger condition and the current actual conversation stage, and determine the update result of the actual conversation stage based on the chronological relationship; S130. Determine the response text for the conversation text to be processed based on the update result of the actual conversation stage.
[0031] The conversation direction control method provided by the present invention can achieve the technical effect of controlling the direction of the conversation stage by adding the judgment of the chronological relationship of the conversation stage when triggering the conversation stage transition during the conversation process.
[0032] The conversation direction control method provided by the present invention can be implemented based on the sales service assistant software. The sales service assistant software uses the current conversation stage and a large language model to implement intelligent conversations.
[0033] Before putting the sales service software into use to execute the above steps of the conversation direction control method provided by the present invention, first configure the assistant software, that is, before obtaining the conversation text to be processed, including: Receive a setting instruction; Determine the default text and the parameters of the large language model based on the setting instruction, and the default text is the conversation opening text; Register the call interface of the preset tool.
[0034] As Figure 2 shown, first configure the description, opening remarks of the sales service assistant software, and parameters such as the temperature value related to the large language model. By configuring the opening remarks, the customer experience can be improved, and by configuring the parameters of the large language model, the quality level of the response text generated for the received conversation text to be processed can be achieved.
[0035] Furthermore, in the conversation direction control method provided by the present invention, the call interface of the preset tool is registered in advance, so that the preset tool can be directly called through the call interface during the process of generating the response text, realizing new acquisition and integration, and improving the quality and efficiency of the generated response text. Specifically, before registering the call interface of the preset tool, it includes: Determine the preset tool based on the task objectives of each conversation stage.
[0036] According to the dialogue scenario to which the dialogue direction control method provided by the present invention is applied, multiple dialogue stages in this scenario are determined in advance, and then the preset tools required for the task objectives of each dialogue stage are confirmed, and the interfaces are registered. Taking the intelligent sales service scenario as an example, three dialogue stages can be set, namely demand contact, recommendation facilitation, and contact information acquisition. Based on these three dialogue stages, deeply understand the consumer's needs through the dialogue, make recommendations based on the understanding of the needs, then continuously carry out marketing persuasion work around the recommended items and the customer's needs, finally persuade the customer to reach an order intention, and finally ask the customer for the on-site contact information to form a sales closed-loop for the real customer manager to provide on-site service. And in these dialogue stages, it may be necessary to call the interface of business system tools such as product recommendation and appointment order placement. First, develop the interfaces of these tools using traditional IT means, then register them in the tool management module of the front-line service platform, and finally incorporate them into the tool configuration of the sales service assistant software, such as Figure 3 shown.
[0037] In order to achieve natural intelligent dialogue, the generated response text should be consistent with the consciousness of a natural person. That is, in order to achieve the goal, it is necessary to communicate naturally in stages. For example, in the intelligent sales service scenario, the generated response text should be consistent with the consciousness of a natural salesperson. That is, in order to achieve the sales goal, the communication process with the customer needs to be naturally staged, and each dialogue stage has its own dialogue task objective, with a certain degree of autonomy and purpose. When the task of the current dialogue stage is completed, the stage conversion is triggered, and the dialogue content is transferred to the next stage. As Figure 5 shown, the key question-and-answer for transitioning from the first demand contact stage to the second recommendation facilitation stage is to trigger the dialogue of the product recommendation tool after completing the task of obtaining customer attributes in the first dialogue stage. The key question-and-answer for triggering the transition from the second recommendation facilitation stage to the third contact information acquisition stage is to confirm the dialogue of the user's intention to be achieved.
[0038] However, in the actual dialogue process, there may be a situation where the customer jumps stages in terms of questions. For example, if the customer has already reached the intention to order a certain product, then trigger the transition to the contact information acquisition stage to ask the customer for contact information. However, if the customer answers their basic situation again, it may lead to matching the stage transition of obtaining customer attributes and triggering the product recommendation tool, and then starting the recommendation facilitation stage again, and generating the response text based on the stage tasks of this stage. In order to avoid this situation of unidirectional control of stage backtracking or jumping, in the dialogue direction control method provided by the present invention, after determining that the trigger condition for dialogue stage conversion is met based on the to-be-processed dialogue text, based on the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, determine the update result of the actual dialogue stage, specifically including: When the candidate dialogue stage is earlier than the actual dialogue stage, keep the actual dialogue stage unchanged; When the candidate dialogue stage is later than the actual dialogue stage, update the actual dialogue stage to the candidate dialogue stage.
[0039] That is to say, only control the forward conversion of the dialogue stage, and there will be no backtracking.
[0040] The judgment of the chronological relationship between the candidate dialogue stage and the current actual dialogue stage can be achieved by setting a stage identification variable, specifically including: Obtain the first identification variable corresponding to the candidate dialogue stage corresponding to the trigger condition and the second identification variable corresponding to the current actual dialogue stage; Based on the size relationship between the first identification variable and the second identification variable, determine the chronological relationship.
[0041] Allocate a stage identification variable for each dialogue stage, and determine the size relationship between the identification variables corresponding to each dialogue stage based on the setting occurrence order of each dialogue stage. For example, set the identification variables of demand contact, recommendation facilitation, and contact method acquisition to 1, 2, and 3 respectively. The forward control of the dialogue is achieved by setting a globally unique variable within the session. When each session is started, set the global variable to the identification variable of the first stage. Whichever stage the dialogue is in, the global variable is set to the identification variable of that stage. However, before the global variable is to be set when a stage conversion trigger condition is met, perform a size judgment between the global variable and the identification variable of the candidate dialogue stage to be converted. As long as the identification variable of the candidate dialogue stage is less than or equal to the current global variable, the global variable is not allowed to be updated, that is, the stage conversion is not allowed, otherwise it is allowed. In this way, only by setting the identification variable of the stage and through simple size comparison, the chronological judgment of the dialogue stage can be achieved, so as to control the entire dialogue to move forward intelligently, and solve the problems of dialogue stage backtracking and dialogue process disorder caused by multi-factor Q&A of customers.
[0042] Determine the response text for the dialogue text to be processed based on the update result of the actual dialogue stage, including: Obtain the prompt word of the dialogue stage corresponding to the update result of the actual dialogue stage; Determine whether the dialogue text to be processed hits a preset tool; If it hits, call the preset tool to generate the response text of the dialogue text to be processed; If it does not hit, input the dialogue text to be processed and the prompt word into the large language model to obtain the response text output by the large language model; Among them, the prompt word of the dialogue stage reflects the task goal of the dialogue stage.
[0043] Such as Figure 4As shown, when the dialogue text to be processed, i.e., the question, is received, it is determined whether the dialogue text to be processed hits a preset tool, such as whether it hits a recommended business tool (such as a reservation and order placement tool), etc. If it hits, the preset tool is called to generate the response text for the dialogue text to be processed. For example, after hitting the reservation and order placement tool, the order placement tool is called to generate an order placement link as the response text. If it does not hit, the large language model generates the response text.
[0044] As can be seen from the above description, in the dialogue process, in addition to relying on the agent matching tool to implement the dialogue, ordinary dialogue needs to rely on the large model's own meaning understanding, text generation, and multi-round dialogue capabilities to achieve. However, relying solely on the large model for answering has the disadvantage that many questions are prone to overgeneralization and cannot actively guide the customer to achieve the goal of the current dialogue stage in the answer.
[0045] To address this defect, in the dialogue direction control method provided by the present invention, a prompt word reflecting the task goal is set for each dialogue stage. When the dialogue text to be processed is input into the large language model to generate the response text each time, the prompt word of the current dialogue stage and the dialogue text to be processed are input into the large language model together, so as to provide the direction of the response text for the large language model and not deviate from the task goal of the current dialogue stage.
[0046] Within each dialogue stage, the prompt word of this dialogue stage is retained. No matter what questions the customer asks in this stage, in addition to solving the problem, the dialogue task of the current stage is also pursued through the prompt word. Specifically, for all questions (i.e., the dialogue text to be processed sent by the user) in the process, the prompt word is appended to the large language model for summarization, so that the large language model has the ability to automatically pursue questions related to the task goal or automatically supplement content related to the pursuit of the task goal in the answer to the current question. Only one prompt word is running at the same time within a session. When the dialogue stage switches, the prompt word will also switch accordingly. As Figure 5 shown, taking the intelligent sales service scenario as an example, in the demand contact dialogue stage, the task goal is to clarify the customer attributes (industry, area, number of people, turnover, etc.). The prompt word for this dialogue stage is: The goal of the current link is to clarify the customer attributes, etc. For the question "I want to learn about a certain xx product" sent by the customer, in the generated answer text, in addition to introducing the content of the xx product, the content of asking about the customer attributes is also supplemented.
[0047] By setting a prompt word reflecting the task goal in each stage of the dialogue and generating the response text in combination with the prompt word, the intelligent dialogue can not only simply solve the current problem, but also play the function of completing the task.
[0048] The dialogue direction control method provided by the present invention, when applied to the intelligent sales scenario, can implement a highly intelligent and user-friendly sales assistant. By customizing the stage identification variable and stage prompt word control of the assistant, different dialogue strategies and direction controls can be presented in different sales stages, and the control of the direction precursor can be realized during the dialogue process, achieving natural interaction with potential customers, thereby improving sales efficiency, reducing sales costs, and providing a more high-quality and personalized sales experience for customers.
[0049] The dialogue direction control device provided by the present invention will be described below. The dialogue direction control device described below can be mutually corresponding and referred to the dialogue direction control method described above. As Figure 6 shown, the dialogue direction control device provided by the present invention includes a stage conversion judgment module 610, a stage update module 620, and a response module 630. Among them: The stage conversion judgment module 610 is used to obtain the dialogue text to be processed and determine whether the trigger condition for dialogue stage conversion is satisfied based on the dialogue text to be processed; The stage update module 620 is used to, if satisfied, obtain the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determine the update result of the actual dialogue stage based on the chronological relationship; The response module 630 is used to determine the response text for the dialogue text to be processed based on the update result of the actual dialogue stage.
[0050] The dialogue direction control device provided by the present invention can achieve the technical effect of controlling the direction of the dialogue stage by adding the judgment of the chronological relationship of the dialogue stage when triggering the dialogue stage conversion during the dialogue process.
[0051] In a possible implementation manner, the process of the stage update module 620 determining the update result of the actual dialogue stage based on the event sequence relationship includes: When the candidate dialogue stage is earlier than the actual dialogue stage, keep the actual dialogue stage unchanged; When the candidate dialogue stage is later than the actual dialogue stage, update the actual dialogue stage to the candidate dialogue stage.
[0052] In a possible implementation manner, the process of the stage update module 620 obtaining the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage includes: Obtain the first identification variable corresponding to the candidate dialogue stage corresponding to the trigger condition and the second identification variable corresponding to the current actual dialogue stage; Determine the chronological relationship based on the magnitude relationship between the first identification variable and the second identification variable.
[0053] In a possible implementation, the response module 630 determines a response text for the to-be-processed dialogue text based on the update result of the actual dialogue stage, including: Obtain the prompt words of the dialogue stage corresponding to the update result of the actual dialogue stage; Determine whether the to-be-processed dialogue text hits a preset tool; If it hits, call the preset tool to generate a response text for the to-be-processed dialogue text; If it does not hit, input the to-be-processed dialogue text and the prompt words into a large language model to obtain the response text output by the large language model; Among them, the prompt words of the dialogue stage reflect the task objectives of the dialogue stage.
[0054] In a possible implementation, the dialogue direction control device provided by the present invention further includes a configuration module, which is used to receive a setting instruction before obtaining the to-be-processed dialogue text; determine a default text and the parameters of the large language model based on the setting instruction, and the default text is the dialogue opening text; register the call interface of the preset tool.
[0055] Further, before registering the call interface of the preset tool, the configuration module is further used to: determine the preset tool based on the task objectives of each dialogue stage.
[0056] Figure 7 An example of the entity structure diagram of an electronic device is shown as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740. Among them, the processor 710, the communication interface 720, and the memory 730 complete mutual communication through the communication bus 740. The processor 710 can call the logical instructions in the memory 730 to execute the dialogue direction control method, which includes: obtaining the to-be-processed dialogue text, determining whether the trigger condition for dialogue stage conversion is satisfied based on the to-be-processed dialogue text; if it is satisfied, obtaining the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determining the update result of the actual dialogue stage based on the chronological relationship; determining the response text for the to-be-processed dialogue text based on the update result of the actual dialogue stage.
[0057] In addition, when the logical instructions in the above-mentioned memory 730 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, 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. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0058] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the dialogue direction control method provided by the above-mentioned various methods. The method includes: obtaining a dialogue text to be processed, and determining whether a trigger condition for dialogue stage transition is satisfied based on the dialogue text to be processed; if satisfied, obtaining the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determining an update result for the actual dialogue stage based on the chronological relationship; and determining a response text for the dialogue text to be processed based on the update result of the actual dialogue stage.
[0059] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the dialogue direction control method provided by the above-mentioned various methods. The method includes: obtaining a dialogue text to be processed, and determining whether a trigger condition for dialogue stage transition is satisfied based on the dialogue text to be processed; if satisfied, obtaining the chronological relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determining an update result for the actual dialogue stage based on the chronological relationship; and determining a response text for the dialogue text to be processed based on the update result of the actual dialogue stage.
[0060] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0061] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling a conversation direction, characterized in that: include: Acquire the dialogue text to be processed, and determine whether a trigger condition for dialogue phase transition is met based on the dialogue text to be processed; If the condition is satisfied, then obtaining the time sequence relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage, and determining the update result of the actual dialogue stage based on the time sequence relationship; A response text for the to-be-processed dialogue text is determined based on the update result of the actual dialogue stage.
2. The method for controlling the conversation direction according to claim 1, characterized in that: The determining of the update result of the actual dialogue stage based on the time sequence relationship includes: When the candidate dialogue stage is earlier than the actual dialogue stage, maintaining the actual dialogue stage unchanged; When the candidate dialogue phase is later than the actual dialogue phase, the actual dialogue phase is updated to the candidate dialogue phase.
3. The method for controlling the conversation direction according to claim 1, characterized in that: The obtaining of the time sequence relationship between the candidate dialogue stage corresponding to the trigger condition and the current actual dialogue stage includes: Acquire a first identification variable corresponding to the candidate dialogue stage corresponding to the trigger condition and a second identification variable corresponding to the current actual dialogue stage; The time sequence relationship is determined based on the size relationship between the first identification variable and the second identification variable.
4. The method for controlling the conversation direction according to claim 1, characterized in that: The step of determining a response text for the to-be-processed dialogue text based on the update result of the actual dialogue stage includes: Obtaining a prompt word of the dialogue stage corresponding to the update result of the actual dialogue stage; Determining whether the dialogue text to be processed hits a preset tool; If a match is found, the preset tool is called to generate the response text of the dialogue text to be processed; If no hit is found, the dialogue text to be processed and the prompt word are input into the large language model to obtain the response text output by the large language model; The prompt words in the dialogue stage reflect the task objectives of the dialogue stage.
5. The method for controlling the conversation direction according to claim 4, characterized in that: Before obtaining the conversation text to be processed, the following steps are included: Receive setting instructions; Determining a default text and parameters of the large language model based on the setting instruction, the default text being a dialogue opening text; Register the calling interface of the preset tool.
6. The method for controlling the conversation direction according to claim 5, characterized in that: Before registering the calling interface of the preset tool, the following steps are included: The preset tools are determined based on the task objectives of each dialogue stage.
7. A conversation direction control device, characterized in that: include: A phase transition judgment module, used to obtain the dialogue text to be processed, and determine whether the triggering condition for dialogue phase transition is met based on the dialogue text to be processed; a phase updating module, configured to obtain a time sequence relationship between the candidate dialogue phase corresponding to the trigger condition and the current actual dialogue phase if the trigger condition is satisfied, and determine an update result of the actual dialogue phase based on the time sequence relationship; A response module is used to determine a response text for the to-be-processed dialogue text based on the update result of the actual dialogue stage.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the conversation direction control method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the conversation direction control method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the conversation direction control method according to any one of claims 1 to 6 is implemented.