A data processing method, a data processing apparatus, an electronic device, and a storage medium
By obtaining relevant information about the target issue from the intelligent customer service system, determining the handling strategy, and generating accurate response content, the problem of inaccurate intent recognition in the existing system is solved, improving user experience and system adaptability.
Patent Information
- Application Number
- CN202511144568.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-08-15
AI Technical Summary
Existing intelligent customer service systems struggle to accurately identify user intent after receiving input questions, resulting in inaccurate responses and negatively impacting user experience.
By acquiring the target question and its related information, a target processing strategy is determined, including a question generation model and a question localization model, to generate accurate response content.
It improved the user experience, enhanced the accuracy of dialogues and the understanding of multi-turn conversations, and reduced the investment of human resources.
Smart Images

Figure CN120725154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a data processing method, a data processing apparatus, an electronic device, and a storage medium. Background Technology
[0002] With the rapid development of artificial intelligence and natural language processing (NLP) technologies, intelligent customer service systems based on real-time online interaction have been widely adopted across various industries. These systems significantly improve customer service response efficiency through their environmental awareness, decision generation, and task execution capabilities.
[0003] Currently, businesses are investing heavily in building intelligent customer service systems to resolve customer issues online in real time. However, existing intelligent customer service systems still have significant limitations: after receiving the input question, these systems process it directly to obtain the output response, resulting in low accuracy in recognizing the intent behind the input question. This makes it difficult to uncover the user's true needs, hindering effective customer problem-solving and negatively impacting the user experience.
[0004] Therefore, for intelligent customer service systems, how to accurately process input questions in order to generate precise responses has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a data processing method, a data processing apparatus, an electronic device, and a storage medium. The method can accurately process input questions in an intelligent customer service system to generate precise response content.
[0006] Firstly, a data processing method is provided, which is applied to an electronic device, comprising: acquiring a target problem and related information corresponding to the target problem; determining a target processing strategy corresponding to the target problem based on the target problem and related information corresponding to the target problem, wherein the related information corresponding to the target problem is background information for processing the target problem; determining a target response content corresponding to the target problem based on the target processing strategy corresponding to the target problem; and outputting the target response content.
[0007] In the above technical solution, by acquiring the target problem and its corresponding related information, a target processing strategy is determined for the target problem. Based on this strategy, the target response content is determined and output. This approach combines the background information required to process the target problem to determine the target processing strategy, ensuring it aligns with the needs of the target problem. Furthermore, the target response content generated through this strategy accurately addresses the target problem, effectively processing the input and improving the user experience. Additionally, the data processing method of this application is compatible with different usage scenarios, reducing human resource investment and saving labor costs for enterprises.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the target processing strategy corresponding to the target problem is determined based on the target problem and the relevant information corresponding to the target problem, including: determining the response type of the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the response type of the target problem is used to characterize the way to process the target problem; and determining the target processing strategy corresponding to the target problem based on the response type of the target problem.
[0009] In the above technical solution, the target processing strategy corresponding to the target problem is further determined by identifying the response type of the target problem. This allows for flexible selection of the target processing strategy based on different response types, thereby improving the accuracy of processing the target problem.
[0010] Combining the first aspect and the above implementation methods, based on the response type of the target question, a target processing strategy corresponding to the target question is determined, including: when the response type of the target question indicates that the target question has a preset standard answer, the first processing strategy is used as the target processing strategy corresponding to the target question, and the first processing strategy is used to answer the input question based on the preset answer; when the response type of the target question indicates that the expression of the target question is ambiguous, the second processing strategy is used as the target processing strategy corresponding to the target question, and the second processing strategy is used to determine the expression of the input question; when the response type of the target question indicates that processing the target question requires querying external information, the third processing strategy is used as the target processing strategy corresponding to the target question, and the third processing strategy is used to process the input question based on the queried information.
[0011] The above technical solution enables the selection of appropriate target processing strategies based on different situations during the actual handling of target problems, thereby improving the flexibility of target problem handling. At the same time, it can further expand the response types of target problems according to actual situations to be compatible with more real-world scenarios.
[0012] Combining the first aspect and the above implementation method, based on the target processing strategy corresponding to the target question, the target response content corresponding to the target question is determined, including: when the target processing strategy corresponding to the target question is the first processing strategy, determining the first sub-response type corresponding to the target question, the first processing strategy being used to answer the input question based on a preset answer; and determining the target response content corresponding to the target question based on the first sub-response type corresponding to the target question.
[0013] In the above technical solution, when the target processing strategy corresponding to the target problem is the first processing strategy, the target response content corresponding to the target problem is further determined by the determined first sub-response type. This refines the different actual situations of adopting the first processing strategy and can output target response content that fits the user's intent more accurately.
[0014] Combining the first aspect and the above implementation methods, based on the target processing strategy corresponding to the target question, the target response content corresponding to the target question is determined, including: when the first sub-response type corresponding to the target question indicates that the target question is a follow-up question on relevant information related to the target question, the first response content is used as the target response content corresponding to the target question, and the first response content is used to respond to and explain the target question to soothe emotions; when the first sub-response type corresponding to the target question indicates that the target question is small talk or a meaningless question, the second response content is used as the target response content corresponding to the target question, and the second response content is a preset general response.
[0015] In the above technical solution, the first or second response content is determined as the target response content corresponding to the target question by different first sub-response types. This refines the execution of the first processing strategy and improves its accuracy.
[0016] Combining the first aspect and the above implementation method, based on the target processing strategy corresponding to the target question, the target response content corresponding to the target question is determined, including: when the target processing strategy corresponding to the target question is the second processing strategy, obtaining the retrieval recall information corresponding to the target question, the second processing strategy is used to determine the expression of the input question, and the retrieval recall information corresponding to the target question is obtained by querying external information; based on the retrieval recall information corresponding to the target question and the relevant information corresponding to the target question, the third response content is used as the target response content corresponding to the target question, and the third response content is used to determine the expression of the input question.
[0017] In the above technical solution, when the target processing strategy corresponding to the target question is the second processing strategy, by obtaining the retrieval information and related information corresponding to the target question, the third response content is used as the target response content corresponding to the target question. This can accurately determine the expression of the input question by combining external information, reduce the number of data processing operations, and improve the user experience.
[0018] Combining the first aspect and the above implementation method, based on the target processing strategy corresponding to the target question, the target response content corresponding to the target question is determined, including: when the target processing strategy corresponding to the target question is the third processing strategy, determining the intent information corresponding to the target question, the third processing strategy is used to process the input question based on the query information; and determining the target response content corresponding to the target question based on the intent information corresponding to the target question.
[0019] In the above technical solution, when the target processing strategy corresponding to the target question is the third processing strategy, the target response content corresponding to the target question is determined by the intent information corresponding to the target question, thereby outputting response content that is closer to the user's intent and improving the user experience.
[0020] Combining the first aspect and the above implementation method, based on the intent information corresponding to the target question, the target response content corresponding to the target question is determined, including: when the intent information corresponding to the target question is a task-oriented intent, the factor information corresponding to the target question is determined, and the factor information corresponding to the target question is the relevant option or information required to respond to the target question; based on the factor information corresponding to the target question, a fourth response content is obtained, and the fourth response content is used as the target response content corresponding to the target question. The fourth response content is used to explain the input question through step operations.
[0021] In the above technical solution, when the intent information corresponding to the target question is a task-oriented intent, the obtained fourth response content is used as the target response content corresponding to the target question based on the factor information corresponding to the target question. This can output step operation explanations to illustrate the input question, thereby improving the relevance and accuracy of the target response content.
[0022] Combining the first aspect and the above implementation methods, based on the intent information corresponding to the target question, the target response content corresponding to the target question is determined, including: when the intent information corresponding to the target question is a consultation-type intent, obtaining a knowledge graph; and based on the knowledge graph, determining the target response content corresponding to the target question.
[0023] In the above technical solution, when the intent information corresponding to the target question is a consultation-type intent, the target response content corresponding to the target question is determined based on the acquired knowledge graph. The response content can be output by combining external information, thereby improving the accuracy of the target response content.
[0024] Combining the first aspect and the above implementation methods, based on the knowledge graph, the target response content corresponding to the target question is determined, including: extracting at least one target entity from the target question and mapping the target entity to the knowledge graph to obtain at least one target node; performing retrieval and sorting processing on the at least one target node to obtain the associated information corresponding to the target question; and determining the target response content corresponding to the target question based on the associated information corresponding to the target question.
[0025] In the above technical solution, based on the target nodes extracted and mapped from the target question, the associated information corresponding to the target question is obtained. Based on the associated information corresponding to the target question, the target response content corresponding to the target question is determined, which can accurately locate the content related to the target question and further improve the accuracy of the target response content.
[0026] Combining the first aspect and the above implementation method, based on the intent information corresponding to the target question, the target response content corresponding to the target question is determined, including: when the intent information corresponding to the target question is a restricted intent, the fifth response content is used as the target response content corresponding to the target question. The fifth response content is used to refuse to answer the input question. The restricted intent represents a lack of relevant knowledge or processing ability to process the input question.
[0027] In the above technical solution, when the intent information corresponding to the target question is a restricted intent, the fifth response content is used as the target response content corresponding to the target question. This can refuse to answer the input question, improve the ability to reject sensitive topics, and enhance the security of the target response content.
[0028] In conjunction with the first aspect and the above implementation method, the method further includes: obtaining a training set, which includes at least one data sample with label information; using the large model to be trained, determining the predicted response content corresponding to the data sample; and updating the model parameters of the large model at least once based on the predicted response content corresponding to the data sample and the label information of the data sample to obtain a target large model, which is used to process the input problem.
[0029] In the above technical solution, the training samples obtained from the training set are used to update the model parameters of the large model at least once using the predicted response content and label information of the data samples corresponding to the determined data samples, thereby obtaining the target large model. The overall network structure of the large model is then trained, which improves the performance of the target large model, enabling it to accurately engage in dialogue and thus provide users with more personalized services.
[0030] Combining the first aspect and the above implementation method, the method further includes: obtaining at least one sample problem to obtain at least one statistical problem based on the sample problem, wherein the sample problem is data processed as a single-round problem, and the statistical problem is unlabeled data with global representativeness and balanced distribution; generating label information corresponding to the statistical problem; selecting a target statistical problem from the statistical problems, using the target statistical problem as a data sample in the training set, wherein the target statistical problem is a problem that satisfies the self-consistency condition.
[0031] In the above technical solution, at least one statistical problem is obtained from the sample problems, and label information corresponding to the statistical problem is generated. The problem that satisfies the self-consistency condition among the statistical problems is taken as the target statistical problem, and then the target statistical problem is used as the data sample in the training set. This ensures the balance and diversity of the data distribution, avoids the overfitting or underfitting problem of large models due to data bias, and can effectively remove noisy data and low-quality samples, thereby improving the generalization ability and robustness of large models and optimizing the efficiency of dataset construction.
[0032] In a second aspect, a data processing apparatus is provided, which is applied to an electronic device and includes:
[0033] The module is divided into four parts: an acquisition module, which acquires the target question and related information; a determination module, which determines the target processing strategy for the target question based on the target question and related information, wherein the related information is the background information for processing the target question; and an output module, which determines the target response content for the target question based on the target processing strategy.
[0034] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is also used to determine the response type of the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the response type of the target problem is used to characterize the way to handle the target problem; and to determine the target processing strategy corresponding to the target problem based on the response type of the target problem.
[0035] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is also used to determine the response type of the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the response type of the target problem is used to characterize the way to handle the target problem; and to determine the target processing strategy corresponding to the target problem based on the response type of the target problem.
[0036] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further configured to: 1) use the first processing strategy as the target processing strategy corresponding to the target question when the response type of the target question indicates that the target question has a preset standard answer; 2) use the second processing strategy as the target processing strategy corresponding to the target question when the response type of the target question indicates that the description of the target question is ambiguous; 3) use the third processing strategy as the target processing strategy corresponding to the target question when the response type of the target question indicates that processing the target question requires querying external information; 4) use the third processing strategy as the target processing strategy corresponding to the target question when the response type of the target question indicates that processing the target question requires querying external information.
[0037] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to determine the first sub-response type corresponding to the target question when the target processing strategy corresponding to the target question is the first processing strategy, wherein the first processing strategy is used to answer the input question based on a preset answer; and to determine the target response content corresponding to the target question based on the first sub-response type corresponding to the target question.
[0038] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further configured to, when the first sub-response type corresponding to the target question indicates that the target question is a follow-up question on relevant information related to the target question, use the first reply content as the target reply content corresponding to the target question, and the first reply content is used to respond to and explain the target question in order to soothe emotions; when the first sub-response type corresponding to the target question indicates that the target question is a casual or meaningless question, use the second reply content as the target reply content corresponding to the target question, and the second reply content is a preset general reply.
[0039] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to obtain the retrieval recall information corresponding to the target question when the target processing strategy corresponding to the target question is the second processing strategy. The second processing strategy is used to determine the expression of the input question, and the retrieval recall information corresponding to the target question is obtained by querying external information. Based on the retrieval recall information corresponding to the target question and the relevant information corresponding to the target question, the third response content is used as the target response content corresponding to the target question. The third response content is used to determine the expression of the input question.
[0040] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to determine the intent information corresponding to the target question when the target processing strategy corresponding to the target question is the third processing strategy. The third processing strategy is used to process the input question based on the query information; and to determine the target response content corresponding to the target question based on the intent information corresponding to the target question.
[0041] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to determine the factor information corresponding to the target question when the intent information corresponding to the target question is a task-oriented intent. The factor information corresponding to the target question is the relevant option or information required to respond to the target question. Based on the factor information corresponding to the target question, the fourth response content is obtained, and the fourth response content is used as the target response content corresponding to the target question. The fourth response content is used to explain the input question through step operations.
[0042] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is also used to obtain a knowledge graph when the intent information corresponding to the target question is a consultative intent; and based on the knowledge graph, determine the target response content corresponding to the target question.
[0043] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to extract at least one target entity from the target question, map the target entity to a knowledge graph to obtain at least one target node; perform retrieval and sorting processing on the at least one target node to obtain the associated information corresponding to the target question; and determine the target response content corresponding to the target question based on the associated information corresponding to the target question.
[0044] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further used to use the fifth response content as the target response content corresponding to the target question when the intent information corresponding to the target question is a restricted intent. The fifth response content is used to refuse to answer the input question. The restricted intent represents a lack of relevant knowledge or relevant processing ability to process the input question.
[0045] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the acquisition module is further used to acquire a training set, which includes at least one data sample, and the data sample has label information; the determination module is further used to determine the predicted response content corresponding to the data sample using the large model to be trained; the device further includes an update module, which is used to update the model parameters of the large model at least once based on the predicted response content corresponding to the data sample and the label information of the data sample, to obtain a target large model, and the target large model is used to process the input problem.
[0046] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the acquisition module is further used to acquire at least one sample problem to obtain at least one statistical problem based on the sample problem. The sample problem is data processed as a single-round problem, and the statistical problem is unlabeled data with global representativeness and balanced distribution. The device also includes a generation module for generating label information corresponding to the statistical problem. A target statistical problem is selected from the statistical problems and used as a data sample in the training set. The target statistical problem is a problem that satisfies the self-consistency condition.
[0047] Thirdly, an electronic device is provided, including a memory and a processor, wherein the memory is used to store executable program code; and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the data processing method in the first aspect or any possible implementation thereof.
[0048] Fourthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the data processing method described in the first aspect or any possible implementation thereof.
[0049] Fifthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the data processing method described in the first aspect or any possible implementation thereof.
[0050] The method provided in this application determines a target processing strategy for the target problem by acquiring the target problem and related information. Based on the target processing strategy, it determines and outputs the target response content for the target problem. This method can determine the target processing strategy by combining the background information required to process the target problem, ensuring the strategy aligns with the needs of the target problem. Furthermore, the target response content generated through the target processing strategy accurately solves the target problem, effectively addressing the input question and improving the user experience. Moreover, the data processing method of this application is compatible with different usage scenarios, reducing human resource investment and saving labor costs for enterprises. The technical solution of this invention can be applied to transaction and delivery services on instant e-commerce platforms, such as Taobao Flash Sale, Taoxianda, Ele.me delivery, and retail. Attached Figure Description
[0051] Figure 1 This is a flowchart of an intelligent customer service system provided in an embodiment of this application;
[0052] Figure 2 This is an architecture diagram of an intelligent customer service system provided in an embodiment of this application;
[0053] Figure 3 This is a schematic diagram of a knowledge graph provided in an embodiment of this application;
[0054] Figure 4A This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 1 ;
[0055] Figure 4B This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 2 ;
[0056] Figure 4C This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 3 ;
[0057] Figure 4D This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application;
[0058] Figure 4E This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 5 ;
[0059] Figure 4F This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 6 ;
[0060] Figure 4GThis is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 7 ;
[0061] Figure 5 This is an illustrative flowchart of a data processing method provided in an embodiment of this application. Figure 1 ;
[0062] Figure 6 This is an illustrative flowchart of a data processing method provided in an embodiment of this application. Figure 2 ;
[0063] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0064] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0065] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0066] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0067] Before introducing the solutions of the embodiments of this application, the technical terms that may be involved in the embodiments of this application will be explained first.
[0068] Natural Language Processing (NLP) is an interdisciplinary field combining computer science, artificial intelligence (AI), and linguistics. Its aim is to enable computers to understand, interpret, and generate human language. The core goal of NLP is to use algorithms and models to allow machines to process natural language, including text and speech, just like humans, and to achieve effective communication between humans and machines. Specifically, NLP mainly includes Natural Language Understanding (NLU) and Natural Language Generation (NLG). The goal of NLU is to convert human language into a form that computers can process; the goal of NLG is to convert computer-generated information into natural language for output or interaction.
[0069] Large Language Models (LLMs) are artificial intelligence models designed to understand and generate human language. They are trained on massive amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. LLMs are characterized by their enormous scale, containing billions of parameters that help them learn complex patterns in language data. These models are typically based on deep learning architectures, such as transformers, which contributes to their impressive performance across various natural language processing tasks.
[0070] Retrieval-Augmented Generation (RAG) is a natural language processing technique that combines the capabilities of information retrieval and generative models to generate more accurate and informative answers or text. This approach is particularly effective in handling complex question-answering systems and knowledge-enhanced dialogue systems.
[0071] Artificial intelligence agents (AI agents) are intelligent systems that can perceive their environment, make decisions, and perform tasks. They typically improve their performance through learning and adaptation.
[0072] Supervised Fine-Tuning (SFT) is a method of supervising the fine-tuning of a pre-trained model to improve its performance on a specific task, using labeled data for training.
[0073] Reinforcement learning from human feedback (RLHF) is a machine learning method that optimizes the model's behavior through human-provided feedback, aiming to improve the model's performance on tasks that align with human values and preferences.
[0074] Direct Preference Optimization (DPO) is a method for fine-tuning large language models, aiming to directly optimize the model output to conform to human preferences without relying on complex reinforcement learning.
[0075] Before introducing the solutions of the embodiments of this application, we will first introduce the application scenarios of the embodiments of this application.
[0076] With the rapid development of artificial intelligence and natural language processing technologies, intelligent customer service systems based on real-time online interaction have been widely adopted across various industries. These systems significantly improve customer service response efficiency through environmental awareness, decision generation, and task execution capabilities.
[0077] Currently, businesses are investing heavily in building intelligent customer service systems to resolve customer issues online in real time. However, existing intelligent customer service systems still have significant limitations: after receiving the input question, these systems process it directly to obtain the output response, resulting in low accuracy in recognizing the intent behind the input question. This makes it difficult to uncover the user's true needs, hindering effective customer problem-solving and negatively impacting the user experience.
[0078] Therefore, for intelligent customer service systems, how to accurately process input questions in order to generate precise responses has become an urgent problem to be solved.
[0079] The following is combined with Figures 1 to 4G The data processing method provided in the embodiments of this application is described by way of example.
[0080] Figure 1 This is a flowchart of an intelligent customer service system provided in an embodiment of this application.
[0081] For example, after obtaining user question 101 (corresponding to the target question), user question 101 is input into front-end module 102, which can perform preliminary preprocessing on the input question. The user question 101 processed by front-end module 102 is then input into planning model 103. Planning model 103, combined with relevant information corresponding to user question 101, determines the target processing strategy corresponding to user question 101. Further, by combining the target processing strategy corresponding to user question 101, question generation model 112, problem location model 114, artificial factorization model 115, inquiry script generation model 116, and solution generation model 117, different target response contents are obtained, specifically including: first response content 110, second response content 111, third response content 113, fourth response content, fifth response content 118, and sixth response content 119. Question generation model 112 and problem location model 114 require relevant information corresponding to user question 101 and retrieval recall information 120 during use. Finally, the target response is input into the post-processor module 122 to obtain the final output answer 121 for the user. The post-processor module 122 is used to execute standard operating procedures and card rendering operations.
[0082] The fourth response content is obtained based on the artificial factorial slot model 115, the inquiry script generation model 116, and the solution generation model 117. The sixth response content 119 is obtained based on the retrieval recall information 120 and the relevant information corresponding to the user question 101. When the target response content is the second response content 111, the second response content 111 needs to be used again as the user question 101 to execute the workflow of the intelligent customer service system of this application. The relevant information corresponding to the user question 101 includes: context information 104, order information 105, and voice chat information 106. Among them, the voice chat information can be BCD voice chat, where B refers to the merchant, C refers to the user, and D refers to the rider. When the user question 101 is a follow-up question on the relevant information corresponding to the user question 101, the planning model 103 uses the first response content 110 as the target response content. When the user question 101 is casual conversation or a meaningless question, the planning model 103 uses the second response content 111 as the target response content.
[0083] Meanwhile, for the generation of retrieval recall information 120, firstly, a knowledge graph 108 is generated through the vector knowledge base 109. At the same time, the information fused from the knowledge documents related to user question 101 in the vector knowledge base 109, the relevant nodes obtained by graph query in the knowledge graph 108, and the relevant information corresponding to user question 101 is input into the recall model 107. The recall model 107 outputs retrieval recall information 120.
[0084] It should be noted that this intelligent customer service system consists of multiple models with different functions. The intelligent customer service system provided in this application can function in various practical application scenarios. It can achieve beneficial effects including, but not limited to, the following: clear intent recognition; accurate multi-turn dialogue and contextual semantic understanding; the ability to understand deep semantics and directly locate user intent; the ability to simultaneously recognize multiple pieces of information, including intent and slot information; the ability to jointly recognize context and simultaneously associate the user's question with the model's own response; the ability to understand incomplete expressions and provide guidance on responses to ambiguous expressions, etc.
[0085] Figure 2 This is an architecture diagram of an intelligent customer service system provided in an embodiment of this application.
[0086] For example, in the scenario of fewer dispatches, the agent 21 includes a planning layer 22, a memory layer 23, a tool layer 24, and an action layer 25. The planning layer 22 includes: self-reflection 221, self-improvement 222, sub-goal decomposition 223, and thought chain 224. The planning layer 22 is responsible for planning, breaking down tasks into multiple parallel or sequential sub-tasks for solution, with the goal of finding an optimal path to solve the problem through task planning. The memory layer 23 is responsible for memory, including long-term memory 231 and short-term memory 232. Short-term memory 232 includes context information, dialogue state information, etc., while long-term memory 231 includes a knowledge base, rule constraints, etc. The tool layer 24 is responsible for registering the capabilities of various external sub-tools. The capabilities of the agent are enriched through APIs. This scenario involves calling external APIs to retrieve additional information missing from the model weights. This primarily includes queries for factors such as rider online status (241), health certificate status (242), rider position (243), order acceptance rate (244), order rejection rate (245), "grayed" status (246), service rating (247), and other information (248). The action layer (25) includes calling API services (251) and generating solutions (252), responsible for the final solution output.
[0087] It should be noted that, Figure 2 The provided architecture diagram of the intelligent customer service system is the specific architecture in the scenario where riders have few orders. In different use cases, the architecture of the intelligent customer service system includes a planning layer 22, a memory layer 23, a tool layer 24, and an action layer 25. However, since different scenarios require different external sub-tools, the external APIs called by the tool layer 24 are different.
[0088] Figure 3 This is a schematic diagram of a knowledge graph provided in an embodiment of this application.
[0089] For example, knowledge graph 108 has multiple nodes, each corresponding to an entity. The relationships between entities are connected by "lines," ultimately forming knowledge graph 108. Taking node 32 as an example, node 32 is connected to other nodes in knowledge graph 108 by dark-colored lines and light-colored lines. Dark-colored lines represent strong associations, and light-colored lines represent weak associations.
[0090] Figure 4A This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 1 .
[0091] For example, the first interface 41 is a specific use case where dialogue takes place before a call is initiated. The relevant technology in BCD voice chat does not provide a solution, nor does it offer possible solutions after the user enters the intelligent customer service system, requiring repeated problem identification. The data processing method in this application, within BCD voice chat, determines the user's inquiry scenario in real time and provides solutions such as refunds and compensation for scenarios that may not be the user's responsibility, thereby reducing the number of user calls.
[0092] Figure 4B This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 2 .
[0093] For example, the second interface 42 is a specific use case for multi-turn dialogues. Related technologies directly execute standard operating procedures (SOPs) in multi-turn dialogues, which lack a human-like feel. The data processing method of this application, in multi-turn dialogues, confirms the problem by asking questions, and executes the standard operating procedure after the problem is located, thereby improving the accuracy of executing the standard operating procedure.
[0094] Figure 4C This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 3 .
[0095] For example, the third interface 43 is a specific use case for handling long-tail problems. Related technologies for long-tail problems still follow a process of asking questions, confirming, and executing standard operating procedures, which can lead to errors in problem identification. The data processing method in this application, when handling long-tail problems, first clarifies the user's question by asking questions, and then locates the standard operating procedure after the user clarifies the issue.
[0096] Figure 4D This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application.
[0097] For example, the fourth interface 44 represents a specific use case for handling extra-domain issues. Related technologies still tend to ask questions without providing answers to extra-domain issues, which can lead to incorrect responses. The data processing method in this application, when handling extra-domain issues, clearly identifies when knowledge is beyond the scope and guides the user to describe the business problem through questioning.
[0098] Figure 4E This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 5 .
[0099] For example, the fifth interface 45 represents a specific use case for skipping manual factors. Related technologies lack the ability to skip manual factors, and after selecting a manual factor, the user's request needs to be described repeatedly. The data processing method in this application optimizes the standard operating procedure flow, directly adjusting the branches of the previous manual factors into individual knowledge points. This allows the corresponding standard operating procedure to be executed directly once the large language model successfully locates the knowledge.
[0100] Figure 4F This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 6 .
[0101] For example, interfaces 46 and 47 are specific use cases for generative responses generated based on search enhancement. The related technologies employ a question localization process and do not support generative responses. Even with search enhancement based on Frequently Asked Questions (FAQs) and documents, the responses are not intelligent enough. The data processing method in this application supports generative responses generated based on search enhancement in consultation scenarios, allowing users to trigger more detailed explanations by clicking within the answers.
[0102] Figure 4G This is a schematic diagram of an interface for outputting target response content provided in an embodiment of this application. Figure 7 .
[0103] For example, the eighth interface 48 is a specific use case of generative shortcut phrases. Related technologies replace shortcut phrases with card-mode interaction, retaining only order selection or shortcut phrase selection. The data processing method of this application upgrades shortcut phrases to a more expressive and interactive card mode, improving the user experience.
[0104] The above embodiments combined Figures 1 to 4G This paper introduces the execution logic and specific results of the data processing method from the perspectives of interaction and user interface. The following will combine... Figure 5 This section introduces the underlying implementation process upon which this method depends.
[0105] Figure 5This is an illustrative flowchart of a data processing method provided in an embodiment of this application. Figure 1 It should be understood that this method 500 can be applied to electronic devices such as mobile phones, tablets, and in-vehicle devices; the embodiments of this application do not limit the type of electronic device. For example, such as... Figure 5 As shown, the data processing method 500 includes the following steps.
[0106] 501. Obtain the target problem and the relevant information corresponding to the target problem. Based on the target problem and the relevant information corresponding to the target problem, determine the target processing strategy corresponding to the target problem. The relevant information corresponding to the target problem is the background information for processing the target problem.
[0107] The target question refers to the data input into the intelligent customer service system. In some embodiments, the target question is retrieved in response to receiving input information at the target user interface (UI). The target user interface is the user interface of the target application equipped with the intelligent customer service system. The relevant information corresponding to the target question is the relevant background information needed in the process of processing the target question. In some embodiments, the relevant information corresponding to the target question is read from the intelligent customer service system. The relevant information corresponding to the target question may include, but is not limited to, at least one of the following: context information, order information, voice chat information, etc. Context information refers to information such as historical dialogue records, current session status, and environmental parameters during the interaction between the user and the intelligent customer service system. Environmental parameters may include, but are not limited to, at least one of the following: time, device, geographical location, etc. Order information may include, but is not limited to, at least one of the following: order number, product details, payment status, logistics trajectory, etc. Voice chat information refers to the historical dialogue generated by the target object related to the intelligent customer service system. The target object can be any suitable object, such as a merchant, user, rider, etc. The target processing strategy is the strategy adopted to process the target question. In some embodiments, the target processing strategy includes, but is not limited to, one of the following: a first processing strategy, a second processing strategy, a third processing strategy, etc. The first processing strategy is used to answer the input question based on a preset answer. The second processing strategy is used to determine the wording of the input question. The third processing strategy is used to process the input question based on the information from the query. In some embodiments, the target processing strategies for different target questions may be the same or different.
[0108] 502. Based on the target processing strategy corresponding to the target question, determine the target response content corresponding to the target question.
[0109] The target response content refers to the data obtained by processing the target question based on the target processing strategy. In some embodiments, the intelligent customer service system consists of multiple models, each with different functions. These multiple models include a question generation model and a question localization model, which correspond to different target processing strategies. The target response content corresponding to the target question can be determined through the question generation model and the question localization model.
[0110] 503, Output the target response content.
[0111] Because the target response content is determined based on both the target question and the corresponding target processing strategy, it allows for the selection and implementation of appropriate target processing strategies for the target question. This results in outputting data that more closely reflects the user's intent when delivering the target response content.
[0112] The method provided in this application determines a target processing strategy for the target problem by acquiring the target problem and related information. Based on the target processing strategy, it determines and outputs the target response content for the target problem. This method can determine the target processing strategy by combining the background information required to process the target problem, ensuring the strategy aligns with the needs of the target problem. Furthermore, the target response content generated through the target processing strategy accurately solves the target problem, effectively addressing the input question and improving the user experience. Moreover, the data processing method of this application is compatible with different usage scenarios, reducing human resource investment and saving labor costs for enterprises.
[0113] It should be noted that steps 501-503 above are a simplified description of the data processing method provided in the embodiments of this application. The data processing method provided in the embodiments of this application will be described in more detail below with reference to some examples. See [link to relevant documentation]. Figure 6 , Figure 6 This is an illustrative flowchart of a data processing method provided in an embodiment of this application. Figure 2 .
[0114] It should be understood that this method 600 can be applied to electronic devices such as mobile phones, tablets, and in-vehicle devices; the embodiments of this application do not limit the type of electronic device. For example, such as... Figure 6 As shown, the data processing method 600 includes the following steps.
[0115] 601. Obtain the target problem and the relevant information corresponding to the target problem. Based on the target problem and the relevant information corresponding to the target problem, determine the response type of the target problem. The response type of the target problem is used to characterize the way to handle the target problem.
[0116] Here, the target question refers to the data input into the intelligent customer service system. In some embodiments, the target question is obtained in response to receiving input information in the target user interface. The target user interface is the user interface in a target application that carries the intelligent customer service system. For example, in response to a user entering and sending text data in a dialog box of the target user interface, the text data is treated as received input information to obtain the target question.
[0117] In some embodiments, the target question is the data input to the target application. The target question can be generated by any suitable target object, such as a merchant, user, or delivery rider. The target question can be of any suitable type, such as audio data or text data. This application does not limit the type of target question.
[0118] In some embodiments, the target problem is acquired through sensors in an electronic device. Sensors may include, but are not limited to, cameras, microphones, etc. Listening events for the sensors can be set, and the target problem can then be acquired in real time through these listening events.
[0119] The relevant information corresponding to the target question is the background information needed in the process of handling the target question. In some embodiments, the relevant information corresponding to the target question is read from the intelligent customer service system. The relevant information corresponding to the target question may include, but is not limited to, at least one of the following: context information, order information, voice chat information, etc. Context information refers to information such as historical dialogue records, current session status, and environmental parameters during the interaction between the user and the intelligent customer service system. Environmental parameters may include, but are not limited to, at least one of the following: time, device, geographical location, etc. Order information may include, but is not limited to, at least one of the following: order number, product details, payment status, logistics trajectory, etc. Voice chat information refers to historical dialogues generated by the target object related to the intelligent customer service system. The target object can be any suitable object, such as a merchant, user, or delivery rider.
[0120] The response type of a target question characterizes the way the target question is handled. In some embodiments, the content characterized by the response type of a target question may include, but is not limited to: the target question has a preset standard answer, the target question is vaguely worded, or the target question requires querying external information. In some embodiments, the intelligent customer service system consists of multiple models, each with different functions. Among the multiple models is a planning model, which can determine the response type of the target question based on the target question and its corresponding related information.
[0121] In some embodiments, the response type of the target problem is obtained by querying the first relational table using the target problem and the relevant information corresponding to the target problem.
[0122] The first relational table stores multiple target questions, their corresponding related information, and the response types for each target question and its corresponding related information. By querying the first relational table using the target question and its corresponding related information, the response type of the target question can be obtained. This first relational table is defined by a technician based on actual conditions; this embodiment does not limit its definition.
[0123] 602. Based on the response type of the target problem, determine the target processing strategy corresponding to the target problem.
[0124] The target processing strategy is the strategy employed to process the target question. In some embodiments, the target processing strategy includes, but is not limited to, one of the following: a first processing strategy, a second processing strategy, and a third processing strategy. The first processing strategy is used to answer the input question based on a preset answer. The second processing strategy is used to determine the wording of the input question. The third processing strategy is used to process the input question based on query information. In some embodiments, the target processing strategies corresponding to different target questions may be the same or different.
[0125] In some embodiments, the target problem's response type is used to query a second relational table to obtain the target processing strategy corresponding to the target problem.
[0126] The second relation table stores the response types of multiple target problems and the corresponding target processing strategies for each response type. By querying the second relation table using the response type of a target problem, the target processing strategy corresponding to the target problem can be obtained. This second relation table is labeled by technicians according to actual conditions, and this embodiment of the application does not limit it.
[0127] In this implementation, the target processing strategy corresponding to the target problem is further determined by the response type of the target problem. The target processing strategy can be flexibly selected according to different response types, thereby improving the accuracy of processing the target problem.
[0128] In one possible implementation, if the response type of the target question indicates that there is a preset standard answer, a first processing strategy is adopted as the target processing strategy corresponding to the target question, and the first processing strategy is used to answer the input question based on the preset answer. If the response type of the target question indicates that the expression of the target question is ambiguous, a second processing strategy is adopted as the target processing strategy corresponding to the target question, and the second processing strategy is used to determine the expression of the input question. If the response type of the target question indicates that processing the target question requires querying external information, a third processing strategy is adopted as the target processing strategy corresponding to the target question, and the third processing strategy is used to process the input question based on the queried information.
[0129] To provide a clearer explanation of the above implementation methods, the process of determining the target processing strategy corresponding to the target problem in the above implementation methods will be described in three parts below.
[0130] Part 1: When the response type of the target problem indicates that there is a preset standard answer to the target problem, the first processing strategy shall be used as the target processing strategy corresponding to the target problem.
[0131] Specifically, the planning model in the intelligent customer service system determines the specific content of the response type representation of the target question, and then determines the target processing strategy corresponding to the target question based on the specific content of the response type representation. When the response type representation of the target question indicates that there is a preset standard answer, the target processing strategy aims to process the target response content to include the preset answer. Since the first processing strategy is used to answer the input question based on the preset answer, the first processing strategy that matches the response type of the current target question is taken as the target processing strategy corresponding to the target question.
[0132] For example, the target question is: "How do I order takeout?". The intelligent customer service system stores a preset standard answer to the target question. If the response type of the target question indicates that the target question has a preset standard answer, then the first processing strategy is used as the target processing strategy corresponding to the target question.
[0133] Part Two: When the description of the target problem is ambiguous in the response type representation of the target problem, the second processing strategy shall be taken as the target processing strategy corresponding to the target problem.
[0134] In cases where the response type of the target question is ambiguous in representing the description of the target question, the role of the target processing strategy is to process the target response content into content that includes the description of the user. Since the second processing strategy is a strategy used to determine the description of the input question, the second processing strategy is used as the target processing strategy corresponding to the target question.
[0135] For example, if the target question is: "Is this restaurant planning to make me eat hand-grabbed rice?", the intelligent customer service system cannot determine the specific content of the target question. The response type of the target question indicates that the target question is vague. In this case, the second processing strategy is used as the target processing strategy corresponding to the target question.
[0136] Part Three: When the response type of the target problem requires querying external information, the third processing strategy shall be used as the target processing strategy corresponding to the target problem.
[0137] In the case where the response type of the target problem represents the need to query external information to process the target problem, the role of the target processing strategy is to process the target response content into content containing the queried external information. Since the third processing strategy is a strategy for processing the input problem based on the queried information, the third processing strategy is used as the target processing strategy corresponding to the target problem.
[0138] For example, the target question is: "Your customer service is very good, how can I praise you?" The intelligent customer service system does not store the information needed to process the target question. The response type of the target question indicates that processing the target question requires querying external information. In this case, the third processing strategy is used as the target processing strategy corresponding to the target question.
[0139] In this implementation, the target processing strategy can be selected according to different situations to suit the response type of the target problem during the actual processing of the target problem, which improves the flexibility of handling the target problem. At the same time, more response types for the target problem can be further expanded according to the actual situation to be compatible with more real-world scenarios.
[0140] 603. Based on the target processing strategy corresponding to the target question, determine the target response content corresponding to the target question.
[0141] The target response content refers to the data obtained by processing the target question based on the target processing strategy. In some embodiments, the intelligent customer service system consists of multiple models, each with different functions. These multiple models include a question generation model and a question localization model, which correspond to different target processing strategies. The target response content corresponding to the target question can be determined through the question generation model and the question localization model.
[0142] In one possible implementation, when the target processing strategy corresponding to the target question is a first processing strategy, a first sub-response type corresponding to the target question is determined, and the first processing strategy is used to answer the input question based on a preset answer; based on the first sub-response type corresponding to the target question, the target response content corresponding to the target question is determined.
[0143] The target processing strategy is the strategy employed to process the target problem. The first processing strategy is used to answer the input question based on a preset answer. The target response content refers to the data obtained by processing the target problem based on the target processing strategy.
[0144] It should be noted that when the target processing strategy corresponding to the target problem is the first processing strategy, the response type of the target problem can be further refined into different first sub-response types to accurately process the target problem. Therefore, the first sub-response type is the response type of the target problem that needs to be further determined when the target processing strategy corresponding to the target problem is the first processing strategy. In some embodiments, the content represented by the first sub-response type corresponding to the target problem may include, but is not limited to: the target problem being a follow-up question about relevant information, or the target problem being casual conversation or a meaningless question.
[0145] In some embodiments, the target question and its corresponding related information are analyzed to determine the first sub-response type corresponding to the target question. The related information corresponding to the target question may include, but is not limited to, at least one of the following: context information, order information, voice chat information, etc.
[0146] In some embodiments, if the target processing strategy corresponding to the target problem is a first processing strategy, the target problem is further processed to determine a first sub-response type corresponding to the target problem. In implementation, the target problem can be processed using natural language understanding to determine the first sub-response type corresponding to the target problem. Natural language understanding aims to enable computers to understand and infer the meaning and intent of human language.
[0147] In some embodiments, a corresponding target rule base can be set for different first sub-response types. The target rule base stores multiple target questions and the target response content corresponding to each target question. After determining the first sub-response type corresponding to the target question, the target question is queried in the target rule base corresponding to the first sub-response type to determine the target response content corresponding to the target question.
[0148] In this implementation, when the target processing strategy corresponding to the target problem is the first processing strategy, the target response content corresponding to the target problem is further determined by the determined first sub-response type. This refines the different actual situations of adopting the first processing strategy and can output target response content that fits the user's intent more accurately.
[0149] In one possible implementation, if the first sub-response type corresponding to the target question indicates that the target question is a follow-up inquiry about relevant information, the first response content is used as the target response content for the target question. This first response content is used to respond to and explain the target question to provide emotional reassurance. If the first sub-response type corresponding to the target question indicates that the target question is casual conversation or a meaningless question, the second response content is used as the target response content for the target question. This second response content is a pre-defined, general response.
[0150] To provide a clearer explanation of the above implementation methods, the process of determining the target response content corresponding to the target question in the above implementation methods will be described in two parts below.
[0151] Part 1: When the first sub-response type corresponding to the target question indicates that the target question is a follow-up question for relevant information, the content of the first response shall be taken as the target response content corresponding to the target question.
[0152] The first response is used to address and explain the target question in order to soothe emotions. When the first sub-response type corresponding to the target question indicates that the target question is a follow-up inquiry about relevant information, the target response serves to respond to the follow-up inquiry. Since the first response is used to address and explain the target question in order to soothe emotions, it is considered the target processing strategy for the target question.
[0153] For example, the target question is: "How do I transfer to a human customer service representative?". The relevant information for this target question includes the following: "{User input: I'm speechless, are your delivery riders like this?}{Intelligent customer service system reply: We are very sorry for the inconvenience. For your safety and property, we suggest you seek help from your local government and contact customer service for assistance.}" This indicates that the target question is a follow-up inquiry into the relevant information for transferring to a human customer service representative. This satisfies the first sub-response type characteristic of the target question, which indicates that the target question is a follow-up inquiry into the relevant information for the target question. Therefore, the first reply content is taken as the target reply content for the target question. The first reply content could be: "You can click 'My - My Customer Service - Online Customer Service' on the mobile application, enter 'human customer service representative', and access human customer service."
[0154] Part Two: When the first sub-response type corresponding to the target question indicates that the target question is casual conversation or a meaningless question, the second response content will be used as the target response content corresponding to the target question.
[0155] The second response is a pre-defined, general response. When the first sub-response type corresponding to the target question indicates that the target question is casual or meaningless, the target response serves to address the target question with pre-defined content. Since the second response is a pre-defined, general response, it is used as the target processing strategy for the target question.
[0156] For example, if the target question is "What do you like?", it can be determined that the target question is a meaningless question. The first sub-response type corresponding to the target question indicates that the target question is casual conversation or a meaningless question. The second response content is then used as the target response content corresponding to the target question. The second response content could be: "Little E likes to help you solve any problems you encounter. You can always contact me if you have any questions~".
[0157] In this implementation, the first or second response content is determined as the target response content corresponding to the target question by different first sub-response types. This refines the execution of the first processing strategy, improving its accuracy.
[0158] In one possible implementation, when the target processing strategy corresponding to the target question is the second processing strategy, the retrieval recall information corresponding to the target question is obtained. The second processing strategy is used to determine the expression of the input question. The retrieval recall information corresponding to the target question is obtained by querying external information. Based on the retrieval recall information corresponding to the target question and the relevant information corresponding to the target question, the third response content is used as the target response content corresponding to the target question. The third response content is used to determine the expression of the input question.
[0159] The target processing strategy is the strategy adopted to process the target question. The second processing strategy is used to determine the expression of the input question. The target response content refers to the data obtained by processing the target question based on the target processing strategy. The retrieval recall information corresponding to the target question refers to the information retrieved by the intelligent customer service system from the knowledge base or historical sessions based on the target question. The third response content is used to determine the expression of the input question. In some embodiments, the third response content is in the form of a rhetorical question.
[0160] In some embodiments, the retrieval recall information corresponding to the target question is obtained by querying external information. The intelligent customer service system consists of multiple models, each with different functions. Among these models are a recall model and a counter-question generation model. The recall model can obtain retrieval recall information based on the target question, while the counter-question generation model can generate third-party response content based on the retrieval recall information corresponding to the target question and related information.
[0161] For example, the target problem is: "I just ordered snail rice noodles, but the duck feet snail rice noodles didn't include duck feet, and the container was damaged." After analysis, the intelligent customer service system determines that the target processing strategy corresponding to the target problem is the second processing strategy. It further obtains the retrieval information corresponding to the target problem. Based on the retrieval information and related information, the system selects the third response as the target response content. The third response content could be: "Hello, which of the following types of problems are you currently encountering?"
[0162] In this implementation, when the target processing strategy corresponding to the target question is the second processing strategy, the third response content is used as the target response content corresponding to the target question by obtaining the retrieval information and related information corresponding to the target question. This can accurately determine the expression of the input question by combining external information, reduce the number of data processing operations, and improve the user experience.
[0163] In one possible implementation, when the target processing strategy corresponding to the target question is the third processing strategy, the intent information corresponding to the target question is determined, and the third processing strategy is used to process the input question based on the query information; based on the intent information corresponding to the target question, the target response content corresponding to the target question is determined.
[0164] The target processing strategy is the strategy adopted to process the target problem. The third processing strategy is used to process the input problem based on the query information. The target response content refers to the data obtained by processing the target problem based on the target processing strategy. The intent information corresponding to the target problem refers to the need or purpose expressed by the target problem. In some embodiments, the intent information corresponding to the target problem includes, but is not limited to, one of the following: task-oriented intent, consultation-oriented intent, and restricted intent. Restricted intent indicates a lack of relevant knowledge or processing ability to process the input problem.
[0165] In some embodiments, the intelligent customer service system comprises multiple models, each with different functions. These models include a problem localization model, which can be used to determine the intent information corresponding to a target problem.
[0166] In some embodiments, when the target processing strategy corresponding to the target question is the third processing strategy, retrieval recall information corresponding to the target question is obtained. Based on the retrieval recall information and related information corresponding to the target question, intent information corresponding to the target question is determined. Here, the retrieval recall information corresponding to the target question refers to the information retrieved by the intelligent customer service system from a knowledge base or historical sessions based on the target question.
[0167] In some embodiments, a corresponding target rule base can be set for the intent information corresponding to different target questions. The target rule base stores multiple target questions and the target response content corresponding to each target question. After determining the intent information corresponding to the target question, the target question is queried in the target rule base corresponding to the intent information of the target question, thereby determining the target response content corresponding to the target question.
[0168] In this implementation, when the target processing strategy corresponding to the target question is the third processing strategy, the target response content corresponding to the target question is determined by the intent information corresponding to the target question, thereby outputting response content that is closer to the user's intent and improving the user experience.
[0169] In one possible implementation, when the intent information corresponding to the target question is a task-oriented intent, factor information corresponding to the target question is determined. The factor information corresponding to the target question is the relevant options or information required to respond to the target question. Based on the factor information corresponding to the target question, a fourth response content is obtained. The fourth response content is used as the target response content corresponding to the target question. The fourth response content is used to explain the input question through step operations.
[0170] Here, task-oriented intent refers to the user's intention to obtain information containing operational procedures and steps. Factor information corresponding to the target question refers to the relevant options or information required to respond to the target question. In some embodiments, retrieval recall information corresponding to the target question is obtained to determine the factor information corresponding to the target question based on the retrieval recall information. The retrieval recall information corresponding to the target question is obtained by querying external information. The fourth response content is used to explain the input question through step-by-step operations.
[0171] In some embodiments, the intelligent customer service system comprises multiple models, each with different functions. These models include a human factor filling model, an inquiry script generation model, and a solution generation model. These models can fill in the gaps in the factor information corresponding to the target question to obtain a fourth response based on that factor information. Slot filling refers to the process of completing information to translate the user's intent into explicit instructions.
[0172] In some embodiments, factor information corresponding to the target problem is determined from external knowledge based on Chain-of-Thought (COT). Chain-of-Thought is a method for extracting structured logic from raw data through step-by-step reasoning. This process enables the artificial factor filling model to automatically fill in artificial factors, reduces user path selection, utilizes natural language interaction methods as much as possible, and minimizes the number of invalid user interactions.
[0173] For example, the target question is: "How to make a password-free payment?". The intelligent customer service system confirms that the intent information corresponding to the target question is a task-oriented intent. Through the information stored in the intelligent customer service system and the retrieval recall information corresponding to the target question, the relevant operation steps for password-free payment are obtained to determine the factor information corresponding to the target question. Based on the factor information corresponding to the target question, the fourth response content is used as the target response content corresponding to the target question. The fourth response content could be: "Hello, you can go to the application - [My] - [Settings in the upper right corner] - [Account and Security] - [Small Amount Password-Free Payment] to activate password-free payment~".
[0174] Furthermore, for intelligent customer service systems, examples including prompts and specific processing procedures are as follows:
[0175] You are a food delivery customer service robot named Xiao E, not a human customer service representative. Your task is to identify user intent. Different intents have different slots to collect. After collection, you will organize the user intent into a lightweight data exchange format (JavaScript Object Notation, JSON). You cannot directly reply to users. Your reply must include four parts: Think, Search, Fill, and Act, as well as two parts: Reply and Final.
[0176] The following is the configuration information for the candidate intents. You need to reiterate the configuration information corresponding to the identified intents during the thinking phase:
[0177] meaning Figure 1 - Order Timeout: {"Intent": "Order Timeout", "Slot and Candidate Value": <{> "Has the User Received the Goods": ["Received", "Not Received"]}}
[0178] meaning Figure 2 - Order cancellation: {"Intent": "Order cancellation", "Slot and candidate value": {"Has the user received the product?": ["Received", "Not received"]}}
[0179] meaning Figure 3- Complain about rider: {"Intent": "Complain about rider", "Slot and candidate value": {"Reason for complaint": ["Poor rider service attitude", "Rider delivered to the wrong place", "Rider delivered ahead of schedule", "Rider did not deliver to the door"], "Did the user receive the goods": ["Received", "Not received"]}}
[0180] Intent 4 - Complain about Merchant: {"Intent": "Complain about Merchant", "Slot and Candidate Value": {"Reason for Complaint": ["Poor service attitude of the merchant", "Merchant harasses / intimidates / assaults the user", "Merchant requests to modify the takeout review", "Merchant cancels the order"]}}
[0181] meaning Figure 5 -Complaint about food quality issues: {"Intent": "Complaint about food quality issues", "Slot and candidate value": "Reason for complaint": ["Not tasty", "Caused physical discomfort (medical treatment sought)", "Caused physical discomfort (medical treatment sought)", "Spoiled or contained foreign objects", "Food melted"]}}
[0182] meaning Figure 6 -Complaint about incorrect or missing food items: {"Intent": "Complaint about incorrect or missing food items", "Slot and Candidate Values": {"Reason for Complaint": ["Missing tableware", "Merchant missed delivering food", "Rider delivered the wrong food", "Food spilled / damaged", "Food portion too small"]}}
[0183] You must strictly adhere to the following principles:
[0184] 1. Your response must include six parts: Thinking, Search, Fill, Action, Response, and Result. In the Thinking module, you need to identify the user's intent and describe the identification process. In the Search module, you must restate the identified intent, configure the corresponding lightweight data exchange format, and determine the slots to be filled. The Fill module attempts to fill the empty slots obtained from the Search module based on the current context. The Action module determines whether to generate a response or a result based on the slot filling situation. Only one of the Response and Result modules is displayed. The Response is the text you send to the user {e.g., supplementing intent, slot information, etc.}. When intent collection is incomplete, the Response is displayed to prompt the user for follow-up. If all intents are collected, the Result module is displayed. In this section, the intent slot information is output in a lightweight data exchange format, for example: {"Intent": "Order Timeout", "Slot Value": {"Did the user receive the goods?": "Not received"}}
[0185] 2. When replying to users, do not use technical terms such as "intention" or "slot". Use plain and polite language to ask questions to users.
[0186] 3. Some intent slots are configured with enumeration candidates, which may differ from the user's expression. The user's expression needs to be converted into one of the enumeration values. If it cannot be converted, you can summarize a new expression yourself.
[0187] 4. When performing slot filling, first recall the relevant information provided in the user's context, then determine whether the original text provides information to fill the slot, and prioritize using existing information to fill the slot, avoiding repeatedly asking the user.
[0188] 5. When generating a response, if the user's current question is off-topic or the user is emotionally agitated, it is necessary to calm them down and try to steer the conversation back to collecting their needs.
[0189] In this implementation, when the intent information corresponding to the target question is a task-oriented intent, the obtained fourth response content is used as the target response content corresponding to the target question based on the factor information corresponding to the target question. This can output step operation explanations to illustrate the input question, thereby improving the relevance and accuracy of the target response content.
[0190] In one possible implementation, if the intent information corresponding to the target question is a consultative intent, a knowledge graph is obtained; based on the knowledge graph, the target response content corresponding to the target question is determined.
[0191] Consultative intent refers to a user's intention to obtain information, advice, or knowledge, without involving specific operational processes or steps. A knowledge graph is a structured semantic knowledge base used to rapidly describe concepts and their relationships in the physical world.
[0192] In some embodiments, the knowledge graph construction process is as follows: prepare knowledge base documents and knowledge points structured in question-and-answer format; divide the long texts in the above knowledge into blocks; perform vectorization, entity extraction, and relation summary steps on each block of text in sequence. During this process, each relation is scored to indicate its closeness; cluster entities and relations to form communities based on their closeness, generate community reports, aggregate scores, etc., and merge them into a graph knowledge base to construct the knowledge graph.
[0193] In some embodiments, when determining the target response content corresponding to a target question based on a knowledge graph, firstly, the target question is semantically parsed to identify key entities and relationships within it. Then, the nodes and edges directly or indirectly associated with these key entities are queried through the knowledge graph's graph structure to locate the subgraph related to the question. Next, structured information is extracted from the subgraph by combining contextual information and converted into a natural language response to obtain the target response content corresponding to the target question.
[0194] In this implementation, when the intent information corresponding to the target question is a consultative intent, the target response content corresponding to the target question is determined based on the acquired knowledge graph. The response content can be output by combining external information, thereby improving the accuracy of the target response content.
[0195] In one possible implementation, at least one target entity is extracted from the target question, and this target entity is mapped to a knowledge graph to obtain at least one target node. The at least one target node is then searched and sorted to obtain the associated information corresponding to the target question. Based on the associated information, the target response content corresponding to the target question is determined.
[0196] To provide a clearer explanation of the above implementation methods, the process of determining the target response content corresponding to the target question in the above implementation methods will be described in three parts below.
[0197] The first part involves extracting at least one target entity from the target problem and mapping the target entity to a knowledge graph to obtain at least one target node.
[0198] In a knowledge graph, an entity is the basic unit, representing an object in the real world, such as a person, place, or organization. A target entity is an entity extracted from a target question. In some embodiments, there is at least one target entity. A node is the basic unit for representing and storing detailed information about an entity; each node typically represents an object in the real world, such as a person, place, organization, or other concept. A target node is the node corresponding to a target entity.
[0199] In some embodiments, at least one target entity is extracted from the target question using Named Entity Recognition (NER). Entity recognition is the process of identifying specific entities from unstructured text data. Further, the extracted target entity is aligned with nodes in a knowledge graph, and the target entity is mapped to the knowledge graph using methods such as disambiguation and synonym transformation to obtain at least one target node.
[0200] The second part involves retrieving and sorting at least one target node to obtain the associated information corresponding to the target question.
[0201] The associated information corresponding to the target question is information that is related to the target node. In some embodiments, for each target node with at least one target node, graph retrieval processing is performed to determine the target similarity between the target node and multiple nodes in the knowledge graph, and then the target similarity is sorted to obtain the associated information corresponding to the target question.
[0202] In some embodiments, nodes with a target similarity greater than or equal to a similarity threshold are selected as candidate nodes, and the information corresponding to the candidate nodes is used as the associated information corresponding to the target question. The similarity threshold can be any suitable value, such as 85%, 90%, etc. In some embodiments, the target similarity is sorted, and the nodes with the top N target similarities are selected as candidate nodes, and the information corresponding to the candidate nodes is used as the associated information corresponding to the target question. N can be any suitable positive integer, such as 5, 3, etc.
[0203] In some embodiments, target similarity is determined using a similarity calculation algorithm. This similarity calculation algorithm may include, but is not limited to, cosine similarity (CS) and Euclidean distance (ED). For example, the cosine similarity algorithm calculates the cosine of the angle between the target node and multiple nodes in the knowledge graph, and uses this cosine as the target similarity. As another example, the Euclidean distance algorithm calculates the distance between the target node and multiple nodes in the knowledge graph, and uses this distance as the target similarity.
[0204] Part Three: Based on the relevant information corresponding to the target question, determine the target response content corresponding to the target question.
[0205] The target response content refers to the data obtained by processing the target question based on the target processing strategy. The associated information corresponding to the target question is information that is related to the target node.
[0206] In some embodiments, based on the associated information corresponding to the target question, and then combining the context of the target question with the semantic logic of the knowledge graph, the associated information corresponding to the target question is organized into a coherent answer framework. Then, using NLG technology, the answer framework is transformed into text that conforms to the user's expression habits to determine the target response content corresponding to the target question. The semantic logic of the knowledge graph may include, but is not limited to, one of the following: causal relationships, hierarchical classification, etc.
[0207] In some embodiments, multiple-path recall is performed, and at least one target node is subjected to multiple retrieval and sorting processes to obtain the associated information corresponding to the target question multiple times. Then, the associated information corresponding to all target questions is filtered and combined to determine the target response content corresponding to the target question.
[0208] It should be noted that since the related information for the target question is obtained through coarse recall text obtained by retrieval and sorting, it can be further refined according to user habits and preferences to determine the target response content for the target question. This allows the target response content to provide personalized services to different users. Specifically, the refined ranking involves scoring and sorting the related information for the target question in detail, and then filtering the related information again to obtain the target response content for the target question.
[0209] In this implementation, based on the target nodes extracted and mapped from the target question, the associated information corresponding to the target question is obtained. Based on the associated information corresponding to the target question, the target response content corresponding to the target question is determined, which can accurately locate the content related to the target question and further improve the accuracy of the target response content.
[0210] In one possible implementation, when the intent information corresponding to the target question is a restricted intent, the fifth response content is used as the target response content corresponding to the target question. The fifth response content is used to refuse to answer the input question. The restricted intent indicates a lack of relevant knowledge or processing ability to process the input question.
[0211] In this context, the intent information corresponding to the target question refers to the need or purpose expressed by the target question. Restricted intent indicates a lack of relevant knowledge or processing ability to handle the input question. The fifth response is used to refuse to answer the input question.
[0212] For example, if the target question is "I want to buy a lottery ticket," it can be determined that there is a lack of relevant knowledge or processing ability to address the target question. Therefore, the intent information corresponding to the target question is a restricted intent, and the fifth response content is chosen as the target response content for the target question. The fifth response content could be: "Sorry, I don't quite understand what you mean. Could you try asking me another question?"
[0213] In this implementation, when the intent information corresponding to the target question is a restricted intent, the fifth response content is used as the target response content corresponding to the target question. This can refuse to answer the input question, improve the ability to reject sensitive topics, and enhance the security of the target response content.
[0214] 604, output the target response content.
[0215] Because the target response content is determined based on both the target question and the corresponding target processing strategy, it allows for the selection and implementation of appropriate target processing strategies for the target question. This results in outputting data that more closely reflects the user's intent when delivering the target response content.
[0216] It should be noted that since the target response content is determined based on different target processing strategies, various forms of data, including image data and text data, can be used as data in the target response content during the generation process. Therefore, the final output target response content can include various forms of data, such as image data and text data.
[0217] In one possible implementation, a training set is obtained, which includes at least one data sample with label information. Using the large model to be trained, the predicted response content corresponding to the data sample is determined. Based on the predicted response content and the label information of the data sample, the model parameters of the large model are updated at least once to obtain a target large model, which is used to process the input problem.
[0218] To provide a clearer explanation of the above implementation methods, the process of training a large model in the above implementation methods will be described in three parts below.
[0219] Part 1: Obtain the training set. The training set includes at least one data sample, and the data sample has label information.
[0220] The training set is the dataset used to train the model. The training set includes at least one data sample, and each data sample has a label. The label information of a data sample refers to the response to the question in that data sample.
[0221] In some embodiments, methods for obtaining the training set include, but are not limited to, data collection and web crawling. A web crawler is a program or script that automatically retrieves information according to certain rules; the training set is obtained through data retrieved by a web crawler.
[0222] Part Two: Using the large model to be trained, determine the predicted response content corresponding to the data samples.
[0223] Here, the large model to be trained refers to a machine learning model with a large number of parameters and complex computational structure that has not been trained. The predicted response content refers to the response content determined by the large model to be trained. In some embodiments, the large model to be trained is a large language model. The number of large models to be trained is at least one. The large models to be trained may include, but are not limited to: question generation models, question localization models, planning models, artificial factor slot filling models, inquiry script generation models, solution generation models, etc.
[0224] In some embodiments, relevant information corresponding to the data sample is obtained. Using the large model to be trained, the response type of the data sample is determined based on the data sample and its corresponding relevant information. Based on the response type of the data sample, the target processing strategy corresponding to the data sample is determined. Finally, based on the target processing strategy corresponding to the data sample, the predicted response content corresponding to the data sample is determined. The relevant information corresponding to the data sample is the relevant background information needed during the data sample processing.
[0225] In some embodiments, the relevant information corresponding to the data sample may include, but is not limited to, at least one of the following: context information, order information, voice chat information, etc. The response type of the data sample is used to characterize the way the data sample is processed. In some embodiments, the content characterized by the response type of the data sample may include, but is not limited to: the data sample has a preset standard answer, the data sample's description is ambiguous, the data sample needs to query external information, etc. The target processing strategy includes, but is not limited to, one of the following: a first processing strategy, a second processing strategy, a third processing strategy, etc.
[0226] Part Three: Based on the predicted response content and label information of the data samples, the model parameters of the large model are updated at least once to obtain the target large model, which is used to process the input problem.
[0227] The target large model is a trained machine learning model with a large number of parameters and complex computational structure, capable of handling the input question. In some embodiments, the target large model is a large language model. There is at least one target large model. The target large model may include, but is not limited to: question generation models, question localization models, planning models, artificial factor slot filling models, question script generation models, solution generation models, etc. The model parameters of the large model refer to the learnable variables within the model, used to map input data to output results. In some embodiments, the model parameters of the large model may include, but are not limited to, one of the following: Deepspeed parameters, Low-Rank Adaptation (Lora) parameters, sampling parameters, etc. In some embodiments, the update method for model parameters may include, but is not limited to, at least one of: gradient descent, momentum update, Newton's momentum method, etc.
[0228] In some embodiments, a target loss value is determined based on the predicted response content corresponding to the data sample and the label information of the data sample. The model parameters of the large model are then updated at least once based on the target loss value to obtain the target large model. The target loss value may include, but is not limited to, Mean Squared Error (MSE) loss, Mean Absolute Error (MAE) loss, and Root Mean Squared Error (RMSE) loss.
[0229] In some embodiments, the target loss value is calculated using Pearson Linear Correlation Coefficient (PLCC), Spearman Rank-order Correlation Coefficient (SRCC), Kendall Rank-order Correlation Coefficient (KRCC), etc.
[0230] In some embodiments, based on the target loss value, it is determined whether the model parameters of the large model need to be updated. For example, the target loss value is compared with a loss threshold; if the target loss value is greater than the loss threshold, the model parameters of the large model are updated; if the target loss value is not greater than the loss threshold, the large model is identified as the target large model. Another example is comparing the target loss value with the previous target loss value; if the target loss value is different from the previous target loss value, the model parameters of the large model are updated; if the target loss value is substantially equal to the previous target loss value, the large model is identified as the target large model.
[0231] In some embodiments, based on the predicted response content corresponding to the data sample and the label information of the data sample, the model parameters of the large model are updated at least once and the large model is fine-tuned to obtain the target large model. Fine-tuning methods may include, but are not limited to, P-Tuning (a method in Natural Language Processing) and Fine-tuning. P-Tuning in Natural Language Processing allows adjustment of the model by adding prompts to the model's input without changing the pre-trained model parameters. Model fine-tuning is a commonly used technique in deep learning models, which can adjust some or all of the parameters of a pre-trained model to adapt to a new specific task or dataset.
[0232] It should be noted that the intelligent customer service system in this application consists of multiple target large models, each with different sizes, and the amount of data used to train each model varies. For the Deepspeed parameter, small models use stage 2 data partitioning, while large models use stage 3 tensor partitioning, using 16-bit floating-point format (Brain Floating Point 16-bit, bf16) precision whenever possible. For fine-tuning parameters, in medium-sized datasets (e.g., around 100,000 data points) with complex tasks, a larger matrix rank (lora_rank) is chosen. When data homogeneity is severe, training steps should be reduced, and combinations of hyperparameters with faster fitting should be selected to reduce overfitting. For sampling parameters, in scenarios with high deterministic requirements (such as location tracking), temperature=0 or top_k=1 is used to achieve a greedy search effect; conversely, increasing temperature increases diversity. Additionally, when performance allows, n>1 can be used to achieve beam search for better results.
[0233] Meanwhile, the target large-scale model demonstrates strong adaptability to sentiment analysis, multi-turn interactive question answering, semantic understanding, and generative responses. Regarding model selection, the performance, iteration speed, security, Chinese language capabilities, and domain knowledge of the large-scale model were evaluated, and the primary model (Alibaba Cloud (Qwen)) + backup generative pre-trained transformer (GPT) mode was prioritized. Finally, for the model training scheme, considering overall performance, accuracy, inference performance, and instruction compliance, a supervised fine-tuning + human feedback reinforcement learning / direct preference optimization mode was adopted.
[0234] In this implementation, the training samples obtained from the training set are used to update the model parameters of the large model at least once using the predicted response content and label information of the data samples. This yields the target large model, and the overall network structure of the large model is trained, improving the performance of the target large model. This enables the target large model to accurately engage in dialogue, thereby providing users with more personalized services.
[0235] In one possible implementation, at least one sample problem is obtained to derive at least one statistical problem. The sample problem is data processed as a single-round problem, and the statistical problem is unlabeled data with global representativeness and balanced distribution. Label information corresponding to the statistical problem is generated. A target statistical problem is selected from the statistical problems and used as a data sample in the training set. The target statistical problem is a problem that satisfies the self-consistency condition.
[0236] To provide a clearer explanation of the above implementation methods, the process of determining data samples in the training set in the above implementation methods will be described in three parts below.
[0237] Part 1: Obtain at least one sample problem to derive at least one statistical problem based on the sample problem. The sample problem is data that has been processed as a single-round problem, and the statistical problem is unlabeled data that is globally representative and evenly distributed.
[0238] In this system, the sample problem refers to data processed into single-round questions. In some embodiments, the intelligent customer service system obtains multiple questions from a large number of historically processed dialogues, processes these multiple questions into single-round questions, and obtains at least one sample problem. The statistical problem refers to unlabeled data that is globally representative and evenly distributed. In some embodiments, the number of statistical problems is at least one. Data statistics are performed on the sample problems, thereby obtaining at least one statistical problem based on the sample problems. Data statistics may include, but are not limited to, the following operations: feature extraction, dimensionality reduction, density estimation, clustering, etc.
[0239] It's important to note that the questions include both single-turn and multi-turn questions. For single-turn questions, unmodified initial user questions are used as samples, allowing the model to learn the true distribution of user responses. User responses refer to the raw, unprocessed input during the interaction, typically expressing needs or questions directly in natural language. For multi-turn questions, a context rewriting model is used to transform multi-turn questions into single-turn questions, using human-side dialogues as authentic multi-turn data samples to train the context rewriting model.
[0240] Part Two: Generating label information corresponding to statistical questions.
[0241] In this context, the label information corresponding to the statistical question refers to the response content corresponding to that statistic. In some embodiments, the label information corresponding to the statistical question is pseudo-label data, which can be generated using a larger model (e.g., generative pre-trained transformer-4) through prompting engineering (e.g., mind chain, etc.).
[0242] Part Three: Select target statistical problems from statistical problems and use them as data samples in the training set. Target statistical problems are those that satisfy the self-consistency condition.
[0243] The target statistical problem is selected from statistical problems that meet the self-consistency condition. Self-consistency refers to the characteristic that the output generated by the model maintains internal consistency in three dimensions: logical consistency, factual accuracy, and contextual coherence. In some embodiments, the self-consistency condition is that the self-consistency is greater than a preset self-consistency threshold.
[0244] In some embodiments, when selecting target statistical problems from statistical problems, problems with self-consistency less than a preset self-consistency threshold are further filtered in combination with specific scenario business rules to form difficult problems. These difficult problems are then handed over to human experts for annotation and review, and the problems selected by human experts are also added to the target statistical problems.
[0245] In some embodiments, after obtaining the target statistical problem, an evaluation (Eval) analysis is performed on the target statistical problem, and the aforementioned steps are repeated to continuously refine the data quality and obtain high-quality training samples. Evaluation analysis is a process of comprehensively examining model performance through a systematic evaluation method, aiming to reveal the true capability boundaries of the model in practical applications.
[0246] In this implementation, at least one statistical problem is obtained from the sample problems, and label information corresponding to the statistical problem is generated. The problem that satisfies the self-consistency condition among the statistical problems is taken as the target statistical problem, and then the target statistical problem is used as the data sample in the training set. This ensures the balance and diversity of the data distribution, avoids the overfitting or underfitting problem caused by data bias in large models, and can effectively remove noisy data and low-quality samples, thereby improving the generalization ability and robustness of large models and optimizing the efficiency of dataset construction.
[0247] It should be noted that the intelligent customer service system described in this application needs to have strong responsiveness in practical applications. Therefore, the following solutions can be adopted to optimize the performance of the intelligent customer service system:
[0248] 1. Distillation of the thinking process: By using the data processing logic of generating and eliminating the thinking process through the thought chain, the large language model can reduce inference latency while maintaining accuracy and generalization ability in the same scenario within the vertical domain.
[0249] 2. Adhering to the scaling law: Large models have good performance but slow inference speed. Smaller models (size can be 7 bits (B) / 14 bits) were used for online inference. More vertical domain datasets were used to make up for the disadvantage of the model in terms of the number of parameters. At the same time, after training multiple task datasets together, each sub-task showed a complementary improvement effect. Through division of labor and cooperation, more than 100,000 instruction fine-tuning data were finally trained.
[0250] 3. Inference Acceleration: Different acceleration strategies are formulated based on task difficulty and the required input and output lengths: Key-Value Cache (KV): For long input, short output tasks (e.g., problem localization), a prefix caching mechanism is used to cache instruction templates to reduce the time it takes for the model to output the first word, and the prefix of the output word is directly specified to minimize the number of generated words; Speculative Sampling: For short input, long output tasks (e.g., guided question generation), a small model (1.5-bit / 3-bit) trained on the same data is used for presampling, and the large model is used for further checking to reduce the number of times the larger model processes the data; Tensor Parallelism: For tasks with high difficulty and a large number of generated words (e.g., agent planning), it is necessary to ensure both inference speed and model parameter count. Based on the above acceleration mechanisms, tensor parallelism is further adopted to achieve a significant acceleration of a single inference by trading a small amount of throughput.
[0251] In summary, the method provided in this application determines the target processing strategy corresponding to the target problem by acquiring the target problem and related information, and then determines and outputs the target response content based on the target processing strategy. This method can determine the target processing strategy by combining the background information required to process the target problem, ensuring that the target processing strategy aligns with the needs of the target problem. Furthermore, by generating the target response content through the target processing strategy, the generated response content accurately solves the target problem, effectively handling the input question and improving the user experience. Moreover, the data processing method of this application is compatible with different usage scenarios, reducing the investment of human resources and saving labor costs for enterprises.
[0252] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.
[0253] The above text combined Figures 1 to 6 The data processing method provided in the embodiments of this application is described in detail below; the following will be combined with Figure 7 and Figure 8 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.
[0254] Figure 7This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 7 As shown, the data processing device 700 includes: an acquisition module 710, a determination module 720, and an output module 730. Wherein:
[0255] Module 710 is used to acquire the target problem and related information.
[0256] The determination module 720 is used to determine the target processing strategy corresponding to the target problem based on the target problem and the relevant information corresponding to the target problem. The relevant information corresponding to the target problem is the background information for processing the target problem. Based on the target processing strategy corresponding to the target problem, the target response content corresponding to the target problem is determined.
[0257] Output module 730 is used to output the target response content.
[0258] In one possible implementation, the determining module 720 is further configured to determine the response type of the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the response type of the target problem is used to characterize the way the target problem is handled; and to determine the target processing strategy corresponding to the target problem based on the response type of the target problem.
[0259] In one possible implementation, the determining module 720 is further configured to determine the response type of the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the response type of the target problem is used to characterize the way the target problem is handled; and to determine the target processing strategy corresponding to the target problem based on the response type of the target problem.
[0260] In one possible implementation, the determining module 720 is further configured to: ...
[0261] In one possible implementation, the determining module 720 is further configured to determine a first sub-response type corresponding to the target question when the target processing strategy corresponding to the target question is a first processing strategy, wherein the first processing strategy is used to answer the input question based on a preset answer; and to determine the target response content corresponding to the target question based on the first sub-response type corresponding to the target question.
[0262] In one possible implementation, the determining module 720 is further configured to, when the first sub-response type corresponding to the target question indicates that the target question is a follow-up question on relevant information related to the target question, use the first response content as the target response content corresponding to the target question, the first response content being used to respond to and explain the target question in order to soothe emotions; when the first sub-response type corresponding to the target question indicates that the target question is a casual or meaningless question, use the second response content as the target response content corresponding to the target question, the second response content being a preset general response.
[0263] In one possible implementation, the determining module 720 is further configured to: obtain retrieval recall information corresponding to the target question when the target processing strategy corresponding to the target question is the second processing strategy; the second processing strategy is used to determine the expression of the input question; and the retrieval recall information corresponding to the target question is obtained by querying external information. Based on the retrieval recall information corresponding to the target question and the relevant information corresponding to the target question, the third response content is used as the target response content corresponding to the target question; and the third response content is used to determine the expression of the input question.
[0264] In one possible implementation, the determining module 720 is further configured to determine the intent information corresponding to the target question when the target processing strategy corresponding to the target question is a third processing strategy, wherein the third processing strategy is used to process the input question based on the query information; and to determine the target response content corresponding to the target question based on the intent information corresponding to the target question.
[0265] In one possible implementation, the determining module 720 is further configured to determine the factor information corresponding to the target question when the intent information corresponding to the target question is a task-oriented intent. The factor information corresponding to the target question is related to the target question or the information that needs to be provided to reply to the target question. Based on the factor information corresponding to the target question, a fourth response content is obtained, and the fourth response content is used as the target response content corresponding to the target question. The fourth response content is used to explain the input question through step operations.
[0266] In one possible implementation, the determining module 720 is further configured to acquire a knowledge graph when the intent information corresponding to the target question is a consultative intent; and determine the target response content corresponding to the target question based on the knowledge graph.
[0267] In one possible implementation, the determining module 720 is further configured to extract at least one target entity from the target question, map the target entity to a knowledge graph to obtain at least one target node; perform retrieval and sorting processing on the at least one target node to obtain the associated information corresponding to the target question; and determine the target response content corresponding to the target question based on the associated information corresponding to the target question.
[0268] In one possible implementation, the determining module 720 is further configured to, when the intent information corresponding to the target question is a restricted intent, use the fifth response content as the target response content corresponding to the target question. The fifth response content is used to refuse to answer the input question. The restricted intent indicates a lack of relevant knowledge or processing ability to process the input question.
[0269] In one possible implementation, the acquisition module 710 is further configured to acquire a training set, which includes at least one data sample having label information; the determination module 720 is further configured to determine the predicted response content corresponding to the data sample using the large model to be trained; the device further includes an update module, configured to update the model parameters of the large model at least once based on the predicted response content corresponding to the data sample and the label information of the data sample, to obtain a target large model, which is used to process the input problem.
[0270] In one possible implementation, the acquisition module 710 is further configured to acquire at least one sample problem to obtain at least one statistical problem based on the sample problem, wherein the sample problem is data processed as a single-round problem, and the statistical problem is unlabeled data with global representativeness and balanced distribution; the device further includes a generation module for generating label information corresponding to the statistical problem; selecting a target statistical problem from the statistical problems, using the target statistical problem as a data sample in the training set, wherein the target statistical problem is a problem that satisfies the self-consistency condition.
[0271] The division of modules in the above data processing device is only for illustrative purposes. In other embodiments, the data processing device can be divided into different modules as needed to complete all or part of the functions of the above data processing device.
[0272] The various modules in the data processing apparatus provided in this application embodiment can be implemented in the form of computer programs. These computer programs can run on server or client electronic devices. The program modules constituted by these computer programs can be stored in the memory of the server or client electronic devices. When the computer program is executed by a processor, it implements all or part of the steps of the methods described in this application embodiment.
[0273] It should be noted that the aforementioned data processing device 700 is embodied in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.
[0274] For example, a "module" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.
[0275] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0276] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0277] For example, such as Figure 8 As shown, the electronic device 800 includes a memory 801 and a processor 802. The memory 801 stores executable program code 8011, and the processor 802 is used to call and execute the executable program code 8011 to perform a data processing method.
[0278] For example, memory 801 can be used to store related programs of the data processing method provided in the embodiments of this application; processor 802 can call the related programs of the data processing method stored in memory 801 to execute the data processing method of the embodiments of this application; for example, by using a target large model, the initial response content corresponding to the target question is obtained, the initial response content includes at least one target tag, the target tag is used to replace the corresponding multimedia data; at least one target tag in the initial response content is replaced with the corresponding multimedia data to obtain the target response content corresponding to the target question; the target response content is output.
[0279] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0280] When the functional modules are divided according to their respective functions, the device may also include a processing module and a communication module. It should be noted that all relevant content regarding the steps involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0281] It should be understood that the apparatus provided in this embodiment is used to perform the above-described data processing method, and therefore can achieve the same effect as the above-described implementation method.
[0282] When using integrated units, the device may include a processing module and a storage module. The processing module may be a processor or a controller that can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0283] In addition, the apparatus provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a data processing method provided in the above embodiments.
[0284] This application also provides a computer-readable storage medium storing computer program code, which, when run on a computer, causes the computer to execute the aforementioned method steps to implement a data processing method provided in the above embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROMs), microdrives, and magneto-optical disks, read-only memory (ROMs), random access memory (RAMs), erasable programmable read-only memory (EPROMs), electrically erasable programmable read-only memory (EEPROMs), dynamic random access memory (DRAMs), video random access memory (VRAMs), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and / or data.
[0285] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a data processing method provided in the above embodiments.
[0286] The computer-readable storage medium, computer program product, or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0287] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0288] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0289] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method, characterized in that, The method is applied to electronic devices, including: Obtain the target problem and the relevant information corresponding to the target problem; based on the target problem and the relevant information corresponding to the target problem, determine the target processing strategy corresponding to the target problem; the relevant information corresponding to the target problem is the background information for processing the target problem; the target problem includes text data. Based on the target processing strategy corresponding to the target question, determine the target response content corresponding to the target question; Output the target response content, which includes text data and / or image data; The method further includes: Obtain at least one sample problem to derive at least one statistical problem based on the sample problem, wherein the sample problem is data processed as a single-round problem, and the statistical problem is unlabeled data with global representativeness and balanced distribution; Generate the label information corresponding to the statistical problem; The target statistical problem is selected from the statistical problems and used as a data sample in the training set. The target statistical problem is a problem that satisfies the self-consistency condition. The training set is used to train the target large model. The target large model is used to process the input target problem. The self-consistency refers to the characteristic that the output generated by the model maintains internal consistency in three dimensions: logical consistency, factual accuracy, and contextual coherence.
2. The method according to claim 1, characterized in that, The step of determining the target processing strategy corresponding to the target problem based on the target problem and the relevant information corresponding to the target problem includes: Based on the target problem and the relevant information corresponding to the target problem, the response type of the target problem is determined, and the response type of the target problem is used to characterize the way to handle the target problem; Based on the response type of the target problem, determine the target processing strategy corresponding to the target problem.
3. The method according to claim 2, characterized in that, The step of determining the target processing strategy corresponding to the target problem based on the response type of the target problem includes: When the response type of the target question indicates that the target question has a preset standard answer, the first processing strategy is used as the target processing strategy corresponding to the target question. The first processing strategy is used to answer the input question based on the preset answer. When the response type of the target problem is ambiguous in representing the description of the target problem, the second processing strategy is used as the target processing strategy corresponding to the target problem. The second processing strategy is used to determine the description of the input problem. When the response type of the target problem indicates that processing the target problem requires querying external information, the third processing strategy is used as the target processing strategy corresponding to the target problem. The third processing strategy is used to process the input problem based on the queried information.
4. The method according to claim 1, characterized in that, The step of determining the target response content corresponding to the target question based on the target processing strategy corresponding to the target question includes: When the target processing strategy corresponding to the target question is the first processing strategy, the first sub-response type corresponding to the target question is determined, and the first processing strategy is used to answer the input question based on a preset answer; Based on the first sub-response type corresponding to the target question, determine the target response content corresponding to the target question.
5. The method according to claim 1, characterized in that, The step of determining the target response content corresponding to the target question based on the target processing strategy corresponding to the target question includes: When the target processing strategy corresponding to the target question is the second processing strategy, the retrieval recall information corresponding to the target question is obtained. The second processing strategy is used to determine the description of the input question. The retrieval recall information corresponding to the target question is obtained by querying external information. Based on the retrieval information and related information corresponding to the target question, the third response content is used as the target response content corresponding to the target question, and the third response content is used to determine the expression of the input question.
6. The method according to claim 1, characterized in that, The step of determining the target response content corresponding to the target question based on the target processing strategy corresponding to the target question includes: When the target processing strategy corresponding to the target question is the third processing strategy, the intent information corresponding to the target question is determined, and the third processing strategy is used to process the input question based on the query information; Based on the intent information corresponding to the target question, the target response content corresponding to the target question is determined.
7. The method according to claim 6, characterized in that, The step of determining the target response content corresponding to the target question based on the intent information corresponding to the target question includes: If the intent information corresponding to the target question is a task-oriented intent, then the factor information corresponding to the target question is determined. The factor information corresponding to the target question is the relevant option for the target question or the information required to respond to the target question. Based on the factor information corresponding to the target question, a fourth response is obtained, and the fourth response is used as the target response content corresponding to the target question. The fourth response is used to explain the input question through the step operation.
8. The method according to claim 6, characterized in that, The step of determining the target response content corresponding to the target question based on the intent information corresponding to the target question includes: If the intent information corresponding to the target question is a consultation-type intent, then a knowledge graph is obtained. Based on the knowledge graph, the target response content corresponding to the target question is determined.
9. The method according to claim 6, characterized in that, The step of determining the target response content corresponding to the target question based on the intent information corresponding to the target question includes: When the intent information corresponding to the target question is a restricted intent, the fifth response content is used as the target response content corresponding to the target question. The fifth response content is used to refuse to answer the input question. The restricted intent indicates a lack of relevant knowledge or processing ability to process the input question.
10. A data processing apparatus, characterized in that, The device is applied to an electronic device and includes: The acquisition module is used to acquire the target question and related information corresponding to the target question, wherein the target question includes text data; The determination module is used to determine the target processing strategy corresponding to the target problem based on the target problem and the relevant information corresponding to the target problem, wherein the relevant information corresponding to the target problem is background information for processing the target problem, and to determine the target response content corresponding to the target problem based on the target processing strategy corresponding to the target problem; The output module is used to output the target response content, which includes text data and / or image data; The acquisition module is used to acquire at least one sample question to obtain at least one statistical question based on the sample question. The sample question is data processed as a single-round question, and the statistical question is unlabeled data with global representativeness and balanced distribution. The generation module is used to generate label information corresponding to the statistical problem; to select a target statistical problem from the statistical problems, and to use the target statistical problem as a data sample in the training set. The target statistical problem is a problem that satisfies the self-consistency condition. The training set is used to train a target large model. The target large model is used to process the input target problem. The self-consistency refers to the characteristic that the output generated by the model maintains internal consistency in three dimensions: logical consistency, factual accuracy, and contextual coherence.
Citation Information
Patent Citations
Method and device for realizing intelligent question and answer control for replying investment advisor questions in security intelligent customer service system, processor and storage medium
CN115525752A
Conversation processing method and device, electronic equipment and storage medium
CN118394913A
Intelligent customer service interaction method based on large language model
CN120104745A