Business dialogue model training method and device, electronic equipment and storage medium
By analyzing historical call records and user profiles to generate simulation scripts, and using an artificial intelligence agent model to train a business dialogue model through simulated dialogue, the problems of high cost and low response speed in existing technologies are solved, and efficient and accurate business dialogue services are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YUANBAO TECH (BEIJING) TECH CO LTD
- Filing Date
- 2024-10-22
- Publication Date
- 2026-07-03
AI Technical Summary
The training process for existing business dialogue models requires significant manual investment and has a slow response time, resulting in services that are not accurate or intelligent enough.
By acquiring historical call records and user profile data of the target business, extracting call segments, analyzing feature information, generating user simulation scripts, and using user and consultant AI agent models to conduct simulated dialogues, generating simulated business dialogue data, training the initial business dialogue model, and reducing the number of model parameters.
It reduces the manual cost of training business dialogue models, improves dialogue response speed, and ensures the accuracy and intelligence of services.
Smart Images

Figure CN119539119B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and apparatus for training a business dialogue model, an electronic device, and a storage medium. Background Technology
[0002] Task-oriented dialogue systems (TOD) can be used to solve specific problems in a particular field, such as helping users find goods, book movie tickets, make restaurant reservations, and conduct business consulting and transactions in professional fields.
[0003] When using TOD (Transit-Oriented Development) to solve specific problems in a particular field, it is necessary to first acquire rich language data in that field. Based on the acquired language data, an end-to-end TOD robot is trained. This TOD robot can understand the information conveyed by the user through language and provide the user with the information they want, thereby helping the user solve specific problems in a particular field.
[0004] Currently, while historical dialogue data can be obtained from some specialized business systems as training data for TOD (Transit-Oriented Development) robots, the varying skill levels of sales personnel during actual business consultations or responses mean that training a TOD robot solely based on historical dialogue data from these systems often lacks professionalism and standardization. This necessitates incorporating a large amount of manually labeled data into the TOD robot's training to enhance its professionalism and standardization. Furthermore, to ensure the accuracy and intelligence of the TOD robot's services, the number of model parameters is quite large. In practice, manually setting up a large amount of labeled data is time-consuming and labor-intensive, requiring significant manpower. Additionally, TOD robots trained using current methods have a large number of model parameters, resulting in longer response times and slower dialogue engagement with users. Summary of the Invention
[0005] This invention provides a business dialogue model training method, apparatus, electronic device, and storage medium to address the shortcomings of existing business dialogue model training processes, which require significant manual labor and have slow response speeds. It aims to reduce the manual labor costs involved in training business dialogue models and improve dialogue response speed, while simultaneously ensuring the accuracy and intelligence of the business dialogue service process.
[0006] This invention provides a method for training a business dialogue model, comprising the following steps.
[0007] The process involves: acquiring historical call records and user profile data for the target business; extracting call segments from the historical call records to obtain multiple call segments; parsing these call segments to obtain target feature information, including call feature information; generating multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputting any one of the multiple user simulation scripts for each user setting type into a preset user AI agent model; simulating business dialogue based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data, including user dialogue data and consultant dialogue data, with the consultant AI agent model generating consultant dialogue data based on multiple business databases of the target business; training the initial business dialogue model based on the simulated business dialogue data to obtain the target business dialogue model, where the number of model parameters in the target business dialogue model is less than the number of model parameters in the consultant AI agent model.
[0008] According to a business dialogue model training method provided by the present invention, any user simulation script from multiple user simulation scripts of each user-defined type is input into a preset user AI agent model. Simulated business dialogue is then performed based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data. The method includes: when the current extraction count changes and the change result is less than an extraction count threshold, randomly selecting one user simulation script from multiple user simulation scripts of each user-defined type as the input user simulation script, obtaining multiple input user simulation scripts corresponding one-to-one for multiple user-defined types; inputting the multiple input user simulation scripts into the user AI agent model to obtain a target user AI agent model corresponding to the current extraction count; performing simulated business dialogue based on the target user AI agent model and the consultant AI agent model to obtain business dialogue data corresponding to the current extraction count; incrementing the current extraction count by 1; and when the current extraction count changes and the change result is greater than or equal to the extraction count threshold, determining all business dialogue data corresponding to all extraction counts as simulated business dialogue data.
[0009] According to a business dialogue model training method provided by the present invention, multiple user setting types include: user role personality setting, user call segment end setting, and call segment user intent setting; before inputting multiple user simulation scripts to be input into a user artificial intelligence agent model to obtain the target user artificial intelligence agent model corresponding to the current extraction number, the method further includes: obtaining a first user simulation script corresponding to the user call segment end setting and a second user simulation script corresponding to the call segment user intent setting from the multiple user simulation scripts to be input; analyzing whether the call segment progress of the first user simulation script and the second user simulation script to be input matches; and in the first user simulation script... If the call progress of the first user simulation script and the second user simulation script to be input matches, multiple user simulation scripts to be input are input into the user AI agent model; if the call progress of the first user simulation script and the second user simulation script to be input do not match, any user simulation script is extracted again from the multiple user simulation scripts set at the end of the user call as the first user simulation script to be input, or any user simulation script is extracted again from the multiple user simulation scripts set at the user intent during the call as the second user simulation script to be input. Then, the analysis of whether the first user simulation script and the second user simulation script to be input match and the subsequent steps are re-executed.
[0010] According to a business dialogue model training method provided by the present invention, before inputting any user simulation script from multiple user simulation scripts of each user setting type into a preset user artificial intelligence agent model, the method further includes: receiving a custom script set for any target user setting type among multiple user setting types; adding the custom script as a user simulation script of the target user setting type to the multiple user simulation scripts of the target user setting type.
[0011] According to the business dialogue model training method provided by the present invention, the target feature information further includes: user feature information; before generating multiple user simulation scripts for each user setting type among multiple user setting types based on user profile data and call feature information, the method further includes: generating user profile completion data according to user feature information; and performing completion processing on user profile data according to user profile completion data.
[0012] According to a business dialogue model training method provided by the present invention, multiple call stages include: a call explanation stage, a confirmation guidance stage, and a payment guidance stage.
[0013] The present invention also provides a business dialogue model training device, comprising the following modules: an acquisition module, an interception module, a parsing module, a generation module, a processing module, and a training module.
[0014] The acquisition module is used to acquire historical call records and user profile data of the target business.
[0015] The interception module is used to extract call segments from historical business call records, obtaining call segments from multiple call stages.
[0016] The parsing module is used to parse call segments from multiple call stages to obtain target feature information; the target feature information includes call feature information.
[0017] The generation module is used to generate multiple user simulation scripts for each user setting type among multiple user setting types, based on user profile data and call feature information.
[0018] The processing module is used to input any one of the multiple user simulation scripts of each user's set type into a preset user AI agent model, and to conduct simulated business dialogue based on the user AI agent model and the preset consultant AI agent model to obtain simulated business dialogue data. The simulated business dialogue data includes user dialogue data and consultant dialogue data. The consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business.
[0019] The training module is used to train the initial business dialogue model based on simulated business dialogue data to obtain the target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the advisor AI agent model.
[0020] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described business dialogue model training methods.
[0021] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described business dialogue model training methods.
[0022] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described business dialogue model training methods.
[0023] The present invention provides a business dialogue model training method, apparatus, electronic device, and storage medium, which acquires historical business call records and user profile data of the target business; extracts call segments from the historical business call records to obtain multiple call segments; parses the call segments to obtain target feature information, wherein the target feature information includes call feature information; generates multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputs any one of the multiple user simulation scripts for each user setting type into a preset user artificial intelligence agent model, and performs simulated business dialogue based on the user artificial intelligence agent model and a preset consultant artificial intelligence agent model to obtain simulated business dialogue data; wherein the simulated business dialogue data includes user dialogue data and consultant dialogue data, and the consultant artificial intelligence agent model generates consultant dialogue data based on multiple business databases of the target business; trains an initial business dialogue model based on the simulated business dialogue data to obtain a target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the consultant artificial intelligence agent model. Therefore, this invention eliminates the need for manual configuration to obtain large amounts of labeled data when acquiring the target business dialogue model. Instead, it generates multiple user setting types, generates multiple user simulation scripts for each user setting type, and then uses these scripts, along with a user AI agent model and an advisor AI agent model, to obtain simulated business dialogue data. This simulated business dialogue data is then used as training data to train the initial business dialogue model, ultimately yielding the target business dialogue model. The number of parameters in the target business dialogue model is equal to the number of parameters in the advisor AI agent model. Thus, this invention overcomes the shortcomings of existing technologies where training business dialogue models requires significant manual effort and results in slow response times. It reduces the manual costs of training business dialogue models and improves dialogue response speed while maintaining the accuracy and intelligence of the business dialogue service process. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1This is one of the flowcharts illustrating the business dialogue model training method provided by the present invention.
[0026] Figure 2 This is a schematic diagram illustrating the process of extracting call segments from historical business call records in the business dialogue model training method provided by this invention.
[0027] Figure 3 This is a schematic diagram illustrating the parsing of call segments across multiple call stages in the business dialogue model training method provided by this invention.
[0028] Figure 4 This is a schematic diagram illustrating the generation of consultant dialogue data by the consultant artificial intelligence agent model in the business dialogue model training method provided by this invention.
[0029] Figure 5 This is the second flowchart illustrating the business dialogue model training method provided by this invention.
[0030] Figure 6 This is a schematic diagram illustrating the process of simulated dialogue between the target user AI agent model and the consultant AI agent model in the business dialogue model training method provided by this invention.
[0031] Figure 7 This is the third flowchart illustrating the business dialogue model training method provided by this invention.
[0032] Figure 8 This is the fourth flowchart illustrating the business dialogue model training method provided by this invention.
[0033] Figure 9 This is a schematic diagram illustrating the operation of the target business dialogue model in the business dialogue model training method provided by the present invention.
[0034] Figure 10 This is a schematic diagram of the business dialogue model training device provided by the present invention.
[0035] Figure 11 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0037] It should be noted that in the business dialogue model training method and apparatus, electronic device and storage medium of the present invention, the data collection of call records is carried out with the user's knowledge and consent, and the use of call record data is legal and compliant.
[0038] The following is combined Figures 1-9 The present invention describes the business dialogue model training method.
[0039] Figure 1 This is one of the flowcharts illustrating the business dialogue model training method provided by this invention. For example... Figure 1 As shown, the method includes the following steps S110~S160.
[0040] S110: Obtain historical call records and user profile data for the target service.
[0041] The target business can be related to mass consumption, such as tourism, catering, ticket booking, etc.
[0042] The target business can also be a business in a specific professional field, such as insurance, finance, legal consulting, etc.
[0043] The historical business call records of the target business can be the business call records between salespersons and users obtained from the business system of the target business. These business call records may include, for example, business consultation, business explanation, business marketing, business suggestions, business follow-up and many other business-related call records.
[0044] User profile data for the target business can be obtained as follows. First, basic information data of multiple users of the target business can be obtained from the business system of the target business. Each user's basic information data can include information that describes user characteristics, such as age, gender, education level, occupation, and income. Next, the basic information data of multiple users is cleaned, clustered, and analyzed to abstract multiple user tags, such as age, gender, education level, occupation, and income. Based on these user tags, multiple user profiles are reconstructed, resulting in user profile data. The user profile data can contain profile data of multiple user profiles. Each user profile profile can contain n (n is a natural number and n is greater than 1) user tags, which are used to describe the user characteristics of that user profile.
[0045] S120: Extract call segments from historical call records to obtain call segments from multiple call stages.
[0046] In actual business calls, the communication process between salespeople and users can typically be divided into several stages (i.e., call stages). For example, if a salesperson wants to recommend a service to a user, after the call is connected, the salesperson must first introduce themselves and explain the reason for the call. This is a necessary call stage, which we can define as the call explanation stage. When the user chooses to continue after learning the reason for the call, the salesperson can begin the next stage, usually recommending a service, such as insurance. This process usually involves confirmation actions such as SMS confirmation or keypad confirmation to guide the user to confirm their intention to purchase the recommended service. We can define this call stage as the confirmation guidance stage. After the user completes all confirmation actions, it can be confirmed that the user wants to purchase the service. The salesperson then explains to the user how to purchase the service and how to pay. For example, the salesperson guides the user to the service payment page and guides them to complete the payment process, thus completing the purchase and payment of the service. We can define this call stage as the payment guidance stage.
[0047] Therefore, in actual business calls, the multiple call stages between the salesperson and the user can typically include: the call explanation stage, the confirmation guidance stage, and the payment guidance stage.
[0048] Understandably, in practice, the name of each call segment can be adjusted according to the specific business requirements. For example, in the case of insurance recommendation services, after explaining the service to the user over the phone, if the user is interested in purchasing the recommended insurance, the user needs to send an SMS to the insurance business system, or the insurance business system will send an SMS to the user, who then needs to reply to the SMS. Since all operations in the confirmation and guidance process involve SMS messages, this confirmation and guidance process can be called the SMS guidance process.
[0049] Understandably, in practice, each call segment can be further divided into multiple sub-segments depending on the specific business requirements. For example, in the insurance referral process, the payment guidance segment typically involves first guiding the user through a page redirect to the payment page, then guiding them to complete payment-related operations on the payment page, and finally completing the entire payment process. Based on this, the payment guidance segment can be divided into two sub-segments: a payment page entry guidance sub-segment and a payment operation guidance sub-segment. The payment page entry guidance sub-segment guides the user through the relevant page redirection to the payment page, while the payment operation guidance sub-segment guides the user to complete payment-related operations on the payment page.
[0050] For multiple pre-set call segments, call segment fragments can be extracted from historical business call records based on the preset first large language models (LLMs). For example, the fragments corresponding to each call segment in the historical business call records can be identified first, and then the fragments corresponding to each call segment can be segmented or extracted, thereby extracting the fragments corresponding to each call segment in the historical business call records, and finally obtaining call segments of multiple call segments.
[0051] For example, see Figure 2 The target business is the recommendation business of insurance business. The historical business call records are input into the first LLMs. The first LLMs extracts call segment segments from the historical business call records. The first LLMs outputs the extracted call segment segments of incoming call description (corresponding to the call description segment), SMS sending (corresponding to the confirmation guidance segment), entering the payment page (corresponding to the payment page entry guidance sub-segment), and payment guidance (corresponding to the payment operation guidance sub-segment).
[0052] In practice, the first initial LLMs can be trained according to the actual business needs to obtain the aforementioned first LLMs.
[0053] S130: Analyze call segments from multiple call stages to obtain target feature information; wherein, the target feature information includes: call feature information.
[0054] The target feature information may include at least call feature information. Call feature information may include, for example, call performance behavior information, call content intent information, call script flow information, and call style information.
[0055] It should be noted that call feature information is information on relevant features extracted from the user's call records, and the call feature information also represents the call features on the user's side.
[0056] Call behavior information may include, for example, information related to the user's emotional behavior during the call, such as behaviors of interest, calmness, impatience, or indifference.
[0057] The intent information in the call content may include, for example, requests, questions, objections, and other information related to the user's intent in the call.
[0058] Call script flow information may include, for example, the stage of the call at the end of the call. For instance, if the user hangs up during the call explanation stage, the call script flow information could be the call explanation stage; or if the user hangs up during the confirmation guidance stage, the call script flow information could be the confirmation guidance stage.
[0059] Call style information may include, for example, information related to the user's conversation style such as talkative, easy-going, silent, cheerful, lively, aloof, etc.
[0060] In some embodiments, the target feature information may further include: user feature information. Specifically, user feature information may be background-related information about the user, which can be extracted from the user's historical business call records with the salesperson, such as the user's city of residence, the user's consumption habits, etc. Of course, it is also possible to extract basic user information data such as age, gender, education level, occupation, and income from historical business call records.
[0061] In practice, call segments from multiple call stages can be analyzed based on a pre-set second LLMs to obtain the aforementioned target feature information. The acquisition of the second LLMs can be achieved by training a model on the second initial LLMs according to the actual business requirements.
[0062] For example, such as Figure 3 As shown, call segments from multiple call stages are input into the second LLMs. The second LLMs parses the call segments from multiple call stages and then outputs user characteristic information, call performance behavior information, call content intent information, call script flow information, and call style information.
[0063] In some embodiments, where the target feature information also includes user feature information, see [link to previous step S140] before performing the subsequent step S140. Figure 3 Furthermore, user profile completion data can be generated based on the user feature information obtained above; then, the user profile data can be completed based on the user profile completion data.
[0064] Specifically, the process of generating user profile completion data based on user feature information may include, for example, comparing the user feature information with all tags for each user profile in the user profile data; when the user feature information overlaps with a predetermined proportion of tags in the target user profile, it is determined that the user feature information is similar to the target user profile; then, target information from the user feature information that does not appear in any tags of the target user profile is obtained, and this target information is identified as the profile completion data for the target user profile. When completing the target user profile, at least one profile completion tag is generated based on the profile completion data, and this at least one profile completion tag is added to the multiple existing tags of the target user profile.
[0065] For example, user profile 1 in the user profile data has n user tags. By parsing call segments from multiple call sessions, user feature information (actually multiple user feature tags) of a certain user is obtained. The multiple user feature tags are compared with the n user tags of user profile 1. When the comparison result shows that the multiple user feature tags overlap with the m (m is a natural number and m is less than or equal to n) user tags of user profile 1, if m / n exceeds a set ratio, at least one user feature tag that does not appear in the n user tags of user profile 11 is determined as at least one profile completion tag, and at least one profile completion tag is added to the n user tags of user profile 1.
[0066] S140: Based on user profile data and call feature information, generate multiple user simulation scripts for each user setting type among multiple user setting types.
[0067] Multiple user setting types may include, for example, user role personality settings, user call segment end settings, and call segment user intent settings.
[0068] Multiple user simulation scripts can be generated based on user profile data and call characteristic information, tailored to user role personality settings. For example, user profile data includes profile data from multiple user profiles. This profile data can be freely combined with call performance behavior information, call content intent information, call script flow information, and call style information to generate multiple user simulation scripts with different user role personality settings. Each user simulation script has a different user role personality setting. For example, each user simulation script may include at least one or more of the following: basic user information such as age, gender, education, occupation, and income; one or more of the following related to the user's conversational style: talkative, easygoing, silent, cheerful, lively, aloof; one or more of the following related to emotional behavior during the call: interested behavior, calm behavior, impatient behavior, indifferent behavior; one or more of the following related to the call content intent: request information, question information, objection information; and the call stage reached at the end of the call.
[0069] Similarly, multiple user simulation scripts can be generated based on user profile data and call feature information to specify the end of a user's call. The call feature information, including the call script flow information, can include the call stage reached at the end of the call. Therefore, multiple user simulation scripts can be generated based on the user profile data and the call script flow information in the call feature information. For example, a user simulation script can be created based on the user profile data of user profile 1 and the call stage reached at the end of the call as a call explanation stage; another user simulation script can be created based on the user profile data of user profile 2 and the call stage reached at the end of the call as a confirmation guidance stage; and so on, ultimately generating multiple user simulation scripts based on the end of the user's call.
[0070] Of course, it's understandable that, in order to simulate as many different scenarios as possible in real-world call termination, when generating multiple user simulation scripts for call termination settings, the call characteristic information used to create the scenario content of these multiple user simulation scripts includes not only call script flow information, but also call performance behavior information and call style information. That is, when generating multiple user simulation scripts for call termination settings, the scenario content of these multiple user simulation scripts can be created based on user profile data and call performance behavior information, call script flow information, and call style information from the call characteristic information.
[0071] Similarly, multiple user simulation scripts can be generated based on user profile data and call feature information to define user intent during a call. Call feature information, such as call content intent information, can include requests, questions, objections, and other information related to the call content intent. Therefore, multiple user simulation scripts can be generated based on the user profile data and call content intent information in the call feature information. For example, a user simulation script with corresponding scenario content can be created based on the user profile data of user profile 1 and call content intent information 1; another user simulation script with corresponding scenario content can be created based on the user profile data of user profile 2 and call content intent information 2; and so on, ultimately generating multiple user simulation scripts based on user intent during the call.
[0072] Of course, it's understandable that, in order to simulate as many different forms of user intent scenarios as possible in reality, when generating multiple user simulation scripts based on user intent settings during a call, the call feature information used to create the scenario content for these multiple user simulation scripts can include not only call content intent information, but also call performance behavior information and call style information. That is, when generating multiple user simulation scripts based on user intent settings during a call, the scenario content of these multiple user simulation scripts can be created based on user profile data and call performance behavior information, call content intent information, and call style information from the call feature information.
[0073] The user setting types listed above are merely illustrative. In this embodiment of the invention, the user setting types include, but are not limited to, the user setting types listed above. For example, they may also include: user call preference settings. Call preference may include, for example, a preference to continue the call, a preference to end the call, a preference to request other information, etc.
[0074] S150: Input any one of the multiple user simulation scripts of each user setting type into the preset user AI agent model, and conduct simulated business dialogue based on the user AI agent model and the preset consultant AI agent model to obtain simulated business dialogue data; wherein, the simulated business dialogue data includes: user dialogue data and consultant dialogue data, and the consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business.
[0075] First, we will introduce the user AI agent model and the advisor AI agent model.
[0076] Both the user AI agent model and the consultant AI agent model are AI (Artificial Intelligence Agents).
[0077] For the user AI agent model, the input data consists of multiple user simulation scripts corresponding to multiple user setting types (see the corresponding description in S520 in the following embodiment for details, which will not be elaborated here).
[0078] For the consultant AI agent model, the consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business.
[0079] Specifically, see Figure 4 As shown, the target business's multiple business databases may include: a professional knowledge base, an action base, and a tool base.
[0080] The professional knowledge base stores professional knowledge related to the target business. For example, if the target business is insurance, the professional knowledge base will store professional knowledge related to insurance; similarly, if the target business is legal consulting, the professional knowledge base will store professional knowledge related to law.
[0081] The action library stores action data for feedback actions in response to user behavior. These feedback actions may include, for example, soothing actions, reminder actions, and encouraging actions. For instance, if a user's behavior is impatience, the feedback action could be a soothing action; if the user's behavior is interest, the feedback action could be an encouraging action, and so on. It is understood that the feedback actions listed above are merely exemplary, and the feedback actions in the action library in this embodiment of the invention include, but are not limited to, the feedback actions listed above.
[0082] The tool library is used to store data related to business calculations. For example, if the target business is insurance, it can calculate the corresponding insurance premium for the insurance type that the user is interested in; or if the target business is legal consulting, it can calculate the relevant legal time limits for the event based on the time information provided by the user and the provisions of the relevant legal articles concerning the event inquired about.
[0083] See Figure 4 Based on multiple business databases related to the target business, the consultant AI agent model can combine relevant data from the professional knowledge base, action base, and tool base in different ways to generate corresponding consultant dialogue data based on the information provided by the user's AI agent model.
[0084] In some embodiments, such as Figure 5 As shown, the execution process of S150 may include S510~S560.
[0085] S510: Determine whether the current number of draws is less than the draw count threshold.
[0086] If the judgment result is yes, that is, the current number of extractions is less than the extraction number threshold, execute S520.
[0087] If the result is negative, meaning the current number of extractions is greater than or equal to the extraction threshold, execute S560.
[0088] It should be noted that the initial number of extractions is 0. The threshold for the number of extractions can be set by those skilled in the art according to actual circumstances, and this embodiment of the invention does not limit this.
[0089] S520: If the current number of extractions changes and the result of the change is less than the extraction number threshold, randomly select one user simulation script from multiple user simulation scripts of each user setting type as the user simulation script to be input, and obtain multiple user simulation scripts to be input that correspond one-to-one with multiple user setting types.
[0090] Each user setting type corresponds to multiple user simulation scripts. To allow for free combination of these scripts across multiple user setting types, one script is randomly selected from each user setting type as the input user simulation script. This results in multiple input user simulation scripts corresponding to each user setting type. These scripts are then combined in subsequent steps (corresponding to S530). This method allows for the free combination of user simulation scripts across multiple user setting types, simulating as many possible scenarios as possible on the user's side.
[0091] S530: Input multiple user simulation scripts to the user AI agent model to obtain the target user AI agent model corresponding to the current number of extractions.
[0092] Multiple user simulation scripts can be directly input into the user AI agent model to obtain the target user AI agent model corresponding to the current number of extractions.
[0093] In some embodiments, when multiple user setting types are user role personality setting, user call segment end setting, and call segment user intent setting, it is also possible to detect whether there are call segment conflicts in multiple user simulation scripts to be input. For example, in the consultant simulation script to be input for the user call segment end setting, the user has already ended the call during the call explanation phase, but in the consultant simulation script to be input for the user call segment intent setting, the user still asks questions during the confirmation guidance phase, thus creating a conflict. If a call segment conflict occurs, the user simulation script to be input is replaced. For details, please refer to the description in S710~S740 in the following embodiments, which will not be repeated here.
[0094] S540: Based on the target user AI agent model and the consultant AI agent model, simulate business dialogue to obtain the business dialogue data corresponding to the current number of extractions.
[0095] For example, the simulated business dialogue process of the target user AI agent model and the consultant AI agent model can be found in [reference needed]. Figure 6 As shown, based on the question-and-answer process between the target user AI agent model and the consultant AI agent model, corresponding business dialogue data can be obtained.
[0096] In practice, a Prompt can be set according to actual needs and input into the target user's AI agent model to guide the target user's AI agent model to generate specific output text or instructions.
[0097] In practice, both the user AI agent model and the consultant AI agent model are LLMs. Therefore, during the simulated business dialogue based on the target user AI agent model and the consultant AI agent model, parameters such as temperature and Top-P can be adjusted to stimulate the language generation capabilities of the target user AI agent model and the consultant AI agent model.
[0098] Business dialogue data can include user dialogue data output by the target user AI agent model, and consultant dialogue data generated by the consultant AI agent model based on the user dialogue data.
[0099] S550: Increment the current number of draws by 1.
[0100] Increment the current number of extractions by 1, and then execute S510.
[0101] S560: Determine the business dialogue data corresponding to all extraction counts as simulated business dialogue data.
[0102] In some embodiments, the multiple user setting types are user role personality settings, user call segment end settings, and call segment user intent settings. In this case, such as Figure 7 As shown, before executing S530, the following S710~S740 can also be executed.
[0103] S710: Obtain from multiple user simulation scripts to be input the first user simulation script corresponding to the end setting of the user call phase and the second user simulation script corresponding to the user intent setting of the call phase.
[0104] S720: Analyze whether the call progress of the first user simulation script to be entered and the second user simulation script to be entered matches.
[0105] The call phase corresponding to the end of the call in the first user simulation script is defined as the first call phase, and the call phase corresponding to the end of the call in the second user simulation script is defined as the second call phase. If the first call phase precedes the second call phase, it is determined that the call phase progress of the first and second user simulation scripts does not match; if the first and second call phases are the same, or the first call phase follows the second call phase, it is determined that the call phase progress of the first and second user simulation scripts matches.
[0106] If the analysis result is yes, that is, the call progress of the first user simulation script and the second user simulation script matches, execute S730; if the analysis result is no, that is, the call progress of the first user simulation script and the second user simulation script does not match, execute S740.
[0107] S730: Input multiple user simulation scripts to be input into the user AI agent model.
[0108] S740: Select any one of the multiple user simulation scripts set at the end of the user call phase as the first user simulation script to be input, or select any one of the multiple user simulation scripts set at the user intent during the call phase as the second user simulation script to be input.
[0109] After executing S740, re-execute S720.
[0110] In some embodiments, to further refine the training data used to train the initial business dialogue model (corresponding to subsequent step S160), a custom script tailored to the user can be input into the user AI agent model. In this case, before executing S150, such as Figure 8 As shown, S810~S820 can also be executed.
[0111] S810: Receives a custom script for setting any target user setting type among multiple user setting types.
[0112] S820: Add a custom script as a user simulation script of the target user setting type, or add the custom script to multiple user simulation scripts of the target user setting type.
[0113] S160: Train the initial business dialogue model based on simulated business dialogue data to obtain the target business dialogue model; wherein, the number of model parameters of the target business dialogue model is less than the number of model parameters of the advisor AI agent model.
[0114] The initial business dialogue model could be, for example, an LLM (Local Management Model).
[0115] In related technologies, the user AI agent model and the consultant AI agent model are TOD robots, whose model parameters are typically around 1,450,000,000,000, a large number, resulting in a long response time to user dialogue data and a slow response speed in user dialogue. The standard business dialogue model obtained based on the business dialogue model training method of this invention has approximately 3,000,000,000 to 7,000,000,000 model parameters, significantly reducing the number of parameters and effectively improving the response speed in user dialogue. Furthermore, in this invention, the initial business dialogue model training data is simulated business dialogue data. Since simulated business dialogue data is obtained based on a large number of simulated dialogues between the user AI agent model and the consultant AI agent model, it has high accuracy, ensuring the precision and intelligence of the business dialogue service process. Furthermore, during the acquisition of training data (simulated business dialogue data), user profile data and call feature information can be automatically obtained. Based on this data, multiple user simulation scripts for each user's specified type are automatically generated. These scripts, representing different user types, are then freely combined and input into the user AI agent model. This allows the user AI agent model and the consultant AI agent model to engage in business dialogue. Through numerous iterations, training data is ultimately obtained to train the initial business dialogue model. The acquisition of training data eliminates the need for manually setting large amounts of labeled data, thus saving significant labor costs. This reduces the manual effort required for training the business dialogue model and improves dialogue response speed, while simultaneously ensuring the accuracy and intelligence of the business dialogue service process.
[0116] In specific implementation, such as Figure 9 As shown, the target business dialogue model in this embodiment of the invention can be externally connected to the target business's action library, professional knowledge library, and tool library. The target business dialogue model proactively makes a phone call to the user, analyzes the user's expressed needs, questions, or objections based on the information provided during the call, and then selects corresponding feedback data from the action library, professional knowledge library, and / or tool library. Based on the feedback data, a feedback strategy is generated, and corresponding information is provided to the user based on the feedback strategy. Finally, based on the user's response to the feedback strategy, it determines whether the call can continue. For example... Figure 9 In this process, after explaining the call to the user, if the user's response indicates interest, the call can proceed to the next stage, such as sending an SMS, and so on. This achieves precision and intelligence in the service process.
[0117] The business dialogue model training method provided by this invention involves: acquiring historical business call records and user profile data of the target business; extracting call segments from the historical business call records to obtain multiple call segments; parsing the call segments to obtain target feature information, including call feature information; generating multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputting any one of the multiple user simulation scripts for each user setting type into a preset user AI agent model; simulating business dialogue based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data, including user dialogue data and consultant dialogue data, wherein the consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business; and training an initial business dialogue model based on the simulated business dialogue data to obtain a target business dialogue model, wherein the number of model parameters in the target business dialogue model is less than the number of model parameters in the consultant AI agent model. Therefore, this invention eliminates the need for manual configuration to obtain large amounts of labeled data when acquiring the target business dialogue model. Instead, it generates multiple user setting types, generates multiple user simulation scripts for each type, and then uses these scripts, along with a user AI agent model and an advisor AI agent model, to obtain simulated business dialogue data. This simulated data is then used as training data to train the initial business dialogue model, ultimately yielding the target business dialogue model. The number of parameters in the target business dialogue model is less than that in the advisor AI agent model. Thus, this invention overcomes the shortcomings of existing technologies, such as high manual costs and slow response times in business dialogue model training. It reduces the manual costs of training business dialogue models and improves dialogue response speed while maintaining the accuracy and intelligence of the business dialogue service process.
[0118] The business dialogue model training device provided by the present invention is described below. The business dialogue model training device described below and the business dialogue model training method described above can be referred to in correspondence.
[0119] Figure 10 This is a schematic diagram of the structure of the business dialogue model training device provided by the present invention. Figure 10 As shown, the business dialogue model training device 1000 includes: an acquisition module 1001, an interception module 1002, a parsing module 1003, a generation module 1004, a processing module 1005, and a training module 1006.
[0120] The acquisition module 1001 is used to acquire historical call records and user profile data of the target business.
[0121] The interception module 1002 is used to extract call segments from historical business call records to obtain call segments from multiple call stages.
[0122] The parsing module 1003 is used to parse call segments from multiple call stages to obtain target feature information; wherein, the target feature information includes: call feature information.
[0123] The generation module 1004 is used to generate multiple user simulation scripts for each user setting type among multiple user setting types based on user profile data and call feature information.
[0124] The processing module 1005 is used to input any one of the multiple user simulation scripts of each user's set type into a preset user artificial intelligence agent model, and to conduct simulated business dialogue based on the user artificial intelligence agent model and the preset consultant artificial intelligence agent model to obtain simulated business dialogue data; wherein, the simulated business dialogue data includes: user dialogue data and consultant dialogue data, and the consultant artificial intelligence agent model generates consultant dialogue data based on multiple business databases of the target business.
[0125] Training module 1006 is used to train the initial business dialogue model based on simulated business dialogue data to obtain the target business dialogue model; wherein, the number of model parameters of the target business dialogue model is less than the number of model parameters of the advisor AI agent model.
[0126] The business dialogue model training device provided by this invention acquires historical business call records and user profile data of the target business; extracts call segment fragments from the historical business call records to obtain multiple call segment fragments; parses the call segment fragments to obtain target feature information, wherein the target feature information includes call feature information; generates multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputs any one of the multiple user simulation scripts for each user setting type into a preset user artificial intelligence agent model, and performs simulated business dialogue based on the user artificial intelligence agent model and a preset consultant artificial intelligence agent model to obtain simulated business dialogue data; wherein the simulated business dialogue data includes user dialogue data and consultant dialogue data, and the consultant artificial intelligence agent model generates consultant dialogue data based on multiple business databases of the target business; trains an initial business dialogue model based on the simulated business dialogue data to obtain a target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the consultant artificial intelligence agent model. Therefore, this invention eliminates the need for manual configuration to obtain large amounts of labeled data when acquiring the target business dialogue model. Instead, it generates multiple user setting types, generates multiple user simulation scripts for each type, and then uses these scripts, along with a user AI agent model and an advisor AI agent model, to obtain simulated business dialogue data. This simulated data is then used as training data to train the initial business dialogue model, ultimately yielding the target business dialogue model. The number of parameters in the target business dialogue model is less than that in the advisor AI agent model. Thus, this invention overcomes the shortcomings of existing technologies, such as high manual costs and slow response times in business dialogue model training. It reduces the manual costs of training business dialogue models and improves dialogue response speed while maintaining the accuracy and intelligence of the business dialogue service process.
[0127] Figure 11 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 11As shown, the electronic device may include: a processor 1110, a communications interface 1120, a memory 1130, and a communications bus 1140, wherein the processor 1110, the communications interface 1120, and the memory 1130 communicate with each other through the communications bus 1140. The processor 1110 can call logical instructions in the memory 1130 to execute a business dialogue model training method. This method includes: acquiring historical business call records and user profile data of the target business; extracting call segments from the historical call records to obtain multiple call segments; parsing the call segments to obtain target feature information, where the target feature information includes call feature information; generating multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputting any one of the multiple user simulation scripts for each user setting type into a preset user AI agent model, and performing simulated business dialogue based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data; where the simulated business dialogue data includes user dialogue data and consultant dialogue data, and the consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business; training an initial business dialogue model based on the simulated business dialogue data to obtain a target business dialogue model; where the number of model parameters in the target business dialogue model is less than the number of model parameters in the consultant AI agent model.
[0128] Furthermore, the logical instructions in the aforementioned memory 1130 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the business dialogue model training method provided by the above methods. The method includes: acquiring historical business call records and user profile data of the target business; extracting call segment fragments from the historical business call records to obtain call segments of multiple call segments; parsing the call segments of multiple call segments to obtain target feature information; wherein, the target feature information includes: call feature information; and setting each of the multiple user types based on the user profile data and the call feature information. Multiple user simulation scripts are generated based on user setting types. Any one of these user simulation scripts is input into a preset user AI agent model. Simulated business dialogues are then performed based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data. This simulated business dialogue data includes user dialogue data and consultant dialogue data. The consultant AI agent model generates consultant dialogue data based on multiple business databases related to the target business. The initial business dialogue model is trained using the simulated business dialogue data to obtain the target business dialogue model. The number of model parameters in the target business dialogue model is less than the number of model parameters in the consultant AI agent model.
[0130] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a business dialogue model training method provided by the above-described methods. This method includes: acquiring historical business call records and user profile data of the target business; extracting call segment fragments from the historical business call records to obtain multiple call segment fragments; parsing the call segment fragments of the multiple call segments to obtain target feature information; wherein the target feature information includes call feature information; generating multiple user simulation scripts for each user setting type based on the user profile data and call feature information; inputting any one of the multiple user simulation scripts for each user setting type into a preset user AI agent model, and performing simulated business dialogue based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data; wherein the simulated business dialogue data includes user dialogue data and consultant dialogue data, and the consultant AI agent model generates consultant dialogue data based on multiple business databases of the target business; training an initial business dialogue model based on the simulated business dialogue data to obtain a target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the consultant AI agent model.
[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training a business dialogue model, characterized in that, include: Obtain historical call records of the target service and user profile data of the target service; The historical call records are segmented to obtain call segments from multiple call stages; The call segments of the multiple call sessions are parsed to obtain target feature information; wherein, the target feature information includes: call feature information; Based on the user profile data and the call feature information, multiple user simulation scripts are generated for each user setting type among multiple user setting types; Each user simulation script of the user setting type is input into a preset user AI agent model. Based on the user AI agent model and the preset consultant AI agent model, a simulated business dialogue is performed to obtain simulated business dialogue data. The simulated business dialogue data includes user dialogue data and consultant dialogue data. The consultant AI agent model generates the consultant dialogue data based on multiple business databases of the target business. The initial business dialogue model is trained based on the simulated business dialogue data to obtain the target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the advisor AI agent model. The step involves inputting any one of the multiple user simulation scripts of each user-defined type into a preset user AI agent model, and performing simulated business dialogue based on the user AI agent model and a preset consultant AI agent model to obtain simulated business dialogue data, including: If the current number of extractions changes and the result of the change is less than the extraction number threshold, one user simulation script is randomly extracted from the plurality of user simulation scripts of each user setting type as the user simulation script to be input, thereby obtaining a plurality of user simulation scripts to be input corresponding to the plurality of user setting types. Input the multiple user simulation scripts to be input into the user AI agent model to obtain the target user AI agent model corresponding to the current number of extractions; Based on the simulated business dialogue of the target user AI agent model and the consultant AI agent model, the business dialogue data corresponding to the current number of extractions is obtained; Increment the current number of draws by 1; If the current number of extractions changes and the change result is greater than or equal to the extraction number threshold, the business dialogue data corresponding to all extraction numbers shall be determined as the simulated business dialogue data. The multiple user setting types include: user role personality setting, user call segment end setting, and call segment user intent setting; before inputting the multiple user simulation scripts to be input into the user AI agent model to obtain the target user AI agent model corresponding to the current extraction number, the method further includes: From the plurality of user simulation scripts to be input, obtain the first user simulation script to be input corresponding to the user call segment end setting and the second user simulation script to be input corresponding to the user intent setting of the call segment; Analyze whether the call progress of the first user simulation script and the second user simulation script matches; If the call progress of the first user simulation script to be input and the second user simulation script to be input are matched, the plurality of user simulation scripts to be input are input into the user artificial intelligence agent model; If the call progress of the first user simulation script to be input and the second user simulation script to be input do not match, any user simulation script is extracted from the multiple user simulation scripts set at the end of the user call phase as the first user simulation script to be input, or any user simulation script is extracted from the multiple user simulation scripts set at the user intent of the call phase as the second user simulation script to be input. Then, the analysis of whether the first user simulation script to be input and the second user simulation script to be input match and the subsequent steps are re-executed.
2. The business dialogue model training method according to claim 1, characterized in that, Before inputting any one of the plurality of user simulation scripts of each user-defined type into the preset user AI agent model, the method further includes: Receive a custom script that sets any target user setting type among the plurality of user setting types; The custom script is used as a user simulation script of the target user setting type, and the custom script is added to the plurality of user simulation scripts of the target user setting type.
3. The business dialogue model training method according to claim 1, characterized in that, The target feature information also includes: user feature information; Before generating multiple user simulation scripts for each user setting type based on the user profile data and the call feature information, the method further includes: Based on the user characteristic information, user profile completion data is generated; Based on the user profile completion data, the user profile data is completed.
4. The business dialogue model training method according to claim 1, characterized in that, The multiple call stages include: a call explanation stage, a confirmation guidance stage, and a payment guidance stage.
5. A business dialogue model training device, characterized in that, include: The acquisition module is used to acquire historical call records of the target service and user profile data of the target service; The interception module is used to extract call segments from the historical business call records to obtain call segments of multiple call segments. The parsing module is used to parse call segments from the multiple call sessions to obtain target feature information; wherein, the target feature information includes: call feature information; The generation module is used to generate multiple user simulation scripts for each user setting type among multiple user setting types based on the user profile data and the call feature information; The processing module is used to input any one of the multiple user simulation scripts of each user setting type into a preset user artificial intelligence agent model, and perform simulated business dialogue based on the user artificial intelligence agent model and the preset consultant artificial intelligence agent model to obtain simulated business dialogue data; wherein, the simulated business dialogue data includes: user dialogue data and consultant dialogue data, and the consultant artificial intelligence agent model generates the consultant dialogue data based on multiple business databases of the target business; The training module is used to train the initial business dialogue model based on the simulated business dialogue data to obtain the target business dialogue model; wherein the number of model parameters of the target business dialogue model is less than the number of model parameters of the advisor AI agent model. The step of inputting any one of the multiple user simulation scripts of each user setting type into a preset user AI agent model, and conducting simulated business dialogue based on the user AI agent model and the preset consultant AI agent model to obtain simulated business dialogue data includes: If the current number of extractions changes and the result of the change is less than the extraction number threshold, one user simulation script is randomly extracted from the plurality of user simulation scripts of each user setting type as the user simulation script to be input, thereby obtaining a plurality of user simulation scripts to be input corresponding to the plurality of user setting types. Input the multiple user simulation scripts to be input into the user AI agent model to obtain the target user AI agent model corresponding to the current number of extractions; Based on the simulated business dialogue of the target user AI agent model and the consultant AI agent model, the business dialogue data corresponding to the current number of extractions is obtained; Increment the current number of draws by 1; If the current number of extractions changes and the change result is greater than or equal to the extraction number threshold, the business dialogue data corresponding to all extraction numbers shall be determined as the simulated business dialogue data. The multiple user setting types include: user role personality setting, user call segment end setting, and call segment user intent setting; before inputting the multiple user simulation scripts to be input into the user AI agent model to obtain the target user AI agent model corresponding to the current number of extractions, the method further includes: From the plurality of user simulation scripts to be input, obtain the first user simulation script to be input corresponding to the user call segment end setting and the second user simulation script to be input corresponding to the user intent setting of the call segment; Analyze whether the call progress of the first user simulation script and the second user simulation script matches; If the call progress of the first user simulation script to be input and the second user simulation script to be input are matched, the plurality of user simulation scripts to be input are input into the user artificial intelligence agent model; If the call progress of the first user simulation script to be input and the second user simulation script to be input do not match, any user simulation script is extracted from the multiple user simulation scripts set at the end of the user call phase as the first user simulation script to be input, or any user simulation script is extracted from the multiple user simulation scripts set at the user intent of the call phase as the second user simulation script to be input. Then, the analysis of whether the first user simulation script to be input and the second user simulation script to be input match and the subsequent steps are re-executed.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the business dialogue model training method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the business dialogue model training method as described in any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the business dialogue model training method as described in any one of claims 1 to 4.