Training scene data generation method and device, equipment and storage medium
By using the search enhancement generation system and large language model in the sales task generation system, the training scenario data is automatically generated, which solves the problems of cumbersome and inefficient generation process in the existing technology, and achieves more efficient and reliable data generation.
Patent Information
- Application Number
- CN202411362715.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-14
AI Technical Summary
The data generation process of the current sales task training scenario is cumbersome, resulting in inefficient generation and susceptible to manual intervention.
By obtaining preset sales tasks and entering the search and enhancing the generation system, the first text content is generated and the sales task is spliced to generate preset training content. The large language model is used to generate predicted scene data based on preset training content, and the model parameters are updated through the loss function until the loss value meets the conditions. The updated model is generated to generate the current training scene data.
There is no need to generate data manually, which reduces the time of data generation in training scenarios, improves generation efficiency, and enhances data reliability, avoids the impact of manual intervention.
Smart Images

Figure CN119441466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and financial technology, and in particular to a method, device, equipment and storage medium for generating training scenario data. Background Art
[0002] Pre-sales training is an important part of promoting business growth. Through this part, enterprises can systematically improve the comprehensive quality and professional ability of sales personnel, so that sales personnel can more accurately grasp market dynamics, more deeply understand customer needs, and more effectively convey product value, thus successfully completing sales tasks.
[0003] However, the current generation process of training scenario data for sales tasks is cumbersome, which is not conducive to improving the generation efficiency of training scenario data. The reason is that the existing technology mainly uses manual writing to generate training scenario data for current sales tasks, and the manual writing method consumes a lot of human resources and time resources, increases the generation time of training scenario data for current sales tasks, and is easily affected by manual intervention, so it is not conducive to improving the generation efficiency of training scenario data. Summary of the invention
[0004] The present invention provides a training scenario data generation method, device, computer equipment and storage medium to solve the technical problem that the generation process of training scenario data for current sales tasks is cumbersome and is not conducive to improving the generation efficiency of training scenario data.
[0005] In a first aspect, a method for generating training scenario data is provided, comprising:
[0006] Acquire a preset sales task, and input the preset sales task into a preset retrieval enhancement generation system;
[0007] Acquire a first text content output by the search enhancement generation system based on the preset sales task;
[0008] splicing the sales task and the first text content to obtain preset training content, and acquiring actual scenario data corresponding to the preset training content;
[0009] Acquire prediction scenario data generated by the large language model based on the preset training content;
[0010] Obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value;
[0011] When the loss value meets the preset conditions, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, concatenate the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
[0012] Further, the obtaining of the first text content output by the search enhancement generation system based on the preset sales task includes:
[0013] Retrieving first data related to the preset sales task from a pre-established database through a retriever of the retrieval enhancement generation system;
[0014] The first data is input into a generator of a search enhancement generation system, and a first text content output by the generator based on the preset sales task is obtained.
[0015] Furthermore, the step of combining the sales task with the first text content to obtain preset training content and acquiring actual scenario data corresponding to the preset training content includes:
[0016] splicing the sales task and the first text content to obtain preset training content;
[0017] Obtain a preset file, and in the preset file, obtain actual scene data corresponding to the preset training content.
[0018] Furthermore, the obtaining of prediction scenario data generated by the large language model based on the preset training content includes:
[0019] Performing feature extraction on the preset training content to obtain a first feature vector, and inputting the first feature vector into a preset large language model;
[0020] Obtain predicted scenario data generated by the large language model based on the first feature vector.
[0021] Furthermore, obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value, includes:
[0022] Obtaining a loss value between the predicted scene data and the actual scene data through a preset cross entropy loss function;
[0023] Based on the loss value, model parameters of the large language model are updated.
[0024] Further, when the loss value meets a preset condition, the updating of the model parameters of the large language model is stopped, the updated large language model is obtained, the current sales task is obtained, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained, including:
[0025] When the loss value converges, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, and retrieve second data related to the current sales task in a pre-established database through a retriever of the retrieval enhancement generation system;
[0026] Input the second data into the generator of the retrieval enhancement generation system, obtain the second text content output by the generator based on the second data, splice the current sales task and the second text content to obtain the current training content, perform feature extraction on the current training content to obtain a second feature vector, input the second feature vector into a preset large language model, and obtain the training scenario data generated by the large language model based on the second feature vector.
[0027] Furthermore, when the loss value satisfies a preset condition, the updating of the model parameters of the large language model is stopped, the updated large language model is obtained, the current sales task is obtained, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained, the training scenario data generation method includes:
[0028] A target device is connected, and the training scenario data is sent to the target device, so that the target device generates a simulated training scenario according to the training scenario data.
[0029] In a second aspect, a training scenario data generating device is provided, comprising:
[0030] A first acquisition module, used to acquire a preset sales task and input the preset sales task into a preset search enhancement generation system;
[0031] A second acquisition module is used to acquire the first text content output by the search enhancement generation system based on the preset sales task;
[0032] A third acquisition module is used to splice the sales task and the first text content to obtain preset training content, and obtain actual scenario data corresponding to the preset training content;
[0033] A first generating module, used to obtain prediction scenario data generated by the large language model based on the preset training content;
[0034] An updating module, configured to obtain a loss value between the predicted scene data and the actual scene data through a preset loss function, and update a model parameter of the large language model based on the loss value;
[0035] The second generation module is used to stop updating the model parameters of the large language model when the loss value meets the preset conditions, obtain the updated large language model, obtain the current sales task, splice the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
[0036] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned training scenario data generation method when executing the computer program.
[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned training scenario data generation method are implemented.
[0038] The present application provides a training scenario data generation method, apparatus, computer equipment and storage medium, which obtain a preset sales task, input the preset sales task into a preset retrieval enhancement generation system; obtain a first text content output by the retrieval enhancement generation system based on the preset sales task; splice the sales task and the first text content to obtain a preset training content, and obtain actual scenario data corresponding to the preset training content; obtain the predicted scenario data generated by the large language model based on the preset training content; obtain the loss value between the predicted scenario data and the actual scenario data through a preset loss function, and update the model parameters of the large language model based on the loss value; when the loss value meets the preset condition, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, and connect the current sales task and the second The text contents are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained. The beneficial effects are in two aspects. On the one hand, when the loss value meets the preset conditions, the model parameters of the large language model are stopped from being updated, the updated large language model is generated, the current sales task is generated, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is generated. Since manual generation is not required, the generation time of the training scenario data of the current sales task is reduced, which is conducive to improving the generation efficiency of the training scenario data of the current sales task. On the other hand, since the updated large language model will not be affected by manual intervention, it is conducive to enhancing the reliability of the generated training scenario data of the current sales task. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0040] Figure 1 is a schematic diagram of an application environment of a method for generating training scenario data in one embodiment of the present invention;
[0041] Figure 2 A schematic diagram of a flow chart of a method for generating training scenario data provided by an embodiment of the present invention;
[0042] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step S23;
[0043] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S25;
[0044] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26;
[0045] Figure 6 is a structural schematic diagram of a training scenario data generating device in one embodiment of the present invention;
[0046] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0047] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a method for generating training scenario data in an embodiment of the present invention. The method for generating training scenario data provided by an embodiment of the present invention can be applied in the following embodiments: Figure 1 In an application environment, a client communicates with a server through a network.
[0050] The server obtains the preset sales task through the client, and inputs the preset sales task into the preset search enhancement generation system;
[0051] Acquire a first text content output by the search enhancement generation system based on the preset sales task;
[0052] splicing the sales task and the first text content to obtain preset training content, and acquiring actual scenario data corresponding to the preset training content;
[0053] Acquire prediction scenario data generated by the large language model based on the preset training content;
[0054] Obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value;
[0055] When the loss value meets the preset conditions, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, concatenate the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
[0056] In the scheme implemented by the above-mentioned training scenario data generation method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, when the loss value meets the preset conditions, the model parameters of the large language model are stopped from being updated, the updated large language model is generated, the current sales task is generated, the current sales task and the second text content are spliced to obtain the current training content, and the updated large language model is generated based on the current training content. The training scenario data generated. Since manual generation is not required, the generation time of the training scenario data of the current sales task is reduced, which is conducive to improving the generation efficiency of the training scenario data of the current sales task. On the other hand, since the updated large language model will not be affected by manual intervention, it is conducive to enhancing the reliability of the generated training scenario data of the current sales task.
[0057] The device running the client is referred to as a client device.
[0058] The device running the server is referred to as the server device.
[0059] The client devices may include but are not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
[0060] The server device can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.
[0061] See also Figure 2 , Figure 2 A flow chart of a method for generating training scenario data provided by an embodiment of the present invention includes the following steps:
[0062] S21, obtaining a preset sales task, and inputting the preset sales task into a preset search enhancement generation system;
[0063] Exemplarily, obtaining a preset sales task and inputting the preset sales task into a preset search enhancement generation system includes:
[0064] Connect to a target platform, obtain a preset sales task sent by the target platform, and input the preset sales task into a preset retrieval enhancement generation system, wherein the target platform includes one or a combination of a financial platform and an insurance platform.
[0065] Among them, the Retrieval-Augmented Generation (RAG) system is an advanced system that combines information retrieval and natural language generation technology, aiming to improve the efficiency and quality of text processing tasks.
[0066] S22, obtaining a first text content output by the search enhancement generation system based on the preset sales task;
[0067] The step of obtaining the first text content output by the search enhancement generation system based on the preset sales task includes:
[0068] Retrieving first data related to the preset sales task from a pre-established database through a retriever of the retrieval enhancement generation system;
[0069] The first data is input into a generator of a search enhancement generation system, and a first text content output by the generator based on the preset sales task is obtained.
[0070] S23, splicing the sales task and the first text content to obtain preset training content, and acquiring actual scenario data corresponding to the preset training content;
[0071] Among them, the actual scene data is the data for constructing the actual scene.
[0072] The actual scene data is data that has been artificially labeled or annotated in advance. This annotation process is to enable the large language model to learn and understand the inherent patterns and rules of the actual scene data.
[0073] S24, obtaining prediction scenario data generated by the large language model based on the preset training content;
[0074] Among them, the prediction scenario data is the data for constructing the prediction scenario.
[0075] Wherein, obtaining the prediction scenario data generated by the large language model based on the preset training content includes:
[0076] Performing feature extraction on the preset training content to obtain a first feature vector, and inputting the first feature vector into a preset large language model;
[0077] Obtain predicted scenario data generated by the large language model based on the first feature vector.
[0078] Preferably, the large language model adopts the Llama3 model, which is the third generation product of the Llama series.
[0079] S25, obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value;
[0080] S26, when the loss value meets the preset conditions, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, splice the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
[0081] Among them, the data format of the preset sales task and the current sales task is text format.
[0082] Among them, the training scenario data is the data for constructing the training scenario.
[0083] Wherein, when the loss value satisfies the preset condition, the updating of the model parameters of the large language model is stopped, the updated large language model is obtained, the current sales task is obtained, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained, the training scenario data generation method includes:
[0084] A target device is connected, and the training scenario data is sent to the target device, so that the target device generates a simulated training scenario according to the training scenario data.
[0085] The target device includes a head mounted display device, a mobile phone device, or a combination thereof.
[0086] Among them, the head display device refers to the head-mounted display (HMD), which is a technical device that can directly display virtual images in front of the user.
[0087] Among them, the mobile phone device refers to other mobile phones other than this device.
[0088] For the sake of illustration, an example is given below:
[0089] For example, the target device is a head-mounted display device, and the head-mounted display device generates a simulated training scene according to the training scene data.
[0090] The user puts on the headset and accesses the training application;
[0091] The application interface will display the training difficulty, training progress, and subsequent matching simulation scenario content for selection;
[0092] After the user selects the content, he / she enters the simulation scene, where a digital human simulates the customer;
[0093] Users communicate with digital human-simulated customers through gestures and voice;
[0094] After the application receives the voice, it transmits it to the server in real time. The server uses the Llama3 model to output the subsequent conversation content, customer emotions and expressions, etc. The expressions and emotional behaviors will be reflected in the image of the digital human. The emotions and conversations are synthesized into voices that match the image of the digital human through TTS and played to the salesperson.
[0095] For the sake of illustration, an example is given below:
[0096] For example, the target device is a mobile phone device, and the mobile phone device generates a simulated training scenario according to the training scenario data.
[0097] Users access the training app through their mobile devices;
[0098] The application interface will display the training difficulty, training progress, and subsequent matching simulation scenario content for selection;
[0099] After the user selects the content, he / she enters the simulation scene, where a digital human simulates the customer;
[0100] Users communicate with digital human-simulated customers through gestures and voice;
[0101] After the application receives the voice, it transmits it to the server in real time. The server uses the Llama3 model to generate the subsequent conversation content, customer emotions and expressions, etc. The expressions and emotional behaviors will be reflected in the image of the digital human. The emotions and conversations are synthesized into voices that match the image of the digital human through TTS and played to the salesperson. The full name of TTS in Chinese is: Text to Speech, and the full name in English is: Text To Speech.
[0102] Among them, TTS technology is a technology that can convert text information into natural and fluent voice output. It is part of human-computer dialogue and is used in head-mounted display devices to provide a humanized interactive experience.
[0103] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, when the loss value meets the preset conditions, the updating of the model parameters of the large language model is stopped, the updated large language model is generated, the current sales task is generated, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is generated. Since manual generation is not required, the generation time of the training scenario data of the current sales task is reduced, which is conducive to improving the generation efficiency of the training scenario data of the current sales task. On the other hand, since the updated large language model will not be affected by manual intervention, it is conducive to enhancing the reliability of the generated training scenario data of the current sales task.
[0104] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows:
[0105] S31, combining the sales task and the first text content to obtain preset training content;
[0106] S32, obtaining a preset file, and obtaining actual scene data corresponding to the preset training content in the preset file.
[0107] In the embodiment of the present invention, the sales task and the first text content are spliced to obtain preset training content, which improves the flexibility and efficiency of processing the preset training content.
[0108] See also Figure 4 , Figure 4 yes Figure 1 A specific implementation flow diagram of step S25 is described in detail as follows:
[0109] S41, obtaining a loss value between the predicted scene data and the actual scene data through a preset cross entropy loss function;
[0110] S42: Update the model parameters of the large language model based on the loss value.
[0111] Exemplarily, updating the model parameters of the large language model based on the loss value includes:
[0112] Calculate the gradient of the loss value with respect to each parameter through the back-propagation algorithm;
[0113] The model parameters of the large language model are updated according to the gradient and the set learning rate.
[0114] Among them, the learning rate is a hyperparameter, which determines the magnitude of the model parameter update in the direction of the gradient. Reasonable selection and adjustment of the learning rate is crucial to improving the training effect and convergence speed of large language models. In practical applications, the appropriate learning rate adjustment strategy can be selected according to the specific situation and training requirements of the large language model.
[0115] In an embodiment of the present invention, the model parameters of the large language model are updated based on the loss value. This dynamic update mechanism enables the large language model to continuously optimize its performance and adapt to changing application scenarios and requirements, which is conducive to improving the generalization ability and robustness of the large language model.
[0116] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows:
[0117] S51, when the loss value converges, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, and retrieve second data related to the current sales task in a pre-established database through the retriever of the retrieval enhancement generation system;
[0118] Exemplarily, when the loss value converges, stopping updating the model parameters of the large language model, obtaining the updated large language model, obtaining the current sales task, and retrieving second data related to the current sales task in a pre-established database through a retriever of the retrieval enhancement generation system, including:
[0119] When the loss value converges, stop updating the model parameters of the large language model, obtain the updated large language model, connect to the target platform, obtain the current sales task sent by the target platform, and retrieve the second data related to the current sales task in a pre-established database through the retriever of the retrieval enhancement generation system. The target platform includes one or a combination of a financial platform and an insurance platform.
[0120] S52, input the second data into the generator of the retrieval enhancement generation system, obtain the second text content output by the generator based on the second data, splice the current sales task and the second text content to obtain the current training content, perform feature extraction on the current training content to obtain a second feature vector, input the second feature vector into a preset large language model, and obtain the training scenario data generated by the large language model based on the second feature vector.
[0121] In an embodiment of the present invention, the training scenario data generated by the large language model based on the second feature vector is obtained. Since manual generation is not required, the generation time of the training scenario data for the current sales task is reduced, which is beneficial to improving the generation efficiency of the training scenario data for the current sales task.
[0122] See also Figure 6 , Figure 6 is a structural diagram of a training scenario data generating device in one embodiment of the present invention, such as Figure 6 As shown, the training scene data generating device includes a first acquisition module 101, a second acquisition module 102, a third acquisition module 103, a first generation module 104, an update module 105, and a second generation module 106. The functional modules are described in detail as follows:
[0123] A first acquisition module 101 is used to acquire a preset sales task and input the preset sales task into a preset search enhancement generation system;
[0124] A second acquisition module 102, configured to acquire a first text content output by the search enhancement generation system based on the preset sales task;
[0125] A third acquisition module 103 is used to splice the sales task and the first text content to obtain preset training content, and obtain actual scenario data corresponding to the preset training content;
[0126] A first generating module 104 is used to obtain prediction scenario data generated by the large language model based on the preset training content;
[0127] An updating module 105 is used to obtain a loss value between the predicted scene data and the actual scene data through a preset loss function, and update a model parameter of the large language model based on the loss value;
[0128] The second generation module 106 is used to stop updating the model parameters of the large language model when the loss value meets the preset conditions, obtain the updated large language model, obtain the current sales task, splice the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
[0129] In one embodiment, the second acquisition module 102 includes:
[0130] A first retrieval subunit, configured to retrieve first data related to the preset sales task from a pre-established database through a retriever of the retrieval enhancement generation system;
[0131] The first input subunit is used to input the first data into a generator of the retrieval enhancement generation system to obtain a first text content output by the generator based on the preset sales task.
[0132] In one embodiment, the third acquisition module 103 includes:
[0133] A splicing subunit, used for splicing the sales task and the first text content to obtain preset training content;
[0134] The first acquisition subunit is used to acquire a preset file, and in the preset file, obtain actual scene data corresponding to the preset training content.
[0135] In one embodiment, the first generating module 104 includes:
[0136] An extraction subunit, configured to perform feature extraction on the preset training content to obtain a first feature vector, and input the first feature vector into a preset large language model;
[0137] The first generating subunit is used to obtain the predicted scene data generated by the large language model based on the first feature vector.
[0138] In one embodiment, the updating module 105 includes:
[0139] A second acquisition subunit, used to obtain a loss value between the predicted scene data and the actual scene data through a preset cross entropy loss function;
[0140] An updating subunit is used to update the model parameters of the large language model based on the loss value.
[0141] In one embodiment, the second generating module 106 includes:
[0142] A second retrieval subunit is configured to stop updating the model parameters of the large language model when the loss value converges, obtain the updated large language model, obtain the current sales task, and retrieve second data related to the current sales task in a pre-established database through a retriever of the retrieval enhancement generation system;
[0143] The second generating sub-unit is used for inputting the second data into the generator of the retrieval enhancement generating system, obtaining the second text content output by the generator based on the second data, splicing the current sales task and the second text content to obtain the current training content, performing feature extraction on the current training content to obtain a second feature vector, inputting the second feature vector into a preset large language model, and obtaining the training scenario data generated by the large language model based on the second feature vector.
[0144] In one embodiment, the training scenario data generating device further includes:
[0145] The display module is used to connect to the target device and send the training scenario data to the target device so that the target device generates a simulated training scenario according to the training scenario data.
[0146] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, when the loss value meets the preset conditions, the updating of the model parameters of the large language model is stopped, the updated large language model is generated, the current sales task is generated, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is generated. Since manual generation is not required, the generation time of the training scenario data of the current sales task is reduced, which is conducive to improving the generation efficiency of the training scenario data of the current sales task. On the other hand, since the updated large language model will not be affected by manual intervention, it is conducive to enhancing the reliability of the generated training scenario data of the current sales task.
[0147] For the specific limitations on the training scenario data generating device, please refer to the limitations on the training scenario data generating method mentioned above, which will not be repeated here.
[0148] Each module in the training scenario data generating device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0149] See also Figure 7 , Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a server device, and its internal structure diagram may be as shown in FIG. Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus.
[0150] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of a training scenario data generation method can be implemented on the server device.
[0151] See also Figure 8 , Figure 8 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a client device, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database via a network connection. When the computer program is executed by the processor, the functions or steps of a training scenario data generation method can be implemented on the client device.
[0152] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0153] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions of the server and the client in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0154] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0155] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0156] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0157] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0158] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for generating training scenario data, characterized in that: include: Acquire a preset sales task, and input the preset sales task into a preset retrieval enhancement generation system; Acquire a first text content output by the search enhancement generation system based on the preset sales task; splicing the sales task and the first text content to obtain preset training content, and acquiring actual scenario data corresponding to the preset training content; Acquire prediction scenario data generated by the large language model based on the preset training content; Obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value; When the loss value meets the preset conditions, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, concatenate the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
2. The method for generating training scenario data according to claim 1, characterized in that: The obtaining of the first text content output by the search enhancement generation system based on the preset sales task includes: Retrieving first data related to the preset sales task from a pre-established database through a retriever of the retrieval enhancement generation system; The first data is input into a generator of a search enhancement generation system, and a first text content output by the generator based on the preset sales task is obtained.
3. The method for generating training scenario data according to claim 1, characterized in that: The step of combining the sales task with the first text content to obtain preset training content and acquiring actual scenario data corresponding to the preset training content includes: splicing the sales task and the first text content to obtain preset training content; Obtain a preset file, and in the preset file, obtain actual scene data corresponding to the preset training content.
4. The method for generating training scenario data according to claim 1, characterized in that: The obtaining of prediction scenario data generated by the large language model based on the preset training content includes: Performing feature extraction on the preset training content to obtain a first feature vector, and inputting the first feature vector into a preset large language model; Obtain predicted scenario data generated by the large language model based on the first feature vector.
5. The method for generating training scenario data according to claim 1, characterized in that: The step of obtaining a loss value between the predicted scene data and the actual scene data through a preset loss function, and updating a model parameter of the large language model based on the loss value, comprises: Obtaining a loss value between the predicted scene data and the actual scene data through a preset cross entropy loss function; Based on the loss value, model parameters of the large language model are updated.
6. The method for generating training scenario data according to claim 1, characterized in that: When the loss value satisfies a preset condition, the updating of the model parameters of the large language model is stopped, the updated large language model is obtained, the current sales task is obtained, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained, including: When the loss value converges, stop updating the model parameters of the large language model, obtain the updated large language model, obtain the current sales task, and retrieve second data related to the current sales task in a pre-established database through a retriever of the retrieval enhancement generation system; Input the second data into the generator of the retrieval enhancement generation system, obtain the second text content output by the generator based on the second data, splice the current sales task and the second text content to obtain the current training content, perform feature extraction on the current training content to obtain a second feature vector, input the second feature vector into a preset large language model, and obtain the training scenario data generated by the large language model based on the second feature vector.
7. The method for generating training scenario data according to any one of claims 1 to 6, characterized in that: When the loss value satisfies a preset condition, the updating of the model parameters of the large language model is stopped, the updated large language model is obtained, the current sales task is obtained, the current sales task and the second text content are spliced to obtain the current training content, and the training scenario data generated by the updated large language model based on the current training content is obtained, the training scenario data generation method includes: A target device is connected, and the training scenario data is sent to the target device, so that the target device generates a simulated training scenario according to the training scenario data.
8. A training scenario data generating device, characterized in that: include: A first acquisition module, used to acquire a preset sales task and input the preset sales task into a preset search enhancement generation system; A second acquisition module is used to acquire the first text content output by the search enhancement generation system based on the preset sales task; A third acquisition module is used to splice the sales task and the first text content to obtain preset training content, and obtain actual scenario data corresponding to the preset training content; A first generating module, used to obtain prediction scenario data generated by the large language model based on the preset training content; An updating module, configured to obtain a loss value between the predicted scene data and the actual scene data through a preset loss function, and update a model parameter of the large language model based on the loss value; The second generation module is used to stop updating the model parameters of the large language model when the loss value meets the preset conditions, obtain the updated large language model, obtain the current sales task, splice the current sales task and the second text content to obtain the current training content, and obtain the training scenario data generated by the updated large language model based on the current training content.
9. A computer 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, the steps of the method for generating training scenario data according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for generating training scenario data according to any one of claims 1 to 7 are implemented.