Dialogue processing method, system, electronic device and storage medium

By introducing a second language model better than the first language model in the intelligent customer service system and selecting an appropriate model for processing based on the complexity of user input, the problems of high model call cost and low processing efficiency in the intelligent customer service system are solved, and more efficient resource utilization and system response are achieved.

CN119739816APending Publication Date: 2025-04-01CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411613247.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

When dealing with user conversations, the intelligent customer service system has problems such as high cost of model call, low processing efficiency and waste of resources.

Method used

An intelligent customer service system is adopted, including a preprocessing module, a first language model and a second language model. The second language model is better than the first language model in terms of task processing capabilities, task type, context understanding and content generation quality. The preprocessing module determines the complexity of the requirements of the user input. If it is a simple problem, it will be processed by the first language model, and if it is a complex problem, it will be processed by the second language model.

Benefits of technology

Through the collaborative work of two models with different processing capabilities, the operating costs of the system are reduced, the efficiency of resource allocation and task processing is improved, the system's response speed and resource utilization are enhanced, and the system's economical and scalable are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739816A_ABST
    Figure CN119739816A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, system, electronic device and storage medium for processing a dialogue, which relates to the field of machine learning technology. The method includes: obtaining a demand question input by a 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, the demand question is input into the first language model for processing, and a first reply information for the demand question is returned; 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 a second reply information for the demand question is returned, thereby significantly reducing the operating cost of the system while achieving more efficient resource allocation and task processing, improving the overall response speed of the system, and enabling system resources to be more reasonably utilized, thereby improving the economy and scalability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, 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 Art

[0002] In the current intelligent customer service system, solutions based on large language models (LLM) have become mainstream. The corresponding models have powerful natural language understanding and generation capabilities, can handle diverse user queries and provide relatively accurate responses. However, in the corresponding customer service dialogue process, there are at least problems such as high cost of calling large language models, low processing efficiency, and waste of resources. Summary of the invention

[0003] The embodiments of the present invention provide a conversation processing method, system, electronic device and computer-readable storage medium to solve or partially solve the problems of high model calling cost, low processing efficiency and waste of resources in the process of conversation between the intelligent customer service system and the user.

[0004] An embodiment of the present invention discloses a method for processing a dialogue, which is applied to an intelligent customer service system. The intelligent customer service system includes at least 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 terms of task processing capability, task type, context understanding, and content generation quality. The method includes:

[0005] Obtaining the demand question input by the user through the preprocessing module, and determining the complexity corresponding to the demand question;

[0006] 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;

[0007] 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.

[0008] Some possible implementations also include:

[0009] Acquire first user feedback information for the first reply information through the first language model;

[0010] 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.

[0011] Some possible implementations also include:

[0012] 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.

[0013] Some possible implementations also include:

[0014] acquiring second user feedback information for the second reply information through the second language model;

[0015] 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.

[0016] In some feasible implementations, the intelligent customer service system further includes 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 includes:

[0017] Retrieving background information corresponding to the demand question through the retrieval enhancement module;

[0018] 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.

[0019] In some feasible implementations, the intelligent customer service system includes a complexity analysis model, and obtaining the demand question input by the user through the preprocessing module and determining the complexity corresponding to the demand question include:

[0020] Obtaining the requirement question input by the user through the preprocessing module;

[0021] Extracting the corresponding first keyword from the demand question by the preprocessing module;

[0022] 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;

[0023] 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.

[0024] In some feasible implementations, determining the complexity corresponding to the demand problem by using the complexity analysis model includes:

[0025] 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;

[0026] 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.

[0027] In some feasible implementations, the complexity analysis model is generated in the following manner:

[0028] 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;

[0029] Convert each question in the question data set into a corresponding input sequence;

[0030] 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;

[0031] The classification head of the initial model is trained according to the high-dimensional vector representation to obtain the complexity analysis model.

[0032] In some feasible implementations, the classification head includes 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 includes:

[0033] Inputting the high-dimensional vector representation into the initial model for prediction to obtain a corresponding output representation;

[0034] 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;

[0035] 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.

[0036] In some feasible implementations, 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 implemented by the following formula:

[0037]

[0038] 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.

[0039] The embodiment of the present invention further discloses an intelligent customer service system, which includes 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 in at least task processing capability, task type, context understanding and content generation quality; wherein,

[0040] The preprocessing module is used to obtain the demand question input by the user and determine the complexity corresponding to the demand question;

[0041] 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;

[0042] 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.

[0043] In some feasible implementations, the first language model is also used to obtain first user feedback information for the first reply information; 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, and third reply information for the demand question is returned.

[0044] In some feasible implementations, the first language model is further used to transfer the demand question, the first reply information, and the first user feedback information to manual processing if the first user feedback information indicates transfer to manual customer service.

[0045] In some feasible implementations, the second language model is also used to obtain second user feedback information for the second reply information; if the second user feedback information indicates transfer to manual customer service, the demand question, the second reply information and the second user feedback information are transferred to manual processing, or the demand question, the first reply information, the third reply information and the second user feedback information are transferred to manual processing.

[0046] In some feasible implementations, the intelligent customer service system further includes a retrieval enhancement module; wherein,

[0047] The search enhancement module is used to search for background information corresponding to the demand question;

[0048] The second language model is used to process the demand question and the background information, and return second reply information for the demand question.

[0049] In some feasible implementations, the intelligent customer service system includes a complexity analysis model; wherein,

[0050] The preprocessing module is used to obtain the demand question input by the user and extract the corresponding first keyword from the demand question; if the first keyword successfully matches the preset manual customer service keyword, the demand question is transferred to the manual customer service for processing; if the first keyword does not successfully 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.

[0051] In some feasible implementations, the complexity analysis model is used to extract features from the demand problem to obtain corresponding task features, and the task features include at least 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 predict the complexity of the demand problem to obtain the complexity corresponding to the demand problem.

[0052] Some possible implementations also include:

[0053] A data acquisition module, used to acquire an initial model and training data for the initial model, wherein the initial model at least includes a classification head, and the classification head is used to distinguish simple questions from complex questions, and the training data includes a labeled question data set;

[0054] A conversion module, used to convert each question in the question data set into a corresponding input sequence;

[0055] A mapping module, used for mapping the input sequence into a high-dimensional vector representation, wherein the high-dimensional vector representation is used for representing the semantic information corresponding to the historical user question;

[0056] A training module is used to train the classification head of the initial model according to the high-dimensional vector representation to obtain the complexity analysis model.

[0057] In some feasible implementations, the classification head includes at least an activation function, a weight matrix, and a bias term, and the training module is specifically used for:

[0058] Inputting the high-dimensional vector representation into the initial model for prediction to obtain a corresponding output representation;

[0059] 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;

[0060] 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.

[0061] In some feasible implementations, the training module is specifically implemented by the following formula:

[0062]

[0063] 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.

[0064] The embodiment of the present invention further discloses 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 via the communication bus;

[0065] The memory is used to store computer programs;

[0066] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0067] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0068] The embodiments of the present invention include the following advantages:

[0069] In an embodiment of the present invention, the intelligent customer service system is applied to the intelligent customer service system, which includes at least 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 terms of task processing capability, task type, context understanding and content generation quality. In the process of replying to the user's session information, the intelligent customer service system can obtain the demand question input by the user through the preprocessing module, determine the complexity corresponding to the demand question, and if the complexity indicates that the demand question is a simple question, the demand question is input into the first language model for processing, and the first reply information for the demand question is returned; 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 the second reply information for the demand question is returned, so that the two models with different processing capabilities work together. On the one hand, simple questions can be processed by the first language model, and complex questions can be processed by the second language model. While significantly reducing the operating cost of the system, more efficient resource allocation and task processing are achieved, the overall response speed of the system is improved, and system resources can be used more reasonably, thereby improving the economy and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 is a flowchart of a method for processing a conversation provided in an embodiment of the present invention;

[0071] Figure 2 is a schematic diagram of the model training process provided in an embodiment of the present invention;

[0072] Figure 3 is a flow chart of session processing provided in an embodiment of the present invention;

[0073] Figure 4 is a structural block diagram of an intelligent customer service system provided in an embodiment of the present invention;

[0074] Figure 5 It is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0076] As an example, in the corresponding customer service dialogue process, it is usually possible to intelligently reply to the user's input based on the large language model. However, in the process of processing the user's input, the call of the large language model is often accompanied by high computing resources and costs, especially in high-concurrency online services, which is easy to bring large costs; secondly, the large language model may generate wrong or inconsistent answers in some cases, especially when the context information provided by the user is insufficient; thirdly, when dealing with simple and complex problems, it is often dependent on the large language model, resulting in a waste of resources.

[0077] In this regard, in the present invention, it is applied to an intelligent customer service system, and the intelligent customer service system at least includes 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 capability, task type, context understanding and content generation quality. In the process of replying to the user's session information, the intelligent customer service system can obtain the demand question input by the user through the preprocessing module, determine the complexity corresponding to the demand question, and if the complexity indicates that the demand question is a simple question, the demand question is input into the first language model for processing, and the first reply information for the demand question is returned; 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 the second reply information for the demand question is returned, so that the two models with different processing capabilities work together. On the one hand, simple problems can be processed by the first language model, and complex problems can be processed by the second language model. While significantly reducing the operating cost of the system, more efficient resource allocation and task processing are achieved, the overall response speed of the system is improved, and system resources can be used more reasonably, thereby improving the economy and scalability of the system.

[0078] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, some technical features involved in the embodiments of the present invention are explained and illustrated below:

[0079] Large Language Model (LLM): A deep learning model based on an end-to-end deep learning framework and pre-trained with large-scale corpora, designed to understand and generate human language. The LLM processes massive amounts of text data and learns the statistical characteristics of language, so that it can generate new texts with similar statistical characteristics and understand the meaning of language texts. It can perform a variety of natural language tasks, such as text generation, language understanding, question answering, translation, etc.

[0080] Retrieval Augmented Generation (RAG): A method that combines search technology and LLM generation capabilities. Its core is to retrieve relevant information from data sources (such as local databases and knowledge bases) and use this information as the basis for generating answers. Specifically, RAG technology uses search algorithms to find content related to the query and integrates this content as context into the prompts passed to the LLM, thereby generating more accurate and detailed answers.

[0081] Reference Figure 1 , shows a flowchart of a method for processing a dialogue provided in an embodiment of the present invention, which is applied to an intelligent customer service system, wherein the intelligent customer service system at least includes 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, and specifically may include the following steps:

[0082] Step 101, obtaining a demand question input by a user through the preprocessing module, and determining the complexity corresponding to the demand question;

[0083] The intelligent customer service system (hereinafter referred to as the system) can be used to handle different types of problems, such as query problems, complaint problems, and technical support problems. Among them, the intelligent customer service system can include at least a preprocessing module, a first language model, a second language model, a complexity analysis model, and a retrieval enhancement module. For the preprocessing module, it can be responsible for receiving and preliminarily processing user input, identifying the basic intention corresponding to the user input, and classifying and routing. In the process of classification and routing, 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 to handle simple problems and quickly generate responses. Correspondingly, the second language model can be used to handle complex problems, especially those involving context understanding and deep reasoning. It should be noted that the second language model at least It is superior to the first language model in terms of task processing capability, task type, context understanding and content generation quality. The first language model has a certain amount of parameters and a certain generation capability. Compared with the second language model, the amount of parameters of the second language model is much larger than that of the first language model. Therefore, when the first language model processes simple question-and-answer tasks, it can meet actual needs while reducing the cost of model reasoning. The second language model, due to its large amount of parameters, can process context understanding and question-and-answer tasks that require deep reasoning to ensure that the output content meets the actual needs of users. For the retrieval enhancement module, it can be responsible for obtaining information related to user input from the local database or knowledge base to enhance the generation capability of the second language model.

[0084] In addition, the intelligent customer service system can also be configured with a corresponding manual customer service interface. In certain situations (such as complex situation processing or particularly urgent inquiries, etc.), the system can transfer to manual customer service, who will solve the user's needs. Optionally, the intelligent customer service system can also include a feedback and optimization module, which adjusts the model's processing method based on user feedback to continuously optimize system performance.

[0085] In one example, the user request is first connected to the intelligent customer service system through the network. The system performs preliminary processing through the preprocessing module. Then, according to the complexity of the problem, the preprocessing module can route the request to the small language model or the large language model module. The large language model module accesses the local database or knowledge base through the retrieval enhancement module to obtain supplementary information when necessary. During the processing, all modules are connected to the feedback and optimization module, and the system adjusts the model's processing strategy in real time based on user feedback.

[0086] In the actual processing process, after the user inputs the corresponding demand question, the system can obtain the demand question input by the user through the preprocessing module and determine the complexity corresponding to the demand question, so as to classify and route the demand question to the corresponding language model by determining the complexity corresponding to the demand question.

[0087] In the specific implementation, the system can first obtain the demand problem input by the user through the preprocessing module, and then extract the corresponding first keyword from the demand problem through the preprocessing module. If the first keyword successfully matches the preset manual customer service keyword, it indicates that the user currently wants to solve his own demand problem through manual customer service. The system can transfer the demand problem to manual customer service for processing through the preprocessing module; if the first keyword does not successfully match the manual customer service keyword, it indicates that the current user does not need manual access temporarily, and the system can process it through intelligent customer service. The system can send the demand problem to the complexity analysis module for analysis, and determine the complexity corresponding to the demand problem through the complexity analysis model.

[0088] Among them, for complexity, the system can extract features of the demand questions through the complexity analysis model to obtain corresponding task features, which at least include context length, second keywords and semantic relationships. Then, the context length, second keywords and phonetic relationships are input into the complexity analysis model to predict the complexity of the demand questions and obtain the corresponding complexity of the demand questions. In order to determine the corresponding complexity of the demand questions, the demand questions can be classified and routed to the corresponding language models to improve the utilization of system resources.

[0089] It should be noted that the context length can be used to calculate the text length corresponding to the demand question as an indicator of task complexity; the second keyword can be the keyword identified from the demand question, as an important feature of the task content and complexity; the semantic relationship can include subject-predicate relationship, verb-object relationship, etc., which can be used as another indicator of task complexity. Therefore, by inputting the context length, the second keyword and the semantic relationship into the complexity analysis model for analysis, the complexity corresponding to the demand question can be determined.

[0090] In some feasible implementations, an initial model and training data for the initial model can be obtained, where the initial model at least includes a classification head, which is used to distinguish simple questions from complex questions. The training data includes a labeled question data set, and then each question in the question data set is converted into a corresponding input sequence. The input sequence is then mapped into a high-dimensional vector representation, which is used to characterize the semantic information corresponding to historical user questions. The classification head of the initial model is then trained based on the high-dimensional vector representation to obtain a complexity analysis model.

[0091] Among them, the classification head at least includes an activation function, a weight matrix and a bias term. When training the classification head, the high-dimensional vector representation can be first input into the initial model for prediction to obtain the corresponding output representation, and then the output representation, activation function, weight matrix and bias term are used to train the classification head to obtain the corresponding prediction value, and the loss function for the prediction value is obtained. Then, the loss function is used to calculate the error information corresponding to the prediction value, and the initial model is iterated in reverse based on the error information until the error information is less than or equal to the preset condition to obtain the complexity analysis model.

[0092] Optionally, the classification head can be trained using the following formula:

[0093]

[0094] Among them, 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.

[0095] In one example, for a complexity analysis model, a deep learning model (BERT) can be used to perform complexity analysis, which is converted into a binary classification problem, that is, the context features of the problem are extracted through a pre-trained language model, and the binary classification is performed at the output layer through a classification head to output the probability of the problem being "simple" or "complex". Figure 2 , shows a schematic diagram of the process of model training provided in an embodiment of the present invention, and the process is as follows:

[0096] 1. Training data annotation: Prepare annotated Chinese question datasets, as shown in Table 1:

[0097] question Complexity Tags How do I reset my password? 0 (simple) Could you please explain the warranty terms for this product and how to claim it? 1 (complex)

[0098] Table 1

[0099] 2. Pre-trained model: Select BERT as the pre-trained model and load it. BERT learns the relationship between words through a bidirectional Transformer structure.

[0100] 3. Text feature extraction: Convert the question text entered by the user into the input format of the BERT model (i.e., TokenIDs) and use BERT to extract features. BERT maps the input sequence into high-dimensional vector representations that capture the deep semantic information of the text. In BERT, the output of the first Token [CLS] is usually used to represent the vector of the entire sentence, which can be used as the input feature of the classification task.

[0101] Classification head training: Add a classification head (fully connected layer) based on the output of the BERT model to predict the complexity of the problem. Here, it is assumed that the output of BERT is represented as H, and the parameters of the classification head are the weight matrix W and the bias term b. The output of the classification head is:

[0102]

[0103] Among them, σ is the activation function, which is used to convert the output into a probability value Indicates the probability that the problem belongs to the complex class.

[0104] 4. Furthermore, based on the output of the complexity analysis module and the set threshold, the system can dynamically

[0105]

[0106] Dynamically assign tasks to the first language model or the second language model. Specifically, the complexity probability of the model output can be Set a threshold τ to determine the complexity of the problem. If the problem is complex, it is classified as a complex problem; otherwise, it is classified as a simple problem.

[0107] For example: τ is set to 0.5

[0108] Question 1: How do I reset my password? → Model Output Below the threshold, classified as simple. Question 2: Please explain the warranty terms of this product and how to apply for warranty? → Model output Above the threshold, it is classified as complex.

[0109] Through the above process, the corresponding complexity analysis model can be trained. Based on the complexity analysis model, the demand problems can be classified in the process of processing the demand problems input by users, and the demand problems can be classified and routed to the corresponding language model based on the classification, which fully optimizes the allocation of system computing resources and ensures the utilization of system resources.

[0110] Step 102: if the complexity indicates that the demand question is a simple question, the demand question is input into the first language model for processing, and first reply information for the demand question is returned;

[0111] Through the above process, after receiving the demand question input by the user, the system can determine whether it needs to be directly transferred to manual customer service based on keywords. If not, it can enter the problem classification, analyze the complexity of the demand question through the complexity analysis model, and then input the demand question into the first language model or the second language model based on the complexity.

[0112] Among them, for complexity, it can be a corresponding numerical value. By comparing the complexity with a preset threshold, it is determined whether the demand question is a complex question. For example, if the complexity is greater than or equal to the preset threshold, the demand question is regarded as a complex question; if the complexity is less than the preset threshold, the demand question is regarded as a simple question, and the demand question is input into the first language model for processing, and the first reply information for the demand question is returned, so that the first language model can quickly respond to simple user queries, reduce the number of calls to the second language model, and reduce the overall cost of the system.

[0113] Furthermore, for the first reply information returned by the first language model, the system can obtain first user feedback information for the first reply information through the first language model, and analyze the first user feedback information to determine whether the first reply information meets the user's needs. 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 through the first language model for processing, and the third reply information for the demand question is returned. Therefore, if the user is dissatisfied with the first reply information fed back by the first language model, the system can pass the user's feedback information together with the first reply information and the context to the second language model for processing through the second language model. If the first user feedback information indicates that the user is satisfied with the first reply information, the first reply information can be used as the final information, and the system does not need to further analyze the user's needs.

[0114] Accordingly, if the first user feedback information representation 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. Therefore, in the corresponding dialogue link, if the user expresses strong emotions, contains manual service keywords or the question involves complex background knowledge, the system can actively transfer the task to manual customer service, and at the same time, the contextual dialogue history and the core summary of the dialogue are fed back to the customer service for reference, so as to ensure the effective and timely resolution of complex problems and improve user satisfaction.

[0115] Step 103: 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.

[0116] Accordingly, if the complexity characterization shows that the demand problem is a complex problem, the demand problem will be input into the second language model for processing. The demand problem will be analyzed through the context connection and deep reasoning capabilities of the second language model, and a second response information for the demand problem will be returned. Thus, the two models with different processing capabilities can work together. On the one hand, simple problems can be processed by the first language model, and complex problems can be processed by the second language model. While significantly reducing the operating cost of the system, more efficient resource allocation and task processing are achieved, the overall response speed of the system is improved, and system resources can be used more reasonably, thereby improving the economy and scalability of the system.

[0117] It should be noted that when dealing with problems in corresponding specific fields, the system can also retrieve background information corresponding to the demand question through the retrieval enhancement module, and then input the demand question and the background information into the second language model for processing, and return the second reply information for the demand question. Therefore, when dealing with complex problems involving knowledge in specific fields or requiring precise information, the second language model can call the local database or knowledge base for retrieval through the retrieval enhancement model, and use the retrieval results as the input part of the second language model, combining the demand question, contextual connections and other content to generate more accurate answers, thereby ensuring the accuracy of the answers to complex questions.

[0118] In addition, for the second reply information or the third reply information fed back by the second language model, the second language model can also obtain the second user feedback information for the second reply information. 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, so that the system can actively transfer the task to manual customer service, and at the same time feedback the contextual conversation history and the core summary of the conversation to the customer service for reference, so as to ensure the effective and timely resolution of complex problems and improve user satisfaction.

[0119] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that those skilled in the art can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention is not limited to this.

[0120] In an embodiment of the present invention, the intelligent customer service system is applied to the intelligent customer service system, which includes at least 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 terms of task processing capability, task type, context understanding and content generation quality. In the process of replying to the user's session information, the intelligent customer service system can obtain the demand question input by the user through the preprocessing module, determine the complexity corresponding to the demand question, and if the complexity indicates that the demand question is a simple question, the demand question is input into the first language model for processing, and the first reply information for the demand question is returned; 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 the second reply information for the demand question is returned, so that the two models with different processing capabilities work together. On the one hand, simple questions can be processed by the first language model, and complex questions can be processed by the second language model. While significantly reducing the operating cost of the system, more efficient resource allocation and task processing are achieved, the overall response speed of the system is improved, and system resources can be used more reasonably, thereby improving the economy and scalability of the system.

[0121] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0122] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following examples are used for exemplary description:

[0123] As an example, in an intelligent customer service system, different types of problems (such as inquiries, complaints, technical support, etc.) put forward different requirements on the system's processing capabilities. In order to improve the efficiency and accuracy of the system while reducing costs, an intelligent customer service optimization method based on the collaboration of large and small language models is proposed in an embodiment of the present invention. This method effectively handles problems of different complexities by collaboratively using small and large language models in the system architecture, ensuring the rational use of resources.

[0124] The network element devices and communication connection relationships involved may be as follows:

[0125] (1) User terminal devices: including but not limited to personal computers, smart phones, tablet computers, etc. Users initiate requests to the intelligent customer service system through these terminal devices.

[0126] (2) Intelligent customer service platform. It consists of the following main modules (3)-(8).

[0127] (3) Preprocessing module: responsible for receiving and preliminarily processing user input, identifying its basic intention, and classifying the routing.

[0128] (4) Small language model module: It processes simple questions and generates responses quickly. The small language model used here also has a certain number of parameters and a certain generation capability, but the number of parameters is much smaller than that of the large prediction model. Therefore, it can also meet the needs when processing simple question-answering tasks while reducing the model inference cost.

[0129] (5) Large Language Model Module: handles complex problems, especially tasks involving context understanding and deep reasoning.

[0130] (6) Retrieval enhancement module: responsible for obtaining information related to user queries from the local database or knowledge base to enhance the generation capability of the large language model.

[0131] (7) Manual customer service interface: In certain situations (such as complex emotional processing or particularly urgent inquiries), the system will transfer to manual customer service.

[0132] (8) Feedback and optimization module: Adjust the model processing method based on user feedback and continuously optimize system performance.

[0133] It should be noted that the communication connection between the modules can be as follows:

[0134] User requests are first connected to the intelligent customer service platform through the network and are initially processed by the preprocessing module. Depending on the complexity of the question, the preprocessing module routes the request to the small language model or large language model module. The large language model module accesses the local database or knowledge base through the retrieval enhancement module to obtain supplementary information when necessary. All modules are connected to the feedback and optimization module, and the system adjusts the model's processing strategy in real time based on user feedback.

[0135] In the specific implementation, refer to Figure 3 , shows a schematic diagram of the session processing process provided in an embodiment of the present invention, and the corresponding processing flow may include:

[0136] Step 1: Preprocessing of user input

[0137] Execution body: preprocessing module

[0138] Execution steps:

[0139] 1. The user enters the question on the terminal device and sends it to the intelligent customer service system through the network.

[0140] 2. The preprocessing module receives the input and uses keyword matching to perform preliminary processing on the input content, identifying its basic intent to confirm transfer to manual customer service or intelligent customer service.

[0141] 3. Based on the results of preprocessing, the system determines the complexity of the problem and calls the "complexity analysis module" for further complexity analysis: The complexity analysis module determines the complexity of the task based on the deep learning model and the set advance.

[0142] 4. Based on the results of the complexity analysis, the system marks the question as "simple" or "complex".

[0143] Result: The generated tags are used for subsequent model selection and problem processing, and parallel processing mechanisms are initiated when necessary.

[0144] Step 2: Classification and handling of problems

[0145] Execution body: small language model module and large language model module

[0146] Execution steps:

[0147] 1. Simple problem handling:

[0148] If the question is marked as "easy", the preprocessing module routes the request to the small language model module for processing.

[0149] The small language model quickly generates a concise answer based on the preprocessed input and returns the result to the user. If the user is not satisfied, the conversation content is fed back to the large model based on the user feedback mechanism, and the answer is output. If the user needs customer service intervention, the system transfers to manual customer service.

[0150] 2. Handling of complex issues:

[0151] If the question is marked as "complex", the preprocessing module routes the request to the large language model module.

[0152] The large language model first deeply understands the question and calls the retrieval enhancement module to obtain relevant background information when necessary. For questions transferred from the small language model, the processing results will be passed to the large language model as context to ensure the coherence of the answer.

[0153] Result: The system generates a response based on the user's input, ready to be sent to the user.

[0154] Step 3: Feedback and optimization of answers

[0155] Execution body: Feedback and optimization module

[0156] Execution steps:

[0157] After receiving the answers generated by the system, the user can provide feedback on the terminal device, and the system automatically records the feedback information.

[0158] The feedback and optimization module performs the following operations based on user feedback:

[0159] Adjust the classification criteria for simple and complex questions to improve classification accuracy.

[0160] Record user questions and, after desensitization, use them as model training data for the complexity analysis module

[0161] Optimize the task allocation mechanism and model parameters to ensure more reasonable task allocation and reduce misclassification.

[0162] If necessary, the system will submit feedback information to the manual intervention interface for more detailed adjustments and optimizations.

[0163] Results: Through continuous feedback and optimization, the system's processing efficiency and answer accuracy have been continuously improved.

[0164] In addition to text conversations, the system can also be in voice conversations. The relevant process is similar to the text processing process and will not be repeated here. The corresponding process may include:

[0165] Step 1: Voice input processing

[0166] Execution entity: speech recognition module

[0167] Execution steps:

[0168] Users initiate queries in the form of voice through terminal devices (such as smartphones).

[0169] The speech recognition module receives the user's speech and converts it into text input. The text input is then passed to the pre-processing module for processing.

[0170] Result: The generated text input will be further processed according to the standard text workflow.

[0171] Step 2: Similar to the above example

[0172] The text input is processed according to the process in the above example, except that the user's query is converted from speech.

[0173] Step 3: Feedback and Optimization

[0174] Execution body: Feedback and optimization module

[0175] Execution steps:

[0176] The system adjusts the collaborative processing mode of the speech recognition module and the large and small language models based on the user's feedback on speech recognition and answers.

[0177] The system is continuously optimized for the accuracy of speech recognition and its collaboration with language models.

[0178] Result: The optimized system is more accurate and efficient in processing voice queries.

[0179] Through the above process, the two models based on different processing capabilities work together. On the one hand, simple problems can be processed through the first language model, and complex problems can be processed through the second language model. While significantly reducing the operating cost of the system, more efficient resource allocation and task processing are achieved, the overall response speed of the system is improved, and system resources can be used more reasonably, which improves the economy and scalability of the system.

[0180] Reference Figure 4 , shows a structural block diagram of an intelligent customer service system provided in an embodiment of the present invention, the intelligent customer service system at least includes 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 capability, task type, context understanding and content generation quality; wherein,

[0181] The preprocessing module is used to obtain the demand question input by the user and determine the complexity corresponding to the demand question;

[0182] 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;

[0183] 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.

[0184] In some feasible implementations, the first language model is also used to obtain first user feedback information for the first reply information; 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, and third reply information for the demand question is returned.

[0185] In some feasible implementations, the first language model is further used to transfer the demand question, the first reply information, and the first user feedback information to manual processing if the first user feedback information indicates transfer to manual customer service.

[0186] In some feasible implementations, the second language model is also used to obtain second user feedback information for the second reply information; if the second user feedback information indicates transfer to manual customer service, the demand question, the second reply information and the second user feedback information are transferred to manual processing, or the demand question, the first reply information, the third reply information and the second user feedback information are transferred to manual processing.

[0187] In some feasible implementations, the intelligent customer service system further includes a retrieval enhancement module; wherein,

[0188] The search enhancement module is used to search for background information corresponding to the demand question;

[0189] The second language model is used to process the demand question and the background information, and return second reply information for the demand question.

[0190] In some feasible implementations, the intelligent customer service system includes a complexity analysis model; wherein,

[0191] The preprocessing module is used to obtain the demand question input by the user and extract the corresponding first keyword from the demand question; if the first keyword successfully matches the preset manual customer service keyword, the demand question is transferred to the manual customer service for processing; if the first keyword does not successfully 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.

[0192] In some feasible implementations, the complexity analysis model is used to extract features from the demand problem to obtain corresponding task features, and the task features include at least 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 predict the complexity of the demand problem to obtain the complexity corresponding to the demand problem.

[0193] Some possible implementations also include:

[0194] A data acquisition module, used to acquire an initial model and training data for the initial model, wherein the initial model at least includes a classification head, and the classification head is used to distinguish simple questions from complex questions, and the training data includes a labeled question data set;

[0195] A conversion module, used to convert each question in the question data set into a corresponding input sequence;

[0196] A mapping module, used for mapping the input sequence into a high-dimensional vector representation, wherein the high-dimensional vector representation is used for representing the semantic information corresponding to the historical user question;

[0197] A training module is used to train the classification head of the initial model according to the high-dimensional vector representation to obtain the complexity analysis model.

[0198] In some feasible implementations, the classification head includes at least an activation function, a weight matrix, and a bias term, and the training module is specifically used for:

[0199] Inputting the high-dimensional vector representation into the initial model for prediction to obtain a corresponding output representation;

[0200] 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;

[0201] 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.

[0202] In some feasible implementations, the training module is specifically implemented by the following formula:

[0203]

[0204] 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.

[0205] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0206] In addition, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned dialogue processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0207] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned dialogue processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0208] Figure 5 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0209] 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 supply 511. Those skilled in the art will appreciate that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0210] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, 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, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.

[0211] The electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0212] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the electronic device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.

[0213] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.

[0214] 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 and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include 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 will not be repeated here.

[0215] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0216] The user input unit 507 can be used to receive input digital or character information, and to generate key signal input 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. The touch panel 5071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 5071 or near the touch panel 5071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0217] Further, the touch panel 5071 may be covered on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. It can be understood that in one embodiment, the touch panel 5071 and the display panel 5061 are used as two independent components to implement the input and output functions of the electronic device, but in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to implement the input and output functions of the electronic device, which is not limited here.

[0218] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. 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 device 500 or may be used to transmit data between the electronic device 500 and an external device.

[0219] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0220] The processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.

[0221] The electronic device 500 may also include a power supply 511 (such as a battery) for supplying power to each component. Preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0222] In addition, the electronic device 500 includes some functional modules not shown, which will not be described in detail here.

[0223] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0224] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0225] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0226] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0227] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0228] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.

[0230] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0231] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0232] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for processing a conversation, characterized in that: Applied to an intelligent customer service system, the intelligent customer service system includes at least 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 capability, task type, context understanding and content generation quality, the method includes: 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. The method according to claim 1, characterized in that Also includes: 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. The method according to claim 2, characterized in that Also includes: 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. The method according to claim 2, characterized in that: Also includes: 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. The method according to any one of claims 1 to 4, characterized in that: The intelligent customer service system further includes a retrieval enhancement module, which inputs the demand question into the second language model for processing and returns second reply information for the demand question, including: 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. The method according to claim 1, characterized in that The intelligent customer service system includes a complexity analysis model, wherein obtaining 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. The method according to claim 1 or 6, characterized in that: Determining the complexity corresponding to the demand problem by using the complexity analysis model includes: 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. The method according to claim 7, characterized in that The complexity analysis model is generated in the following way: 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. The method according to claim 8, characterized in that The classification head includes at least an activation function, a weight matrix, and a bias term, and the classification head of the initial model is trained according to the high-dimensional vector representation to obtain the complexity analysis model, including: 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. 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: 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. An intelligent customer service system, characterized in that: The intelligent customer service system includes 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. An electronic device, characterized in that: It includes 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; 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. 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.

Citation Information

Cited By

  • Voice dialogue system based on large model

    CN120496530A

  • Large and small model collaborative semantic rewriting system based on complexity induction

    CN120633677A