[go: up one dir, main page]

CN119739816A - Dialogue processing method, system, electronic device and storage medium - Google Patents

Dialogue processing method, system, electronic device and storage medium Download PDF

Info

Publication number
CN119739816A
CN119739816A CN202411613247.0A CN202411613247A CN119739816A CN 119739816 A CN119739816 A CN 119739816A CN 202411613247 A CN202411613247 A CN 202411613247A CN 119739816 A CN119739816 A CN 119739816A
Authority
CN
China
Prior art keywords
demand
language model
question
complexity
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411613247.0A
Other languages
Chinese (zh)
Inventor
史张龙
张秀侠
黄定江
邹采栋
程漩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Artificial Intelligence Technology Beijing Co ltd
Original Assignee
China Telecom Artificial Intelligence Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Artificial Intelligence Technology Beijing Co ltd filed Critical China Telecom Artificial Intelligence Technology Beijing Co ltd
Priority to CN202411613247.0A priority Critical patent/CN119739816A/en
Publication of CN119739816A publication Critical patent/CN119739816A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a dialogue processing method, a dialogue processing system, electronic equipment and a storage medium, and relates to the technical field of machine learning; if the complexity characterizes the demand problem belongs to a simple problem, the demand problem is input into the first language model to be processed, first reply information aiming at the demand problem is returned, if the complexity characterizes the demand problem belongs to a complex problem, the demand problem is input into the second language model to be processed, and second reply information aiming at the demand problem is returned, so that more efficient resource allocation and task processing are realized while the running cost of the system is obviously reduced, the overall response speed of the system is improved, system resources can be more reasonably utilized, and the economy and the expandability of the system are improved.

Description

Dialogue processing method, dialogue processing system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of machine learning, and in particular, to a method for processing a dialogue, an intelligent customer service system, an electronic device, and a computer readable storage medium.
Background
In current intelligent customer service systems, solutions based on large language models (Large Language Model, LLM) have become mainstream, with corresponding models having powerful natural language understanding and generating capabilities, capable of handling diverse user queries and providing relatively accurate responses. However, in the corresponding customer service dialogue process, at least the problems of high cost, low processing efficiency, resource waste and the like of calling a large language model exist.
Disclosure of Invention
The embodiment of the invention provides a processing method, a processing system, electronic equipment and a computer readable storage medium for a conversation, which are used for solving or partially solving the problems of high model calling cost, low processing efficiency and resource waste of an intelligent customer service system in the conversation process with a user.
The embodiment of the invention discloses a processing method of a dialogue, which is applied to an intelligent customer service system, wherein the intelligent customer service system at least comprises a preprocessing module, a first language model and a second language model, the second language model is superior to the first language model at least in task processing capacity, task type, context understanding and content generation quality, and the method comprises the following steps:
acquiring a demand problem input by a user through the preprocessing module, and determining the complexity corresponding to the demand problem;
If the complexity characterizes that the demand problem belongs to a simple problem, inputting the demand problem into the first language model for processing, and returning first reply information aiming at the demand problem;
And if the complexity characterizes that the demand problem belongs to the complex problem, inputting the demand problem into the second language model for processing, and returning second reply information aiming at the demand problem.
In some possible implementations, further comprising:
Acquiring first user feedback information aiming at the first reply information through the first language model;
If the first user feedback information characterizes that the user is not satisfied with the first reply information, the first demand problem, the first reply information and the first user feedback information are input into the second language model through the first language model to be processed, and third reply information aiming at the demand problem is returned.
In some possible implementations, further comprising:
And if the first user feedback information representation is transferred to the manual customer service, transferring the demand problem, the first reply information and the first user feedback information to manual processing through the first language model.
In some possible implementations, further comprising:
acquiring second user feedback information aiming at the second reply information through the second language model;
And if the second user feedback information representation is transferred to the manual customer service, transferring the demand problem, the second reply information and the second user feedback information to manual processing through the second language model, or transferring the demand problem, the first reply information, the third reply information and the second user feedback information to manual processing.
In some possible implementations, the intelligent customer service system further includes a retrieval enhancement module, the inputting the demand problem into the second language model for processing, and returning second reply information for the demand problem, including:
searching background information corresponding to the demand problem through the searching enhancement module;
And inputting the demand problem and the background information into the second language model for processing, and returning second reply information aiming at the demand problem.
In some possible implementations, the intelligent customer service system includes a complexity analysis model, the acquiring, by the preprocessing module, a demand problem input by a user, and determining a complexity corresponding to the demand problem includes:
Acquiring a demand problem input by a user through the preprocessing module;
extracting corresponding first keywords from the demand problems through the preprocessing module;
if the first keyword is successfully matched with the preset manual customer service keyword, the demand problem is transferred to manual customer service processing through the preprocessing module;
If the first keyword is not successfully matched with the manual customer service keyword, the demand problem is sent to the complexity analysis module for analysis, and the complexity corresponding to the demand problem is determined through the complexity analysis model.
In some possible implementations, the determining, by the complexity analysis model, the complexity corresponding to the demand problem includes:
extracting features of the demand problem through the complexity analysis model to obtain corresponding task features, wherein the task features at least comprise context lengths, second keywords and semantic relations;
Inputting the context length, the second keyword and the voice relation into the complexity analysis model to predict the complexity of the demand problem, and obtaining the complexity corresponding to the demand problem.
In some possible implementations, the complexity analysis model is generated by:
Acquiring an initial model and training data aiming at the initial model, wherein the initial model at least comprises a classification head, the classification head is used for distinguishing simple problems from complex problems, and the training data comprises a marked problem data set;
Converting each question in the question dataset into a corresponding input sequence;
mapping the input sequence into a high-latitude vector representation, wherein the high-latitude vector representation is used for representing semantic information corresponding to the historical user problem;
training a classification head of the initial model according to the high-latitude vector representation to obtain the complexity analysis model.
In some possible implementations, the classification head includes at least an activation function, a weight matrix, and a bias term, and the training the classification head of the initial model according to the high-latitude vector representation to obtain the complexity analysis model includes:
inputting the high latitude vector representation into the initial model for prediction to obtain a corresponding output representation;
training the classification head by adopting the output representation, the activation function, the weight matrix and the bias term to obtain a corresponding predicted value, and obtaining a loss function aiming at the predicted value;
And calculating error information corresponding to the predicted value by adopting the loss function, and reversely iterating the initial model based on the error information until the error information is smaller than or equal to a preset condition to obtain the complexity analysis model.
In some possible implementations, the training of the classification head using the output representation, the activation function, the weight matrix, and the bias term obtains a corresponding predicted value by the following formula:
Wherein H is the output representation, W is the weight matrix, b is the bias term, sigma is the activation function for converting the output representation into a probability value; for representing the probability that a problem belongs to a complex problem.
The embodiment of the invention also discloses an intelligent customer service system which at least comprises a preprocessing module, a first language model and a second language model, wherein the second language model is superior to the first language model at least in task processing capacity, task type, context understanding and content generation quality,
The preprocessing module is used for acquiring a demand problem input by a user and determining the complexity corresponding to the demand problem;
The first language model is used for processing the demand problem if the complexity characterizes that the demand problem belongs to a simple problem and returning first reply information aiming at the demand problem;
And the second language model is used for processing the demand problem and returning second reply information aiming at the demand problem if the complexity characterizes the demand problem as a complex problem.
In some possible implementations, the first language model is further configured to obtain first user feedback information for the first reply information, and if the first user feedback information characterizes that the user is not satisfied with the first reply information, input the first demand problem, the first reply information, and the first user feedback information into the second language model for processing, and return third reply information for the demand problem.
In some possible implementations, the first language model is further configured to forward the demand problem, the first reply message, and the first user feedback message to manual processing if the first user feedback message representation is forwarded to manual customer service.
In some possible implementations, the second language model is further configured to obtain second user feedback information for the second reply information, and if the second user feedback information representation is transferred to a manual customer service, transfer the demand problem, the second reply information, and the second user feedback information to manual processing, or transfer the demand problem, the first reply information, the third reply information, and the second user feedback information to manual processing.
In some possible implementations, the intelligent customer service system further includes a retrieval enhancement module, wherein,
The retrieval enhancement module is used for retrieving background information corresponding to the demand problem;
and the second language model is used for processing the demand problem and the background information and returning second reply information aiming at the demand problem.
In some possible implementations, the intelligent customer service system includes a complexity analysis model, wherein,
The preprocessing module is used for acquiring a demand problem input by a user and extracting a corresponding first keyword from the demand problem, if the first keyword is successfully matched with a preset manual customer service keyword, the demand problem is transferred to manual customer service processing, and if the first keyword is not successfully matched with the manual customer service keyword, the demand problem is sent to the complexity analysis module for analysis, and the complexity corresponding to the demand problem is determined through the complexity analysis model.
In some possible implementations, the complexity analysis model is used for extracting features of the requirement problem to obtain corresponding task features, wherein the task features at least comprise a context length, a second keyword and a semantic relation, and the context length, the second keyword and the speech relation are input into the complexity analysis model to predict the complexity of the requirement problem to obtain the complexity corresponding to the requirement problem.
In some possible implementations, further comprising:
The system comprises a data acquisition module, a data analysis module and a data analysis module, wherein the data acquisition module is used for acquiring an initial model and training data aiming at the initial model, the initial model at least comprises a classification head, the classification head is used for distinguishing simple problems from complex problems, and the training data comprises a marked problem data set;
the conversion module is used for converting each question in the question data set into a corresponding input sequence;
The mapping module is used for mapping the input sequence into a high-latitude vector representation, and the high-latitude vector representation is used for representing semantic information corresponding to the historical user problem;
And the training module is used for training the classification head of the initial model according to the high-latitude vector representation to obtain the complexity analysis model.
In some possible implementations, the classification head includes at least an activation function, a weight matrix, and a bias term, and the training module is specifically configured to:
inputting the high latitude vector representation into the initial model for prediction to obtain a corresponding output representation;
training the classification head by adopting the output representation, the activation function, the weight matrix and the bias term to obtain a corresponding predicted value, and obtaining a loss function aiming at the predicted value;
And calculating error information corresponding to the predicted value by adopting the loss function, and reversely iterating the initial model based on the error information until the error information is smaller than or equal to a preset condition to obtain the complexity analysis model.
In some possible implementations, the training module is specifically configured to implement by the following formula:
Wherein H is the output representation, W is the weight matrix, b is the bias term, sigma is the activation function for converting the output representation into a probability value; for representing the probability that a problem belongs to a complex problem.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
The processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Embodiments of the present invention also disclose a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method according to the embodiments of the present invention.
The embodiment of the invention has the following advantages:
In the embodiment of the invention, the intelligent customer service system at least comprises a preprocessing module, a first language model and a second language model, wherein the second language model is superior to the first language model in terms of task processing capacity, task type, context understanding and content generation quality at least, the intelligent customer service system can acquire the demand problem input by a user through the preprocessing module in the process of replying session information of the user, determine the complexity corresponding to the demand problem, input the demand problem into the first language model for processing if the complexity characterizes the demand problem belongs to a simple problem, return the first reply information aiming at the demand problem, input the demand problem into the second language model for processing if the complexity characterizes the demand problem belongs to a complex problem, and return the second reply information aiming at the demand problem, so that the models with two different processing capacities work cooperatively, on one hand, the simple problem can be processed through the first language model, the complex problem can be concentrated through the second language model, more efficient allocation and task processing can be realized while the running cost of the system is obviously reduced, the overall response speed of the system is improved, and the system resource can be reasonably utilized, and the system can be more economical and expandable.
Drawings
FIG. 1 is a flow chart of steps of a method for processing a dialog provided in an embodiment of the present invention;
FIG. 2 is a schematic flow chart of model training provided in an embodiment of the present invention;
FIG. 3 is a flow diagram of a session process provided in an embodiment of the present invention;
FIG. 4 is a block diagram of an intelligent customer service system according to an embodiment of the present invention;
Fig. 5 is a block diagram of an electronic device provided in an embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
As an example, the content entered by the user may be intelligently replied to, typically based on a large language model, during the corresponding customer service session. However, the invocation of large language models tends to be associated with high computational resources and costs during processing of user-entered content, and is prone to significant costs, especially in highly concurrent online services, and secondly, large language models may generate erroneous or inconsistent answers in some circumstances, especially when the user-provided context information is insufficient, and again, tend to rely on large language models when processing simple and complex questions, resulting in wasted resources.
In the invention, the intelligent customer service system at least comprises a preprocessing module, a first language model and a second language model, wherein the second language model is superior to the first language model in terms of task processing capacity, task type, context understanding and content generation quality at least, the intelligent customer service system can acquire the requirement problem input by a user through the preprocessing module in the process of replying session information of the user, determine the complexity corresponding to the requirement problem, input the requirement problem into the first language model for processing if the complexity characterizes the requirement problem belongs to a simple problem, return the first reply information aiming at the requirement problem, input the requirement problem into the second language model for processing if the complexity characterizes the requirement problem belongs to a complex problem, and return the second reply information aiming at the requirement problem, so that the two models with different processing capacities work cooperatively, on one hand, the simple problem can be processed through the first language model, the complex problem can be processed through the second language model, the running cost of the system is remarkably reduced, more efficient resource allocation and task processing are realized, the overall response speed of the system is improved, and the system resource is reasonably used, and the system is more economical and the system is more reasonable.
In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following explains and describes some technical features related to the embodiments of the present invention:
Large language model (Large Language Model, LLM) a deep learning model based on an end-to-end deep learning framework, pre-trained using large-scale corpora, aimed at understanding and generating human language. The large language model learns statistical characteristics of language by processing massive text data, thereby generating new text with similar statistical characteristics and understanding meaning of the language text. Can perform a variety of natural language tasks such as text generation, language understanding, questions and answers, translation, and the like.
Retrieval enhancement generation (RETRIEVAL AUGMENTED GENERATION, RAG), a method that combines search technology and LLM generation capabilities, is centered on retrieving relevant information from data sources (e.g., local databases, knowledge bases) and using this information as the basis for generating answers. In particular, the RAG technique finds content relevant to the query through a search algorithm and integrates the content as context into the prompt delivered to the LLM, thereby generating a more accurate and detailed answer.
Referring to fig. 1, a step flow chart of a processing method of a dialog provided in an embodiment of the present invention is shown and applied to an intelligent customer service system, where the intelligent customer service system at least includes a preprocessing module, a first language model, and a second language model, and the second language model is superior to the first language model at least in terms of task processing capability, task type, context understanding, and content generation quality, and may specifically include the following steps:
step 101, acquiring a demand problem input by a user through the preprocessing module, and determining the complexity corresponding to the demand problem;
For an intelligent customer service system (hereinafter referred to as a system), the intelligent customer service system can be used for processing different types of problems, such as query problems, complaint problems, technical support problems and the like. The intelligent customer service system at least comprises a preprocessing module, a first language model, a second language model, a complexity analysis model, a retrieval enhancement module and other processing modules, wherein the preprocessing module can be used for receiving and primarily processing user input, identifying basic intention corresponding to the user input and classifying routes, and in the process of classifying routes, the complexity of the user input can be analyzed based on the load analysis model so as to classify the user input into the first language model or the second language model based on the complexity; the first language model can be used for processing simple problems and quickly generating responses, and the corresponding second language model can be used for processing complex problems, especially problems related to context understanding and deep reasoning, and it is required to say that the second language model is superior to the first language model at least in task processing capacity, task type, context understanding and content generation quality, the first language model has a certain parameter quantity and has a certain generation capacity, compared with the second language model, the parameter quantity of the second language model is far greater than that of the first language model, therefore, when the first language model processes simple question-and-answer tasks, the first language model can meet actual requirements, meanwhile, the cost of model reasoning is reduced, and the second language model can process context understanding and question-and-answer tasks requiring deep reasoning so as to ensure that output content meets the actual requirements of users.
In addition, for the intelligent customer service system, a corresponding manual customer service interface can be configured, and in a specific situation (such as complex situation processing or particularly urgent inquiry and the like), the system can be switched to the manual customer service, and the manual customer service can solve the requirement problem of a user. Optionally, the intelligent customer service system may further include a feedback and optimization module, where the feedback and optimization module adjusts a processing manner of the model according to the user feedback to continuously optimize system performance.
In one example, a user request is first connected to an intelligent customer service system via a network, the system performs preliminary processing via a preprocessing module, and then, depending on the complexity of the problem, the preprocessing module may route the request to a small language model or a large language model module that accesses a local database or knowledge base via a retrieval enhancement module to obtain supplemental information as necessary. In the processing process, all modules are connected with a feedback and optimization module, and the system adjusts the processing strategy of the model in real time according to the feedback of a user.
In the actual processing process, after the user inputs the corresponding demand problem, the system can acquire the demand problem input by the user through the preprocessing module, determine the complexity corresponding to the demand problem, and route the demand problem classification to the corresponding language model through determining the complexity corresponding to the demand problem.
In a specific implementation, the system can acquire a demand problem input by a user through a preprocessing module, then extract a corresponding first keyword from the demand problem through the preprocessing module, if the first keyword is successfully matched with a preset manual customer service keyword, the system can transfer the demand problem to manual customer service processing through the preprocessing module if the user is represented to solve the demand problem through manual customer service, if the first keyword is not successfully matched with the manual customer service keyword, the system can represent that the current user does not need to be accessed through manual work temporarily, the system can process through intelligent customer service, the system can send the demand problem to a complexity analysis module for analysis, and the complexity corresponding to the demand problem is determined through a complexity analysis model.
For complexity, the system can perform feature extraction on the demand problem through a complexity analysis model to obtain corresponding task features, the task features at least comprise a context length, a second keyword and a semantic relation, then the context length, the second keyword and the speech relation are input into the complexity analysis model to perform complexity prediction on the demand problem, the complexity corresponding to the demand problem is obtained, and the demand problem is classified and routed to a corresponding language model through determining the complexity corresponding to the demand problem so as to improve the utilization rate of system resources.
It should be noted that, for the context length, the context length may be used to calculate a text length corresponding to the requirement problem and serve as an index of task complexity, the second keyword may be a keyword identified from the requirement problem and serve as an important feature of task content and complexity, the semantic relationship may include a master-to-name relationship, a moving-guest relationship, and the like and may serve as another index of task complexity, so that the complexity corresponding to the requirement problem may be determined by inputting the context length, the second keyword, the semantic relationship, and the like into the complexity analysis model for analysis.
In some possible implementations, the initial model may be obtained by obtaining the initial model and training data for the initial model, where the initial model includes at least a classification header for distinguishing simple questions from complex questions, where the training data includes a labeled question dataset, then converting each question in the question dataset into a corresponding input sequence, then mapping the input sequence to a high-latitude vector representation, where the high-latitude vector representation is used to characterize semantic information corresponding to the historical user question, and then training the classification header of the initial model according to the high-latitude vector representation to obtain the complexity analysis model.
When the classification head at least comprises an activation function, a weight matrix and a bias term, the high latitude vector representation can be firstly input into an initial model for prediction to obtain a corresponding output representation when the classification head is trained, then the classification head is trained by adopting the output representation, the activation function, the weight matrix and the bias term to obtain a corresponding predicted value, a loss function aiming at the predicted value is obtained, error information corresponding to the predicted value is calculated by adopting the loss function, and the initial model is iterated reversely based on the error information until the error information is smaller than or equal to a preset condition to obtain a complexity analysis model.
Alternatively, the classification head may be trained by the following formula:
Wherein H is output representation, W is weight matrix, b is bias term, sigma is activation function for converting output representation into probability value; for representing the probability that a problem belongs to a complex problem.
In one example, for complexity analysis models, a deep learning model (BERT) may be used to perform complexity analysis, converting it into a two-classification problem, i.e., extracting the contextual features of the problem by a pre-trained language model, performing two-classification at the output layer by a classification head, outputting the probability that the problem belongs to "simple" or "complex". Referring to fig. 2, a schematic flow chart of model training provided in an embodiment of the present invention is shown, where the flow chart is as follows:
1. training data labeling, namely preparing a labeled Chinese problem data set, for example, as shown in table 1:
Problem(s) Complexity tags
How does the password reset? 0 (Simple)
Please explain the warranty terms of this product and how to apply for a warranty? 1 (Complex)
TABLE 1
2. Pre-training model, selecting BERT as pre-training model, and loading. BERT learns word-to-word relationships through a bi-directional transducer structure.
3. Text feature extraction, converting the problem text input by the user into an input format (namely Token IDs) of the BERT model, and extracting features by using the BERT. BERT maps input sequences into high-dimensional vector representations that capture deep semantic information of text. In BERT, the output of the first Token CLS is typically used to represent a vector of the entire sentence, which can be used as an input feature for the classification task.
Classification head training, namely adding a classification head (full connection layer) on the basis of the output of the BERT model for predicting the complexity of the problem, wherein the output of the BERT is assumed to be expressed as H, the parameters of the classification head are a weight matrix W and a bias term b, and the output of the classification head is as follows:
wherein σ is an activation function for converting the output into a probability value Representing the probability that the problem belongs to a complex class.
4. Further, the system may be movable based on the output of the complexity analysis module and a set threshold
Tasks are assigned to the first language model or the second language model in a state. Specifically, the complexity probability that can be output through a modelA threshold τ is set to determine the complexity of the problem. If it isThe problem is classified as complex, otherwise as simple. Namely:
for example, τ is set to 0.5
Question 1 how to reset my passwordBelow the threshold, it is classified as simple. Question 2 please explain the warranty terms of this product and how to apply for warrantyAbove the threshold, it is classified as complex.
Through the process, the corresponding complexity analysis model can be trained, the requirement problems input by the user can be classified in the process of processing the requirement problems based on the complexity analysis model, and the requirement problems are classified and routed to the corresponding language model based on the classification, so that the distribution of system computing resources is fully optimized, and the utilization rate of the system resources is guaranteed.
102, If the complexity represents that the demand problem belongs to a simple problem, inputting the demand problem into the first language model for processing, and returning first reply information aiming at the demand problem;
Through the above process, after receiving the demand problem input by the user, the system can determine whether to directly transfer to the manual customer service based on the keywords, if not, can enter problem classification, analyze the complexity of the demand problem through the complexity analysis model, and then input the demand problem into the first language model or the second language model based on the complexity.
The complexity can be a corresponding numerical value, and whether the demand problem belongs to the complex problem is judged by comparing the complexity with a preset threshold, for example, if the complexity is larger than or equal to the preset threshold, the demand problem is used as the complex problem, if the complexity is smaller than the preset threshold, the demand problem is used as the simple problem, the demand problem is input into the first language model to be processed, and the first reply information aiming at the demand problem is returned, so that the first language model is used for quickly responding to simple user inquiry, the calling times of the second language model are reduced, and the overall cost of the system is reduced.
Further, the system can acquire the first user feedback information of the first reply information through the first language model, analyze the first user feedback information and judge whether the first reply information meets the requirement of the user, if the first user feedback information characterizes the user to be unsatisfied with the first reply information, the first requirement problem, the first reply information and the first user feedback information are input into the second language model through the first language model to be processed, and the third reply information aiming at the requirement problem is returned, so that the system can transmit the feedback information of the user, the first reply information, the context and the like to the second language model to be processed under the condition that the first reply information fed back by the user to the first language model is unsatisfied, and if the first user feedback information characterizes the user to be satisfied with the first reply information, the first reply information can be used as final information, and the system does not need to further analyze the requirement of the user.
Correspondingly, if the first user feedback information representation is transferred to the manual customer service, the demand problem, the first reply information and the first user feedback information are transferred to the manual processing through the first language model, so that in the corresponding dialogue links, if the user expresses strong emotion and contains manual service keywords or the problem involves complex background knowledge, the system can actively transfer the task to the manual customer service, and meanwhile, the context dialogue history and the dialogue core abstract are fed back to the customer service reference, thereby ensuring effective and timely solution of the complex problem and improving the user satisfaction.
And step 103, if the complexity characterizes that the requirement problem belongs to a complex problem, inputting the requirement problem into the second language model for processing, and returning second reply information aiming at the requirement problem.
Accordingly, if the complexity characterization demand problem belongs to a complex problem, the demand problem is input into a second language model for processing, the context relation and the depth reasoning capacity are analyzed through the second language model, and second reply information aiming at the demand problem is returned, so that the models with two different processing capacities work cooperatively, on one hand, the simple problem can be processed through the first language model, the complex problem is processed through the second language model, the running cost of the system is obviously reduced, meanwhile, more efficient resource allocation and task processing are realized, the overall response speed of the system is improved, the system resources can be reasonably utilized, and the economy and the expandability of the system are improved.
It should be noted that, when processing the problem in the corresponding specific field, the system may further search the background information corresponding to the requirement problem through the search enhancement module, then input the requirement problem and the background information into the second language model for processing, and return the second reply information for the requirement problem, so when processing the knowledge related to the specific field or the complex problem requiring the accurate information, the second language model may call the local database or the knowledge base through the search enhancement model for searching, and use the search result as the input part of the second language model, and combine the content such as the requirement problem, the context relation, and the like to generate a more accurate answer, thereby ensuring the accuracy of the complex problem answer.
In addition, the second language model can acquire second user feedback information aiming at the second reply information or third reply information fed back by the second language model, if the second user feedback information representation is converted to the manual customer service, the demand problem, the second reply information and the second user feedback information are converted to the manual processing through the second language model, or the demand problem, the first reply information, the third reply information and the second user feedback information are converted to the manual processing, so that the system can actively transfer the task to the manual customer service, and meanwhile, the context dialogue history and the dialogue core abstract are fed back to the customer service reference, thereby ensuring the effective timely solution of the complex problem and improving the user satisfaction.
It should be noted that the embodiments of the present invention include, but are not limited to, the foregoing examples, and it will be understood that those skilled in the art may also set the embodiments according to actual requirements under the guidance of the concepts of the embodiments of the present invention, which are not limited thereto.
In the embodiment of the invention, the intelligent customer service system at least comprises a preprocessing module, a first language model and a second language model, wherein the second language model is superior to the first language model in terms of task processing capacity, task type, context understanding and content generation quality at least, the intelligent customer service system can acquire the demand problem input by a user through the preprocessing module in the process of replying session information of the user, determine the complexity corresponding to the demand problem, input the demand problem into the first language model for processing if the complexity characterizes the demand problem belongs to a simple problem, return the first reply information aiming at the demand problem, input the demand problem into the second language model for processing if the complexity characterizes the demand problem belongs to a complex problem, and return the second reply information aiming at the demand problem, so that the models with two different processing capacities work cooperatively, on one hand, the simple problem can be processed through the first language model, the complex problem can be concentrated through the second language model, more efficient allocation and task processing can be realized while the running cost of the system is obviously reduced, the overall response speed of the system is improved, and the system resource can be reasonably utilized, and the system can be more economical and expandable.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
In order to enable those skilled in the art to better understand the technical solutions according to the embodiments of the present invention, the following exemplary descriptions are provided by way of corresponding examples:
as an example, in intelligent customer service systems, different types of problems (e.g., queries, complaints, technical support, etc.) place different demands on the processing capabilities of the system. In order to improve the efficiency and accuracy of the system and reduce the cost, the embodiment of the invention provides an intelligent customer service optimization method based on the collaboration of a large language model and a small language model. The method effectively solves the problem of different complexity by cooperatively using the small language model and the large language model in the system architecture, and ensures reasonable utilization of resources.
The related network element equipment and communication connection relation can be as follows:
(1) User terminal devices including, but not limited to, personal computers, smart phones, tablet computers, and the like. And the user initiates a request to the intelligent customer service system through the terminal equipment.
(2) An intelligent customer service platform. Comprises the following main modules (3) - (8).
(3) And the preprocessing module is responsible for receiving and primarily processing the input of the user, identifying the basic intention of the user and classifying the routes.
(4) The small language model module is used for processing simple problems and rapidly generating response, and the small language model used herein also has certain parameter quantity and certain generating capacity, and is only much smaller than the parameter quantity of the large predictive model, so that the small language model module can also meet the requirements when processing simple question-answering tasks, and simultaneously reduce the model reasoning cost.
(5) Large language model module-the task of handling complex problems, especially involving context understanding and deep reasoning.
(6) And the retrieval enhancement module is responsible for acquiring information related to user query from a local database or a knowledge base so as to enhance the generation capability of the large language model.
(7) Manual customer service interface-in certain situations (such as complex emotion processing or particularly urgent queries), the system may be switched to manual customer service.
(8) And the feedback and optimization module is used for continuously optimizing the system performance according to the processing mode of the user feedback adjustment model.
Note that, for the communication connection between the respective modules, the following may be adopted:
The user request is firstly connected to the intelligent customer service platform through a network, and is initially processed by the preprocessing module. Depending on the complexity of the problem, the preprocessing module routes the request to either the small language model or the large language model module. The large language model module accesses a local database or knowledge base as necessary through the retrieval enhancement module to obtain the supplemental information. All modules are connected with the feedback and optimization module, and the system adjusts the processing strategy of the model in real time according to the feedback of the user.
In a specific implementation, referring to fig. 3, a flow diagram of session processing provided in an embodiment of the present invention is shown, where a corresponding processing flow may include:
Step one, preprocessing user input
Execution main body, preprocessing module
The method comprises the following steps:
1. the user inputs the question on the terminal device and sends it to the intelligent customer service system through the network.
2. The preprocessing module receives input, performs preliminary processing on the input content by using keyword matching, and recognizes the basic intention thereof to confirm the transfer of manual customer service or intelligent customer service.
3. And according to the preprocessing result, the system judges the complexity of the problem, and a complexity analysis module is called to carry out further complexity analysis, wherein the complexity analysis module judges the task complexity based on the deep learning model and the set pre-support.
4. Based on the results of the complexity analysis, the system marks the problem as "simple" or "complex".
As a result, the generated signature will be used for subsequent model selection and problem handling, and if necessary, the parallel processing mechanism is started.
Step two, classification and treatment of problems
Execution subject, small language model Module and Large language model Module
The method comprises the following steps:
1. Simple problem handling:
if the problem is marked as "simple," the preprocessing module routes the request to the small language model module for processing.
The small language model quickly generates a compact answer based on the preprocessed input and returns the result to the user. If the user is not satisfied, based on a user feedback mechanism, the dialogue content is fed back to the large model, and an answer is output. If the user requires customer service intervention, the system goes to manual customer service.
2. Complex problem handling:
If the problem is marked "complex," the preprocessing module routes the request to the large language model module.
The large language model first carries out deep understanding on the problem and calls the retrieval enhancement module to acquire relevant background information when necessary. For the problem of small language model transfer, the processing result is transferred as context to large language model to ensure consistency of answer.
As a result, the system generates an answer based on the user input ready to be sent to the user.
Step three, feedback and optimization of answers
Execution body feedback and optimization module
The method comprises the following steps:
The user receives the answer generated by the system, and can provide feedback on the terminal equipment, and the system automatically records feedback information.
The feedback and optimization module performs the following operations according to the user feedback:
The division standards of the simple problem and the complex problem are adjusted to improve the classification accuracy.
Recording user questions, desensitizing, and training data for complexity analysis module model
Optimizing task allocation mechanism and model parameters, ensuring more reasonable task allocation and reducing error classification.
If necessary, the system submits the feedback information to a manual intervention interface, and more detailed adjustment and optimization are performed manually.
As a result, the processing efficiency and answer accuracy of the system are continually improved through continuous feedback and optimization.
In addition, besides text dialogue, the system may be in voice dialogue, and related processes are similar to text processing processes, which are not described herein, and the corresponding processes may include:
step one, processing of speech input
Execution subject speech recognition Module
The method comprises the following steps:
the user initiates the query in voice form through a terminal device, such as a smart phone.
The speech recognition module receives user speech and converts it into text input. The text input is then transferred to a preprocessing module for processing.
As a result, the generated text input will be further processed in accordance with standard text flow.
Step two, similar to the above example
The text input continues to be processed in accordance with the flow in the example above, except that the user's query is converted from speech.
Step three, feedback and optimization
Execution body feedback and optimization module
The method comprises the following steps:
the system adjusts the cooperative processing mode of the voice recognition module and the size language model according to the feedback of the user on the voice recognition and the answer.
The system is continuously optimized for the accuracy of speech recognition and the effect of co-working with the language model.
As a result, the optimized system is more accurate and efficient in processing the voice query.
Through the process, the models based on two different processing capacities work cooperatively, on one hand, the simple problem can be processed through the first language model, the complex problem can be processed through the second language model, more efficient resource allocation and task processing are realized while the running cost of the system is obviously reduced, the overall response speed of the system is improved, the system resources can be reasonably utilized, and the economy and the expandability of the system are improved.
Referring to fig. 4, there is shown a block diagram of an intelligent customer service system provided in an embodiment of the present invention, the intelligent customer service system at least comprising a preprocessing module, a first language model, and a second language model superior to the first language model at least in terms of task processing capability, task type, context understanding, and content generation quality, wherein,
The preprocessing module is used for acquiring a demand problem input by a user and determining the complexity corresponding to the demand problem;
The first language model is used for processing the demand problem if the complexity characterizes that the demand problem belongs to a simple problem and returning first reply information aiming at the demand problem;
And the second language model is used for processing the demand problem and returning second reply information aiming at the demand problem if the complexity characterizes the demand problem as a complex problem.
In some possible implementations, the first language model is further configured to obtain first user feedback information for the first reply information, and if the first user feedback information characterizes that the user is not satisfied with the first reply information, input the first demand problem, the first reply information, and the first user feedback information into the second language model for processing, and return third reply information for the demand problem.
In some possible implementations, the first language model is further configured to forward the demand problem, the first reply message, and the first user feedback message to manual processing if the first user feedback message representation is forwarded to manual customer service.
In some possible implementations, the second language model is further configured to obtain second user feedback information for the second reply information, and if the second user feedback information representation is transferred to a manual customer service, transfer the demand problem, the second reply information, and the second user feedback information to manual processing, or transfer the demand problem, the first reply information, the third reply information, and the second user feedback information to manual processing.
In some possible implementations, the intelligent customer service system further includes a retrieval enhancement module, wherein,
The retrieval enhancement module is used for retrieving background information corresponding to the demand problem;
and the second language model is used for processing the demand problem and the background information and returning second reply information aiming at the demand problem.
In some possible implementations, the intelligent customer service system includes a complexity analysis model, wherein,
The preprocessing module is used for acquiring a demand problem input by a user and extracting a corresponding first keyword from the demand problem, if the first keyword is successfully matched with a preset manual customer service keyword, the demand problem is transferred to manual customer service processing, and if the first keyword is not successfully matched with the manual customer service keyword, the demand problem is sent to the complexity analysis module for analysis, and the complexity corresponding to the demand problem is determined through the complexity analysis model.
In some possible implementations, the complexity analysis model is used for extracting features of the requirement problem to obtain corresponding task features, wherein the task features at least comprise a context length, a second keyword and a semantic relation, and the context length, the second keyword and the speech relation are input into the complexity analysis model to predict the complexity of the requirement problem to obtain the complexity corresponding to the requirement problem.
In some possible implementations, further comprising:
The system comprises a data acquisition module, a data analysis module and a data analysis module, wherein the data acquisition module is used for acquiring an initial model and training data aiming at the initial model, the initial model at least comprises a classification head, the classification head is used for distinguishing simple problems from complex problems, and the training data comprises a marked problem data set;
the conversion module is used for converting each question in the question data set into a corresponding input sequence;
The mapping module is used for mapping the input sequence into a high-latitude vector representation, and the high-latitude vector representation is used for representing semantic information corresponding to the historical user problem;
And the training module is used for training the classification head of the initial model according to the high-latitude vector representation to obtain the complexity analysis model.
In some possible implementations, the classification head includes at least an activation function, a weight matrix, and a bias term, and the training module is specifically configured to:
inputting the high latitude vector representation into the initial model for prediction to obtain a corresponding output representation;
training the classification head by adopting the output representation, the activation function, the weight matrix and the bias term to obtain a corresponding predicted value, and obtaining a loss function aiming at the predicted value;
And calculating error information corresponding to the predicted value by adopting the loss function, and reversely iterating the initial model based on the error information until the error information is smaller than or equal to a preset condition to obtain the complexity analysis model.
In some possible implementations, the training module is specifically configured to implement by the following formula:
Wherein H is the output representation, W is the weight matrix, b is the bias term, sigma is the activation function for converting the output representation into a probability value; for representing the probability that a problem belongs to a complex problem.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In addition, the embodiment of the invention also provides electronic equipment, which comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes the processes of the processing method embodiment of the conversation when being executed by the processor and can achieve the same technical effects, and the repetition is avoided, so that the description is omitted.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the processing method embodiment of the session, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. The computer readable storage medium is, for example, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 500 includes, but is not limited to, a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power source 511. It will be appreciated by those skilled in the art that the structure of the electronic device according to the embodiments of the present invention is not limited to the electronic device, and the electronic device may include more or less components than those illustrated, or may combine some components, or may have different arrangements of components. In the embodiment of the invention, the electronic equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
It should be understood that in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, receiving downlink data from the base station, and then processing the downlink data by the processor 510, and in addition, transmitting uplink data to the base station. Typically, the radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 may also communicate with networks and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user through the network module 502, such as helping the user to send and receive e-mail, browse web pages, access streaming media, and the like.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic device 500. The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used for receiving an audio or video signal. The input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, the graphics processor 5041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphics processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. Microphone 5042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 501 in case of a phone call mode.
The electronic device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 and/or the backlight when the electronic device 500 is moved to the ear. The accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), etc., and the sensor 505 can also comprise a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 506 is used to display information input by a user or information provided to the user. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 5071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). Touch panel 5071 may include two parts, a touch detection device and a touch controller. The touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, physical keyboards, function keys (e.g., volume control keys, switch keys, etc.), trackballs, mice, joysticks, and so forth, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 510 to determine a type of touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of touch event. It will be appreciated that in one embodiment, the touch panel 5071 and the display panel 5061 are implemented as two separate components for input and output functions of the electronic device, but in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated for input and output functions of the electronic device, which is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and an external device.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area which may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), etc., and a storage data area which may store data created according to the use of the mobile phone (such as audio data, a phonebook, etc.), etc. In addition, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 510 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 509, and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units and preferably, processor 510 may integrate an application processor that primarily processes operating systems, user interfaces, application programs, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 510.
The electronic device 500 may also include a power supply 511 (e.g., a battery) for powering the various components, and preferably the power supply 511 may be logically connected to the processor 510 via a power management system that performs functions such as managing charging, discharging, and power consumption.
In addition, the electronic device 500 includes some functional modules, which are not shown, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes various media capable of storing program codes such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (13)

1.一种对话的处理方法,其特征在于,应用于智能客服系统,所述智能客服系统至少包括预处理模块、第一语言模型以及第二语言模型,所述第二语言模型至少在任务处理能力、任务类型、上下文理解以及内容生成质量上优于所述第一语言模型,所述方法包括:1. A method for processing a dialogue, characterized in that it is applied to an intelligent customer service system, the intelligent customer service system at least comprising a preprocessing module, a first language model and a second language model, the second language model being superior to the first language model at least in terms of task processing capability, task type, context understanding and content generation quality, the method comprising: 通过所述预处理模块获取用户输入的需求问题,确定所述需求问题对应的复杂度;Obtaining the demand question input by the user through the preprocessing module, and determining the complexity corresponding to the demand question; 若所述复杂度表征所述需求问题属于简单问题,则将所述需求问题输入所述第一语言模型进行处理,返回针对所述需求问题的第一回复信息;If the complexity indicates that the demand question is a simple question, input the demand question into the first language model for processing, and return first reply information for the demand question; 若所述复杂度表征所述需求问题属于复杂问题,则将所述需求问题输入所述第二语言模型进行处理,返回针对所述需求问题的第二回复信息。If the complexity indicates that the demand question is a complex question, the demand question is input into the second language model for processing, and second reply information for the demand question is returned. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method according to claim 1, further comprising: 通过所述第一语言模型获取针对所述第一回复信息的第一用户反馈信息;Acquire first user feedback information for the first reply information through the first language model; 若所述第一用户反馈信息表征用户对所述第一回复信息不满意,则通过所述第一语言模型将所述第一需求问题、所述第一回复信息以及所述第一用户反馈信息输入所述第二语言模型进行处理,返回针对所述需求问题的第三回复信息。If the first user feedback information indicates that the user is dissatisfied with the first reply information, the first demand question, the first reply information and the first user feedback information are input into the second language model for processing through the first language model, and third reply information for the demand question is returned. 3.根据权利要求2所述的方法,其特征在于,还包括:3. The method according to claim 2, further comprising: 若所述第一用户反馈信息表征转至人工客服,则通过所述第一语言模型将所述需求问题、所述第一回复信息以及所述第一用户反馈信息转至人工处理。If the first user feedback information indicates that it is transferred to manual customer service, the demand question, the first reply information and the first user feedback information are transferred to manual processing through the first language model. 4.根据权利要求2所述的方法,其特征在于,还包括:4. The method according to claim 2, further comprising: 通过所述第二语言模型获取针对所述第二回复信息的第二用户反馈信息;acquiring second user feedback information for the second reply information through the second language model; 若所述第二用户反馈信息表征转至人工客服,则通过所述第二语言模型将所述需求问题、所述第二回复信息以及所述第二用户反馈信息转至人工处理,或,将所述需求问题、所述第一回复信息、所述第三回复信息以及所述第二用户反馈信息转至人工处理。If the second user feedback information indicates that it is transferred to manual customer service, the demand question, the second reply information and the second user feedback information are transferred to manual processing through the second language model, or the demand question, the first reply information, the third reply information and the second user feedback information are transferred to manual processing. 5.根据权利要求1至4任一项所述的方法,其特征在于,所述智能客服系统还包括检索增强模块,所述将所述需求问题输入所述第二语言模型进行处理,返回针对所述需求问题的第二回复信息,包括:5. The method according to any one of claims 1 to 4, characterized in that the intelligent customer service system further comprises a retrieval enhancement module, wherein the inputting the demand question into the second language model for processing and returning second reply information for the demand question comprises: 通过所述检索增强模块检索与所述需求问题对应的背景信息;Retrieving background information corresponding to the demand question through the retrieval enhancement module; 将所述需求问题与所述背景信息输入至所述第二语言模型进行处理,返回针对所述需求问题的第二回复信息。The demand question and the background information are input into the second language model for processing, and second reply information for the demand question is returned. 6.根据权利要求1所述的方法,其特征在于,所述智能客服系统包括复杂性分析模型,所述通过所述预处理模块获取用户输入的需求问题,确定所述需求问题对应的复杂度,包括:6. The method according to claim 1, characterized in that the intelligent customer service system includes a complexity analysis model, and the obtaining of the demand question input by the user through the preprocessing module and determining the complexity corresponding to the demand question include: 通过所述预处理模块获取用户输入的需求问题;Obtaining the requirement question input by the user through the preprocessing module; 通过所述预处理模块从所述需求问题中提取对应的第一关键词;Extracting the corresponding first keyword from the demand question by the preprocessing module; 若所述第一关键词与预设的人工客服关键词匹配成功,则通过所述预处理模块将所述需求问题转至人工客服处理;If the first keyword successfully matches the preset manual customer service keyword, the demand question is transferred to the manual customer service for processing through the pre-processing module; 若所述第一关键词未与所述人工客服关键词匹配成功,则将所述需求问题发送至所述复杂性分析模块进行分析,通过所述复杂性分析模型确定所述需求问题对应的复杂度。If the first keyword fails to match the manual customer service keyword, the demand question is sent to the complexity analysis module for analysis, and the complexity corresponding to the demand question is determined by the complexity analysis model. 7.根据权利要求1或6所述的方法,其特征在于,所述通过所述复杂性分析模型确定所述需求问题对应的复杂度,包括:7. The method according to claim 1 or 6, characterized in that determining the complexity corresponding to the demand problem through the complexity analysis model comprises: 通过所述复杂性分析模型对所述需求问题进行特征提取,获得对应的任务特征,所述任务特征至少包括上下文长度、第二关键词以及语义关系;Extracting features of the demand problem through the complexity analysis model to obtain corresponding task features, wherein the task features at least include context length, a second keyword, and a semantic relationship; 将所述上下文长度、所述第二关键词以及所述语音关系输入所述复杂性分析模型对所述需求问题进行复杂度预测,获得所述需求问题对应的复杂度。The context length, the second keyword and the phonetic relationship are input into the complexity analysis model to perform complexity prediction on the demand question, so as to obtain the complexity corresponding to the demand question. 8.根据权利要求7所述的方法,其特征在于,所述复杂性分析模型通过如下方式生成:8. The method according to claim 7, characterized in that the complexity analysis model is generated by: 获取初始模型以及针对所述初始模型的训练数据,所述初始模型至少包括分类头,所述分类头用于区分简单问题与复杂问题,所述训练数据包括标注好的问题数据集;Obtaining an initial model and training data for the initial model, wherein the initial model at least includes a classification head, the classification head is used to distinguish simple questions from complex questions, and the training data includes a labeled question data set; 将所述问题数据集中的每条问题转换为对应的输入序列;Convert each question in the question data set into a corresponding input sequence; 将所述输入序列映射为高纬度向量表示,所述高纬度向量表示用于表征所述历史用户问题对应的语义信息;Mapping the input sequence into a high-dimensional vector representation, where the high-dimensional vector representation is used to characterize semantic information corresponding to the historical user questions; 根据所述高纬度向量表示对所述初始模型的分类头进行训练,获得所述复杂性分析模型。The classification head of the initial model is trained according to the high-dimensional vector representation to obtain the complexity analysis model. 9.根据权利要求8所述的方法,其特征在于,所述分类头至少包括激活函数、权重矩阵以及偏置项,所述根据所述高纬度向量表示对所述初始模型的分类头进行训练,获得所述复杂性分析模型,包括:9. The method according to claim 8, characterized in that the classification head comprises at least an activation function, a weight matrix and a bias term, and the training of the classification head of the initial model according to the high-dimensional vector representation to obtain the complexity analysis model comprises: 将所述高纬度向量表示输入所述初始模型进行预测,获得对应输出表示;Inputting the high-dimensional vector representation into the initial model for prediction to obtain a corresponding output representation; 采用所述输出表示、所述激活函数、所述权重矩阵以及所述偏置项对所述分类头进行训练,获得对应的预测值,并获取针对所述预测值的损失函数;The classification head is trained using the output representation, the activation function, the weight matrix, and the bias term to obtain a corresponding prediction value, and a loss function for the prediction value; 采用所述损失函数计算所述预测值对应的误差信息,并基于所述误差信息反向对所述初始模型进行迭代,直至误差信息小于或等于预设条件,获得所述复杂性分析模型。The loss function is used to calculate the error information corresponding to the predicted value, and the initial model is reversely iterated based on the error information until the error information is less than or equal to a preset condition, thereby obtaining the complexity analysis model. 10.根据权利要求8或9所述的方法,其特征在于,所述采用所述输出表示、所述激活函数、所述权重矩阵以及所述偏置项对所述分类头进行训练,获得对应的预测值,通过如下公式实现:10. The method according to claim 8 or 9, characterized in that the output representation, the activation function, the weight matrix and the bias term are used to train the classification head to obtain the corresponding prediction value, which is achieved by the following formula: 其中,H为所述输出表示;W为所述权重矩阵;b为所述偏置项;σ为所述激活函数,用于将所述输出表示转换为概率值;用于表示问题属于复杂问题的概率。Wherein, H is the output representation; W is the weight matrix; b is the bias term; σ is the activation function, which is used to convert the output representation into a probability value; Used to indicate the probability that a problem is complex. 11.一种智能客服系统,其特征在于,所述智能客服系统至少包括预处理模块、第一语言模型以及第二语言模型,所述第二语言模型至少在任务处理能力、任务类型、上下文理解以及内容生成质量上优于所述第一语言模型;其中,11. An intelligent customer service system, characterized in that the intelligent customer service system comprises at least a preprocessing module, a first language model and a second language model, wherein the second language model is superior to the first language model at least in terms of task processing capability, task type, context understanding and content generation quality; wherein, 所述预处理模块,用于获取用户输入的需求问题,确定所述需求问题对应的复杂度;The preprocessing module is used to obtain the demand question input by the user and determine the complexity corresponding to the demand question; 所述第一语言模型,用于若所述复杂度表征所述需求问题属于简单问题,则对所述需求问题进行处理,返回针对所述需求问题的第一回复信息;The first language model is used to process the demand question and return first reply information for the demand question if the complexity indicates that the demand question is a simple question; 所述第二语言模型,用于若所述复杂度表征所述需求问题属于复杂问题,则对所述需求问题进行处理,返回针对所述需求问题的第二回复信息。The second language model is used to process the demand question and return second reply information for the demand question if the complexity characterizes that the demand question is a complex question. 12.一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口以及所述存储器通过所述通信总线完成相互间的通信;12. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; 所述存储器,用于存放计算机程序;The memory is used to store computer programs; 所述处理器,用于执行存储器上所存放的程序时,实现如权利要求1-10任一项所述的方法。The processor is used to implement the method according to any one of claims 1 to 10 when executing the program stored in the memory. 13.一种计算机可读存储介质,其上存储有指令,当由一个或多个处理器执行所述指令时,使得所述处理器执行如权利要求1-10任一项所述的方法。13. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 10.
CN202411613247.0A 2024-11-12 2024-11-12 Dialogue processing method, system, electronic device and storage medium Pending CN119739816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411613247.0A CN119739816A (en) 2024-11-12 2024-11-12 Dialogue processing method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411613247.0A CN119739816A (en) 2024-11-12 2024-11-12 Dialogue processing method, system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN119739816A true CN119739816A (en) 2025-04-01

Family

ID=95129589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411613247.0A Pending CN119739816A (en) 2024-11-12 2024-11-12 Dialogue processing method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN119739816A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120496530A (en) * 2025-07-17 2025-08-15 杭州一知智能科技有限公司 Voice dialogue system based on large model
CN120633677A (en) * 2025-06-03 2025-09-12 杭州兔不二科技有限公司 A collaborative semantic rewriting system for large and small models based on complexity sensing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120633677A (en) * 2025-06-03 2025-09-12 杭州兔不二科技有限公司 A collaborative semantic rewriting system for large and small models based on complexity sensing
CN120496530A (en) * 2025-07-17 2025-08-15 杭州一知智能科技有限公司 Voice dialogue system based on large model

Similar Documents

Publication Publication Date Title
CN113378556B (en) Method and device for extracting text keywords
KR102360659B1 (en) Machine translation method, apparatus, computer device and storage medium
CN110096580B (en) FAQ conversation method and device and electronic equipment
CN110334347B (en) Information processing method based on natural language recognition, related equipment and storage medium
CN109543195B (en) Text translation method, information processing method and device
CN109033156B (en) Information processing method and device and terminal
WO2019042244A1 (en) Image description generation method, model training method and device, and storage medium
WO2021159877A1 (en) Question answering method and apparatus
CN111105852A (en) Electronic medical record recommendation method and device, terminal and storage medium
CN119739816A (en) Dialogue processing method, system, electronic device and storage medium
CN111597804B (en) Method and related device for training entity recognition model
CN114065900A (en) Data processing method and data processing device
CN111159338A (en) Malicious text detection method and device, electronic equipment and storage medium
US20250363307A1 (en) Semantic understanding method, apparatus, medium, and device
CN119090432A (en) Work order generation method, device, electronic device and storage medium
CN111241815B (en) Text increment method, device and terminal equipment
CN110597957B (en) Text information retrieval method and related device
CN111062200B (en) Speaking generalization method, speaking recognition device and electronic equipment
CN116070114A (en) Data set construction method, device, electronic equipment and storage medium
CN115526662A (en) Article information pushing method and device, electronic equipment and storage medium
CN110866114B (en) Object behavior identification method and device and terminal equipment
CN110390102B (en) Emotion analysis method and related device
CN114155859B (en) Detection model training method, speech dialogue detection method and related equipment
CN113569043A (en) A text category determination method and related device
CN111353422A (en) Information extraction method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination