Talk skill optimization method and device, electronic equipment and storage medium
Through the pre-trained corpus data model, the corpus data is optimized using preset sorting, which solves the problem of inefficient speech selection in the intelligent dialogue system, achieves more accurate scene matching and speech selection, and improves system efficiency.
Patent Information
- Application Number
- CN202411099129.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-06
AI Technical Summary
In the existing intelligent dialogue system, the speech selection of large language model (LLM) through expert experience is inefficient and cannot objectively reflect customers' communication willingness, resulting in inefficient speech selection.
Through the pre-trained corpus data model, the corpus data is optimized by preset sorting method, the corpus is added or deleted according to the weight size, and a speech selection model is generated more in line with different scenarios, improving the accuracy of speech selection.
It improves the accuracy and efficiency of the speech selection of intelligent dialogue systems, can reply more accurately to target speeches that meet the scene, reduces manual intervention, and improves the accuracy of model training.
Smart Images

Figure CN119088918A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a speech optimization method, device, electronic device and storage medium. Background Art
[0002] In the current intelligent dialogue system based on the Large Language Model (LLM), one implementation method is to retrieve the vector library and return the alternative dialogues to the LLM. The LLM then selects the best alternative dialogue based on the context. The current criterion for judging the best dialogue is to intervene in the LLM's dialogue selection ability through expert experience.
[0003] However, as business complexity increases, the ability to judge each conversation based on expert experience and manually intervene in the LLM's speech selection is very inefficient and cannot even objectively reflect the customer's communication willingness. How to optimize the speech selection of the intelligent dialogue system and improve the efficiency of intelligent dialogue is an urgent problem that needs to be solved. Summary of the invention
[0004] The purpose of some embodiments of the present application is to provide a speech optimization method, device, electronic device and storage medium. Through the technical solution of the embodiments of the present application, the dialogue request of the client terminal is obtained; according to the pre-trained speech selection model, the target speech corresponding to the dialogue request of the client terminal is determined; wherein the pre-trained speech selection model is obtained by training a large language model with corpus data; the expected data is obtained after optimization using a preset sorting method. In the present application, the corpus data is optimized by using a preset sorting method, that is, according to the size of the weight, new corpus is added or corpus with a small weight value is deleted, so as to realize continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request of the client terminal, it can more accurately reply to the target speech that meets the scenario, thereby improving the accuracy of speech selection.
[0005] In a first aspect, some embodiments of the present application provide a method for optimizing speech, including:
[0006] Get the conversation request of the client terminal;
[0007] According to a pre-trained speech selection model, the target speech corresponding to the dialogue request of the client terminal is determined; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
[0008] Some embodiments of the present application optimize the corpus data by adopting a preset sorting method, that is, adding new corpus or deleting corpus with small weight value according to the weight, so as to realize continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request from the client terminal, it can more accurately reply to the target speech that meets the scenario, thereby improving the accuracy of speech selection.
[0009] Optionally, the pre-trained speech selection model is obtained in the following manner:
[0010] Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value;
[0011] When the weight value of the answer response is greater than a preset value, the large language model is trained according to the customer question and the answer to the question to obtain the speech selection model.
[0012] Some embodiments of the present application optimize and modify the training corpus through the data of historical conversations, and then train the large language model according to the modified training corpus to obtain a speech selection model. In this way, the information in the historical conversations can be learned more effectively and better suited to different scenarios.
[0013] Optionally, the method further comprises:
[0014] The customer questions and / or answer words in the corpus data are modified according to the weight value of the answer response, wherein the answer response includes at least one or more of the hit volume, hit rate, hit-hangup volume, hit-hangup rate, hit-answer volume, hit-answer rate, transaction volume after hit, and transaction rate after hit.
[0015] During the model training process, some embodiments of the present application continuously learn from historical conversation data, and modify customer questions and / or answer words in the corpus data according to the weight values of the answer responses, thereby continuously optimizing the training corpus.
[0016] Optionally, the method further comprises:
[0017] The weight value of the answer response is updated every preset time period.
[0018] In some embodiments of the present application, the weight values of answer responses are updated according to historical conversation data at preset time intervals, thereby improving the accuracy of model training.
[0019] Optionally, the method further comprises:
[0020] When the weight value of the answer response is less than and equal to the preset value, the customer question and answer script corresponding to the answer response will be deleted.
[0021] Some embodiments of the present application delete data with poor performance in the training corpus to improve the accuracy of model training.
[0022] In a second aspect, some embodiments of the present application provide a speech optimization device, including:
[0023] An acquisition module, used for acquiring a conversation request from a client terminal;
[0024] The optimization module is used to determine the target speech corresponding to the dialogue request of the client terminal according to a pre-trained speech selection model; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
[0025] Some embodiments of the present application optimize the corpus data by adopting a preset sorting method, that is, adding new corpus or deleting corpus with small weight value according to the weight, so as to realize continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request from the client terminal, it can more accurately reply to the target speech that meets the scenario, thereby improving the accuracy of speech selection.
[0026] Optionally, the device further comprises a model training module, wherein the model training module is used to:
[0027] Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value;
[0028] When the weight value of the answer response is greater than a preset value, the large language model is trained according to the customer question and the answer to the question to obtain the speech selection model.
[0029] Some embodiments of the present application optimize and modify the training corpus through the data of historical conversations, and then train the large language model according to the modified training corpus to obtain a speech selection model. In this way, the information in the historical conversations can be learned more effectively and better suited to different scenarios.
[0030] Optionally, the model training module is used to:
[0031] The customer questions and / or answer words in the corpus data are modified according to the weight value of the answer response, wherein the answer response includes at least one or more of the hit volume, hit rate, hit-hangup volume, hit-hangup rate, hit-answer volume, hit-answer rate, transaction volume after hit, and transaction rate after hit.
[0032] During the model training process, some embodiments of the present application continuously learn from historical conversation data, and modify customer questions and / or answer words in the corpus data according to the weight values of the answer responses, thereby continuously optimizing the training corpus.
[0033] Optionally, the model training module is used to:
[0034] The weight value of the answer response is updated every preset time period.
[0035] In some embodiments of the present application, the weight values of answer responses are updated according to historical conversation data at preset time intervals, thereby improving the accuracy of model training.
[0036] Optionally, the model training module is used to:
[0037] When the weight value of the answer response is less than and equal to the preset value, the customer question and answer script corresponding to the answer response will be deleted.
[0038] Some embodiments of the present application delete data with poor performance in the training corpus to improve the accuracy of model training.
[0039] In a third aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the speech optimization method as described in any embodiment of the first aspect can be implemented.
[0040] In a fourth aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the speech optimization method as described in any embodiment of the first aspect.
[0041] In a fifth aspect, some embodiments of the present application provide a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, can implement the speech optimization method as described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A flowchart of a speech optimization method provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the structure of a speech optimization device provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0047] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0048] In the current intelligent dialogue system based on the Large Language Model (LLM), one implementation method is to retrieve the vector library and return the alternative dialogues to the LLM. The LLM then selects the best alternative dialogue based on the context. The current criterion for judging the best dialogue is to intervene in the LLM's dialogue selection ability through expert experience.
[0049] However, with the increase of business complexity, the ability to judge each conversation through expert experience and manually intervene in the speech selection of LLM is very inefficient and even cannot objectively reflect the customer's communication willingness. How to optimize the speech selection of the intelligent dialogue system and the efficiency of intelligent dialogue is an urgent problem to be solved. In view of this, some embodiments of the present application provide a speech optimization method, which includes obtaining a dialogue request from a client terminal; determining the target speech corresponding to the dialogue request of the client terminal according to a pre-trained speech selection model; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; the expected data is obtained after optimization using a preset sorting method. In the present application, the corpus data is optimized by using a preset sorting method, that is, according to the weight size, new corpus is added or corpus with a small weight value is deleted, so as to realize the continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request from the client terminal, the target speech that meets the scenario can be replied more accurately, and the accuracy of speech selection can be improved.
[0050] like Figure 1 As shown, an embodiment of the present application provides a method for optimizing speech, the method comprising:
[0051] S101, obtaining a conversation request from a client terminal;
[0052] Specifically, the server receives a dialogue request sent by a client terminal, the user can input a question through the client terminal, and the client terminal sends the dialogue request containing the question to the server.
[0053] S102. Determine the target speech corresponding to the dialogue request of the client terminal according to the pre-trained speech selection model; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
[0054] Specifically, the server obtains historical conversation data and continuously optimizes the historical conversation data using a preset sorting method to obtain optimized corpus data, and uses the optimized corpus data to train the large language model to obtain a speech selection model. After receiving a conversation request from a client terminal, the server obtains keywords of the question in the conversation request, and inputs the keywords into the pre-trained speech selection model, and obtains the target speech corresponding to the conversation request. In this way, by continuously optimizing the corpus data, a target speech that better suits the scenario is obtained during the conversation.
[0055] Some embodiments of the present application optimize the corpus data by adopting a preset sorting method, that is, adding new corpus or deleting corpus with small weight value according to the weight, so as to realize continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request from the client terminal, it can more accurately reply to the target speech that meets the scenario, thereby improving the accuracy of speech selection.
[0056] Another embodiment of the present application further supplements the speech optimization method provided in the above embodiment.
[0057] Optionally, the pre-trained speech selection model is obtained by:
[0058] Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value;
[0059] When the weight value of the answer response is greater than the preset value, the large language model is trained according to the customer's questions and answers to obtain a speech selection model.
[0060] Large Language Model (LLM) refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. Large language model can handle a variety of natural language tasks, such as text classification, question answering, dialogue, etc., and is an important path to artificial intelligence.
[0061] Specifically, the fine-tuning training corpus of the large language model includes input information and output information. The input information includes at least the basic information of the user and the questions raised by the user. The output response dialogue (i.e., answer response) is obtained by adding training data of answers with better effects and eliminating corpus with poor effects. The large language model is trained with the training corpus to obtain a dialogue selection model, so that when it is run online later, answer dialogues with good performance will be easier to select.
[0062] Some embodiments of the present application optimize and modify the training corpus through the data of historical conversations, and then train the large language model according to the modified training corpus to obtain a speech selection model. In this way, the information in the historical conversations can be learned more effectively and better suited to different scenarios.
[0063] Optionally, the method further comprises:
[0064] The customer questions and / or answer words in the corpus data are modified according to the weight value of the answer response, wherein the answer response includes at least one or more of the hit volume, hit rate, hit hang-up volume, hit hang-up rate, hit answer volume, hit answer rate, transaction volume after hit, and transaction rate after hit.
[0065] During the model training process, some embodiments of the present application continuously learn from historical conversation data, and modify customer questions and / or answer words in the corpus data according to the weight values of the answer responses, thereby continuously optimizing the training corpus.
[0066] Optionally, the method further comprises:
[0067] The weight value of the answer response is updated every preset time period.
[0068] In some embodiments of the present application, the weight values of answer responses are updated according to historical conversation data at preset time intervals, thereby improving the accuracy of model training.
[0069] Optionally, the method further comprises:
[0070] When the weight value of an answer response is less than and equal to a preset value, the customer question and answer script corresponding to the answer response will be deleted.
[0071] Some embodiments of the present application delete data with poor performance in the training corpus to improve the accuracy of model training.
[0072] Exemplarily, an embodiment of the present application obtains historical conversation data and relevant data in the historical conversation data, such as questions asked by a user during a conversation, answers to the questions, and user reactions, such as whether the user hangs up or converts.
[0073] Through the relevant data of multiple historical conversations, the hit-hangup rate and hit-conversion rate of a certain phrase are counted and sorted to obtain the top 10 phrases with better performance.
[0074] For example, a script is a dialogue template. For example, there are 20 alternative scripts for answering the same customer question, but these 20 answers all belong to the same user question, so they can be counted as a complete match.
[0075] In outbound calls, customer questions, answer scripts and answer responses are all stored in a relational database, and each conversation has record data. Among them, the answer response is whether the user hangs up or converts. The hit rate, hit answer rate, and hit conversion rate are ranked with weights of 20%, 40%, and 40% respectively, and the top 10 scripts with the highest scores are found.
[0076] In the embodiment of the present application, the large language model is continuously trained while the training corpus is continuously updated. The customer questions and / or answer words in the corpus data can be modified according to the weight values of the answer responses. The weight values of the answer responses can be adjusted according to different scenarios and the words with excellent performance. By calling the traditional LLM interface, the training corpus can be automatically generated at a regular interval, and deletion suggestions can be given for the data with poor performance in the knowledge base.
[0077] The embodiment of the present application is applied to an automated closed-loop optimization telephone sales system, which reduces manual intervention, improves accuracy, and iterates quickly based on the LLM script selection capability.
[0078] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0079] Another embodiment of the present application provides a speech optimization device for executing the speech optimization method provided in the above embodiment.
[0080] like Figure 2 FIG. 1 is a schematic diagram of the structure of a speech optimization device provided in an embodiment of the present application. The speech optimization device includes:
[0081] An acquisition module, used for acquiring a conversation request from a client terminal;
[0082] The optimization module is used to determine the target speech corresponding to the dialogue request of the client terminal according to the pre-trained speech selection model; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
[0083] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0084] Some embodiments of the present application optimize the corpus data by adopting a preset sorting method, that is, adding new corpus or deleting corpus with small weight value according to the weight, so as to realize continuous optimization of the corpus according to different scenarios, and then generate a speech selection model that is more suitable for different scenarios. After receiving the dialogue request from the client terminal, it can more accurately reply to the target speech that meets the scenario, thereby improving the accuracy of speech selection.
[0085] Another embodiment of the present application further supplements the speech optimization device provided in the above embodiment.
[0086] Optionally, the device further includes a model training module, and the model training module is used to:
[0087] Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value;
[0088] When the weight value of the answer response is greater than the preset value, the large language model is trained according to the customer's questions and answers to obtain a speech selection model.
[0089] Some embodiments of the present application optimize and modify the training corpus through the data of historical conversations, and then train the large language model according to the modified training corpus to obtain a speech selection model. In this way, the information in the historical conversations can be learned more effectively and better suited to different scenarios.
[0090] Optionally, the model training module is used to:
[0091] The customer questions and / or answer words in the corpus data are modified according to the weight value of the answer response, wherein the answer response includes at least one or more of the hit volume, hit rate, hit hang-up volume, hit hang-up rate, hit answer volume, hit answer rate, transaction volume after hit, and transaction rate after hit.
[0092] During the model training process, some embodiments of the present application continuously learn from historical conversation data, and modify customer questions and / or answer words in the corpus data according to the weight values of the answer responses, thereby continuously optimizing the training corpus.
[0093] Optionally, the model training module is used to:
[0094] The weight value of the answer response is updated every preset time period.
[0095] In some embodiments of the present application, the weight values of answer responses are updated according to historical conversation data at preset time intervals, thereby improving the accuracy of model training.
[0096] Optionally, the model training module is used to:
[0097] When the weight value of an answer response is less than and equal to a preset value, the customer question and answer script corresponding to the answer response will be deleted.
[0098] Some embodiments of the present application delete data with poor performance in the training corpus to improve the accuracy of model training.
[0099] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0100] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0101] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the operation of the method corresponding to any embodiment of the speech optimization method provided in the above embodiments can be implemented.
[0102] An embodiment of the present application also provides a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations of the method corresponding to any embodiment of the speech optimization method provided in the above embodiments.
[0103] like Figure 3 As shown, some embodiments of the present application provide an electronic device 300, which includes: a memory 310, a processor 320, and a computer program stored in the memory 310 and executable on the processor 320, wherein the processor 320 can implement a method of any embodiment included in the above-mentioned speech optimization method when reading the program from the memory 310 through the bus 330 and executing the program.
[0104] Processor 320 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 320 can be a microprocessor.
[0105] The memory 310 may be used to store instructions executed by the processor 320 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 320 of the disclosed embodiment may be used to execute instructions in the memory 310 to implement the method shown above. The memory 310 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0106] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0108] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for optimizing speech, characterized in that: The method comprises: Get the conversation request of the client terminal; According to a pre-trained speech selection model, the target speech corresponding to the dialogue request of the client terminal is determined; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
2. The method for optimizing speech techniques according to claim 1, characterized in that: The pre-trained speech selection model is obtained in the following way: Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value; When the weight value of the answer response is greater than a preset value, the large language model is trained according to the customer question and the answer to the question to obtain the speech selection model.
3. The method for optimizing speech techniques according to claim 2, characterized in that: The method further comprises: The customer questions and / or answer words in the corpus data are modified according to the weight value of the answer response, wherein the answer response includes at least one or more of the hit volume, hit rate, hit-hangup volume, hit-hangup rate, hit-answer volume, hit-answer rate, transaction volume after hit, and transaction rate after hit.
4. The method for optimizing speech techniques according to claim 3, characterized in that: The method further comprises: The weight value of the answer response is updated every preset time period.
5. The method for optimizing speech techniques according to claim 3, characterized in that: The method further comprises: When the weight value of the answer response is less than and equal to the preset value, the customer question and answer script corresponding to the answer response will be deleted.
6. A speech optimization device, characterized in that: The device comprises: An acquisition module, used for acquiring a conversation request from a client terminal; The optimization module is used to determine the target speech corresponding to the dialogue request of the client terminal according to a pre-trained speech selection model; wherein the pre-trained speech selection model is obtained by training a large language model using corpus data; and the expected data is obtained after optimization using a preset sorting method.
7. The speech optimization device according to claim 6, characterized in that: The device also includes a model training module, which is used to: Acquire training corpus, wherein the training corpus at least includes customer questions, answering words and answer responses, and the weight value of the answer response is greater than a preset value; When the weight value of the answer response is greater than a preset value, the large language model is trained according to the customer question and the answer to the question to obtain the speech selection model.
8. The speech optimization device according to claim 7, characterized in that: The preset sorting rules include at least one or more of hit quantity, hit rate, hit hang-up quantity, hit hang-up rate, hit answer quantity, hit answer rate, transaction volume after hit, and transaction rate after hit.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement the speech optimization method described in any one of claims 1 to 5 when executing the program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the program, when executed by a processor, can implement the speech optimization method described in any one of claims 1 to 5.
Citation Information
Cited By
Call-out quality monitoring and optimizing system based on big data
CN119694347A
A Big Data-Based Outbound Call Quality Monitoring and Optimization System
CN119694347B
