Dialogue generation method and device, computer device and readable storage medium

By expanding the basic object profile data to generate enhanced object attribute information, constructing target scene data, and generating multi-round dialogues, the problem of insufficient dialogue richness in the training samples of large language models is solved, and the diversity and richness of simulated customer service responses are improved.

CN122262269APending Publication Date: 2026-06-23BAIRONG ZHIXIN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610215351.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-14
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In large language model training samples in commercial scenarios, salespeople have poor vocabulary and skills, resulting in insufficient simulated sales ability.

Method used

By acquiring initial scene data, expanding basic object profile data to generate enhanced object attribute information, constructing target scene data and generating target role script combinations, using dialogue models to generate simulated dialogue data through multi-round interactions, and training customer service simulation models based on this data.

Benefits of technology

It enriched customer attribute information, improved the diversity of simulated dialogue data and the richness of user responses, and enhanced the richness of simulated customer service response scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262269A_ABST
    Figure CN122262269A_ABST
Patent Text Reader

Abstract

The application relates to a dialogue generation method and device, computer equipment and a readable storage medium. The method comprises the following steps: obtaining initial scene data, wherein the initial scene data comprises a target combination and a target behavior level corresponding to the target combination, the target combination comprises target product data and basic object portrait data; performing object attribute expansion on the basic object portrait data to generate enhanced object attribute information corresponding to the basic object portrait data; constructing target scene data according to the enhanced object attribute information, the target combination and the target behavior level, and constructing a prompt word script corresponding to each target role according to the target scene data to obtain a target role script combination corresponding to each target combination; and inputting prompt word information in each target role script combination into a dialogue model for interaction to generate simulated dialogue data between the target roles. The method can improve the richness of the generated dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a dialogue generation method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the development of artificial intelligence technology, the application of large language models is becoming more and more widespread. In order to enable large language models to be used in business scenarios and to simulate salespeople to introduce products and respond to customer service, targeted training of large language models is required.

[0003] In traditional technologies, the construction of training samples for large-scale models in business scenarios, taking a sales simulation model as an example, typically uses real dialogues between salespeople and customers as training samples to train the large language model's ability to respond to customer questions or guide sales.

[0004] However, there are some problems with current traditional technologies: the richness of the sales language of simulated salespeople in the training samples of large language models in commercial scenarios is poor. Summary of the Invention

[0005] Therefore, it is necessary to provide a dialogue generation method, apparatus, computer device, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0006] Firstly, this application provides a dialogue generation method, including:

[0007] Acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0008] The basic object profile data is extended with object attributes to generate enhanced object attribute information corresponding to the basic object profile data.

[0009] Target scene data is constructed based on the enhanced object attribute information, the target combination, and the target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0010] Based on the prompt information in the script combinations of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

[0011] In one embodiment, obtaining the initial scene data includes:

[0012] Obtain target product data, basic object profile data, preset behavior levels and description information corresponding to each preset behavior level, and combine the target product data and the basic object profile data to obtain the target combination;

[0013] Based on the description information, the behavior level of each target combination is matched to obtain the target behavior level corresponding to each target combination.

[0014] In one embodiment, the target product data is obtained in the following manner:

[0015] Obtain the original product data, and perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain the target product data.

[0016] In one embodiment, the step of performing behavior level matching on each of the target combinations based on the description information to obtain the target behavior level corresponding to each target combination includes:

[0017] The target product data and the basic object profile data are arranged and combined to obtain multiple target combinations;

[0018] Based on the description information, a level division instruction is constructed. Based on the level division instruction, the scene combination model is controlled to match each target combination with the preset behavior level to obtain the target behavior level corresponding to each target combination.

[0019] In one embodiment, before constructing target scene data based on the enhanced object attribute information and the initial scene data, and constructing prompt word scripts corresponding to each target role based on the target scene data to obtain the target role script combination corresponding to each target combination, the method further includes:

[0020] Based on the scenario combination model and the preset adaptability filtering strategy, each target combination is subjected to adaptability filtering to obtain the filtered target combination.

[0021] In one embodiment, the target role script combination includes a first role script and a second role script, the dialogue model includes a first dialogue model and a second dialogue model, and the simulated dialogue data includes first dialogue data and second dialogue data.

[0022] The step of interactively inputting prompt word information from the script combinations of each target role into the dialogue model to generate simulated dialogue data between the target roles includes:

[0023] For each target character script combination, the prompt word information in the first character script is input into the first dialogue model, and the prompt word information in the second character script is input into the second dialogue model;

[0024] The dialogue is generated through multiple rounds of alternating responses based on the first dialogue model and the second dialogue model. The dialogue data generated by the dialogue sender model is used as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements. The first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model are then obtained.

[0025] In one embodiment, the method further includes:

[0026] The behavioral intent result of the second dialogue data is evaluated based on a preset evaluation model to obtain a first evaluation result, and the capability of the first dialogue data is evaluated to obtain a second evaluation result.

[0027] The first dialogue data is filtered based on the first evaluation result and the second evaluation result to obtain the target first dialogue data and the target second dialogue data corresponding to the target first dialogue data.

[0028] Secondly, this application provides a model training method, including:

[0029] Acquire multiple target character script combinations and simulated dialogue data corresponding to each target character script combination; the simulated dialogue data is generated based on the target character script combinations, the target character script combinations include prompt word scripts corresponding to each target character constructed based on target scene data, the target scene data includes enhanced object attribute information, target combinations and target behavior levels, and the target combinations include target product data and basic object profile data;

[0030] A target sample set is constructed based on the target role script combination and the simulated dialogue data;

[0031] The initial customer simulation model to be trained is fine-tuned based on the target sample set to obtain the trained customer service simulation model.

[0032] In one embodiment, the target sample set includes first sample data, a first sample label corresponding to the first sample data, second sample data, and a second sample label corresponding to the second sample data; the step of constructing the target sample set based on the target role script combination and the simulated dialogue data includes:

[0033] The customer service role script in the target role script combination is used as the first sample data, and the first customer service output content corresponding to the customer service role script in the simulated dialogue data is used as the first sample label of the first sample data.

[0034] The second customer output content in the simulated dialogue data is used as the second sample data, and the second customer service output content corresponding to the second customer output content in the simulated dialogue data is used as the second sample label of the second sample data.

[0035] In one embodiment, the initial customer simulation model to be trained is fine-tuned based on the target sample set to obtain a trained customer service simulation model, including:

[0036] The customer service role script or the second customer output content is input into the initial customer service simulation model to be trained. The initial customer service simulation model is used to perform model inference on the customer service role script or the second customer output content to obtain the first model output or the second model output.

[0037] Loss is calculated based on the output of the first model and the output of the first customer service representative, or loss is calculated based on the output of the second model and the output of the second customer service representative, to obtain the loss value;

[0038] The model parameters of the initial customer service simulation model are fine-tuned based on the loss value until the loss value meets the preset loss threshold, thus obtaining the trained customer service simulation model.

[0039] Thirdly, this application also provides a dialogue generation apparatus, comprising:

[0040] The acquisition module is used to acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0041] The attribute extension module is used to extend the object attributes of the basic object profile data and generate enhanced object attribute information corresponding to the basic object profile data.

[0042] The construction module is used to construct target scene data based on the enhanced object attribute information, the target combination and the target behavior level, and to construct prompt word scripts corresponding to each target role based on the target scene data, so as to obtain the target role script combination corresponding to each target combination;

[0043] The generation module is used to generate simulated dialogue data between the target characters by interactively inputting the prompt word information in the script combination of each target character into the dialogue model.

[0044] In one embodiment, the acquisition module is specifically used to acquire target product data, basic object profile data, preset behavior levels and description information corresponding to each preset behavior level, and to combine the target product data and the basic object profile data to obtain a target combination;

[0045] Based on the description information, the behavior level of each target combination is matched to obtain the target behavior level corresponding to each target combination.

[0046] In one embodiment, the acquisition module is specifically used to acquire original product data, and perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain target product data.

[0047] In one embodiment, the acquisition module is specifically used to arrange and combine the target product data and the basic object profile data to obtain multiple target combinations;

[0048] Based on the description information, a level division instruction is constructed. Based on the level division instruction, the scene combination model is controlled to match each target combination with the preset behavior level to obtain the target behavior level corresponding to each target combination.

[0049] In one embodiment, the device further includes:

[0050] The filtering module is used to perform adaptive filtering on each target combination according to the scenario combination model and the preset adaptability filtering strategy to obtain the filtered target combination.

[0051] In one embodiment, the target role script combination includes a first role script and a second role script, the dialogue model includes a first dialogue model and a second dialogue model, and the simulated dialogue data includes first dialogue data and second dialogue data.

[0052] The generation module is specifically used to input the prompt word information in the first character script into the first dialogue model and the prompt word information in the second character script into the second dialogue model for each target character script combination.

[0053] The dialogue is generated through multiple rounds of alternating responses based on the first dialogue model and the second dialogue model. The dialogue data generated by the dialogue sender model is used as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements. The first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model are then obtained.

[0054] In one embodiment, the device further includes:

[0055] The evaluation module is used to evaluate the behavioral intent result of the second dialogue data based on a preset evaluation model to obtain a first evaluation result, and to evaluate the capability of the first dialogue data to obtain a second evaluation result.

[0056] The filtering module is used to filter the first dialogue data based on the first evaluation result and the second evaluation result to obtain target first dialogue data and target second dialogue data corresponding to the target first dialogue data.

[0057] Fourthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0058] Acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0059] The basic object profile data is extended with object attributes to generate enhanced object attribute information corresponding to the basic object profile data.

[0060] Target scene data is constructed based on the enhanced object attribute information, the target combination, and the target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0061] Based on the prompt information in the script combinations of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

[0062] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0063] Acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0064] The basic object profile data is extended with object attributes to generate enhanced object attribute information corresponding to the basic object profile data.

[0065] Target scene data is constructed based on the enhanced object attribute information, the target combination, and the target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0066] Based on the prompt information in the script combinations of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

[0067] Sixthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0068] Acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0069] The basic object profile data is extended with object attributes to generate enhanced object attribute information corresponding to the basic object profile data.

[0070] Target scene data is constructed based on the enhanced object attribute information, the target combination, and the target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0071] Based on the prompt information in the script combinations of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

[0072] The aforementioned dialogue generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product construct initial scene data containing different target behavior levels and extend the object attributes of the basic object profile data in the initial scene data to generate enhanced object attribute information. Compared with real customers in traditional technologies, this enriches the customer attribute information. By supplementing the initial scene data with enhanced object attribute information, target scene data is obtained as the data foundation for constructing target role scripts. This enriches the customer type diversity in the target role scripts. Multi-turn dialogue generation is performed using prompts in the target role scripts. Model training is conducted using the generated simulated dialogue data. Compared with the limited and fragmented dialogue data of real customers, the target role scripts contain richer customer attribute information, and the target behavior levels can reflect richer user responses. This enhances the diversity of user responses in the simulated dialogue data, thereby increasing the richness of the simulated customer service response scripts. Attached Figure Description

[0073] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0074] Figure 1 This is a flowchart illustrating a dialogue generation method in one embodiment;

[0075] Figure 2 This is a flowchart illustrating the matching of target combinations with preset behavior levels in one embodiment;

[0076] Figure 3 This is a schematic diagram illustrating the multi-dimensional attribute information expansion processing of original product data and object profile data in one embodiment;

[0077] Figure 4 This is a schematic diagram of a process for classifying the behavior levels of target combinations based on a scene combination model in one embodiment;

[0078] Figure 5 This is a schematic diagram of a process for generating dialogue data through a dialogue model in one embodiment.

[0079] Figure 6 This is a flowchart illustrating a multi-turn dialogue simulation in one embodiment;

[0080] Figure 7 This is a flowchart illustrating the multi-dimensional filtering of dialogue data in one embodiment;

[0081] Figure 8 This is a schematic diagram illustrating the process of training a customer simulation model using generated simulated dialogue data in one embodiment.

[0082] Figure 9 This is a structural block diagram of a dialogue generation device in one embodiment;

[0083] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0084] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0085] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0086] The user data, data acquisition, and / or use involved in the embodiments of this application strictly comply with the laws, regulations, and industry standards of relevant countries and regions. The collection and acquisition of data involved in the embodiments of this application are all done in advance by actively prompting or prominently displaying information to inform users and obtaining authorization, or by obtaining full authorization from all parties. The processing, manipulation, forwarding, and use of data involved in the embodiments of this application are all carried out on the premise that the user or relevant party is fully informed and authorized. In implementing the various embodiments of this application, the types of data or information, scope of use, and usage scenarios that may be involved are informed to users or relevant parties and authorization is obtained through appropriate means. The specific methods of notification and authorization may vary according to actual circumstances, and this application is not limited in this regard. The processing of personal information involved in the embodiments of this application is carried out under the premise of having a legal basis (such as obtaining the consent of the personal information subject or being necessary for the performance of a contract), and is only processed within the prescribed or agreed scope. Sensitive personal information such as biometric information, medical and health information, financial account information, and precise location information involved in the embodiments of this application are all processed under the premise of having a specific purpose and sufficient necessity, and with the separate authorization and consent of the user or relevant party. In some embodiments of this application, if the user or related party refuses to process personal information other than the information necessary for the basic functions, it will not affect the use of the basic functions of the embodiments of this application.

[0087] In one embodiment, such as Figure 1 As shown, a dialogue generation method is provided. This embodiment illustrates the method applied to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0088] Step 102: Obtain initial scene data.

[0089] The initial scenario data includes target combinations and the target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0090] In this embodiment, the initial scene data can be pre-built and stored in the terminal. The terminal can read the initial scene data from the storage address corresponding to it. The target product data in the initial scene data can also be obtained after information expansion through a large model. The information expansion of the target product data is specifically described in the following embodiments. In one implementation of this embodiment, the terminal can obtain the target product data through the output interface of the large model, or read it from a preset data storage location to obtain the pre-built target product data.

[0091] The basic object profile data can be obtained by sampling from a preset attribute set by the terminal. The preset attribute set includes a preset age range, a preset occupation set, and a preset city set. The terminal samples from the preset age range, preset occupation set, and preset city set respectively, and after sampling, a specific age, occupation, and city constitute the basic object profile data.

[0092] Target product data and basic object profile data are used to form a target combination. A target combination can be obtained by permuting and combining the target product data and the basic object profile data. For example, for each target product data point, it can be combined with each basic object profile data point to form multiple target combinations. Each target combination corresponds to a target behavior level, which characterizes the behavioral tendencies and styles of the user object corresponding to the basic object profile data. The target behavior level corresponding to a target combination can be obtained by sampling from multiple preset behavior levels. Alternatively, the terminal can use a model to match the target product data and basic object profile data in the target combination across multiple preset behavior levels to obtain the target behavior level corresponding to the target combination. This model can be a large language model or a neural network model that has been pre-trained and learned the mapping relationship between target combinations and target behavior levels.

[0093] The target product data includes, but is not limited to, product information such as product name, features, usage scenarios, price range, market positioning, and related service strategies. Basic user profile data includes basic user information, such as age, occupation, and city. The behavioral tendency represented by the target behavior level can be the user's product acquisition tendency, which can be a product purchase tendency. For example, the product acquisition tendency can reflect the likelihood of the user purchasing the product corresponding to the target product data. A higher target behavior level indicates a higher likelihood of the user purchasing the product, and the user's response attitude may be patient, with the response content potentially inquiring about detailed product information. Conversely, a lower target behavior level indicates a lower likelihood of the user purchasing the product, resulting in an impatient response attitude and potentially repeated rejections. Therefore, different target behavior levels can control the simulated user's language style and response content. The target behavior level can represent the user's buyer style; for example, the target behavior level could be "easy (level label 0.8), medium (level label 0.5), difficult (level label 0.2), very difficult (level label 0.1), adversarial (level label 0.05)".

[0094] Step 104: Extend the object attributes of the basic object profile data to generate enhanced object attribute information corresponding to the basic object profile data.

[0095] Among them, the enhanced object attribute information includes the relevant motivations, decision-making factors, pain points, and initial discourses between the user corresponding to the basic object profile data and the target product data.

[0096] In this embodiment of the application, the terminal can sample from a preset set of attribute information using the target product data and the basic object profile in the target combination to obtain the enhanced object attribute information a corresponding to the basic object profile data, as shown in the following formula (1):

[0097] (1)

[0098] Where p represents target product data, u represents basic object profile data, and A represents a set of preset attributes. The set of preset attributes includes users of different professions and cities, and their related motivations, decision-making factors, pain points, and initial discourses with different product types. For example, the related motivations, decision-making factors, pain points, and initial discourses of users of profession A and city A with respect to different product types.

[0099] In an optional embodiment, the terminal can also construct prompt words to instruct the large language model to reason about the basic object profile data and generate enhanced object attribute information corresponding to the basic object profile data.

[0100] Step 106: Construct target scene data based on the enhanced object attribute information, target combination, and target behavior level, and construct prompt word scripts corresponding to each target role based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0101] In this embodiment, the terminal supplements the target combination and target behavior based on the enhanced object attribute information to form target scene data. The target scene data is then used to construct a structured prompt script to drive simulated dialogue. Specifically, the terminal supplements the enhanced object attribute information 'a' into the initial scene combination, which is (p, u, k), where p is the target product data, u is the basic object profile data, and k is the target behavior level. The target scene data s = (p, u, a, k), and this target scene data s is used to construct the prompt script corresponding to each target role.

[0102] The target roles include customer service roles and customer roles. The prompt scripts for the customer role and the prompt scripts for the customer service role constitute a set of target role script combinations. Specifically, for each target scenario data, for example, "student users in City A" as an attribute in the target object profile data, and "affordable wireless headphones" as an attribute in the target product data, with the target behavior level determined to be medium (level label 0.5), the terminal can comprehensively analyze the product characteristics, object profile labels, and descriptive information corresponding to the divided target behavior levels in the target scenario data through a large model. This generates behavior-oriented prompt scripts for both the customer service role and the customer role. Ultimately, the terminal generates one prompt script for the customer service role and one prompt script for the customer service role for each target scenario data. In some examples, the prompt script for the customer role may include customer background (e.g., "a sophomore student with a limited budget, focusing on sound quality and battery life"), communication style (e.g., "polite but cautious tone"), task objective (e.g., "to find out if student discounts are available"), psychological state (e.g., "interested but worried about cost-effectiveness"), and key expression tendencies (e.g., "hoping for free gifts or discounts"). In some examples, the prompt scripts for customer service roles can include service objectives (e.g., "to facilitate order placement and recommend value-added services"), recommendation strategies (e.g., "highlighting cost-effectiveness and campus activity discounts"), response style (e.g., "enthusiastic, proactive, and patient in answering questions"), and anticipation and response strategies for potential customer concerns. Specifically, the prompt scripts for each target role can be generated by filling in a preset rule template, or they can be constructed in real time by calling a large language model with the instruction "Generate prompts for customer and customer service dialogue roles that match this scenario based on the following product, object profile, and behavior level prompts, with the prompt information being: ...".

[0103] Then, the terminal configures the prompt scripts for the customer role and the prompt scripts for the customer service role, generated based on the same target scenario data, into a set of target role script combinations. Each set of target role script combinations corresponds to an independent simulated dialogue scenario. For example, if the terminal receives 10 target scenario data, the terminal generates prompt scripts for each of the 10 target scenario data. For each target scenario data, a prompt script for the customer service role and a prompt script for the customer role are generated. The prompt scripts for the customer role and the prompt scripts for the customer service role generated from the same target scenario data constitute a target role script combination, ultimately resulting in 10 sets of target role script combinations.

[0104] The target role script set includes basic role settings for each target role. For example, the basic role settings for the customer role include basic profile data, including age, occupation and city. The basic role settings for the customer service role include salesperson role and target product data, including product information such as product name, features, usage scenarios, price range, market positioning and related service strategies. The prompt script for the customer role also includes the target behavior level.

[0105] Step 108: Based on the prompt word information in the script combination of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

[0106] Among them, the simulated dialogue data can be used to construct the target sample set, which is used to train the initial customer service simulation model.

[0107] In this embodiment, the terminal inputs the prompt word information from the script combinations of each target role into a pre-built dialogue model to initiate a multi-round interactive dialogue simulation. This dialogue model includes two independently running sub-models: a customer dialogue simulation model and a customer service dialogue simulation model. These models can be built based on a large language model; alternatively, they can also be fine-tuned and trained based on feature data corresponding to the respective role types. In one specific embodiment, at the start of the dialogue simulation, the terminal first inputs the customer service role prompts into the customer service dialogue simulation model to generate the customer service statement for the first round of dialogue. Then, the customer service statement and the customer role prompts are input into the customer dialogue simulation model to generate the customer response for the first round of dialogue. The customer response for the first round of dialogue may include inquiries about product information or related service strategies. The terminal then inputs the customer response for the first round of dialogue into the customer service dialogue simulation model. The customer service dialogue simulation model infers based on the customer response for the first round of dialogue and the dialogue context to generate the customer service statement for the second round of dialogue. Thereafter, the output statements of the customer service dialogue model and the customer dialogue simulation model are alternately used as inputs to each other's models. Under the premise of continuously receiving the output of the other party and constraining their own roles, the customer dialogue simulation model and the customer service dialogue simulation model gradually generate multiple rounds of natural dialogue to obtain simulated dialogue data.

[0108] Finally, each set of target role scripts generates a complete, role-tagged simulated dialogue data, including dialogue turns, text content, and behavioral tendencies. The terminal aggregates the simulated dialogue data corresponding to each set of target role scripts to form a target sample set. This target sample set covers a variety of product types, user groups, and preset behavioral levels, exhibiting high diversity. It can be used to train the downstream sales simulation language model (customer service simulation model), improving the customer service model's emotion recognition and guidance capabilities in complex user scenarios.

[0109] Compared to real-world customer-sales dialogues in traditional technologies, the limited number and types of customers in real-world scenarios result in relatively homogeneous customer responses. This embodiment expands the basic object profile data with enhanced object attributes, generating richer enhanced object attribute information. Compared to the limited customer service types in traditional technologies, this embodiment enriches the types of users. Furthermore, by combining enhanced object attributes, basic object profile data, target product data, and target behavior levels, target scenario data is constructed. Different scenario data also contain different target behavior levels, increasing the diversity of customer responses to customer service. This allows for the generation of different target role script combinations through different target scenario data, providing various customer-type response results for subsequent generation of differentiated dialogue data. Consequently, when the large model simulates customer service responses, it will adopt different scripts for responding to customers with various preset behavior levels, enriching the dialogue scenarios and the richness of the simulated customer service scripts.

[0110] In the aforementioned dialogue generation method, initial scene data containing different target behavior levels is constructed, and the basic object profile data in the initial scene data is expanded with object attributes to generate enhanced object attribute information. Compared with real customers in traditional technologies, this enriches the customer attribute information. The target scene data is obtained by supplementing the initial scene data with enhanced object attribute information, serving as the data foundation for constructing the target role script. This enriches the customer types within the target role script, and multi-turn dialogues are generated using prompts from the target role script. The generated simulated dialogue data is used for model training. Compared to the limited and fragmented dialogue data of real customers, the target role script contains richer customer attribute information, and the target behavior levels can reflect richer user responses. This enhances the diversity of user responses in the simulated dialogue data, thereby increasing the richness of the simulated customer service response scripts.

[0111] In one exemplary embodiment, such as Figure 2 As shown, step 102 includes steps 202 to 204. Wherein:

[0112] Step 202: Obtain target product data, basic object profile data, preset behavior levels and description information corresponding to each preset behavior level, and combine the target product data and basic object profile data to obtain the target combination.

[0113] In this embodiment, the terminal acquires target product data and basic object profile data in the same manner as step 102, and reads a preset user behavior simulation configuration file. The preset user behavior simulation configuration file includes multiple preset behavior levels and corresponding descriptive information for each preset behavior level. Then, the terminal can combine the target product data and basic object profile data in a permutation and combination manner to obtain a target combination.

[0114] The preset behavioral levels are "Easy (0.8), Medium (0.5), Difficult (0.2), Very Difficult (0.1), and Adversarial (0.05)". Each preset behavioral level has corresponding descriptive information to reflect the user's expression style and decision-making tendency in communication at different preset behavioral levels. For example, the description for preset behavioral level "Easy (0.8)" is "An open-minded and motivated buyer with clear pain points and a flexible budget; will make a quick decision if the product is a good match." The description for preset behavioral level "Medium (0.5)" is "A balanced buyer with specific but solvable concerns (e.g., price or fit); needs reasonable evidence and handles objections appropriately." The description for preset behavioral level "Difficult (0.2)" is "A suspicious, price-sensitive, and risk-averse buyer; will only act if strong, specific evidence and a clear ROI are provided." "Investment (Return on Investment), otherwise the default is a negative purchase intention." The description of the default behavior as "Very Difficult (Level Label 0.1)" is "Highly suspicious corporate buyers with strict compliance and procurement restrictions; require detailed evidence, references and process alignment, and usually postpone purchases." The description of the default behavior as "Adversarial (Level Label 0.05)" is "Adversarial evaluators who are primarily focused on eliminating suppliers; emphasize edge cases, legal risks and total cost of ownership, and almost never express positive purchase intentions."

[0115] Step 204: Based on the description information, perform behavior level matching on each target combination to obtain the target behavior level corresponding to each target combination.

[0116] In this embodiment, the terminal uses a scenario combination model to perform behavioral tendency analysis on multiple target combinations formed by combining target product data and target object profile data, thereby classifying each target combination into levels and providing different scenarios for subsequent generation of differentiated dialogues. Specifically, each "target combination" represents a potential interaction scenario between a specific object profile and a product. For example, a target combination consisting of "price-sensitive young user" and "mid-to-high-end smart headphones" represents a potential interaction scenario where the user has some interest in the product's functions and a good communication attitude, but the current product price does not meet the user's preference, and the decision-making tendency is based on the product price. Ultimately, the target behavior level is determined to be medium. At this time, the terminal uses the scenario combination model to determine the communication attitude and decision-making tendency that the user corresponding to the object profile data may exhibit for the target product data in the target combination, and classifies the user into levels according to the description information corresponding to each preset behavior level, determining the preset behavior level that best matches the user as the target behavior level. The terminal performs behavior level classification processing on each target combination through the scenario combination model, ultimately obtaining the target behavior level corresponding to each target combination.

[0117] In one possible implementation of one embodiment, the scenario combination model can be a pre-trained classification model, such as a multi-classification model trained based on a deep neural network or a tree model, used to analyze the input target combination in dimensions such as the matching degree between users and products and psychological motivations, to determine the degree of fit between the target product data and the target object profile in the target combination, to obtain the probability distribution of the description information of the target combination relative to each preset behavior level, and finally to determine the target behavior level of the target combination through the description information with the highest probability.

[0118] In an optional embodiment, the scene combination model may also be a large language model. The terminal constructs prompt words by combining the description information corresponding to each preset behavior level with the target combination, and inputs them into the large language model. The prompt words instruct the large language model to reason about the description information between the target combination and each preset behavior level, analyze which semantic feature of the description information the target combination conforms to, and then determine the preset behavior level corresponding to the description information with the highest matching degree as the target behavior level based on the matching degree between the target combination and each description information.

[0119] In an optional embodiment, the scenario combination model is pre-configured with a Skill component. The metadata of this Skill component includes a preset behavior level, corresponding descriptive information, and a prompt word template. After receiving the target product data and basic object profile data from the target combination, the scenario combination model invokes the Skill component. The Skill component populates the prompt word template with the target product data and basic object profile data, constructing a structured prompt word instruction. This structured prompt word instruction instructs the large model to match the input target combination with the preset behavior level. Then, the Skill component invokes the scenario combination large model. Since the metadata of the Skill component is always within the context of the scenario combination large model's inference, the scenario combination large model can match the target combination with the preset behavior level to obtain the target behavior level of the target combination.

[0120] In an exemplary embodiment, for the method of obtaining target product data, step 102 or step 202 further includes step 2021. Wherein:

[0121] Step 2021: Obtain the original product data, and perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain the target product data.

[0122] In this embodiment of the application, the terminal stores a pre-configured user behavior simulation configuration file. Therefore, the terminal can read the preset user behavior simulation configuration file and obtain the preset behavior level and the description information corresponding to each preset behavior level. The user behavior simulation configuration file is used to reflect the user preferences of different users in different scenarios.

[0123] The terminal can collect business data from the business system and, after anonymization, obtain raw product data and raw object profile data. The raw product data contains only raw attribute information such as product name, type, and price, while the raw object profile data contains only raw attribute information such as user age, occupation, and city.

[0124] In one embodiment, because the existing data in the original product data and original object profile data is relatively sparse, directly matching preset behavior levels based on the original product data and original object profile data will result in certain errors, and the original data on which the prompt script corresponding to the target role depends is relatively singular. To overcome this situation, the terminal uses an attribute expansion model to perform multi-dimensional attribute information expansion processing on the original product data and object profile data respectively, in order to generate target product data and target object profile data with richer semantics and more complete dimensions. The attribute expansion model is a large language model jointly trained with domain knowledge, which has the ability of common sense reasoning, user psychological modeling, and product value interpretation.

[0125] This attribute expansion model takes raw product data as input and can automatically infer and complete extended attributes such as potential usage scenarios (e.g., "suitable for wearing during exercise"), target audience segmentation (e.g., "fitness enthusiasts," "long-distance business travelers"), market positioning (e.g., "20% improvement in noise reduction depth compared to similar products"), and functional characteristics (e.g., "ultra-long standby time"). Based on the same principle, for raw object profile data, the attribute expansion model can deduce users' potential needs, motivations, communication preferences, and decision-making styles based on existing tags, thereby constructing a complete user profile and scenario.

[0126] In an exemplary embodiment, the original product data includes "Product: High-yield time deposit (tiered interest rate); Type: Fixed-term deposit (R1 low risk)". The attribute expansion model can extend the multi-dimensional attribute information by summarizing the features of the original product data, such as "Principal and interest fully guaranteed up to 500,000 yuan (deposit insurance). Supports early withdrawal (including partial withdrawal) to meet liquidity needs. Interest rate is significantly higher than the benchmark interest rate".

[0127] In a specific embodiment, such as Figure 3 As shown, Figure 3This diagram illustrates the multi-dimensional attribute information expansion processing of raw product data. The terminal obtains 33 e-commerce product data items and 300 financial service data items from the product inventory as raw product data, and acquires demographic attributes showing an age distribution of 20-80 years old, across 121 different occupations and 50 different cities. Then, the terminal uses stratified sampling to sample the raw product data from the product inventory and the basic object profile data from the user profile. For the raw product data, the terminal samples 5 seeds (products) as a small sample and 1 category, as well as 10 financial service data items, as the basic data for attribute expansion. A large language model is used to generate 10,074 e-commerce products from the seeds and category, and 20,000 financial products from the financial service data. For the user profile, the terminal samples from the basic demographic data to obtain a uniform sample, for example, an age range (20-60), a preset occupation set (121 occupations), and a preset city set (50 cities). This is then used to generate a user profile pool containing 19,136 users using a large language model and the uniform sample. The terminal also includes a difficulty configuration file containing preset difficulty parameters (i.e., preset behavior levels), such as behavior level 1 to behavior level 5. After obtaining the expanded product data, user profiles, and difficulty parameters, the terminal uses a scenario combination engine (the processing engine of the scenario combination model) to arrange and combine the product, user profile, and difficulty, i.e., product × user profile × difficulty. It then performs adaptability filtering on the resulting target combinations to obtain 1000 target combinations where the product, user profile, and difficulty are all suitable. Finally, the terminal instantiates scripts using the target product data, user profile, and difficulty from the target combinations, generating 1000 standardized role-playing scripts, including customer service role scripts and customer role scripts. In an exemplary embodiment, the terminal can construct prompt word instructions to instruct the large language model to generate standardized role-playing scripts from the perspectives of both the user role and the customer service role, based on the target product data, user profile, and difficulty from the target combinations.

[0128] For the stratified sampling process, the terminal samples a basic scenario configuration from the joint distribution of the original product data p, the basic object profile data u (represented by age, occupation and city), and the preset user behavior simulation profile (difficulty profile) k, as shown in the following formula (2):

[0129] (2)

[0130] Wherein, P, U, and K represent the sampled product data, object profile data, and behavioral level, respectively.

[0131] The terminal uses the big oracle model to expand product data using seed samples, categories, and financial service data as examples, generating various other types of original product data. It then expands the data in multiple dimensions and uses MinHash (Local Sensitive Hashing) for deduplication and data cleaning, ultimately generating 10,047 e-commerce products and 20,000 financial products. It also expands the basic object profile data obtained after uniform sampling in multiple dimensions and uses MinHash for deduplication and data cleaning, generating 19,136 user profile data to form a user profile pool. Finally, it obtains the target product data and object profile data with expanded information. Based on this, the terminal analyzes and reasons the input target product data and object profile data using a scenario combination model, generating a natural language prompt script, as shown in formula (3) below:

[0132] (3)

[0133] Where G is the script generator for the scene composition model, and s represents the generated prompt scripts corresponding to each target character; script sales Characterizes the prompt scripts corresponding to each target role generated from generator G, and the sampled prompt scripts for customer service roles. user A script of prompts representing customer roles obtained from sampling.

[0134] In this embodiment, by introducing an attribute expansion model to perform multi-dimensional semantic expansion on sparse original product data and object profile data, the integrity and semantic richness of the data are enhanced, providing a high-quality data foundation for subsequent behavior level classification and prompt word script construction, improving the realism of simulated dialogue samples, improving the accuracy of level classification, and improving the accuracy of dialogue generation.

[0135] In one exemplary embodiment, such as Figure 4 As shown, step 104 includes steps 402 to 404. Wherein:

[0136] Step 402: Arrange and combine the target product data and the basic object profile data to obtain multiple target combinations.

[0137] In this embodiment, the terminal first cross-combines the target product data and basic object profile data obtained after attribute expansion to generate multiple target combinations. Each target combination corresponds to a potential user-product interaction scenario, such as a combination of a young white-collar user and a high-yield fixed deposit product, or a fitness enthusiast and a smart fitness tracker, thereby constructing candidate scenarios covering diverse scenarios. Since the target product data and target object profile data have been supplemented with deep semantic information such as product features, related motivations, decision factors, pain points, and initial discourse through the attribute expansion model, the target combinations contain rich contextual features. In a specific embodiment, such as... Figure 3 As shown, after the extended information enhancement, the terminal obtains 30,074 target product data (consisting of 10,074 e-commerce products and 20,000 financial products). Then, the terminal arranges and combines the 30,074 target product data with 19,136 user profile data (i.e., 30,074 × 19,136) to obtain 574,979,392 target combinations.

[0138] Step 404: Construct a level division instruction based on the description information, and control the scene combination model to divide each target combination and the preset behavior level according to the level division instruction to obtain the target behavior level corresponding to each target combination.

[0139] In this embodiment, the terminal first constructs a structured level division instruction based on the description information corresponding to each preset behavior level in the preset user behavior simulation configuration file. The level division instruction is used to instruct the scene combination model to match each target combination according to the description information corresponding to the preset behavior level. That is, the level division instruction contains text content of description information, enabling the scene combination model to perform semantic understanding and feature matching according to the text features of the text content.

[0140] The terminal further takes each target combination as input and, according to the level classification instructions, controls the scenario combination model to perform behavior matching and level classification processing on each initial combination to obtain the target behavior type corresponding to each target combination. The scenario combination model, based on extended attributes such as functional characteristics, usage scenarios, and market positioning in the target product data, as well as multi-dimensional features such as consumption habits, interests, language style tendencies, and risk attitudes in the enhanced object attribute information, comprehensively analyzes the user's relevant motivations, decision-making factors, pain points, and initial discourse under this combination, and performs semantic alignment and similarity matching with the description information of the preset behavior level to finally obtain the target behavior level corresponding to the target combination.

[0141] In a specific implementation, for example, when an initial combination is "young freelancers with highly liquid financial products that offer flexible access," and the user profile shows that they value financial flexibility, prefer concise communication, and have a relatively flexible budget, the scenario combination model may classify them as "simple (level label 0.8)" behavior type by comparing the descriptive information of each behavioral level. The judgment criteria are "the user has an open mindset, is motivated, has clear pain points, and has a tendency to make quick decisions on reasonably matched products." However, if the combination is "corporate financial personnel with high-yield closed-end investment products," although the product yield is high, the user profile shows that they are highly compliance-sensitive, risk-averse, and have a rigorous communication style. Therefore, the scenario combination model classifies the user as "very difficult (level label 0.1)" or "adversarial (level label 0.05)" behavior type because their decision-making process requires strict process alignment and detailed supporting materials, and they naturally tend to question suppliers.

[0142] In a specific embodiment, for example, the initial combination is "pet owner and high-performance cordless vacuum cleaner," where the target product data includes: vacuum cleaner, product features: high performance, cordless. The user profile is urban apartment resident, and the enhanced object attribute information is: owns a cat or dog, focuses on home cleaning efficiency, hair removal ability, and product quiet performance, and has a pragmatic communication style. The basic object profile and the enhanced object attribute information constitute complete user information. Then, the scenario combination model matches and analyzes the target product data (e.g., "super suction power, pet hair brush head, low noise design") with the user information. Since the user pain point matches the product function, the scenario combination model classifies the behavior level of this initial combination as "simple (level label 0.8)" behavior type.

[0143] In this embodiment, by performing large-scale cross-combination of target product data and target object profile data, and combining it with the level division instructions constructed based on preset behavior level descriptions, the scenario combination model is used to perform semantic-level behavior matching and classification for each combination, thereby realizing the identification of target behavior levels in user-product interaction scenarios. By constructing role scripts through target combinations and target behavior levels of different behavior levels, the richness of customer types in the target role scripts can be improved, thereby improving the richness of customer service response scripts in the target sample set.

[0144] In an exemplary embodiment, prior to step 106, the method further includes step 1061. Wherein:

[0145] 1061. Based on the scene combination model and the preset adaptability filtering strategy, adaptability filtering is performed on each target combination to obtain the filtered target combination.

[0146] In this embodiment, after the terminal completes the behavioral level classification of the target combination, it can further perform adaptive screening of the target combination in combination with the preset adaptability screening strategy to filter out combinations with low user-product matching degree and insignificant behavioral characteristics. For example, in the target combination, the user's occupation in the target object profile data is student, while the product type in the target product data is maternity and infant products. The application scenario of this combination is relatively rare. Therefore, the terminal removes the target combination according to the preset adaptability screening strategy.

[0147] In addition to the compatibility filtering between target product data and target object profile data within the target combination, the preset compatibility filtering strategy also includes filtering based on the accuracy of the target behavior level corresponding to the target combination. Specifically, the preset compatibility filtering strategy may also include excluding contradictory combinations (e.g., high-risk products with extremely risk-averse users or rare scenarios) and verifying the accuracy of the target behavior level classification. For example, from the originally generated 570 million combinations, 1,000 target combinations are retained through compatibility filtering for subsequent prompt script generation and dialogue simulation. These 1,000 target combinations and their corresponding target behavior levels can ultimately generate 1,000 target role script combinations.

[0148] In this embodiment, the matching score of the scene combination model and the evaluation of the preset adaptability screening strategy are used to screen a large number of target combinations. By ensuring the adaptability of the target combinations, the accuracy of the prompt words in the target role script combination can be improved, thereby improving the quality of the simulated dialogue samples.

[0149] In an exemplary embodiment, the target role script combination includes a first role script and a second role script, wherein the first role script may be a customer service role script and the second role script may be a customer role script; the dialogue model includes a first dialogue model and a second dialogue model, wherein the first dialogue model may be a customer service dialogue model and the second dialogue model may be a customer dialogue model. In the following embodiments, the first role script is a customer service role script, the second role script is a customer role script, the first dialogue model is a customer service dialogue model, and the second dialogue model is a customer dialogue model, as an example for illustration. Figure 5 As shown, step 108 includes steps 502 to 506. Wherein:

[0150] Step 502: For each target character script combination, input the prompt word information from the first character script into the first dialogue model, and input the prompt word information from the second character script into the second dialogue model.

[0151] In this embodiment, the customer service role script and the customer role script in the target role script combination are used to guide the customer service dialogue model and the customer dialogue model to simulate dialogue behavior in real service scenarios, respectively. The customer service role script includes prompts such as product introduction scripts, product information, and product features, while the customer role script includes prompts such as target profile features, target behavior level, and user needs. For each target role script combination, the terminal inputs the prompts from the customer service role script into the pre-trained customer service dialogue model; simultaneously, the terminal inputs the complete customer role script into the customer dialogue model, enabling the customer dialogue model to possess the corresponding user's identity recognition and behavioral tendencies. Both the customer service dialogue model and the customer dialogue model are large language models, capable of simulating the corresponding target role and providing corresponding dialogue data based on the input target role script.

[0152] Step 504: Generate a multi-round interactive dialogue based on the alternating response of the first dialogue model and the second dialogue model, and use the dialogue data generated by the dialogue sender model as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements, and obtain the first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model.

[0153] Specifically, if the customer service dialogue model is a dialogue sender model and the dialogue receiver model is a customer dialogue model, then the dialogue data generated by the customer service dialogue model is used as the input of the customer dialogue model; if the customer dialogue model is a dialogue sender model and the dialogue receiver model is a customer service dialogue model, then the dialogue data generated by the customer dialogue model is used as the input of the customer service dialogue model.

[0154] In this embodiment of the application, the terminal initiates a multi-round interaction process, such as... Figure 6 As shown, the customer service dialogue model (salesperson model) first generates an initial response or question, and the output serves as input for the customer dialogue model (user model). Based on its own role settings and the received customer service messages, the customer dialogue model generates a response that matches its behavioral type (e.g., "price-sensitive" or "adversarial") and feeds it back to the customer service dialogue model. This process continues alternately, forming a multi-round dialogue generation mechanism. During the multi-round dialogue generation process, the terminal monitors the dialogue content in real time to determine whether preset dialogue requirements are met. For example, preset dialogue requirements could be reaching a specified number of rounds (e.g., 6 to 10 rounds) or completing preset termination conditions (e.g., confirming needs, handling objections, guiding sales, or explicitly refusing or reaching a purchase intention). When any dialogue termination condition is met, the interaction stops. For example, as... Figure 6As shown, after t rounds (also known as t rounds) of interaction between the customer service dialogue model and the customer dialogue model, the dialogue data output by the customer dialogue model meets the preset dialogue requirements of the purchase intention. At this time, the customer service dialogue model and the customer dialogue model stop interacting, and a complete dialogue history containing customer service dialogue data and customer dialogue data is obtained, and the customer service dialogue data and customer dialogue data are output.

[0155] In one specific embodiment, the prompts in the customer service role script include task instructions, product information, and product features. For example, the task instructions could be: "You are a professional salesperson (assistant) in a real sales conversation. You have the following product information. Do not disclose it or its source. Speak naturally and remain helpful. You should use sales strategies and techniques to persuade the customer. If the customer has committed to purchasing the product and the product information provides a purchase channel, please do so. Otherwise, clearly explain why the product is suitable for the customer and encourage them to proceed to the next step." The product information includes: "Main Category: Magazine Subscription; Title: XXX Magazine Subscription - 12 Issues Per Year - Print Only - Cutting-Edge Technology, Innovation, and Cultural Trends; Price: $39.99 / Year; Category: Magazine Subscription, Technology, Computers & Electronics; Subscription Type: Print Only; Frequency: Monthly; Issues: 12." The product features include: "Each issue includes a 'Tech Makers' section featuring engineers building the next big technology, and a 'Device Lab' providing hands-on reviews of the latest smartphones, laptops, and smart home devices."

[0156] In a specific embodiment, the prompt information in the customer persona script includes object profile data, target behavior level, and user needs. For example, object profile data could be "Age group: 45-55, Gender: Male, Location: Shanghai, Occupation: Senior Business Consultant," and target behavior level could be "Difficulty level: Medium, Purchase propensity score: 0.6, Persona: Balanced buyer with some concerns." User needs could include user motivation, pain points, decision-making factors, and communication preferences. For example, "Motivation: Wants to subscribe to a professional technology magazine to gain insights into cutting-edge technologies, innovation trends, and cultural dynamics, to assist in business consulting work, and to satisfy their interest in the technology field; Pain points: Has doubts about the authenticity of product quality, worries about insufficient after-sales service and payment security; also wants the magazine to have professional and detailed content and a good brand reputation; Decision-making factors: Values ​​brand reputation, product reviews, after-sales guarantees, payment security, and logistics speed; also pays attention to the professionalism, depth, and uniqueness of the magazine content; Communication preferences: Prefers WeChat and email; likes formal, professional, and detailed content with text and images."

[0157] In some embodiments, customer service dialogue data and customer dialogue data are used to construct a target sample set. Specifically, the terminal summarizes the customer service dialogue data and customer dialogue data generated corresponding to each set of target role scripts, and labels the corresponding target product data, basic object profile data, enhanced object attribute information, and target behavior level to construct a structured target sample set. The structured target sample set can be in the form of key-value pairs, for example, a target sample set such as "Product A; Price: XX yuan; Product features: XX; Customer service dialogue data: XX", "User B; Age: XX years old; Occupation: XX; City: XX", "Motivation: XX; Decision factors: XX; Pain points: XX; Initial remarks: XX; Target behavior level: Simple (0.8); User dialogue data: XXX".

[0158] In this embodiment, multi-turn dialogues are generated using prompts in the target role script combination. The target role script combination is generated by a combination of targets with different target behavior levels. Therefore, the generated customer service dialogue data and customer dialogue data can cover a variety of service scenarios, which improves the richness of the target sample set's dialogue, thereby improving the training effect of the target sample set on the customer service simulation capability of the large language model and improving the accuracy of the generated results of the trained large language model.

[0159] In an exemplary embodiment, during the construction of the target sample set, it is also necessary to filter the customer service dialogue data. That is, before model training, customer service dialogue data that does not meet the training contribution requirements need to be removed. The training contribution represents the degree of contribution to the training of the large language model's guiding ability. Figure 7 As shown, step 506 includes steps 702 to 706. Wherein:

[0160] Step 702: Evaluate the behavioral intent results of the second dialogue data based on the preset evaluation model to obtain the first evaluation result, and evaluate the capabilities of the first dialogue data to obtain the second evaluation result.

[0161] In this embodiment, the terminal analyzes and evaluates the response content represented by customer service dialogue data using a preset evaluation model. This determines the customer's reaction to product introductions and scripted guidance within the customer service dialogue data, thereby indirectly evaluating the effectiveness and contribution of the customer service dialogue data to subsequent model training. For example, if the customer dialogue data contains explicit responses such as "Please place an order" or "I want to buy," it indicates that the corresponding customer service dialogue data has significant driving force.

[0162] The pre-defined evaluation model includes an intent recognition model and a capability evaluation model. The intent recognition model can be a BERT model (BERT scorer) trained on a pre-defined sample set. The sample data in the pre-defined sample set can be customer responses in real-world scenarios, with each customer response manually labeled. The sample labels include various behavioral intent types, such as explicit purchase, possible purchase, no purchase intention, perfunctory, and abusive. The terminal generates customer dialogue data for each target role script combination. Each response or question in the customer service dialogue data is input into the intent recognition model. The intent recognition model analyzes each customer statement, outputs the confidence score between the customer dialogue data and each intent label, and determines the intent label with the highest confidence score as the first evaluation result.

[0163] The capability assessment model can be a pre-trained large language model. The prompts in the model include various customer service advancement types and corresponding descriptive information. For example, customer service advancement types include information guidance, next action guidance, purchase intention enhancement, and objection handling. Information guidance might be described as "the customer changes from vague questions to proactively providing personal information such as budget and usage scenarios." Next action guidance might be described as "the customer expresses their intention to register or request a link." Purchase intention enhancement might be described as "the customer's intention changes from a possible purchase to a clear purchase." Objection handling might be described as "the customer changes from raising price objections to inquiring about details or accepting explanations." The capability assessment model can use customer service dialogue data and customer dialogue data as input, and based on the descriptive information of each advancement type, it determines the advancement type and provides an assessment result for each advancement type, ultimately resulting in a second assessment result comprised of the assessment results for each advancement type. The evaluation results for each customer service promotion type can be a capability score. For example, the capability score for a customer service promotion type is set to 0 to 1 point. That is, the second evaluation result of a certain customer service dialogue data can be "Information guidance: 0.5, Next action guidance: 0.6, Purchase intention improvement: 0.4, Objection information handling: 0.8".

[0164] Step 704: Filter the first dialogue data based on the first evaluation result and the second evaluation result to obtain the target first dialogue data and the target second dialogue data corresponding to the target first dialogue data.

[0165] In this embodiment, the terminal may be pre-set with a filtering strategy for the first evaluation result and the second evaluation result. The filtering strategy includes a first filtering condition and a second filtering condition. The first filtering condition may be to filter and remove customer service dialogue data whose first evaluation result is no purchase intention, perfunctory, or abusive. The second filtering condition may be to filter customer service dialogue data that meets a preset score threshold. The preset score threshold may be a score threshold set separately for each customer service promotion type, or it may be a comprehensive score threshold after weighted summation of all customer service promotion types.

[0166] Therefore, the terminal first performs a preliminary screening of customer service dialogue data using the first screening criterion, filtering and eliminating customer service dialogue data containing no purchase intention, perfunctory responses, or abusive language, thus obtaining initial customer service dialogue data. Then, it further filters the initial customer service dialogue data according to the second screening criterion, using the customer service dialogue data whose second evaluation result meets the score threshold requirement as the target customer service dialogue data. At this point, the terminal can use the customer dialogue data corresponding to the target customer service dialogue data as the target customer service dialogue data.

[0167] In some embodiments, the terminal aggregates the filtered target customer service data and target customer data, and labels the corresponding target product data, basic object profile data, enhanced object attribute information and target behavior level to construct a structured target sample set.

[0168] In this embodiment, by analyzing the intent and driving ability of customer dialogue data, the driving ability of customer service dialogue data is indirectly evaluated based on changes in customer intent and response, thereby achieving the screening of customer service dialogue data. The target customer service dialogue data and target customer dialogue data obtained after screening are used to construct a target sample set for training a large language model, which can improve the guiding ability of the trained customer service large language model in real business scenarios and improve the output accuracy of the customer service large model.

[0169] In one embodiment, such as Figure 8 As shown, a model training method is provided. This embodiment illustrates the method's application to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0170] Step 802: Obtain multiple target character script combinations and the simulated dialogue data corresponding to each target character script combination.

[0171] The simulated dialogue data is generated based on the target role script combination. The target role script combination includes the prompt word scripts corresponding to each target role constructed based on the target scene data. The target scene data includes enhanced object attribute information, target combination and target behavior level. The target combination includes target product data and basic object profile data.

[0172] Step 804: Construct a target sample set based on the target character script combination and simulated dialogue data.

[0173] Step 806: Fine-tune the initial customer simulation model to be trained based on the target sample set to obtain the trained customer service simulation model.

[0174] In the embodiments of this application, the initial customer simulation model can be a pre-trained large language model with general reasoning capabilities, and the fine-tuning training can be a Supervised Fine-Tuning (SFT) training method.

[0175] In this embodiment, diverse target role scripts are constructed by combining target products, user profiles, and enhanced object attribute information. Simulated dialogue data is then generated based on these target role scripts, enriching the diversity of user response content and thus improving the richness of simulated customer service responses. This is ultimately used to construct a target sample set for fine-tuning the customer simulation model, which enhances the model's responsiveness to different user types and improves the accuracy of its output.

[0176] In an exemplary embodiment, the target sample set includes first sample data, first sample labels corresponding to the first sample data, second sample data, and second sample labels corresponding to the second sample data. Step 804 includes steps 8041 to 8042. Wherein:

[0177] Step 8041: Take the customer service role script in the target role script combination as the first sample data, and take the first customer service output content corresponding to the customer service role script in the simulated dialogue data as the first sample label of the first sample data.

[0178] Step 8042: Use the second customer output content in the simulated dialogue data as the second sample data, and use the second customer service output content corresponding to the second customer output content in the simulated dialogue data as the second sample label of the second sample data.

[0179] In an exemplary embodiment, taking supervised fine-tuning training as an example, step 806 includes steps 8061 to 8063. Wherein:

[0180] Step 8061: Input the customer service role script or the second customer output content into the initial customer service simulation model to be trained, and perform model inference on the customer service role script or the second customer output content based on the initial customer service simulation model to obtain the first model output or the second model output.

[0181] Step 8062: Calculate the loss based on the output of the first model and the output of the first customer service representative, or calculate the loss based on the output of the second model and the output of the second customer service representative, and obtain the loss value.

[0182] Step 8063: Fine-tune the model parameters of the initial customer service simulation model based on the loss value until the loss value meets the preset loss threshold, and obtain the trained customer service simulation model.

[0183] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0184] Based on the same inventive concept, this application also provides a dialogue generation apparatus for implementing the dialogue generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more dialogue generation apparatus embodiments provided below can be found in the limitations of the dialogue generation method described above, and will not be repeated here.

[0185] In one exemplary embodiment, such as Figure 9 As shown, a dialogue generation device 900 is provided, including: an acquisition module 901, an attribute expansion module 902, a construction module 903, and a generation module 904, wherein:

[0186] The acquisition module 901 is used to acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data.

[0187] The attribute extension module 902 is used to extend the object attributes of the basic object profile data and generate enhanced object attribute information corresponding to the basic object profile data.

[0188] Module 903 is used to construct target scene data based on the enhanced object attribute information, target combination and target behavior level, and construct prompt word scripts corresponding to each target role based on the target scene data, so as to obtain the target role script combination corresponding to each target combination;

[0189] The generation module 904 is used to generate simulated dialogue data between target characters by interactively inputting the prompt word information in the script combination of each target character into the dialogue model.

[0190] In one embodiment, the acquisition module 901 is specifically used to acquire target product data, basic object profile data, preset behavior levels and description information corresponding to each preset behavior level, and combine the target product data and basic object profile data to obtain a target combination;

[0191] Based on the descriptive information, the behavior level of each target combination is matched to obtain the target behavior level corresponding to each target combination.

[0192] In one embodiment, the acquisition module 901 is specifically used to acquire the original product data, and perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain the target product data.

[0193] In one embodiment, the acquisition module 901 is specifically used to arrange and combine the target product data and the basic object profile data to obtain multiple target combinations;

[0194] Based on the description information, a level classification instruction is constructed. Based on the level classification instruction, the scene combination model is controlled to match each target combination with the preset behavior level to obtain the target behavior level corresponding to each target combination.

[0195] In one embodiment, the device 900 further includes:

[0196] The filtering module is used to perform adaptive filtering on each target combination based on the scenario combination model and the preset adaptability filtering strategy, and obtain the filtered target combination.

[0197] In one embodiment, the target role script combination includes a first role script and a second role script, the dialogue model includes a first dialogue model and a second dialogue model, and the simulated dialogue data includes first dialogue data and second dialogue data.

[0198] The generation module 904 is specifically used to input the prompt word information in the first character script into the first dialogue model and the prompt word information in the second character script into the second dialogue model for each target character script combination.

[0199] The dialogue is generated through multiple rounds of alternating responses based on the first dialogue model and the second dialogue model. The dialogue data generated by the dialogue sender model is used as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements. The first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model are then obtained.

[0200] In one embodiment, the device 900 further includes:

[0201] The evaluation module is used to evaluate the behavioral intent results of the second dialogue data based on a preset evaluation model to obtain a first evaluation result, and to evaluate the capabilities of the first dialogue data to obtain a second evaluation result.

[0202] The filtering module is used to filter the first dialogue data based on the first evaluation result and the second evaluation result to obtain the target first dialogue data and the target second dialogue data corresponding to the target first dialogue data.

[0203] Each module in the aforementioned dialogue generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0204] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a dialogue generation method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0205] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0206] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0207] Acquire initial scene data, which includes target combinations and the target behavior levels corresponding to the target combinations. Target combinations include target product data and basic object profile data.

[0208] Extend the object attributes of the basic object profile data to generate enhanced object attribute information corresponding to the basic object profile data;

[0209] Target scene data is constructed based on the enhanced object attribute information, target combination, and target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination.

[0210] Based on the interactive input of prompt words from the script combinations of each target role, the dialogue model is generated to simulate dialogue data between the target roles.

[0211] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0212] Acquire target product data, basic object profile data, preset behavior levels and descriptions of each preset behavior level, and combine the target product data and basic object profile data to obtain the target combination;

[0213] Based on the descriptive information, the behavior level of each target combination is matched to obtain the target behavior level corresponding to each target combination.

[0214] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0215] Obtain the original product data, and then perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain the target product data.

[0216] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0217] Multiple target combinations are obtained by arranging and combining target product data and basic object profile data;

[0218] Based on the description information, a level classification instruction is constructed. Based on the level classification instruction, the scene combination model is controlled to match each target combination with the preset behavior level to obtain the target behavior level corresponding to each target combination.

[0219] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0220] Based on the scenario combination model and the preset adaptability filtering strategy, each target combination is adapted and filtered to obtain the filtered target combination.

[0221] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0222] Based on the prompts in the script combinations of each target role, the dialogue model is fed with the interactive input, generating simulated dialogue data between the target roles, including:

[0223] For each target character script combination, the prompt words from the first character script are input into the first dialogue model, and the prompt words from the second character script are input into the second dialogue model.

[0224] The dialogue is generated through multiple rounds of alternating responses based on the first dialogue model and the second dialogue model. The dialogue data generated by the dialogue sender model is used as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements. The first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model are then obtained.

[0225] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0226] The behavioral intent results of the second dialogue data are evaluated based on the preset evaluation model to obtain the first evaluation result, and the ability of the first dialogue data is evaluated to obtain the second evaluation result.

[0227] Based on the first and second evaluation results, the first dialogue data is filtered to obtain the target first dialogue data and the target second dialogue data corresponding to the target first dialogue data.

[0228] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0229] Acquire multiple target role script combinations and simulated dialogue data corresponding to each target role script combination; the simulated dialogue data is generated based on the target role script combinations, which include prompt word scripts corresponding to each target role constructed based on target scene data, target scene data including enhanced object attribute information, target combinations and target behavior levels, and target combinations including target product data and basic object profile data;

[0230] Construct a target sample set based on target role script combinations and simulated dialogue data;

[0231] The initial customer simulation model to be trained is fine-tuned based on the target sample set to obtain the trained customer service simulation model.

[0232] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0233] The customer service role script in the target role script combination is used as the first sample data, and the first customer service output content corresponding to the customer service role script in the simulated dialogue data is used as the first sample label of the first sample data.

[0234] The second customer output content in the simulated dialogue data is used as the second sample data, and the second customer service output content corresponding to the second customer output content in the simulated dialogue data is used as the second sample label of the second sample data.

[0235] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0236] Input the customer service role script or the second customer output into the initial customer service simulation model to be trained, and perform model inference on the customer service role script or the second customer output based on the initial customer service simulation model to obtain the first model output or the second model output.

[0237] The loss value is obtained by calculating the loss based on the output of the first model and the output of the first customer service representative, or by calculating the loss based on the output of the second model and the output of the second customer service representative.

[0238] The model parameters of the initial customer service simulation model are fine-tuned based on the loss value until the loss value meets the preset loss threshold, thus obtaining the trained customer service simulation model.

[0239] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0240] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0241] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0242] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0243] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0244] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A dialogue generation method, characterized in that, The method includes: Acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data. The basic object profile data is extended with object attributes to generate enhanced object attribute information corresponding to the basic object profile data. Target scene data is constructed based on the enhanced object attribute information, the target combination, and the target behavior level. Then, prompt word scripts corresponding to each target role are constructed based on the target scene data to obtain the target role script combination corresponding to each target combination. Based on the prompt information in the script combinations of each target role, the dialogue model is interactively input to generate simulated dialogue data between each target role.

2. The method according to claim 1, characterized in that, The acquisition of initial scene data includes: Obtain target product data, basic object profile data, preset behavior levels and description information corresponding to each preset behavior level, and combine the target product data and the basic object profile data to obtain the target combination; Based on the description information, the behavior level of each target combination is matched to obtain the target behavior level corresponding to each target combination.

3. The method according to claim 1 or 2, characterized in that, The target product data was obtained through the following methods: Obtain the original product data, and perform multi-dimensional attribute information expansion processing on the original product data according to the attribute expansion model to obtain the target product data.

4. The method according to claim 2, characterized in that, The step of matching the behavior level of each target combination based on the description information to obtain the target behavior level corresponding to each target combination includes: The target product data and the basic object profile data are arranged and combined to obtain multiple target combinations; Based on the description information, a level division instruction is constructed. Based on the level division instruction, the scene combination model is controlled to match each target combination with the preset behavior level to obtain the target behavior level corresponding to each target combination.

5. The method according to claim 1, characterized in that, Before constructing target scene data based on the enhanced object attribute information and the initial scene data, and constructing prompt word scripts corresponding to each target role based on the target scene data to obtain the target role script combination corresponding to each target combination, the method further includes: Based on the scenario combination model and the preset adaptability filtering strategy, each target combination is subjected to adaptability filtering to obtain the filtered target combination.

6. The method according to claim 1, characterized in that, The target role script combination includes a first role script and a second role script; the dialogue model includes a first dialogue model and a second dialogue model; and the simulated dialogue data includes first dialogue data and second dialogue data. The step of interactively inputting prompt word information from the script combinations of each target role into the dialogue model to generate simulated dialogue data between the target roles includes: For each target character script combination, the prompt word information in the first character script is input into the first dialogue model, and the prompt word information in the second character script is input into the second dialogue model; The dialogue is generated through multiple rounds of alternating responses based on the first dialogue model and the second dialogue model. The dialogue data generated by the dialogue sender model is used as the input of the dialogue receiver model until the dialogue generated by both parties meets the preset dialogue requirements. The first dialogue data output by the first dialogue model and the second dialogue data output by the second dialogue model are then obtained.

7. The method according to claim 6, characterized in that, The method further includes: The behavioral intent result of the second dialogue data is evaluated based on a preset evaluation model to obtain a first evaluation result, and the capability of the first dialogue data is evaluated to obtain a second evaluation result. The first dialogue data is filtered based on the first evaluation result and the second evaluation result to obtain the target first dialogue data and the target second dialogue data corresponding to the target first dialogue data.

8. A model training method, characterized in that, The method includes: Acquire multiple target character script combinations and simulated dialogue data corresponding to each target character script combination; the simulated dialogue data is generated based on the target character script combinations, the target character script combinations include prompt word scripts corresponding to each target character constructed based on target scene data, the target scene data includes enhanced object attribute information, target combinations and target behavior levels, and the target combinations include target product data and basic object profile data; A target sample set is constructed based on the target role script combination and the simulated dialogue data; The initial customer simulation model to be trained is fine-tuned based on the target sample set to obtain the trained customer service simulation model.

9. The method according to claim 8, characterized in that, The target sample set includes first sample data, first sample labels corresponding to the first sample data, second sample data, and second sample labels corresponding to the second sample data; The construction of the target sample set based on the target role script combination and the simulated dialogue data includes: The customer service role script in the target role script combination is used as the first sample data, and the first customer service output content corresponding to the customer service role script in the simulated dialogue data is used as the first sample label of the first sample data. The second customer output content in the simulated dialogue data is used as the second sample data, and the second customer service output content corresponding to the second customer output content in the simulated dialogue data is used as the second sample label of the second sample data.

10. The method according to claim 9, characterized in that, The initial customer simulation model to be trained is fine-tuned based on the target sample set to obtain a trained customer service simulation model, including: The customer service role script or the second customer output content is input into the initial customer service simulation model to be trained. The initial customer service simulation model is used to perform model inference on the customer service role script or the second customer output content to obtain the first model output or the second model output. Loss is calculated based on the output of the first model and the output of the first customer service representative, or loss is calculated based on the output of the second model and the output of the second customer service representative, to obtain the loss value; The model parameters of the initial customer service simulation model are fine-tuned based on the loss value until the loss value meets the preset loss threshold, thus obtaining the trained customer service simulation model.

11. A dialogue generation device, characterized in that, The device includes: The acquisition module is used to acquire initial scene data, which includes target combinations and target behavior levels corresponding to the target combinations. The target combinations include target product data and basic object profile data. The attribute extension module is used to extend the object attributes of the basic object profile data and generate enhanced object attribute information corresponding to the basic object profile data. The construction module is used to construct target scene data based on the enhanced object attribute information, the target combination and the target behavior level, and to construct prompt word scripts corresponding to each target role based on the target scene data, so as to obtain the target role script combination corresponding to each target combination; The generation module is used to generate simulated dialogue data between the target characters by interactively inputting the prompt word information in the script combination of each target character into the dialogue model.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7 and 8 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7 and 8 to 10.