Digital employee dialogue generation method and system based on large language model
By using a session operator and state closure verification method, changes in the order of operations in digital employee dialogues are identified and corrected, solving the problem of insufficient state conflict identification in existing technologies and achieving highly accurate and consistent response generation.
Patent Information
- Application Number
- CN202611422187.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing digital employee dialogue generation technologies struggle to identify state conflicts caused by changes in the order of operations, resulting in inconsistencies between the business state expressed in responses and the actual business execution state.
The method of session operator and state closure verification is adopted. Session operation information is generated through semantic parsing, which is then converted into session state transformation operators. Non-commutative conflicts are identified, the session operator chain is reconstructed, candidate responses are generated, and reverse semantic parsing and correction are performed to ensure response consistency.
It improves the accuracy of state conflict identification and response consistency in continuous multi-round business dialogues, reduces the possibility of deviation between response content and actual business state, and realizes self-verification and closed-loop correction.
Smart Images

Figure CN123178561A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital employee dialogue generation technology, and in particular to a method and system for generating digital employee dialogue based on a large language model. Background Technology
[0002] Existing digital employee dialogue generation technologies typically employ large language models to semantically understand user input and historical dialogues, and then combine contextual information, business knowledge, and current business data to generate natural language responses. In continuous multi-turn business dialogues, the system primarily maintains the conversation state based on dialogue rounds, semantic relationships, and contextual memory, and updates business intent and response content according to the user's latest expression.
[0003] However, when users add, modify, cancel, or reconfirm expressed business operations, different business states may arise due to changes in the execution order of different operations. Existing technologies typically focus on semantic intent recognition and contextual association, making it difficult to identify state conflicts caused by the order of operations. They also lack mechanisms for reverse verification of the business operations implied in the generated response, which can easily lead to inconsistencies between the business state expressed in the response and the actual business execution state. Summary of the Invention
[0004] One objective of this invention is to propose a method and system for generating digital employee dialogues based on a large language model. This invention uses conversation operators and state closure checks to generate digital employee dialogues, which has the advantages of high accuracy and good consistency.
[0005] A method for generating digital employee dialogue based on a large language model according to an embodiment of the present invention includes the following steps:
[0006] Acquire continuous multi-turn natural language dialogue data between digital employees and users, as well as the current business status; perform semantic parsing on the continuous multi-turn natural language dialogue data; and generate conversation operation information.
[0007] Based on the session operation information, each operation behavior is converted into a session state transition operator, and then connected according to the dialogue rounds and state change relationships to form a session operator chain;
[0008] Determine the associated session state transition operators from the session operator chain, exchange the execution order of the associated session state transition operators, and perform state calculations based on the current business state to generate non-exchange conflict information;
[0009] Based on non-exchange conflict information and session operation information, the effective execution relationship is determined, the session operator chain is reconstructed, and the current effective session operator sequence and target business status are generated.
[0010] Based on the current valid session operator sequence, target service state, non-exchange conflict information, and continuous multi-round natural language dialogue data, response generation information is generated, and a state-closed recursive generation network is used to generate candidate responses.
[0011] Perform reverse semantic parsing on candidate responses to generate candidate response operation information, copy the current business state to generate a mirror business state, and execute implicit business operations to generate a shadow business state.
[0012] The shadow business status is compared with the target business status, state closure deviation information is generated and candidate responses are corrected until the shadow business status is consistent with the target business status, and the current response of the digital employee is output.
[0013] Optionally, the generation of the session operation information includes:
[0014] Acquire continuous, multi-turn natural language dialogue data between digital employees and users, as well as the current business status;
[0015] Arrange the natural language dialogues in the order in which they occur in a series of natural language dialogues, determine the dialogue round corresponding to each round of natural language dialogue, and perform semantic parsing on each round of natural language dialogue to identify the corresponding business objects, operational behaviors and operational directions.
[0016] Based on the current business status, determine the state change relationship corresponding to each operation behavior, and associate the business object, operation behavior, operation target, dialogue round and state change relationship to generate session operation information.
[0017] Optionally, the generation of the session operator chain includes:
[0018] Read the session operation information according to the dialogue rounds, and determine the pre-operation state, post-operation state and operation direction of each operation based on the state change relationship;
[0019] Using the pre-operation state and post-operation state as the starting and ending points of state transition, each operation behavior is converted into a corresponding session state transition operator, and the corresponding session operation information is retained.
[0020] Arrange the session state transition operators according to the dialogue rounds, match the post-operation state and pre-operation state of adjacent session state transition operators, determine the connection direction by combining the operation direction, and generate operator connection relationships.
[0021] Based on the operator connection relationship, each session state transformation operator is connected sequentially to form a connection path, and the continuous state changes of the same business object and the operation pointing connection between different business objects are preserved to generate a session operator chain.
[0022] Optionally, the generation of the non-exchange conflict information includes:
[0023] Read the business objects and state change relationships of each session state transition operator along the session operator chain, and determine the associated session state transition operators that act on the same business objects or have state transfer relationships.
[0024] The original execution sequence is formed according to the execution order in the session operator chain, and the execution order of the associated session state transformation operators is exchanged to form the exchanged execution sequence;
[0025] Using the current business state as the starting state for the calculation, the session state transformation operator is executed according to the original execution sequence and the exchanged execution sequence to generate the original execution business state and the exchanged execution business state.
[0026] Compare the original execution business state with the exchanged execution business state, identify the associated session state transformation operators that produce state differences as non-exchange operator pairs, and determine the corresponding non-exchange conflict positions.
[0027] Non-commutative operator pairs are associated with non-commutative conflict positions to generate non-commutative conflict information.
[0028] Optionally, the generation of the target service state includes:
[0029] Based on the dialogue round corresponding to the non-exchange conflict location, the session operation information is read round by round from that dialogue round to the current dialogue round to generate a conflict backtracking sequence;
[0030] The operation pointers in the conflict backtracking sequence are traced to determine the pointer relationships between subsequent operations and previous operations, and the effects of continuation, modification, cancellation or reconfirmation are determined by combining the state change relationships.
[0031] Based on the interaction relationship, the effective execution relationship of each session state transition operator is determined, and the previous execution results are retained, replaced, canceled, or reconfirmed.
[0032] Adjust the reserved state and execution order of the corresponding session state transformation operators in the session operator chain according to the effective execution relationship, and generate the current effective session operator sequence;
[0033] Based on the current business state, the session state transformation operators in the current valid session operator sequence are executed sequentially, and the business state after the execution is completed is determined as the target business state.
[0034] Optionally, the generation of the candidate responses includes:
[0035] According to the execution order of the current valid session operator sequence, associate the business objects, operation behaviors and state change relationships corresponding to each session state change operator, and map the state change relationships with the corresponding business object states in the target business state to generate a valid business expression sequence.
[0036] Based on the non-commutative operator pairs and non-commutative conflict positions in the non-commutative conflict information, the dialogue content and operation direction corresponding to the non-commutative operator pairs are located from the continuous multi-turn natural language dialogue data, and a conflict semantic sequence is generated according to the dialogue turn.
[0037] Based on the effective execution relationship, non-commutative operator pairs are associated with the corresponding session state transformation operators in the current effective session operator sequence. Based on the association result, the conflict semantic sequence is mapped to the effective business expression sequence to determine the conflict semantic position, and response generation information is generated in combination with the target business state.
[0038] The response generation information is input into a closed recursive generation network. The closed recursive generation network includes an input sequence construction layer, a temporal recursive state layer, a conflict semantic injection layer, a target state guidance layer, and a language generation layer. The input sequence construction layer constructs the response state sequence from the valid business expression sequence according to the execution order of the current valid session operator sequence. The temporal recursive state layer recursively passes the state change relationship of each business object along the response state sequence to generate a recursive state representation. The conflict semantic injection layer merges the conflict semantic sequence into the corresponding recursive state representation according to the conflict semantic position to generate a fused state representation. The target state guidance layer associates the fused state representation with the corresponding business object state in the target business state to generate a response semantic sequence.
[0039] The semantic sequence of responses is processed by a language generation layer to generate natural language. The content is then concatenated according to the execution order of the current valid session operator sequence to obtain candidate responses.
[0040] Optionally, the generation of the shadow service status includes:
[0041] Perform reverse semantic parsing on candidate responses, divide the semantic content of candidate responses according to business objects, determine the operation behavior and operation direction corresponding to each business object, and identify the operation behavior that can cause the state change of the corresponding business object as implicit business operation.
[0042] The initial execution order is established according to the expression order of the implicit business operations in the candidate responses. The state inheritance relationship between implicit business operations is determined along the operation direction. When the business state after the execution of the previous implicit business operation is used as the execution basis for the subsequent implicit business operation, the previous implicit business operation is kept before the subsequent implicit business operation. The initial execution order is adjusted based on the state inheritance relationship to determine the semantic execution order.
[0043] The implicit business operations are combined with the corresponding semantic execution order to generate candidate response operation information, and the current business state is copied to generate a mirror business state.
[0044] According to the semantic execution order in the candidate response operation information, implicit business operations are executed sequentially in the mirror business state. After each execution, the business state of the corresponding business object is updated, and the updated mirror business state is used as the basis for the execution of the next implicit business operation. After all implicit business operations are completed, a shadow business state is generated.
[0045] Optionally, the generation of the digital employee's current response includes:
[0046] The shadow business status is matched with the target business status item by item according to the business object. The business status of the corresponding business objects is compared and the business objects with different statuses are identified as deviation business objects.
[0047] Based on the query of candidate response operation information of the deviation business object, the implicit business operation acting on the deviation business object is determined along the semantic execution order, and the corresponding response fragment of the implicit business operation in the candidate response is located. The implicit business operation that causes the state difference is identified as the deviation operation behavior, and the corresponding response fragment is identified as the deviation response fragment.
[0048] The deviation business object, deviation operation behavior, and deviation response fragment are combined to generate state closure deviation information. Based on the state closure deviation information, the deviation operation behavior is mapped to the non-commutative operator pair in the non-commutative conflict information. The corresponding session state transformation operator is located according to the non-commutative conflict position. The correction order of the deviation response fragment is determined according to the current valid session operator sequence, and the response correction information is generated.
[0049] Based on the response correction information, the deviation response fragments in the candidate responses are corrected so that the operation behavior and expression order corresponding to the deviation business object are consistent with the execution order of the corresponding session state transformation operator in the current effective session operator sequence, and the corrected candidate responses are generated.
[0050] The shadow business status is regenerated for the corrected candidate response. The regenerated shadow business status is compared with the target business status. If there is a difference in status, status closure deviation information is generated and the candidate response is corrected. When the shadow business status is consistent with the target business status, the corresponding candidate response is output as the current response of the digital employee.
[0051] A digital employee dialogue generation system based on a large language model according to an embodiment of the present invention includes:
[0052] The dialogue parsing module is used to acquire continuous multi-turn natural language dialogue data and the current business status, and generate conversation operation information;
[0053] The session operator generation module is used to generate session state transition operators and session operator chains based on session operation information;
[0054] The non-commutative conflict identification module is used to perform execution order exchange and state calculation on the associated session state transition operators to generate non-commutative conflict information.
[0055] The business status generation module is used to determine the valid execution relationship based on non-exchange conflict information and generate the current valid session operator sequence and target business status.
[0056] The candidate response generation module is used to generate response generation information and uses a state-closed recursive generation network to generate candidate responses.
[0057] The shadow business status generation module is used to perform reverse semantic parsing on candidate responses and generate shadow business status based on the mirror business status.
[0058] The response correction module is used to compare the shadow business status with the target business status, generate status closure deviation information, correct candidate responses, and output the current response of the digital employee.
[0059] The beneficial effects of this invention are:
[0060] This invention performs semantic parsing on continuous multi-turn natural language dialogue data between digital employees and users, organizing business objects, operational behaviors, operational directions, dialogue rounds, and state change relationships into conversational operation information. Furthermore, each operational behavior is converted into a conversational state transition operator, and a chain of conversational operators represents the continuous changes in business states during multi-turn dialogues. For conversational state transition operators acting on the same business object or exhibiting state transitivity, by exchanging the execution order and performing state calculations separately, non-exchangeable conflicts arising from changes in the order of operations can be identified. This overcomes the problem that relying solely on natural language semantic association makes it difficult to detect differences in the order of business operations, thus improving the accuracy of state conflict identification in continuous multi-turn business dialogues.
[0061] Furthermore, this invention uses non-exchange conflict information to backtrack through continuous multi-turn natural language dialogue data, determines the effective execution relationship of each session state transition operator, and reconstructs the session operator chain accordingly to form a current effective session operator sequence. By executing the current effective session operator sequence, the target business state is obtained, ensuring that the user's effective business intentions after adding, changing, canceling, or reconfirming in multi-turn dialogues can be implemented in a unified business state result. Based on this, a state-closed recursive generation network combines the current effective session operator sequence, the target business state, and non-exchange conflict information to generate candidate responses. This ensures that candidate responses simultaneously reflect effective business operations and their actual execution order, reducing the possibility of deviation between the response content and the actual business state.
[0062] Furthermore, this invention performs reverse semantic parsing on candidate responses, remapping the implicit business operations and semantic execution order in the candidate responses to the mirror business state. It then obtains the shadow business state by executing the implicit business operations and compares the shadow business state with the target business state, performing closed-loop verification of the generated response at the business state level. For candidate responses with state differences, it can locate the deviating business object, deviating operation behavior, and deviating response fragment, and perform targeted corrections based on non-exchange conflict information until the shadow business state matches the target business state. This achieves self-verification and closed-loop correction of the digital employee's response generation results, improving the consistency of digital employee responses, the accuracy of business state, and the reliability of interaction in complex and continuous business dialogues. Attached Figure Description
[0063] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0064] Figure 1 This is an overall flowchart of a digital employee dialogue generation method based on a large language model proposed in this invention;
[0065] Figure 2 This is a comparison diagram showing the execution order of the conversation state transformation operator in a digital employee dialogue generation method based on a large language model proposed in this invention. Detailed Implementation
[0066] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0067] refer to Figures 1-2 A method for generating digital employee dialogues based on a large language model includes the following steps:
[0068] Acquire continuous multi-turn natural language dialogue data between digital employees and users and the current business status; perform semantic parsing on the continuous multi-turn natural language dialogue data to generate conversation operation information, which includes business objects, operation behaviors, operation directions, dialogue rounds and state change relationships.
[0069] Based on the session operation information, each operation behavior is converted into a session state transformation operator that acts on the corresponding business object. The session state transformation operators are connected according to the dialogue rounds and state change relationships to generate a session operator chain.
[0070] Identify associated session state transformation operators that act on the same business object or have a state transit relationship from the session operator chain, exchange the execution order of the associated session state transformation operators, and perform state calculations based on the current business state. Compare the business states corresponding to different execution orders. When there are differences in the business states corresponding to different execution orders, generate non-exchange conflict information. The non-exchange conflict information includes non-exchange operator pairs and non-exchange conflict positions.
[0071] Based on non-exchange conflict information and session operation information, backtrack continuous multi-turn natural language dialogue data to determine the effective execution relationship of each session state transformation operator. Reconstruct the session operator chain according to the effective execution relationship to generate the current effective session operator sequence. Execute the current effective session operator sequence based on the current business state to generate the target business state.
[0072] Based on the current valid session operator sequence, target service state, non-exchange conflict information, and continuous multi-round natural language dialogue data, response generation information is generated. A state-closed recursive generation network is used to process the response generation information and generate candidate responses.
[0073] Reverse semantic parsing is performed on candidate responses to generate candidate response operation information, which includes implicit business operations and semantic execution order. The current business state is copied to generate a mirror business state, and implicit business operations are executed in the mirror business state according to the semantic execution order to generate a shadow business state.
[0074] The shadow business status is compared with the target business status, and the candidate response content corresponding to the status difference is located by combining the candidate response operation information. The status closure deviation information is generated, which includes the deviation business object, deviation operation behavior and deviation response fragment. The candidate response is corrected based on the status closure deviation information and non-exchange conflict information, and the shadow business status is regenerated for the corrected candidate response. When the shadow business status is consistent with the target business status, the corresponding candidate response is output as the current response of the digital employee.
[0075] In this embodiment, the generation of session operation information includes:
[0076] Acquire continuous, multi-turn natural language dialogue data between digital employees and users, as well as the current business status;
[0077] Arrange the natural language dialogues in the order in which they occur in a series of natural language dialogues, determine the dialogue round corresponding to each round of natural language dialogue, and perform semantic parsing on each round of natural language dialogue to identify the corresponding business objects, operational behaviors and operational directions.
[0078] Based on the current business status, determine the state change relationship corresponding to each operation behavior, and associate the business object, operation behavior, operation target, dialogue round and state change relationship to generate session operation information;
[0079] Specifically, each operation is processed sequentially according to the dialogue rounds. The corresponding business state content is located based on the business object in the current business state. The business state content before and after the operation is determined by combining the operation, operation direction and corresponding natural language dialogue content. The business state content before the operation is taken as the starting point of the state change and the business state content after the operation is executed is taken as the ending point of the state change. The starting point of the state change, the ending point of the state change and the corresponding operation are associated to generate the state change relationship.
[0080] In this embodiment, the generation of the session operator chain includes:
[0081] Read session operation information according to the dialogue rounds, determine the pre-operation state and post-operation state of each operation behavior when it acts on the corresponding business object based on the state change relationship, and associate the operation pointer with the corresponding operation behavior;
[0082] Specifically, the starting point and ending point of the state change relationship are read, the business state corresponding to the starting point of the state change is determined as the pre-operation state, and the business state corresponding to the ending point of the state change is determined as the post-operation state. For consecutive operation behaviors of the same business object, the corresponding state change relationship is arranged according to the dialogue round, and the post-operation state of the previous operation behavior is matched with the pre-operation state of the next operation behavior to form the pre-operation state and post-operation state corresponding to each operation behavior.
[0083] Using the pre-operation state as the starting point of the state transition and the post-operation state as the ending point of the state transition, the operation behavior is converted into a session state transition operator that points from the pre-operation state to the post-operation state. The corresponding business object, operation behavior, operation direction, dialogue round and state change relationship are retained in the session state transition operator.
[0084] Arrange the state transition operators according to the dialogue rounds, match the state after the operation of the previous state transition operator with the state before the operation of the next state transition operator one by one, and determine the connection direction of the previous and next state transition operators by combining the operation pointer, and generate the operator connection relationship.
[0085] Specifically, the business object, pre-operation state, and post-operation state of adjacent session state change operators are read sequentially according to the dialogue rounds. The post-operation state of the previous session state change operator is matched with the pre-operation state of the next session state change operator. The connection direction between the two session state change operators is determined by combining the operation pointer. The corresponding session state change operators and connection directions are associated to generate operator connection relationships.
[0086] Based on the operator connection relationship, each session state change operator is connected sequentially to form a connection path. The continuous state changes of the same business object and the connections formed by operation pointers between different business objects are retained in the corresponding connection path to generate a session operator chain.
[0087] Specifically, the corresponding session state change operators are sequentially connected according to the operator connection relationship, forming a connection path along the connection direction. The continuous state changes of the same business object are arranged in the corresponding connection path according to the dialogue round. The connections formed by operation pointers between different business objects are connected to the corresponding connection path. Then, the connection paths are combined according to the dialogue round to generate a session operator chain.
[0088] In this embodiment, the generation of non-exchange conflict information includes:
[0089] Read the business objects and state change relationships corresponding to each session state change operator along the session operator chain, and determine the session state change operators that act on the same business object or whose state changes can be passed to the next session state change operator as associated session state change operators.
[0090] Specifically, the business objects and state change relationships corresponding to each session state change operator are read sequentially along the session operator chain. Session state change operators with the same business objects are associated. For session state change operators with different business objects, the state after the operation of the previous session state change operator is matched with the state before the operation of the next session state change operator. The state transmission relationship between the two is determined by combining the operation pointer. Session state change operators that act on the same business object or have a state transmission relationship are identified as associated session state change operators.
[0091] For each set of associated session state transition operators, the original execution sequence is formed according to their execution order in the session operator chain. The execution order of the associated session state transition operators is swapped to form the swapped execution sequence, and the corresponding session state transition operators in the two execution sequences are kept the same.
[0092] The current business state is used as the starting state for the calculation of the original execution sequence and the exchanged execution sequence, respectively. The session state transformation operator is executed in the corresponding execution order to generate the original execution business state and the exchanged execution business state.
[0093] Specifically, the current business state is copied to form the calculation start state corresponding to the original execution sequence and the exchange execution sequence. The corresponding session state transformation operators are executed sequentially according to the original execution sequence. For each session state transformation operator, the business state of the corresponding business object in the current calculation state is updated according to its operation behavior and state change relationship. The updated business state is used as the calculation basis for the next session state transformation operator. After the original execution sequence is completed, the original execution business state is generated. Then, the same processing is performed according to the exchange execution sequence based on another calculation start state to generate the exchange execution business state.
[0094] According to the comparison of the original execution business state and the exchanged execution business state by the corresponding business object, when there is a difference in the state of the corresponding business object, the associated session state transformation operator that causes the state difference is determined as a non-commutative operator pair, and the non-commutative conflict position is determined according to the position of the non-commutative operator pair in the session operator chain.
[0095] Specifically, the original execution business state is mapped to the exchanged execution business state according to the business object, and the business state content corresponding to the same business object is compared item by item to determine the business state content that causes state differences due to different execution orders. Based on the associated session state transformation operator corresponding to the business state content, the non-exchange operator pair is determined, and the arrangement position of the non-exchange operator pair in the session operator chain is read and the arrangement position is determined as the non-exchange conflict position.
[0096] Non-commutative operator pairs are associated with their corresponding non-commutative conflict positions to generate non-commutative conflict information.
[0097] In this embodiment, the generation of the target service state includes:
[0098] Based on the non-exchangeable conflict position in the non-exchangeable conflict information, the corresponding dialogue round in the continuous multi-turn natural language dialogue data is located, and the conversation operation information is read from the corresponding dialogue round to the current dialogue round to generate a conflict backtracking sequence.
[0099] Specifically, based on the non-exchange conflict position, locate the corresponding session state transition operator in the session operator chain, read the dialogue rounds retained by the corresponding session state transition operator, take the dialogue round as the backtracking starting position, read the data round by round according to the occurrence order of multiple consecutive rounds of natural language dialogue data, read the business object, operation behavior, operation direction and state change relationship corresponding to each dialogue round, and arrange the reading results according to the dialogue round to generate a conflict backtracking sequence;
[0100] The operation pointers in the conflict backtracking sequence are traced to determine the pointer relationship between subsequent operation behaviors and corresponding operation behaviors of non-commutative operators. Combined with the state change relationship, the effect of subsequent operation behaviors on the business state formed by the preceding operation behaviors is determined to continue, change, cancel or reconfirm.
[0101] Specifically, the subsequent operation behavior is read sequentially according to the dialogue rounds along the conflict backtracking sequence. The preceding operation behavior pointed to by the subsequent operation behavior is determined according to the operation pointer. The business objects and state change relationships of the two are matched. When the subsequent operation behavior continues to maintain the business state formed by the preceding operation behavior, a continuation relationship is formed. When the subsequent operation behavior changes the business state formed by the preceding operation behavior, a change relationship is formed. When the subsequent operation behavior eliminates the state change formed by the preceding operation behavior, a cancellation relationship is formed. When the subsequent operation behavior points to the preceding operation behavior again and confirms the corresponding execution result, a reconfirmation relationship is formed. In this way, the interaction relationship between the subsequent operation behavior and the preceding operation behavior is generated.
[0102] The effective execution relationship of each session state transition operator is determined based on the interaction relationship. For the continuation, the execution result of the preceding session state transition operator is retained. For the change, the execution result of the subsequent session state transition operator is used to replace the previous execution result. For the cancellation, the execution result of the preceding session state transition operator is canceled. For the reconfirmation, the execution result of the pointed-to session state transition operator is retained.
[0103] Specifically, the corresponding session state transition operators are processed sequentially according to their operational relationships. Continuation means retaining the execution result of the preceding session state transition operator, Change means replacing the previous execution result with the execution result of the subsequent session state transition operator, Cancellation means revoking the execution result of the preceding session state transition operator, and Reconfirmation means retaining the execution result of the pointed-to session state transition operator. The processing methods of each session state transition operator and its corresponding execution result are then associated to form a valid execution relationship.
[0104] Adjust the retained state and execution order of the corresponding session state transition operators in the session operator chain according to the effective execution relationship, and maintain the original execution order of the remaining session state transition operators to generate the current effective session operator sequence;
[0105] Specifically, the session state transition operators in the session operator chain are processed sequentially according to the effective execution relationship. The reserved state of each session state transition operator is updated, and the execution order of the corresponding session state transition operators is adjusted according to the effective execution relationship. At the same time, the original execution order of the remaining session state transition operators is maintained. The session state transition operators after the reserved state and execution order adjustment are arranged according to the adjusted execution order to generate the current effective session operator sequence.
[0106] Based on the current business state, the session state transformation operators are executed sequentially according to the current valid session operator sequence. The business state after all session state transformation operators have been executed is determined as the target business state.
[0107] In this embodiment, the generation of candidate responses includes:
[0108] According to the execution order of the current valid session operator sequence, associate the business objects, operation behaviors and state change relationships corresponding to each session state change operator, and map the state change relationships with the corresponding business object states in the target business state to generate a valid business expression sequence.
[0109] Specifically, each session state transformation operator is read sequentially according to the current valid session operator sequence, and the corresponding business objects, operation behaviors and state change relationships are associated. The business state corresponding to the same business object is read from the target business state, and the business state together with the corresponding business object, operation behavior and state change relationship are used to form a business expression item. Then, each business expression item is arranged according to the execution order of the current valid session operator sequence to generate a valid business expression sequence.
[0110] Based on the non-commutative operator pairs and non-commutative conflict positions in the non-commutative conflict information, the dialogue content and operation direction corresponding to the non-commutative operator pairs are located from the continuous multi-turn natural language dialogue data, and a conflict semantic sequence is generated according to the dialogue turn.
[0111] Specifically, the dialogue rounds retained by each session state transition operator in the non-commutative operator pair are read, the corresponding dialogue content in the continuous multi-round natural language dialogue data is located according to the dialogue rounds, and the relevant semantic content is determined by combining the business objects, operation behaviors and operation directions retained by the corresponding session state transition operators. Each semantic content is associated with the corresponding non-commutative operator pair, and each semantic content is arranged according to the dialogue rounds to generate a conflict semantic sequence.
[0112] Based on the effective execution relationship, non-commutative operator pairs are associated with the corresponding session state transformation operators in the current effective session operator sequence. Based on the association result, the conflict semantic sequence is mapped to the effective business expression sequence to determine the conflict semantic position, and response generation information is generated in combination with the target business state.
[0113] Specifically, based on the effective execution relationship, the session state transformation operator in the non-exchange operator pair is determined to be the corresponding session state transformation operator in the current effective session operator sequence. The arrangement position of the corresponding session state transformation operator in the current effective session operator sequence is read, and the corresponding business expression item in the effective business expression sequence is located according to the arrangement position. The arrangement position of the corresponding business expression item is determined as the conflict semantic position. The conflict semantic sequence is mapped to the conflict semantic position, and the response generation information is generated in combination with the target business state.
[0114] The response generation information is input into a closed recursive generation network. The closed recursive generation network includes an input sequence construction layer, a temporal recursive state layer, a conflict semantic injection layer, a target state guidance layer, and a language generation layer. The input sequence construction layer constructs the response state sequence from the valid business expression sequence according to the execution order of the current valid session operator sequence. The temporal recursive state layer recursively passes the state change relationship of each business object along the response state sequence to generate a recursive state representation. The conflict semantic injection layer merges the conflict semantic sequence into the corresponding recursive state representation according to the conflict semantic position to generate a fused state representation. The target state guidance layer associates the fused state representation with the corresponding business object state in the target business state to generate a response semantic sequence.
[0115] Specifically, the state-closed recursive generation network consists of an input sequence construction layer, a temporal recursive state layer, a conflict semantic injection layer, a target state guidance layer, and a language generation layer connected in series. The conflict semantic sequence is accessed from the conflict semantic injection layer, and the target business state is accessed from the target state guidance layer. The input sequence construction layer encodes the business object, operation behavior, and state change relationship into 768-dimensional vectors, and combines them into a two-dimensional feature matrix according to the execution order of the current effective session operator sequence. The conflict semantic sequence and the target business state adopt the same 768-dimensional vector format to maintain the consistency of feature dimensions in each layer.
[0116] The training data consisted of historical continuous multi-turn natural language dialogue data, corresponding business status, and manually confirmed digital employee responses. The manually confirmed digital employee responses were used as the target output labels. The training data was divided into 9600 sets, 1200 sets, and 1200 sets for network training, network parameter adjustment, and training result testing, respectively.
[0117] Training uses cross-entropy loss to calculate the difference between the probability distribution of generated words and the corresponding target words. Backpropagation is performed using the AdamW optimization method. The batch size is set to 32, the initial learning rate is set to 0.02%, and the maximum number of training rounds is set to 20. After each training round, the validation loss is calculated. Training ends and the corresponding network parameters are saved when the decrease in validation loss does not exceed 0.1% for five consecutive rounds.
[0118] Specifically, training data is constructed using historical continuous multi-turn natural language dialogue data, corresponding business states, and manually confirmed digital employee responses. The business objects, operational behaviors, and state change relationships in the historical continuous multi-turn natural language dialogue data are associated and arranged according to the actual execution order to form a training business expression sequence. Dialogue content with non-exchangeable conflicts is arranged according to the dialogue turn to form a training conflict semantic sequence, and the corresponding position of the training conflict semantic sequence in the training business expression sequence is determined. The training business expression sequence, training conflict semantic sequence, corresponding position, and business state are combined to form training response generation information. The training response generation information is used as the input of the state closed recursive generation network, and the manually confirmed digital employee response is used as the target output. The cross-entropy loss between the probability distribution of the word units generated by the language generation layer and the corresponding word units in the target output is calculated. The network parameters of the temporal recursive state layer, conflict semantic injection layer, target state guidance layer, and language generation layer are updated through backpropagation.
[0119] The state-closed recursive generation network in this embodiment can be improved based on the RWKV recursive language model. The RWKV model combines the temporal state transmission capability of recursive neural networks with the natural language generation capability of large language models, making it suitable for sequential information processing in continuous multi-turn dialogues. Based on this, the present invention retains the recursive state transmission and lexical generation mechanism, and adds an input sequence construction layer, a conflict semantic injection layer, and a target state guidance layer for digital employee business dialogues. The business objects, operation behaviors, and state change relationships corresponding to the current effective conversation operator sequence are organized into a response state sequence. During the recursive state transmission process, conflict semantic sequences are injected according to the conflict semantic position. Then, the recursive generation result is associated with the target business state, so that the language generation process not only considers the semantic connections before and after, but also can perceive the non-exchange conflicts between business operations and the final business state to be achieved, thereby forming a recursive generation structure oriented towards business state closure, improving the consistency between candidate responses and actual business execution states.
[0120] The semantic sequence of responses is processed by a language generation layer to generate natural language. The content is then concatenated according to the execution order of the current valid session operators to obtain candidate responses.
[0121] Specifically, the language generation layer processes each response semantic representation sequentially according to the order of the response semantic sequence, maps the current response semantic representation to the probability distribution of the corresponding word, and determines the subsequent word by combining the generated preceding word, continuously generating the natural language content corresponding to each business expression item, and then connects each natural language content according to the execution order of the current effective conversation operator sequence to generate candidate responses.
[0122] In this embodiment, the generation of the shadow service status includes:
[0123] Perform reverse semantic parsing on candidate responses, divide the semantic content of candidate responses according to business objects, determine the operation behavior and operation direction corresponding to each business object, and identify the operation behavior that can cause the state change of the corresponding business object as implicit business operation.
[0124] Specifically, candidate responses are segmented according to the semantic boundaries in the candidate responses. The business objects, operational behaviors and operational directions of the semantic content of each segment are identified. The identified operational behaviors are associated with the corresponding business objects. The state changes formed after the operational behaviors act on the business objects are determined. The operational behaviors that can cause the state changes of the corresponding business objects are identified as implicit business operations. At the same time, the positional relationship between the implicit business operations and the corresponding semantic content in the candidate responses is recorded.
[0125] The initial execution order is established according to the expression order of the implicit business operations in the candidate responses. The state inheritance relationship between implicit business operations is determined along the operation direction. When the business state after the execution of the previous implicit business operation is used as the execution basis for the subsequent implicit business operation, the previous implicit business operation is kept before the subsequent implicit business operation. The initial execution order is adjusted based on the state inheritance relationship to determine the semantic execution order.
[0126] Specifically, the implicit business operations are arranged according to the order in which they are expressed in the candidate responses. The business object, operation behavior, and operation pointer corresponding to each implicit business operation are read. The corresponding state change result is determined based on the state change content expressed by the implicit business operation. The business state content referenced by the next implicit business operation is matched with the state change result corresponding to the previous implicit business operation to form a state inheritance relationship between implicit business operations. The initial execution order is adjusted according to the state inheritance relationship to determine the semantic execution order.
[0127] The implicit business operations are combined with the corresponding semantic execution order to generate candidate response operation information, and the current business state is copied to generate a mirror business state.
[0128] According to the semantic execution order in the candidate response operation information, the implicit business operations are executed sequentially in the mirror business state. After each execution, the business state of the corresponding business object is updated, and the updated mirror business state is used as the basis for the execution of the next implicit business operation. After all implicit business operations are completed, the shadow business state is generated.
[0129] Specifically, implicit business operations are read sequentially according to the semantic execution order in the candidate response operation information. The business object corresponding to the implicit business operation is located in the mirror business state, and the business state of the business object is updated according to the state change corresponding to the implicit business operation. After each implicit business operation is completed, the updated mirror business state is used as the execution basis for the next implicit business operation until all implicit business operations are completed. The mirror business state after all state updates is determined as the shadow business state.
[0130] In this embodiment, the generation of the digital employee's current response includes:
[0131] The shadow business status is matched with the target business status item by item according to the business object. The business status of the corresponding business objects is compared and the business objects with different statuses are identified as deviation business objects.
[0132] Based on the query of candidate response operation information of the deviation business object, the implicit business operation acting on the deviation business object is determined along the semantic execution order, and the corresponding response fragment of the implicit business operation in the candidate response is located. The implicit business operation that causes the state difference is identified as the deviation operation behavior, and the corresponding response fragment is identified as the deviation response fragment.
[0133] Specifically, the process reads the business state content of the deviation business object where there is a difference between the shadow business state and the target business state, reads the implicit business operations acting on the deviation business object in reverse order of semantic execution in the candidate response operation information, and traces the formation process of the difference business state content according to the state inheritance relationship between the implicit business operations. It determines the implicit business operations that directly form the difference business state content or pass the difference business state content to the subsequent implicit business operations, identifies the corresponding implicit business operations as deviation operation behaviors, and then determines the deviation response fragment according to the positional relationship between the implicit business operations and the corresponding semantic content in the candidate responses.
[0134] The deviation business object, deviation operation behavior, and deviation response fragment are combined to generate state closure deviation information. Based on the state closure deviation information, the deviation operation behavior is mapped to the non-commutative operator pair in the non-commutative conflict information. The corresponding session state transformation operator is located according to the non-commutative conflict position. The correction order of the deviation response fragment is determined according to the current valid session operator sequence, and the response correction information is generated.
[0135] Specifically, the deviation business object, deviation operation behavior, and deviation response fragment are read from the state closure deviation information. Based on the deviation business object and deviation operation behavior, the deviation operation behavior is matched with the non-commutative operator pair in the non-commutative conflict information. Based on the non-commutative conflict position, the corresponding session state transformation operator in the session operator chain is located. Combined with the effective execution relationship, the session state transformation operator corresponding to the non-commutative conflict in the current effective session operator sequence is determined. The operation behavior and execution position of the corresponding session state transformation operator are read. The correction order of the deviation response fragment is determined according to the execution position. The corresponding operation behavior and correction order are associated with the state closure deviation information to generate response correction information.
[0136] Based on the response correction information, the deviation response fragments in the candidate responses are corrected so that the operation behavior and expression order corresponding to the deviation business object are consistent with the execution order of the corresponding session state transformation operator in the current effective session operator sequence, and the corrected candidate responses are generated.
[0137] Specifically, based on the response correction information, the deviation response fragments in the candidate responses are located, the corresponding operation behaviors and correction order in the response correction information are read, the semantic content representing the deviation operation behavior in the deviation response fragments is replaced with the semantic content of the corresponding operation behavior, and the arrangement of the deviation response fragments and related response content is adjusted according to the correction order, while keeping the rest of the natural language content in the candidate responses unchanged. After completing the operation behavior replacement and expression order adjustment, the corrected candidate responses are generated.
[0138] The shadow business status is regenerated for the corrected candidate response. The regenerated shadow business status is compared with the target business status. If there is a difference in status, the status closure deviation information is generated and the candidate response is corrected. When the shadow business status is consistent with the target business status, the corresponding candidate response is output as the current response of the digital employee.
[0139] Specifically, the corrected candidate responses are re-semantically parsed to generate corresponding candidate response operation information. The current business state is then copied to regenerate a mirror business state. The corresponding implicit business operations are executed in the mirror business state according to the semantic execution order in the candidate response operation information to generate a new shadow business state. The new shadow business state is compared with the target business state according to the business objects. For business objects that still have state differences, state closure deviation information is generated and the candidate responses are corrected. The shadow business state is then regenerated based on the corrected candidate responses until the shadow business state is consistent with the target business state. Finally, the corresponding candidate response is output as the current response of the digital employee.
[0140] A digital employee dialogue generation system based on a large language model includes:
[0141] The dialogue parsing module is used to acquire continuous multi-turn natural language dialogue data and the current business status, and generate conversation operation information;
[0142] The session operator generation module is used to generate session state transition operators and session operator chains based on session operation information;
[0143] The non-commutative conflict identification module is used to perform execution order exchange and state calculation on the associated session state transition operators to generate non-commutative conflict information.
[0144] The business status generation module is used to determine the valid execution relationship based on non-exchange conflict information and generate the current valid session operator sequence and target business status.
[0145] The candidate response generation module is used to generate response generation information and uses a state-closed recursive generation network to generate candidate responses.
[0146] The shadow business status generation module is used to perform reverse semantic parsing on candidate responses and generate shadow business status based on the mirror business status.
[0147] The response correction module is used to compare the shadow business status with the target business status, generate status closure deviation information, correct candidate responses, and output the current response of the digital employee.
[0148] Example 1: To verify the feasibility of this invention in practice, it was applied to a continuous business dialogue scenario for digital employees in an enterprise's online business service center. In this scenario, users can continuously submit modification, cancellation, and reconfirmation operations related to the same business object. Since subsequent operations may point to previously established business states, the execution order of different operations directly affects the final business state. Using a method that generates responses solely based on the latest round of text or historical semantic context can easily lead to problems such as cancelled business operations being retained, subsequent confirmations pointing to incorrect values, or the business state expressed in the response being inconsistent with the actual business state that should be achieved.
[0149] In practical applications, digital employees acquire continuous multi-round natural language dialogue data and the current business status. The current business status is generated from the digital employee's response in the current round, creating a previously saved snapshot of the business status, and the original content remains unchanged during the current dialogue processing. The system copies this current business status to form a state calculus copy, and processes each round of natural language dialogue sequentially according to the dialogue rounds. This ensures that the business status formed by the previous operation can serve as the basis for determining the state change relationship of the subsequent operation, thereby avoiding the interpretation of all operations with the same initial state.
[0150] Taking a user's repeated expressions regarding the same service order, such as "Change the processing time to 3 PM," "Cancel this time," and "Confirm cancellation, no need to reinstate," as an example, the session operation information obtained through semantic parsing includes the corresponding business object, operation behavior, operation target, dialogue rounds, and state change relationships. The first round of operation behavior is modification, the second round is cancellation, and the third round is reconfirmation, where the third round operation targets the second round's cancellation operation. The state calculation copy is updated sequentially according to the dialogue rounds. The first round forms the business state after the service time modification; the second round uses the modified business state as the pre-operation state and forms the post-cancellation business state; the third round, combined with its operation target, determines the reconfirmation of the cancellation execution result, thus forming a mutually reinforcing state change relationship.
[0151] Based on session operation information, each operation behavior is converted into a corresponding session state transition operator. Each session state transition operator retains the business object, operation behavior, operation direction, dialogue round, and state change relationship, and takes the state before the operation as the starting point of the state transition and the state after the operation as the ending point of the state transition. After connecting each session state transition operator according to the dialogue round and state change relationship, a session operator chain is formed, so that the continuous state changes of the same service order in multiple rounds of dialogue can be expressed according to the execution direction.
[0152] When performing non-commutative conflict analysis on associated session state transition operators, the actual business data is not directly changed. Instead, the current business state is copied into two independent computational states: one executed according to the original execution sequence, and the other according to the commutative execution sequence. When executing a session state transition operator, the current state of the corresponding business object in the computational state is mapped to the state before the operation of the session state transition operator. If they correspond, the business state is updated to the state after the operation; if they do not correspond, the current state of the corresponding business object remains unchanged. This approach allows for different state computational results between modification followed by cancellation and cancellation followed by modification, thereby identifying the impact of the operation execution order on the business state and generating non-commutative operator pairs and non-commutative conflict positions.
[0153] After obtaining non-exchange conflict information, the session operation information is traced back along the corresponding dialogue rounds. In the aforementioned dialogue, the third round reaffirms the cancellation operation from the second round, thus confirming that the business state corresponding to the cancellation operation remains valid. Based on this relationship, the valid execution relationship of each session state transition operator is determined. The retention status and execution order of the corresponding session state transition operators in the session operator chain are adjusted according to the valid execution relationship to form the current valid session operator sequence. Subsequently, the current business state is copied again, and the corresponding session state transition operators are executed sequentially according to the current valid session operator sequence, ultimately forming the target business state, in which the service order remains in the cancelled state.
[0154] During the response generation process, a valid business expression sequence is formed according to the current valid session operator sequence, and a conflict semantic sequence is formed according to the corresponding dialogue content based on the non-commutative operator pair. Then, the conflict semantic position is determined, and together with the target business state, they form response generation information. After the state closed recursive generation network processes the response generation information, it generates candidate responses, so that the candidate responses not only reflect natural language semantics, but also reflect the operation behavior and target business state corresponding to the current valid session operator sequence.
[0155] After candidate responses are generated, they undergo reverse semantic parsing. If the candidate response is "This processing has been cancelled for you; there is no need to continue processing according to 3 PM," the system can identify the implicit business operation corresponding to the cancellation and its semantic execution order. The system replicates the current business state to form a mirror business state and executes the implicit business operation according to the semantic execution order to obtain a shadow business state. If the service order in the shadow business state is in a cancelled state and matches the target business state, the candidate response is output as the current response from the digital employee.
[0156] If a candidate response is incorrectly expressed as "The processing time has been adjusted to 3 PM and processing continues," the implicit business operation obtained from reverse semantic parsing will cause the shadow business state to show that the service order is still valid, differing from the cancellation status in the target business state. At this point, the implicit business operation causing the difference is located by reverse-engineering the candidate response operation information, identifying the deviated business object, the deviated operation behavior, and the deviated response fragment, generating state closure deviation information, and determining the correction order of the deviation response fragments by combining non-exchange conflict information. After correcting the candidate response, the shadow business state is regenerated until it matches the target business state, and then the corresponding digital employee's current response is output. Throughout the process, the original current business state remains unchanged, and all state calculations and mirror executions are completed on the replicated business state. Therefore, the actual business data will not be changed due to conflict identification or candidate response verification, making it feasible for direct deployment in online business dialogue processing workflows.
[0157] Statistical analysis was conducted on 3000 consecutive multi-turn natural language dialogues from actual operation records. Among them, 864 dialogues involved modification, cancellation, or reconfirmation operations. After different execution order state calculations, 327 dialogues showed differences in business state. In these 327 dialogues, after identifying the associated session state transformation operator and exchanging the execution order through the session operator chain, 318 dialogues generated non-exchange conflict information corresponding to the manual review results. Further, by combining the non-exchange conflict information to trace back the session operation information and determine the effective execution relationship, and generating the target business state through the current effective session operator sequence, 312 target business states were consistent with the final business state obtained from manual review. This indicates that the session state transformation operator and non-exchange conflict analysis can effectively identify the impact of the operation order caused by modification, cancellation, and reconfirmation in consecutive multi-turn dialogues.
[0158] Further verification of candidate response state closure was conducted on 327 dialogues affected by the order of operations. After the initial generation of candidate responses, 289 groups had shadow business states consistent with the target business state, while 38 groups had state differences. State closure deviation information was generated for these 38 dialogues, and the deviation business object, deviation operation behavior, and deviation response fragment were located. After correcting the candidate responses, 27 groups changed from inconsistent states to consistent states. Ultimately, a total of 316 dialogues had shadow business states consistent with the target business state. This demonstrates that by adding candidate response reverse semantic parsing, mirror business state execution, and state closure deviation correction processes, it is possible to further correct business state deviations caused by incorrect operation behavior or expression order in candidate responses, thus maintaining a better correspondence between the current response of the digital employee and the target business state.
[0159] Table 1. Comparison of multi-turn business processing performance of different digital employee dialogue generation methods
[0160] Comparison indicators Intent recognition and template generation methods Contextual Large Language Model Generation Method Retrieval Enhancement Large Language Model Generation Method Method of the present invention Effective business operation recognition accuracy 73.70% 85.32% 89.60% 96.33% Operation pointing relationship recognition accuracy 71.25% 83.79% 88.38% 95.72% Final business status determination accuracy 70.03% 85.02% 89.30% 95.41% Final response business status consistency rate 67.58% 82.87% 87.46% 94.50% Operation execution order error rate 20.80% 13.15% 8.87% 2.75% Human intervention rate 17.43% 11.01% 7.65% 3.67% Average processing time per group of dialogues / ms 284 536 618 731
[0161] As shown in Table 1, in the same 327 groups of consecutive multi-turn natural language dialogues where the order of operation execution affects the accuracy, the present invention achieves 96.33%, 95.72%, 95.41%, and 94.50% accuracy in effective business operation identification, operation direction relationship identification, final business status determination, and final response business status consistency, respectively, which is better than the other three methods overall. The intent recognition and template generation method mainly relies on the current expression for intent classification and fixed response matching. When continuous modifications, cancellations, and reconfirmations occur, the continuity between the preceding and following business states is easily lost. The contextual large language model generation method can improve semantic understanding by utilizing historical dialogues, but it lacks a clear state calculation process for the state differences caused by different operation execution orders. The retrieval enhancement large language model generation method can supplement relevant business information, but the retrieval results themselves cannot resolve the sequential execution relationship between multiple operations. Therefore, the final business status determination and the consistency of the response business status are still lower than those of the present invention.
[0162] The operation execution order error rate of this invention is 2.75%, lower than the other three methods' 20.80%, 13.15%, and 8.87%. This performance improvement mainly stems from the construction of session state transition operators and non-commutative conflict analysis. This invention converts operational behaviors in continuous multi-turn natural language dialogues into session state transition operators acting on corresponding business objects. It exchanges the execution order of related session state transition operators and performs state calculations separately. When different execution orders result in different business states, non-commutative conflict information is generated. This information is then combined with subsequent session operations to determine valid execution relationships and reconstruct the current valid session operator sequence. Therefore, for business expressions involving modification, cancellation, and reconfirmation, the truly valid operation and its execution order can be determined from the state change results rather than simply the text order, thereby reducing errors in understanding the operation execution order.
[0163] The manual intervention rate of this invention is 3.67%, lower than the 17.43%, 11.01%, and 7.65% of the other three methods. This is because this invention continues to perform reverse semantic parsing after candidate responses are generated. The implicit business operations in the candidate responses are applied to the mirror business state according to the semantic execution order to generate a shadow business state. The shadow business state is then compared with the target business state. When state differences exist, the deviating business object, deviating operation behavior, and deviating response fragment can be further located, and the candidate response can be corrected by combining non-exchange conflict information. This allows some state deviations that originally required manual reading of the entire dialogue to be detected to be automatically identified and corrected before the response is output.
[0164] In terms of average processing time per single dialogue, this invention achieves 731ms, higher than the other three methods' 284ms, 536ms, and 618ms. This increase mainly comes from the construction of the session state transition operator, the exchange calculation of associated session state transition operators, the execution of the current effective session operator sequence, and the shadow business state closure verification after candidate response generation. Although the calculation process is increased, the average processing time remains within 1 second, achieving higher accuracy in final business state determination and consistency rate in final response business state, while reducing the operation execution order error rate and human intervention rate. Therefore, this invention can improve state consistency and response reliability in complex, continuous, multi-turn business dialogues with acceptable processing overhead.
[0165] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for generating digital employee dialogues based on a large language model, characterized in that, Includes the following steps: Acquire continuous multi-turn natural language dialogue data between digital employees and users, as well as the current business status; perform semantic parsing on the continuous multi-turn natural language dialogue data; and generate conversation operation information. Based on the session operation information, each operation behavior is converted into a session state transition operator, and then connected according to the dialogue rounds and state change relationships to form a session operator chain; Determine the associated session state transition operators from the session operator chain, exchange the execution order of the associated session state transition operators, and perform state calculations based on the current business state to generate non-exchange conflict information; Based on non-exchange conflict information and session operation information, determine the valid execution relationship, reconstruct the session operator chain, and generate the current valid session operator sequence and target business status. Based on the current valid session operator sequence, target service state, non-exchange conflict information, and continuous multi-round natural language dialogue data, response generation information is generated, and a state-closed recursive generation network is used to generate candidate responses. Perform reverse semantic parsing on candidate responses to generate candidate response operation information, copy the current business state to generate a mirror business state, and execute implicit business operations to generate a shadow business state. The shadow business status is compared with the target business status, state closure deviation information is generated and candidate responses are corrected until the shadow business status is consistent with the target business status, and the current response of the digital employee is output.
2. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the session operation information includes: Acquire continuous, multi-turn natural language dialogue data between digital employees and users, as well as the current business status; Arrange the natural language dialogues in the order in which they occur in a series of natural language dialogues, determine the dialogue round corresponding to each round of natural language dialogue, and perform semantic parsing on each round of natural language dialogue to identify the corresponding business objects, operational behaviors and operational directions. Based on the current business status, determine the state change relationship corresponding to each operation behavior, and associate the business object, operation behavior, operation target, dialogue round and state change relationship to generate session operation information.
3. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the session operator chain includes: Read the session operation information according to the dialogue rounds, and determine the pre-operation state, post-operation state and operation direction of each operation based on the state change relationship; Using the pre-operation state and the post-operation state as the starting and ending points of state transition, each operation behavior is converted into a corresponding session state transition operator, and the corresponding session operation information is retained. Arrange the session state transition operators according to the dialogue rounds, match the post-operation state and pre-operation state of adjacent session state transition operators, determine the connection direction by combining the operation direction, and generate operator connection relationships. Based on the operator connection relationship, each session state transformation operator is connected sequentially to form a connection path, and the continuous state changes of the same business object and the operation pointing connection between different business objects are preserved to generate a session operator chain.
4. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the non-exchangeable conflict information includes: Read the business objects and state change relationships of each session state transition operator along the session operator chain, and determine the associated session state transition operators that act on the same business objects or have state transfer relationships. The original execution sequence is formed according to the execution order in the session operator chain, and the execution order of the associated session state transformation operators is exchanged to form the exchanged execution sequence; Using the current business state as the starting state for the calculation, the session state transformation operator is executed according to the original execution sequence and the exchanged execution sequence to generate the original execution business state and the exchanged execution business state. Compare the original execution business state with the exchanged execution business state, identify the associated session state transformation operators that produce state differences as non-exchange operator pairs, and determine the corresponding non-exchange conflict positions. Non-commutative operator pairs are associated with non-commutative conflict positions to generate non-commutative conflict information.
5. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the target business state includes: Based on the dialogue round corresponding to the non-exchange conflict location, the session operation information is read round by round from that dialogue round to the current dialogue round to generate a conflict backtracking sequence; The operation pointers in the conflict backtracking sequence are traced to determine the pointer relationships between subsequent operations and previous operations, and the effects of continuation, modification, cancellation or reconfirmation are determined by combining the state change relationships. Based on the interaction relationship, the effective execution relationship of each session state transition operator is determined, and the previous execution results are retained, replaced, canceled, or reconfirmed. Adjust the reserved state and execution order of the corresponding session state transformation operators in the session operator chain according to the effective execution relationship, and generate the current effective session operator sequence; Based on the current business state, the session state transformation operators in the current valid session operator sequence are executed sequentially, and the business state after the execution is completed is determined as the target business state.
6. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the candidate responses includes: According to the execution order of the current valid session operator sequence, associate the business objects, operation behaviors and state change relationships corresponding to each session state change operator, and map the state change relationships with the corresponding business object states in the target business state to generate a valid business expression sequence. Based on the non-commutative operator pairs and non-commutative conflict positions in the non-commutative conflict information, the dialogue content and operation direction corresponding to the non-commutative operator pairs are located from the continuous multi-turn natural language dialogue data, and a conflict semantic sequence is generated according to the dialogue rounds. Based on the effective execution relationship, non-commutative operator pairs are associated with the corresponding session state transformation operators in the current effective session operator sequence. Based on the association result, the conflict semantic sequence is mapped to the effective business expression sequence to determine the conflict semantic position, and response generation information is generated in combination with the target business state. The response generation information is input into a closed recursive generation network. The closed recursive generation network includes an input sequence construction layer, a temporal recursive state layer, a conflict semantic injection layer, a target state guidance layer, and a language generation layer. The input sequence construction layer constructs the response state sequence from the valid business expression sequence according to the execution order of the current valid session operator sequence. The temporal recursive state layer recursively passes the state change relationship of each business object along the response state sequence to generate a recursive state representation. The conflict semantic injection layer merges the conflict semantic sequence into the corresponding recursive state representation according to the conflict semantic position to generate a fused state representation. The target state guidance layer associates the fused state representation with the corresponding business object state in the target business state to generate a response semantic sequence. The semantic sequence of responses is processed by a language generation layer to generate natural language. The content is then concatenated according to the execution order of the current valid session operator sequence to obtain candidate responses.
7. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the shadow service status includes: Perform reverse semantic parsing on candidate responses, divide the semantic content of candidate responses according to business objects, determine the operation behavior and operation direction corresponding to each business object, and identify the operation behavior that can cause the state change of the corresponding business object as implicit business operation. The initial execution order is established according to the expression order of the implicit business operations in the candidate responses. The state inheritance relationship between implicit business operations is determined along the operation direction. When the business state after the execution of the previous implicit business operation is used as the execution basis for the subsequent implicit business operation, the previous implicit business operation is kept before the subsequent implicit business operation. The initial execution order is adjusted based on the state inheritance relationship to determine the semantic execution order. The implicit business operations are combined with the corresponding semantic execution order to generate candidate response operation information, and the current business state is copied to generate a mirror business state. According to the semantic execution order in the candidate response operation information, implicit business operations are executed sequentially in the mirror business state. After each execution, the business state of the corresponding business object is updated, and the updated mirror business state is used as the basis for the execution of the next implicit business operation. After all implicit business operations are completed, a shadow business state is generated.
8. The method for generating digital employee dialogue based on a large language model according to claim 1, characterized in that, The generation of the current response from the digital employee includes: The shadow business status is matched with the target business status item by item according to the business object. The business status of the corresponding business objects is compared and the business objects with different statuses are identified as deviation business objects. Based on the query of candidate response operation information of the deviation business object, the implicit business operation acting on the deviation business object is determined along the semantic execution order, and the corresponding response fragment of the implicit business operation in the candidate response is located. The implicit business operation that causes the state difference is identified as the deviation operation behavior, and the corresponding response fragment is identified as the deviation response fragment. The deviation business object, deviation operation behavior, and deviation response fragment are combined to generate state closure deviation information. Based on the state closure deviation information, the deviation operation behavior is mapped to the non-commutative operator pair in the non-commutative conflict information. The corresponding session state transformation operator is located according to the non-commutative conflict position. The correction order of the deviation response fragment is determined according to the current valid session operator sequence, and the response correction information is generated. Based on the response correction information, the deviation response fragments in the candidate responses are corrected so that the operation behavior and expression order corresponding to the deviation business object are consistent with the execution order of the corresponding session state transformation operator in the current effective session operator sequence, and the corrected candidate responses are generated. The shadow business status is regenerated for the corrected candidate response. The regenerated shadow business status is compared with the target business status. If there is a difference in status, status closure deviation information is generated and the candidate response is corrected. When the shadow business status is consistent with the target business status, the corresponding candidate response is output as the current response of the digital employee.
9. A digital employee dialogue generation system based on a large language model, comprising the digital employee dialogue generation method based on a large language model as described in any one of claims 1 to 8, characterized in that, include: The dialogue parsing module is used to acquire continuous multi-turn natural language dialogue data and the current business status, and generate conversation operation information; The session operator generation module is used to generate session state transition operators and session operator chains based on session operation information; The non-commutative conflict identification module is used to perform execution order exchange and state calculation on the associated session state transition operators to generate non-commutative conflict information. The business status generation module is used to determine the valid execution relationship based on non-exchange conflict information and generate the current valid session operator sequence and target business status. The candidate response generation module is used to generate response generation information and uses a state-closed recursive generation network to generate candidate responses. The shadow business status generation module is used to perform reverse semantic parsing on candidate responses and generate shadow business status based on the mirror business status. The response correction module is used to compare the shadow business status with the target business status, generate status closure deviation information, correct candidate responses, and output the current response of the digital employee.
