Data processing method and device, electronic equipment, storage medium and program product

CN122966060APending Publication Date: 2026-10-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510507873.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

质量评估的一种可行方式是将AI客服输出的回答提交给人工审核,但这种方式需要消耗大量人力

Benefits of technology

[0025]本申请的实施例提供的技术方案,首先需要根据训练样本集获得不同的训练样本子集,不同的训练样本子集中达标的问答对样本的比例不相同,这使得不同训练样本子集能够表征不同的质量评估倾向,然后使用不同训练样本子集对目标模型分别进行训练,使得通过每个训练样本子集进行的模型训练,都能相应得到一个质量评估模型。并且,由于目标模型在分别进行模型训练的过程中,其中包括的微调模块通过调整模型参数,使目标模型学习相应训练样本子集表征的质量评估倾向,这使得训练得到的不同质量评估模型对应不同的质量评估标准。这些具有不同质量评估标准的质量评估模型可以被应用于客服系统中,不仅能够实现对AI客服输出的回答自动化进行质量评估,还能够满足客服系统在实际的运行过程中存在的动态质量标准需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966060A_ABST
    Figure CN122966060A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data processing method and device, electronic equipment, storage medium and program product. The method comprises: obtaining a training sample set; the training sample set comprises question and answer pair samples and sample labels, and the sample labels represent whether the matching degree of the question and answer pair samples meets a standard; selecting question and answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportions of question and answer pair samples meeting the standard in different training sample subsets are different; training a target model through the at least two training sample subsets to obtain quality evaluation models corresponding to the training sample subsets; the target model comprises a pre-training question and answer model and a fine-tuning module connected to the pre-training question and answer model, and model parameters of the fine-tuning module are adjusted in the training process of the target model. Embodiments of the present application can obtain multiple quality evaluation models corresponding to different quality evaluation standards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a data processing method and apparatus, electronic equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the continuous development of artificial intelligence (AI) technology, its application in customer service systems is becoming increasingly common. Traditional customer service systems rely on human agents to interact with users, while AI-based systems involve AI agents interacting with users first. Only when the AI ​​agent cannot resolve the user's problem is the issue transferred to a human agent for further processing, thereby improving the efficiency of the customer service system.

[0003] To ensure the overall service quality of the customer service system, it is necessary to evaluate the quality of the AI ​​customer service responses before presenting them to users. One feasible way to conduct quality evaluation is to submit the AI ​​customer service responses to human review, but this method requires a significant amount of manpower.

[0004] Therefore, how to obtain an AI model that can evaluate the quality of responses output by AI customer service is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] To address the aforementioned technical problems, embodiments of this application provide a data processing method, a data processing apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Embodiments of this application can obtain multiple quality assessment models corresponding to different quality assessment standards, adapting to the dynamic and controllable needs of customer service systems in evaluating the quality of responses output by AI customer service representatives during actual operation.

[0006] One aspect of this application provides a data processing method, the method comprising: acquiring a training sample set; the training sample set including question-answer pair samples and sample labels, the sample labels being used to characterize whether the matching degree of the question-answer pair samples meets the standard; selecting question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportion of question-answer pair samples meeting the standard being different in different training sample subsets; training a target model using the at least two training sample subsets respectively to obtain a quality assessment model corresponding to each training sample subset; the target model including a pre-trained question-answer model and a fine-tuning module connected to the pre-trained question-answer model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

[0007] In another exemplary embodiment, the step of selecting question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets includes: obtaining the sample weights of the question-answer pair samples; the larger the sample weights, the greater the influence of the question-answer pair samples on the training of the target model; determining the probability that the question-answer pair samples are randomly selected into different training sample subsets based on the proportion of qualified question-answer pair samples in different training sample subsets and the sample weights of the question-answer pair samples; and selecting question-answer pair samples from the training sample set based on the probability that the question-answer pair samples are randomly selected into different training sample subsets to obtain different training sample subsets.

[0008] In another exemplary embodiment, obtaining the sample weights of the question-answer pair samples includes: predicting the quality label of the question-answer pair samples using the target model, and determining the prediction confidence of the question-answer pair samples based on the prediction result; the prediction confidence characterizes the reliability of the target model in predicting the quality label of the question-answer pair samples; and determining the sample weights of the question-answer pair samples based on the prediction confidence of the question-answer pair samples and the prediction result.

[0009] In another exemplary embodiment, determining the sample weight of the question-and-answer pair sample based on the prediction confidence of the question-and-answer pair sample and the prediction result includes: if the quality label predicted by the target model is consistent with the sample label, determining the sample weight of the question-and-answer pair sample based on the inverse relationship between sample weight and prediction confidence; if the quality label predicted by the target model is inconsistent with the sample label, determining the sample weight of the question-and-answer pair sample based on the positive relationship between sample weight and prediction confidence.

[0010] In another exemplary embodiment, determining the probability that a question-answer pair sample is randomly selected into different training sample subsets based on the proportion of qualified question-answer pair samples in different training sample subsets and the sample weights of the question-answer pair samples includes: dividing the question-answer pair samples included in the training sample set into qualified sample groups and unqualified sample groups; determining the number of samples to be selected from the qualified sample groups and the unqualified sample groups respectively based on the proportion of qualified question-answer pair samples in different training sample subsets; and calculating the probability that each question-answer pair sample is randomly selected into different training sample subsets based on the number of samples selected from the qualified sample groups and the unqualified sample groups respectively.

[0011] In another exemplary embodiment, the proportion of qualified question-answer pairs in different training sample subsets includes a first ratio between the number of unqualified question-answer pairs and the number of qualified question-answer pairs; determining the number of samples selected from the qualified sample group and the unqualified sample group based on the proportion of qualified question-answer pairs in different training sample subsets includes: calculating a second ratio between the total number of samples in the unqualified sample group and the total number of samples in the qualified sample group; and determining the number of samples selected from the qualified sample group and the unqualified sample group based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets.

[0012] In another exemplary embodiment, determining the number of samples selected from the qualified sample group and the unqualified sample group based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets includes: if the second ratio is less than or equal to the first ratio, then the total number of samples in the unqualified sample group is used as the number of samples selected from the unqualified sample group, and the quotient of the total number of samples in the qualified sample group and the first ratio is used as the number of samples selected from the qualified sample group; if the second ratio is greater than the first ratio, then the total number of samples in the qualified sample group is used as the number of samples selected from the qualified sample group, and the product of the total number of samples in the qualified sample group and the first ratio is used as the number of samples selected from the unqualified sample group.

[0013] In another exemplary embodiment, determining the probability that each question-answer pair sample is randomly selected into different training sample subsets based on the number of samples selected from the qualified sample group and the unqualified sample group respectively includes: determining the probability that each question-answer pair sample is randomly selected based on the size relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, and the sample weight of each question-answer pair sample.

[0014] In another exemplary embodiment, determining the probability of each question-answer pair sample being randomly selected based on the relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, and the sample weights of each question-answer pair sample, includes: if the number of samples selected from the unqualified sample group is less than the number of samples selected from the qualified sample group, using the sample weights of each question-answer pair sample in the qualified sample group as the probability of each question-answer pair sample in the qualified sample group being randomly selected; and using the complementary weights corresponding to the sample weights of each question-answer pair sample in the unqualified sample group as the probability of each question-answer pair sample in the unqualified sample group being randomly selected. The probability of a correct answer being randomly selected; if the number of samples selected from the non-compliant sample group is greater than the number of samples selected from the compliant sample group, the sample weight of each question-answer pair in the non-compliant sample group is used as the probability of each question-answer pair in the non-compliant sample group being randomly selected, and the complementary weights corresponding to the sample weights of each question-answer pair in the compliant sample group are used as the probability of each question-answer pair in the compliant sample group being randomly selected; if the number of samples selected from the non-compliant sample group is equal to the number of samples selected from the compliant sample group, the sample weight of each question-answer pair is used as the probability of each question-answer pair being randomly selected.

[0015] In another exemplary embodiment, the step of selecting question-answer pair samples from the training sample set based on the probability that the question-answer pair samples are randomly selected into different training sample subsets to obtain different training sample subsets includes: dividing the question-answer pair samples included in the training sample set into two sample groups with different sample label categories; generating a standardized weight interval corresponding to each sample group, and dividing each standardized weight interval into multiple sub-intervals according to the probability that the question-answer pair samples included in each sample group are randomly selected; selecting the question-answer pair samples corresponding to the target sub-interval to which the random number belongs according to the random number within the standardized weight interval, until the total number of question-answer pair samples selected from each sample group satisfies the proportion of qualified question-answer pair samples in different training sample subsets.

[0016] In another exemplary embodiment, each question-answer pair sample included in the sample subset is mapped one-to-one with each sub-interval within the standardized weight interval; the step of generating the standardized weight interval corresponding to each sample group and dividing each standardized weight interval into multiple sub-intervals according to the probability that the question-answer pair samples included in each sample group are randomly selected includes: summing the probabilities that the question-answer pair samples included in each sample group are randomly selected to obtain the total probability corresponding to each sample group; determining the boundary information of each sub-interval within the standardized weight interval according to the arrangement order of the question-answer pair samples included in each sample group and the total probability corresponding to each sample group, so as to divide the standardized weight interval into sub-intervals based on the boundary information.

[0017] In another aspect of this application, a data processing apparatus is provided, comprising: a data acquisition module configured to acquire a training sample set; the training sample set includes question-answer pair samples and sample labels, the sample labels being used to characterize whether the matching degree of the question-answer pair samples meets the standard; a sample selection module configured to select question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportion of qualified question-answer pair samples in different training sample subsets is different; and a model training module configured to train a target model using the at least two training sample subsets respectively to obtain a quality assessment model corresponding to each training sample subset; the target model includes a pre-trained question-answer model and a fine-tuning module connected to the pre-trained question-answer model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

[0018] Another aspect of this application provides a different data processing method applied to an intelligent customer service system. The intelligent customer service system deploys a customer service question-and-answer model. The method includes: obtaining the answer statement output by the customer service question-and-answer model for a question statement; determining a target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards; the multiple quality assessment models are obtained by training based on the aforementioned method; using the target quality assessment model to perform a quality assessment on the answer statement, and using the answer statement to respond to the question statement if the quality meets the standard.

[0019] In another exemplary embodiment, selecting a target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards includes: statistically analyzing the business traffic represented by the business needs of the intelligent customer service system; selecting a target quality assessment standard that matches the business traffic, so that the quality assessment model corresponding to the target quality assessment standard is used as the target quality assessment model that matches the business needs of the intelligent customer service system; the amount of business traffic is negatively correlated with the level of the quality assessment standard.

[0020] In another exemplary embodiment, the plurality of quality assessment models include a pre-trained question-answering model and a plurality of fine-tuning modules connected to the pre-trained question-answering model, and the target quality assessment model includes the pre-trained question-answering model and the target fine-tuning module; the step of using the target quality assessment model to perform quality assessment on the answer statement, and using the answer statement to respond to the question statement when the quality meets the standard, includes:

[0021] The pre-trained question-answering model and the target fine-tuning module are used to perform a quality assessment on the answer statement, so that the answer statement is used to respond to the question statement if the quality meets the standard. Another embodiment of this application provides a different data processing apparatus applied to an intelligent customer service system. The intelligent customer service system deploys a pre-trained question-answering model. The apparatus includes: acquiring the answer statement output by the pre-trained question-answering model for a question statement; determining a target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards; the multiple quality assessment models are trained based on the methods described above; using the target quality assessment model to perform a quality assessment on the answer statement, and using the answer statement to respond to the question statement if the quality meets the standard.

[0022] Another aspect of this application provides an electronic device, including: one or more processors; and a memory for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the data processing method as described above.

[0023] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of an electronic device, causes the electronic device to perform the data processing method described above.

[0024] Another aspect of this application provides a computer program product, including a computer program that, when executed by a processor of an electronic device, implements the data processing method described above.

[0025] The technical solution provided by the embodiments of this application first requires obtaining different training sample subsets based on the training sample set. The proportion of qualified question-answer pairs differs in each training sample subset, allowing different training sample subsets to represent different quality assessment tendencies. Then, the target model is trained using these different training sample subsets, resulting in a corresponding quality assessment model for each subset. Furthermore, during the model training process, the fine-tuning module adjusts the model parameters to allow the target model to learn the quality assessment tendencies represented by the respective training sample subsets. This results in different quality assessment models corresponding to different quality assessment standards. These quality assessment models with different quality assessment standards can be applied to customer service systems, enabling not only automated quality assessment of AI customer service responses but also meeting the dynamic quality standard requirements of customer service systems during actual operation.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of one implementation environment involved in this application;

[0028] Figure 2 It indicates Figure 1 The data processing flowchart corresponding to server 130 in the implementation environment shown;

[0029] Figure 3 This illustrates an exemplary method of acquisition. Figure 2 The flowchart of the controllable dynamic quality judgment model is shown below;

[0030] Figure 4 This is a flowchart illustrating a data processing method in an exemplary embodiment of this application;

[0031] Figure 5 The diagram illustrates the connection between the pre-trained question-answering model and multiple fine-tuning modules;

[0032] Figure 6 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application;

[0033] Figure 7 A schematic diagram illustrating an exemplary model training architecture is shown.

[0034] Figure 8 It indicates the target Figure 7 The diagram shows the effect of optimizing the model training architecture.

[0035] Figure 9 It shows the basis Figure 6 In the embodiment shown, S620 is the process of selecting question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets;

[0036] Figure 10 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of this application;

[0037] Figure 11 This is a flowchart illustrating a data processing apparatus as shown in another exemplary embodiment of this application;

[0038] Figure 12 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0040] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0041] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0042] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0043] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0044] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0045] First, it's important to note that, as mentioned earlier, with the continuous development of artificial intelligence (AI) technology, its application in customer service systems is becoming increasingly common. Traditional customer service systems rely on human agents to interact with users, while AI-based systems involve AI-powered customer service representatives interacting with users first. Only when the AI ​​cannot resolve the user's issue is the problem transferred to a human agent for further processing, thereby improving the efficiency of the customer service system.

[0046] The automated responses from AI customer service may have quality issues. Common reasons for reduced response quality include irrelevant answers, poor attitude, and factual errors. Therefore, to ensure the overall service quality of the customer service system, it is necessary to evaluate the quality of the responses output by AI customer service. Only responses that meet the quality standards should be sent to the user; otherwise, the AI ​​customer service should re-output the response until the quality meets the standards, or the user should be transferred to a human customer service representative. Assume that evaluating the quality of the AI ​​customer service's responses means determining whether the AI's response matches the corresponding question. For example, if the match between the AI's response and the corresponding question exceeds a preset threshold, the AI's response is considered satisfactory; otherwise, it is considered unsatisfactory.

[0047] One feasible way to assess the quality of AI customer service's automated responses is to submit the responses to human review. However, this method requires a lot of manpower, greatly increases the operating costs of the customer service system, and is not conducive to the promotion and application of AI customer service in the system. This will also hinder the innovation and development of AI customer service technology.

[0048] Therefore, obtaining an AI model capable of evaluating the quality of responses output by AI customer service is a better approach to solving this technical problem.

[0049] With the development of Large Language Models (LLMs), related technologies have begun to be applied in customer service systems. Currently, LLMs, combined with instructions, achieve excellent results in various tasks. Therefore, LLMs can be used to evaluate the quality of responses output by AI customer service representatives, combining pre-designed instructions and contextual information. Supervised fine-tuning of the LLM using appropriate training data ensures that its output meets the expected quality evaluation results.

[0050] However, this quality assessment method based on large language models combined with instructions is not flexible enough because large language models are trained on existing data and often have only one fixed quality assessment standard. Even if large language models with different quality assessment standards can be obtained through different training data, deploying multiple large language models at the same time requires a lot of computer resources, and the data cost required to collect training samples will also increase significantly.

[0051] Furthermore, in the actual operation of a customer service system, the standards for evaluating the quality of intelligent customer service responses are often dynamically changing based on actual business needs. Specifically, to ensure the overall service quality of the customer service system, a real customer service system often uses both human and AI customer service representatives in parallel. For example, when the customer service system faces a large number of user inquiries, it is necessary to appropriately lower the quality requirements to allow the pre-trained question-answering model to handle more user traffic, while when the number of user inquiries is small, it is necessary to appropriately raise the quality requirements to allow human customer service representatives to handle more user traffic.

[0052] Therefore, in order to improve the dynamic controllability of the quality assessment of AI customer service responses during actual operation, while taking into account the consumption of computer resources and data costs, embodiments of this application propose a model training scheme. This model training scheme not only allows for the acquisition of multiple quality assessment models corresponding to different quality assessment standards, but also significantly reduces the consumption of computer resources in the model deployment method, and requires only one training sample set, thereby saving data costs to a certain extent.

[0053] The embodiments of this application also propose a scheme for applying the quality assessment model obtained through the above model training scheme. By applying multiple quality assessment models corresponding to different quality assessment standards to the customer service system, the quality assessment standards can be dynamically adjusted to evaluate the responses output by the AI ​​customer service, which is more flexible and can adapt to the dynamic changes in the customer service system's requirements for quality assessment standards.

[0054] The technical solutions proposed in the embodiments of this application will be described in detail below.

[0055] Please refer to the following first. Figure 1 , Figure 1 This is a schematic diagram of an implementation environment related to this application. Specifically, this implementation environment is an intelligent customer service system, including a user terminal 110, a human customer service terminal 120, and a server 130. The user terminal 110 and the human customer service terminal 120 establish communication connections with the server 130 via wired or wireless networks, respectively.

[0056] The user terminal 110 and the human client terminal 120 can be devices such as computers, smartphones, tablets, laptops, and smart home appliances, without any restrictions. The server 130 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services, without any restrictions.

[0057] The server 130 deploys an AI customer service model and at least two quality assessment models with different quality assessment standards. The AI ​​customer service model automatically outputs response statements to questions sent by the user terminal 110. The AI ​​customer service model can be a large language model or other Natural Language Processing (NLP) models; there are no restrictions on its application. The quality assessment models are used to evaluate the quality of the responses output by the AI ​​customer service model, and different quality assessment models correspond to different quality assessment standards. Therefore, the server 130 supports the flexible selection of different quality assessment models to evaluate the quality of the responses output by the AI ​​customer service model.

[0058] For example, server 130 inputs the question sent by user terminal 110 into the AI ​​customer service model, obtains the response from the AI ​​customer service model, and selects the target quality assessment model from multiple quality assessment models with different quality assessment standards, based on actual business needs. Using this target quality assessment model, server 130 obtains the quality assessment result. This result is the quality assessment of the AI ​​customer service model's response using its own corresponding quality assessment standard. If the quality assessment result indicates that the AI ​​customer service model's response meets the standard, server 130 directly returns the response to user terminal 110. If the quality assessment result indicates that the AI ​​customer service model's response does not meet the standard, server 130 forwards the specific question, historical dialogue content, and other information to human customer service terminal 120 for human assistance. Thus, this intelligent customer service system can balance the control of human customer service costs and overall service quality while meeting the dynamic requirements for quality assessment standards during actual operation.

[0059] Figure 2 It indicates Figure 1 The data processing flowchart for server 130 in the implementation environment shown is illustrated. Figure 2 As shown, after the AI ​​customer service model obtains the user's question and dialogue history, it generates corresponding response statements. A dynamic quality assessment model then evaluates the quality of these responses. Based on the quality assessment results, the model determines whether the automated response meets the required standards and takes appropriate action. The controllable dynamic quality assessment model can be understood as a program module capable of changing its quality assessment standards in real time according to business needs. Based on actual business requirements, it selects the target quality assessment model from multiple models with different standards that match the current application requirements and uses that model to obtain the corresponding quality assessment result.

[0060] Figure 3 This illustrates an exemplary method of acquisition. Figure 2 The diagram shows a flow chart of a controllable dynamic quality judgment model. Figure 3As shown, a complete set of training data needs to be prepared in advance, along with an initial model F and N different label sample ratios. The label sample ratio represents the ratio of the number of non-compliant samples to the number of compliant samples. The initial model F can directly use a base LLM model, such as Qwen or LLaMA, or it can be obtained using a base LLM model with supervised fine-tuning (SFT) on the full training data. The sample weights of each training sample provided by the full training data can be determined through the initial model F. Furthermore, the full training data is divided into two groups based on the sample labels of each training sample: a non-compliant data group and a compliant data group. Next, based on the sample weights of each training sample and according to the N different label sample ratios, corresponding training data needs to be selected from the full training data to obtain the training data subsets D corresponding to the N different label sample ratios. r1 D r2 ... D rN Next, using N subsets of training data, the initial model F is trained using LoRA (Low-Rank Adaptation), resulting in N quality assessment models F with different quality assessment criteria. r1 F r2 F rN Finally, by deploying the quality assessment models with N different quality assessment criteria using LoRA, we can obtain... Figure 2 The controllable dynamic quality assessment model is shown.

[0061] LoRA deployment refers to the deployment of multiple quality assessment models as a combination of an initial model F connected to multiple LoRA modules. Utilizing the pluggable nature of LoRA modules, different LoRA modules can be deployed pluggably to connect to the same initial model F, thereby reducing the consumption of computer resources and saving computer resources consumed during model application and training.

[0062] It should be noted that detailed application and model training processes are described in the subsequent embodiments and will not be repeated here.

[0063] Please see Figure 4 , Figure 4 This is a flowchart illustrating a data processing method in an exemplary embodiment of this application. The method is applied to an intelligent customer service system, which deploys a customer service question-and-answer model as an AI customer service representative. The intelligent customer service system is, in other words, a customer service system built upon artificial intelligence technology.

[0064] This method can be applied to Figure 1The implementation environment shown can be specifically executed by server 130, or jointly executed by user terminal 110 and server 130. Of course, this method can also be applied to other implementation environments and executed by terminals or servers in other implementation environments, or jointly executed by terminals and servers in other implementation environments, without limitation.

[0065] like Figure 4 As shown, in an exemplary embodiment, the data processing method includes S410-S430, which are described in detail below:

[0066] S410, Obtain the response statement output by the customer service question-and-answer model for the question statement.

[0067] First, it's important to understand that a question statement refers to the text containing the question, while an answer statement refers to the text containing the answer.

[0068] Question statements can be submitted by users through user terminals or obtained through other means, such as extraction from dialogue history or cross-modal conversion (such as speech-to-text, image parsing, video parsing, etc.). This embodiment does not restrict the source of question statements.

[0069] For example, in an intelligent customer service scenario, users submit questions to the customer service system through their user terminals, and the system's answers are displayed to the user through the client. The client's user interface can have a question submission area and a dialogue display area. Users enter their questions in the question submission area, and the system's answers, along with the original question, are displayed in the dialogue display area in the form of a dialogue.

[0070] The customer service question-and-answer model is used to output corresponding answer statements in response to the input questions and answers. The customer service question-and-answer model also serves as the AI ​​customer service deployed in the intelligent customer service system. The customer service question-and-answer model can be a large language model or other types of natural language processing models, and this embodiment does not limit the specific structure of the customer service question-and-answer model.

[0071] S420 determines the target quality assessment model that matches the business status of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards.

[0072] Because the quality evaluation standards for the responses output by the customer service question-and-answer model to questions often change dynamically during actual operation based on actual business needs, this embodiment sets up multiple quality evaluation models corresponding to different quality evaluation standards to meet the dynamic needs of quality evaluation standards during actual operation. When it is necessary to evaluate the quality of the responses output by the customer service question-and-answer model, firstly, a target quality evaluation model that matches the business needs of the intelligent customer service system is determined from the multiple quality evaluation models corresponding to different quality evaluation standards. Then, this target quality evaluation model is used to evaluate the quality of the responses output by the customer service question-and-answer model, thereby obtaining the quality evaluation result obtained by the target quality evaluation model evaluating the responses output by the customer service question-and-answer model according to its own corresponding quality evaluation standards.

[0073] For example, the business needs of an intelligent customer service system can be evaluated using business traffic metrics. These metrics can be obtained by statistically analyzing one or more indicators, such as the number of user visits, the number of sessions, the number of requests, and the number of concurrent users; no specific limitation is imposed here.

[0074] Business traffic metrics reflect the number of user inquiries received by the intelligent customer service system. This number may be related to the system's strategy of dynamically adjusting quality assessment standards. For example, when facing a large number of inquiries, the intelligent customer service system may need to lower its quality requirements to allow the pre-trained question-answering model to handle more traffic. Conversely, when the number of inquiries is low, it may need to raise its quality requirements to allow human customer service representatives to handle more traffic, thus ensuring the overall service quality of the system. Therefore, business traffic metrics can be used to determine the business requirements of the intelligent customer service system.

[0075] Therefore, in some exemplary embodiments, the business traffic of the intelligent customer service system can be statistically analyzed, and a target quality assessment standard matching the business traffic can be selected. The quality assessment model corresponding to the target quality assessment standard can then be used as the target quality assessment model matching the business needs of the intelligent customer service system. The amount of business traffic is negatively correlated with the level of the quality assessment standard.

[0076] For example, different quality assessment standards can be graded according to the degree of quality requirements. The higher the assessment level, the higher the quality requirement. Different quality assessment standards correspond to different business traffic ranges; the higher the assessment level, the larger the traffic volume represented by the corresponding business traffic range. After obtaining the business traffic of the intelligent customer service system, the first step is to determine the business traffic range to which the traffic belongs. Then, the quality assessment standard corresponding to the assessment level of that business traffic range is selected as the target quality assessment standard matching that business traffic.

[0077] This approach can also be understood as follows: each quality assessment standard corresponds to two traffic thresholds, one large and one small. These two traffic thresholds constitute the business traffic range corresponding to each quality assessment standard. After obtaining the business traffic of the intelligent customer service system, this business traffic is compared with the two traffic thresholds corresponding to each quality assessment standard. This yields the business traffic range to which the business traffic belongs. Then, the quality assessment standard corresponding to the assessment level of this business traffic range is selected as the target quality assessment standard that matches the business traffic.

[0078] In other exemplary embodiments, the business requirements of the intelligent customer service system can also be evaluated using other metrics, such as average session duration and problem resolution rate. This embodiment does not impose any limitations on this. Both average session duration and problem resolution rate can reflect the service quality of the intelligent customer service system to a certain extent. Improving the service quality of the intelligent customer service system is the goal of dynamically adjusting quality evaluation standards. Therefore, average session duration and problem resolution rate may also be related to the strategy of dynamically adjusting the quality evaluation standards of the intelligent customer service system. The business requirements of the intelligent customer service system can be determined based on these two metrics.

[0079] S430 uses a target quality assessment model to assess the quality of the response statement and responds to the question statement with the response statement if the quality meets the standards.

[0080] This embodiment describes the quality assessment process of the responses output by the customer service question-and-answer model as a binary classification process. The quality assessment results output by each quality assessment model represent whether the responses output by the customer service question-and-answer model to the question statements meet the standards. Whether the responses output by the customer service question-and-answer model to the question statements meet the standards can also be understood as whether the response statements match the question statements.

[0081] If the quality assessment result output by the target quality assessment model indicates that the response statement output by the customer service Q&A model meets the standard, then the response statement output by the customer service model can be used to respond to the question statement, for example, the response statement output by the customer service Q&A model can be directly returned to the user; otherwise, the response statement can be re-output by the customer service Q&A model for the question statement until the customer service Q&A model outputs a satisfactory response statement, or the question statement can be forwarded to the human customer service terminal for human customer service to answer the question statement, thereby ensuring the overall service quality of the customer service system.

[0082] It should also be noted that, Figure 5The diagram illustrates the deployment methods of multiple quality assessment models. Since each quality assessment model includes a pre-trained question-answering model and a fine-tuning module after model parameter updates, in the actual model deployment process, the pre-trained question-answering model is deployed as the base model, and the fine-tuning modules after multiple model parameter updates are deployed as pluggable modules of the base model. Based on the pluggable characteristics of each fine-tuning module, dynamic switching for different quality assessment standards can be achieved.

[0083] Therefore, the target quality assessment model includes a pre-trained question-and-answer model and a target fine-tuning module with updated model parameters. S430 uses the pre-trained question-and-answer model and the target fine-tuning module to assess the quality of the answer statements output by the customer service question-and-answer module.

[0084] It is understood that a pre-trained question-answering model refers to a natural language processing model with question-answering capabilities obtained by learning language rules in advance through a large-scale dataset and fine-tuning it on a specific question-answering task. This embodiment does not restrict the specific model structure of the pre-trained question-answering model.

[0085] A base model can be understood as a general artificial intelligence model obtained by training on large-scale general data through unsupervised or self-supervised learning, learning the underlying patterns and feature representations of the data. This embodiment uses a pre-trained question-answering model as the base model. On the one hand, different fine-tuning modules can be paired with the base model to evaluate the quality of the responses output by the customer service question-answering model. This meets the dynamic changing requirements of the actual customer service system for quality evaluation standards, and eliminates the need to deploy a separate pre-trained question-answering model for each quality evaluation model, greatly saving on the computer resources consumed by model deployment. On the other hand, during the training of each quality evaluation model, only the model parameters of the fine-tuning modules need to be adjusted, without adjusting the base model, further saving on the computer resources consumed by model training.

[0086] In order to obtain multiple quality assessment models corresponding to different quality assessment standards, so as to meet the dynamic and controllable requirements of intelligent customer service system for quality assessment standards, the embodiments of this application also provide corresponding model training schemes.

[0087] Please see Figure 6 , Figure 6 This is a flowchart illustrating a data processing method in another exemplary embodiment of this application. The method specifically discloses the process of training multiple quality assessment models corresponding to different quality assessment standards. This method can be executed by a terminal device or a server, or jointly by both; this embodiment does not impose any limitations on this.

[0088] like Figure 6As shown, in an exemplary embodiment, the data processing method includes steps S610-S630, which are described in detail below:

[0089] S610, Obtain the training sample set; the training sample set includes question-answer pair samples and sample labels, and the sample labels are used to characterize whether the matching degree of the question-answer pair samples meets the standard.

[0090] In this embodiment, multiple quality assessment models corresponding to different quality assessment standards are trained using the same training sample set. This can be understood as follows: given a fixed training sample set, the quality assessment model can learn different quality assessment tendencies by adjusting the ratio of qualified to unqualified question-answer pairs. Each quality assessment tendency represents a quality assessment standard. Therefore, it is unnecessary to prepare separate training sample sets for different quality assessment models, thus saving the data costs required for model training.

[0091] For example, the training sample set can be represented as D = {(x, y)}, where x represents a question-answer pair sample and y represents the sample label. In addition to the question and answer statements, question-answer pair samples may also include dialogue history, quality judgment instructions, etc. This embodiment does not limit the specific content included in the question-answer pair samples. The sample label is used to characterize whether the matching degree of the question-answer pair samples meets the standard, that is, whether the matching degree of the question and answer statements contained in the question-answer pair samples meets the standard. For example, y = 0 indicates that the matching degree does not meet the standard, and y = 1 indicates that the matching degree meets the standard.

[0092] S620, select question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportion of qualified question-answer pair samples in different training sample subsets is different.

[0093] To achieve different quality assessment standards for the quality assessment model, this embodiment changes the proportion of samples with different labels in the training data, allowing the quality assessment model to learn a certain assessment bias, thereby affecting the quality assessment standards of the model. Therefore, question-answer pairs are selected from the training sample set obtained in S610 based on the sample labels to obtain at least two training sample subsets, and the proportion of qualified question-answer pairs is different in each training sample subset.

[0094] Since the proportion of question-answer pairs that meet the criteria varies in different training sample subsets, different training sample subsets represent different quality assessment tendencies. Different quality assessment models are trained based on different training sample subsets, which causes different quality assessment models to learn different quality assessment tendencies. Therefore, different quality assessment models obtained through training correspond to different quality assessment standards.

[0095] It should be understood that although this embodiment also prepares different training sample subsets for training quality assessment models with different quality assessment standards, since different training sample subsets are obtained by selecting question-answer pairs from a fixed training sample set, data costs can be saved to a certain extent compared to preparing different training sample sets for training different quality assessment models.

[0096] It should also be understood that in other exemplary embodiments, different training sample subsets can be directly obtained, with different proportions of qualified question-answer pairs in different training sample subsets, so as to train quality assessment models with different quality assessment criteria using different training sample subsets. Since the sum of different training sample subsets is essentially also a total training sample set, S610 and S620 should not be interpreted as restricting the source of question-answer pair samples in different training sample subsets.

[0097] S630, the target model is trained separately using at least two training sample subsets to obtain the quality evaluation model corresponding to each training sample subset; the target model includes a pre-trained question answering model and a fine-tuning module connected to the pre-trained question answering model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

[0098] This embodiment summarizes the training process of quality assessment models for different quality assessment standards as a process of training the target model separately using different training sample subsets. Each training sample subset participates in model training and obtains a quality assessment model corresponding to a quality assessment standard.

[0099] The target model includes a pre-trained question-answering model and a fine-tuning module connected to it. The fine-tuning module instructs the pre-trained question-answering model to output quality assessment results. In other words, the fine-tuning module further trains the pre-trained question-answering model on the provided training data set, enabling the model to perform quality assessments.

[0100] Figure 7 A schematic diagram illustrating an exemplary model training architecture is shown, such as... Figure 7 As shown, during the training of the target model using different training sample subsets, the model parameters of the fine-tuning module are adjusted to use the adjusted target model as the quality assessment model. Since different training sample subsets represent different quality assessment tendencies, the target model learns these tendencies from each subset, ensuring that the updated target model also possesses the corresponding quality assessment tendency. This results in different quality assessment models corresponding to different quality assessment standards. Therefore, the model training scheme proposed in this embodiment can obtain multiple quality assessment models corresponding to different quality assessment standards.

[0101] Herein, the pre-trained question-answering model may adopt a base large language model such as Qwen or LLaMA, or may be obtained by fine-tuning the base large language model using the training sample set acquired in S610, which is not limited herein.

[0102] The fine-tuning module may adopt a LoRA (Low-Rank Adaptation) module. By introducing low-rank matrix decomposition into the model weights, the LoRA module greatly reduces the number of trainable parameters, thereby lowering computation and storage costs while maintaining model performance. For example, the LoRA module may be represented as y=Wx+ABx, where y represents the quality label output by the LoRA module, W represents the parameter matrix of the pre-trained question-answering model with a dimension of d×d, d represents the number of parameters, x represents the input signal of the LoRA module, A and B represent the model parameters of the LoRA module, A and B are also referred to as bypass low-rank matrices, and the matrix A∈R d×r , the matrix B∈R r×d , and r<<d, for example, r may take a value of 4 to 16, which is not limited herein. It can be understood that adjusting the model parameters of the fine-tuning module is adjusting the bypass low-rank matrices A and B. The fine-tuning module may also adopt other modules, such as a QLoRA (Quantized Low-Rank Adaptation) module and a DoRA (Directional Orthogonalized Rank Adaptation) module. This embodiment does not limit the specific structure of the fine-tuning module.

[0103] When actually deploying the to-be-trained model, considering that the parameters of the pre-trained question-answering model are not adjusted during the training process of the target model, the model deployment manner may be optimized. As shown in Figure 8 , Figure 8 is a schematic diagram illustrating the optimized effect of the model training architecture shown in Figure 7 , where the pre-trained question-answering model may be deployed as a base model without model parameter adjustment, and different fine-tuning modules are deployed as pluggable modules of the base model. In this way, there is no need to separately deploy the pre-trained question-answering model for each fine-tuning module, which can greatly reduce the occupation of computer resources. Moreover, a corresponding number of fine-tuning modules may be dynamically arranged to connect with the base model according to the actual demand for the number of quality assessment criteria, so that the model training process also has dynamic controllability.

[0104] With further reference to Figure 9 , Figure 9 is a schematic diagram illustrating the basis of Figure 6In the illustrated embodiment, S620, the process of selecting question-answer pair samples from the training sample set based on sample labels to obtain at least two training sample subsets, further includes the following steps:

[0105] S910, obtain the sample weights of the question-answer pair samples; the larger the sample weight, the greater the influence of the question-answer pair samples on the training of the target model.

[0106] Since different question-answer pairs have different impacts on the final performance of the target model during the training process, this embodiment needs to first estimate the impact of question-answer pairs on the target model during training. Then, in the subsequent sample selection process, for sample labels with a low proportion, question-answer pairs with lower weights should be selected as much as possible to reduce the impact of the sample label on the training effect of the target model.

[0107] Therefore, the sample weights of question-and-answer pairs represent the degree of influence these pairs have on the training of the target model. A larger sample weight indicates a greater influence, while a smaller sample weight indicates a smaller influence.

[0108] In some exemplary embodiments, the quality label of the question-answer pair sample can be predicted by the target model, the prediction confidence of the question-answer pair sample can be determined based on the prediction result, and the sample weight of the question-answer pair sample can be determined according to the prediction confidence of the question-answer pair sample and the prediction result.

[0109] Among them, prediction confidence characterizes the reliability of the target model in predicting the answer statement for the question-answer pair sample. The higher the prediction confidence, the more confident the target model is in predicting the answer statement. For example, the mean or product-normalized result of the output probability of each token (the smallest semantic unit, such as a word or character) when the target model predicts the quality label for the question-answer pair sample can be used as the prediction confidence of the question-answer pair sample.

[0110] The confidence level of the question-and-answer pair's prediction and the prediction result of the target model's quality label for the question-and-answer pair both affect the determination of the question-and-answer pair's impact on the target model's training. For example, if the target model's predicted quality label for the question-and-answer pair matches the sample label, and the prediction confidence is high, it indicates that the target model itself has the knowledge and ability to predict that question-and-answer pair. In this case, the question-and-answer pair has a smaller impact on the target model during subsequent training, and its sample weight is also low. Conversely, if the target model's predicted quality label for the question-and-answer pair does not match the sample label, and the prediction confidence is high, it indicates that the target model itself does not have the knowledge and ability to predict that question-and-answer pair. In this case, the question-and-answer pair has a larger impact on the target model during subsequent training. Therefore, it can be determined that when the target model's predicted quality label matches the sample label, the sample weight of the question-and-answer pair is inversely proportional to the prediction confidence; when the target model's predicted quality label does not match the sample label, the sample weight of the question-and-answer pair is directly proportional to the prediction confidence.

[0111] Therefore, if the quality label predicted by the target model matches the sample label, the sample weight of the question-answer pair can be determined based on the inverse relationship between sample weight and prediction confidence. If the quality label predicted by the target model does not match the sample label, the sample weight of the question-answer pair can be determined based on the direct proportional relationship between sample weight and prediction confidence.

[0112] For example, if the quality label of the target model's prediction for question-answer pairs is represented as... Let y represent the sample label of the question-answer pair, and let y represent the prediction confidence of the question-answer pair. Let w be the sample weight of a question-and-answer pair, and w∈(0,1). The formula for determining the sample weight of a question-and-answer pair can be expressed as follows:

[0113]

[0114] Where C is a constant, which can be set to 1 or other values, and there are no restrictions here.

[0115] Of course, in other exemplary embodiments, other calculation formulas can be set to calculate the sample weight of the question-answer pair samples based on the core principle that "when the quality label predicted by the target model is consistent with the sample label, the sample weight is inversely proportional to the prediction confidence; when the quality label predicted by the target model is inconsistent with the sample label, the sample weight is directly proportional to the prediction confidence, and the sample weight ranges from (0,1)". This embodiment does not limit the specific formula content.

[0116] S920, based on the proportion of qualified question-answer pairs in different training sample subsets and the sample weights of the question-answer pairs, determine the probability that a question-answer pair sample is randomly selected into different training sample subsets.

[0117] This embodiment aims to allow question-answer pairs with a higher proportion of labels to play a greater role in subsequent model training, thereby influencing the quality evaluation criteria of the target model. Therefore, it is necessary to determine the probability of question-answer pairs being randomly selected into different training sample subsets based on the proportion of qualified question-answer pairs in different training sample subsets (this proportion reflects the ratio of qualified to unqualified question-answer pairs in the training sample subset) and the sample weights of the question-answer pairs.

[0118] Since the proportion of qualified question-answer pairs varies across different training sample subsets, the probability of each question-answer pair being randomly selected into different training sample subsets also differs. Therefore, by subsequently selecting question-answer pairs from the training sample set based on the probability of each pair being randomly selected into different training sample subsets, we can not only reduce subjective bias within each subset, thereby improving its reliability, but also enable the question-answer pairs included in each subset to play a greater role in subsequent model training, thus helping the target model learn the corresponding quality assessment criteria.

[0119] For example, the probability of each question-answer pair sample being randomly selected into different subsets of training samples can be determined by the following steps:

[0120] S921, divide the question-answer pair samples included in the training sample set into a qualified sample group and a non-qualified sample group;

[0121] S922, Based on the proportion of qualified question-answer pairs in different training sample subsets, determine the number of samples to be selected from the qualified sample group and the unqualified sample group respectively;

[0122] S923, based on the number of samples selected from the qualified sample group and the unqualified sample group respectively, calculate the probability that each question-answer pair sample is randomly selected into different training sample subsets.

[0123] In S921, the question-answer pairs in the training sample set can be divided into qualified and unqualified sample groups based on their sample labels. For example, sample label 0 indicates that the matching degree of the question-answer pair sample is not qualified, sample label 1 indicates that the matching degree of the question-answer pair sample is qualified, and the unqualified sample group is represented as D0 = {(x i ,y i ,w i )},y i=0, where i represents the i-th question-answer pair in the non-compliant sample group D0, and the compliant sample group is represented as D1 = {(x j ,y j ,w j )},y j =1, where j represents the j-th question-answer pair sample in the non-compliant sample group D0.

[0124] In S922, based on the proportion of qualified question-answer pairs in different training sample subsets, the number of unqualified question-answer pairs and the number of qualified question-answer pairs in different training sample subsets can be determined. Furthermore, a first ratio between the number of unqualified question-answer pairs and the number of qualified question-answer pairs can be calculated. That is, different training sample subsets correspond to different first ratios.

[0125] For example, suppose the total number of samples |D0| in the non-compliant sample group is 500, and the total number of samples |D1| in the compliant sample group is also 500. At the first ratio r... i When the ratio is 0.5, 500 question-answer pairs can be selected from the qualified sample group D1, and 250 question-answer pairs can be selected from the unqualified sample group D0, thus obtaining a training sample subset. At the first ratio r... i When the ratio is 2, 500 question-answer pairs can be selected from the unqualified sample group D0, and 250 question-answer pairs can be selected from the qualified sample group D1 to obtain another subset of training samples. At the first ratio r... i When the value is 1, 500 question-answer pairs can be selected from the unqualified sample group D0 and the qualified sample group D1 respectively to obtain another subset of training samples.

[0126] For example, by calculating a second ratio between the total number of samples in the non-compliance sample group and the total number of samples in the compliance sample group, and based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets, the number of samples selected from the compliance sample group and the non-compliance sample group is determined respectively.

[0127] The number of samples selected from the ineligible sample group D0 and the compliant sample group D1 can be determined using the following formula:

[0128]

[0129] Among them, if the second ratio Less than or equal to the first ratio r i The number of samples n0 selected from the non-compliant sample group is determined to be the total number of samples in the non-compliant sample group |D0|, and the number of samples n1 selected from the compliant sample group is the ratio of the total number of samples in the non-compliant sample group |D0| to the first ratio r. i The business.

[0130] If the second ratio Greater than the first ratio r i The number of samples n1 selected from the compliant sample group is determined to be the total number of samples in the compliant sample group |D1|, and the number of samples n0 selected from the non-compliant sample group is determined to be the ratio of the total number of samples in the compliant sample group |D1| to the first ratio r. i The product of.

[0131] It should be noted that in other exemplary embodiments, the first ratio may also be expressed as the ratio between the number of qualified question-answer pairs and the number of unqualified question-answer pairs. Accordingly, the process for determining the number of samples to be selected from the qualified sample group and the unqualified sample group will also be adaptively adjusted, and this embodiment does not limit this.

[0132] In S923, the probability of each question-answer pair being randomly selected can be determined based on the relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, as well as the sample weight of each question-answer pair sample.

[0133] To ensure that question-answer pairs with higher label percentages play a greater role in subsequent model training and influence the quality evaluation criteria of the target model, the following strategy can be used to determine the probability of each question-answer pair being randomly selected:

[0134] If the number of samples n0 selected from the unqualified sample group is less than the number of samples n1 selected from the qualified sample group, and we want the question-answer pairs with label 1 to play a greater role in subsequent model training, then the larger the sample weight of the question-answer pair with label 1, the higher the probability that the question-answer pair will be randomly selected. Conversely, the larger the sample weight of the question-answer pair with label 0, the lower the probability that the question-answer pair will be randomly selected. Therefore, when the number of samples n0 selected from the unqualified sample group is less than the number of samples n1 selected from the qualified sample group, the probability w′ of each question-answer pair in the qualified sample group being randomly selected is determined as its sample weight w, i.e., w′ = w. The probability w′ of each question-answer pair in the unqualified sample group being randomly selected is determined as its complementary weight 1 - w, i.e., w′ = 1 - w.

[0135] If the number of samples n0 selected from the unqualified sample group is greater than the number of samples n1 selected from the qualified sample group, and we want the question-answer pairs with label 0 to play a greater role in subsequent model training, then the larger the sample weight of the question-answer pair with label 0, the higher the probability that the question-answer pair will be randomly selected. Conversely, the larger the sample weight of the question-answer pair with label 1, the lower the probability that the question-answer pair will be randomly selected. Therefore, when the number of samples n0 selected from the unqualified sample group is greater than the number of samples n1 selected from the qualified sample group, the probability w′ of each question-answer pair in the unqualified sample group being randomly selected is its sample weight w, i.e., w′ = w. The probability w′ of each question-answer pair in the qualified sample group being randomly selected is its complementary weight 1 - w, i.e., w′ = 1 - w.

[0136] If the number of samples n0 selected from the unqualified sample group is equal to the number of samples n1 selected from the qualified sample group, it means that the question-answer pair samples with sample label 0 and the question-answer pair samples with sample label 1 have the same importance in the subsequent model training. Therefore, the sampling weight w′ of each question-answer pair sample is determined to be its sample weight w, that is, w′=w.

[0137] S930, based on the probability that question-answer pair samples are randomly selected into different training sample subsets, question-answer pair samples are selected from the training sample set to obtain different training sample subsets.

[0138] After obtaining the probability that the question-answer pair samples contained in the training sample set are randomly selected into different training sample subsets, the weighted sampling algorithm can be used to select question-answer pair samples from the unqualified sample group and the qualified sample group respectively. The total number of question-answer pair samples selected from each sample group should meet the number of samples determined by S822, thereby satisfying the proportion of qualified question-answer pair samples in different training sample subsets.

[0139] For example, the process of selecting question-answer pair samples from the training sample set may include the following steps:

[0140] S931 divides the question-answer pair samples included in the training sample set into two sample groups with different sample label categories.

[0141] S932 generates standardized weight intervals for each sample group and divides each standardized weight interval into multiple sub-intervals based on the probability that the question-answer pair samples included in each sample group are randomly selected.

[0142] S933, based on the random number within the standardized weight interval, select the question-answer pair sample corresponding to the target sub-interval to which the random number belongs, until the total number of question-answer pair samples selected from each sample group satisfies the proportion of qualified question-answer pair samples in different training sample subsets.

[0143] As illustrated in S921, S931 divides the question-answer pairs in the training sample set into a non-compliant sample group D0 and a compliant sample group D1 based on the sample labels of the question-answer pairs. If the non-compliant sample group D0 and the compliant sample group D1 have already been obtained, then S931 does not need to be executed.

[0144] In S932, each sample group needs to generate a corresponding standardized weight interval, which is (0,1). Each question-answer pair sample included in the sample subset is mapped one-to-one with each subinterval within the standardized weight interval. This can also be understood as follows: if the total number of question-answer pair samples included in the sample subset is n, then based on the probability of these n question-answer pair samples being randomly selected, the standardized weight interval (0,1) is divided into n subintervals.

[0145] The probability of randomly selecting the question-answer pairs included in each sample group can be summed to obtain the total probability corresponding to each sample group. Based on the arrangement order of the question-answer pairs included in each sample group and the total probability corresponding to each sample group, the boundary information of each sub-interval within the standardized weight interval can be determined, so as to divide the standardized weight interval into sub-intervals based on the boundary information.

[0146] The boundary information for each sub-interval includes a left boundary and a right boundary. Based on the left and right boundaries of each sub-interval, accurate division of the standardized weighted interval (0,1) can be achieved. For example, the left and right boundaries of each sub-interval can be determined by the following formula:

[0147]

[0148] Among them, tl i and tr i Let represent the left and right boundaries of the sub-interval mapped to the i-th question-answer pair in the sample group, respectively. This represents the summation of the probabilities of randomly selecting each question-and-answer pair in the sample group. If the sub-interval mapped to the i-th question-and-answer pair is represented as the i-th sub-interval within the standardized weight interval... This represents the cumulative probability corresponding to the (i-1)th subinterval. This represents the cumulative probability corresponding to the i-th subinterval.

[0149] In S933, the process of selecting the question-answer pair sample corresponding to the target sub-interval to which the random number belongs based on the random number within the standardized weight interval includes, for example, generating a random number in the range of (0,1), then determining the target sub-interval to which the random number belongs, and determining whether the question-answer pair sample corresponding to the target sub-interval is in the selected sample set V. If not, the question-answer pair sample corresponding to the target sub-interval is added to the selected sample set V. Otherwise, a new random number is generated until the corresponding question-answer pair sample is selected based on the new random number and added to the selected sample set V.

[0150] Based on this iterative selection process, until the total number of question-answer pairs selected from each sample group meets the proportion of qualified question-answer pairs in different training sample subsets, the selected sample set V at this point is also used as the training sample subset.

[0151] Therefore, the acquisition process of different training sample subsets provided in this embodiment can not only reduce subjective bias in different training sample subsets and improve the reliability of training sample subsets, but also enable the question-answer pair samples included in each training sample subset to play a greater role in the subsequent model training process, prompting the target model to learn the corresponding quality evaluation criteria and ensuring the reliability of the entire model training process.

[0152] Of course, in other exemplary embodiments, the number of samples to be selected from the qualified sample group and the unqualified sample group can be determined directly based on the proportion of qualified question-answer pairs in different training sample subsets and the total number of question-answer pairs included in the training sample set. Then, based on the number of samples selected from the qualified sample group and the unqualified sample group corresponding to different training sample subsets, the question-answer pairs contained in the qualified sample group and the unqualified sample group are divided into different training sample subsets. For example, suppose we determine that both the qualified sample group and the unqualified sample group contain 500 question-answer pairs. If we need to select 100 qualified question-answer pairs from the qualified sample group and 200 unqualified question-answer pairs from the unqualified sample group to obtain training sample subset 1; if we need to select 200 qualified question-answer pairs from the qualified sample group and 100 unqualified question-answer pairs from the unqualified sample group to obtain training sample subset 2; if we need to select 200 qualified question-answer pairs from the qualified sample group and 100 unqualified question-answer pairs from the unqualified sample group... In this group, 200 question-and-answer samples that did not meet the standards were selected to obtain training sample subset 3. Therefore, the 500 question-and-answer pairs included in the qualified sample group can be randomly divided into three parts of 100, 200, and 200, and then assigned to training sample subset 1, training sample subset 2, and training sample subset 3 in sequence.

[0153] Therefore, the embodiments of this application do not limit the specific method of obtaining at least two training sample subsets. Any method of obtaining training sample subsets that can meet the requirements of different proportions of question-answer pairs in different training sample subsets can make different training sample subsets have different quality assessment tendencies. This will result in different quality assessment models trained based on different training sample subsets corresponding to different quality assessment standards, thereby meeting the dynamic and controllable requirements for quality assessment standards in intelligent customer service scenarios.

[0154] Please see Figure 10 , Figure 10 This is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of this application. The apparatus can be applied to… Figure 1 The implementation environment shown can be configured, for example, on server 130, or jointly on user terminal 110 and server 130. Of course, this device can also be applied to other implementation environments and configured on terminals or servers in other implementation environments, or jointly configured on terminals and servers in other implementation environments, without limitation.

[0155] like Figure 10 As shown, in an exemplary embodiment, the data processing apparatus 1000 includes:

[0156] The statement acquisition module 1010 is configured to acquire the answer statements output by the customer service question-and-answer model for the question statement;

[0157] The model determination module 1020 is configured to determine the target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards; the multiple quality assessment models are obtained based on the model training methods described in the aforementioned embodiments.

[0158] The quality assessment module 1030 is configured to use a target quality assessment model to assess the quality of the response statement and, if the quality meets the standards, use the response statement to respond to the question statement.

[0159] In another exemplary embodiment, the model determination module 1020 includes:

[0160] The business traffic statistics submodule is configured to count the business traffic represented by the business demands of the intelligent customer service system.

[0161] The standard selection submodule is configured to select a target quality assessment standard that matches the business traffic, so that the quality assessment model corresponding to the target quality assessment standard is used as the target quality assessment model that matches the business needs of the intelligent customer service system; the amount of business traffic is negatively correlated with the level of the quality assessment standard.

[0162] In another exemplary embodiment, the multiple quality assessment models include a pre-trained question-answering model and multiple fine-tuning modules connected to the pre-trained question-answering model, and the target quality assessment model includes the pre-trained question-answering model and the target fine-tuning module; the quality assessment module 1030 is further configured to use the pre-trained question-answering model and the target fine-tuning module to perform quality assessment on the answer statement, so as to use the answer statement to respond to the question statement if the quality meets the standard.

[0163] Please see Figure 11 , Figure 11 This is a flowchart illustrating a data processing apparatus in another exemplary embodiment of this application. The apparatus can be configured on a terminal device or a server, or it can be configured on both a terminal device and a server; this embodiment does not impose any limitations on this.

[0164] like Figure 11 As shown, in an exemplary embodiment, the data processing apparatus 1100 includes:

[0165] The data acquisition module 1110 is configured to acquire a training sample set; the training sample set includes question-answer pair samples and sample labels, and the sample labels are used to characterize whether the matching degree of the question-answer pair samples meets the standard.

[0166] The sample selection module 1120 is configured to select question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportion of qualified question-answer pair samples in different training sample subsets is different.

[0167] The model training module 1130 is configured to train the target model separately using at least two training sample subsets to obtain the quality evaluation model corresponding to each training sample subset; the target model includes a pre-trained question answering model and a fine-tuning module connected to the pre-trained question answering model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

[0168] In another exemplary embodiment, the sample selection module 1120 includes:

[0169] The sample weight determination submodule is configured to obtain the sample weights of question-answer pair samples; the larger the sample weight, the greater the influence of the question-answer pair samples on the training of the target model.

[0170] The probability determination submodule is selected and configured to determine the probability that a question-answer pair sample is randomly selected into different training sample subsets based on the proportion of qualified question-answer pair samples in different training sample subsets and the sample weight of the question-answer pair samples.

[0171] The sample selection execution submodule is configured to select question-answer pair samples from the training sample set based on the probability that the question-answer pair samples are randomly selected into different training sample subsets, so as to obtain different training sample subsets.

[0172] In another exemplary embodiment, the sample weight determination submodule includes:

[0173] The classification processing unit is configured to predict the quality labels of question-answer pair samples using the target model, and determine the prediction confidence of the question-answer pair samples based on the prediction results; the prediction confidence characterizes the reliability of the target model in predicting the quality labels of question-answer pair samples.

[0174] The weight calculation unit is configured to determine the sample weights of the question-answer pair samples based on the prediction confidence and prediction results.

[0175] In another exemplary embodiment, the weight calculation unit is further configured to perform the following steps:

[0176] If the quality label predicted by the target model is consistent with the sample label, the sample weight of the question-answer pair is determined based on the inverse relationship between sample weight and prediction confidence.

[0177] If the quality label predicted by the target model is inconsistent with the sample label, the sample weight of the question-answer pair sample is determined based on the fact that the sample weight is directly proportional to the prediction confidence.

[0178] In another exemplary embodiment, the probability determination submodule includes:

[0179] The data partitioning unit is configured to divide the question-answer pair samples included in the training sample set into a qualified sample group and a non-qualified sample group;

[0180] The quantity determination unit is configured to determine the number of samples to be selected from the qualified sample group and the unqualified sample group based on the proportion of qualified question-answer pairs in different training sample subsets.

[0181] The probability calculation unit is configured to calculate the probability that each question-answer pair sample is randomly selected into different training sample subsets based on the number of samples selected from the qualified sample group and the unqualified sample group, respectively.

[0182] In another exemplary embodiment, the proportion of qualified question-answer pairs in different training sample subsets includes a first ratio between the number of unqualified question-answer pairs and the number of qualified question-answer pairs; the quantity determination unit includes:

[0183] The ratio calculation subunit is configured to calculate a second ratio between the total number of samples in the non-compliant sample group and the total number of samples in the compliant sample group;

[0184] The ratio comparison subunit is configured to determine the number of samples to be selected from the qualified sample group and the unqualified sample group based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets.

[0185] In another exemplary embodiment, the ratio comparison subunit is further configured to perform the following steps:

[0186] If the second ratio is less than or equal to the first ratio, the total number of samples in the non-compliant sample group shall be used as the number of samples selected from the non-compliant sample group, and the quotient of the total number of samples in the compliant sample group and the first ratio shall be used as the number of samples selected from the compliant sample group.

[0187] If the second ratio is greater than the first ratio, the total number of samples in the qualified sample group is used as the number of samples selected from the qualified sample group, and the product of the total number of samples in the qualified sample group and the first ratio is used as the number of samples selected from the unqualified sample group.

[0188] In another exemplary embodiment, the probability determination unit includes:

[0189] The quantity comparison subunit is configured to determine the probability of each question-answer pair sample being randomly selected based on the relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, as well as the sample weight of each question-answer pair sample.

[0190] In another exemplary embodiment, the probability acquisition subunit is further configured to perform the following steps:

[0191] If the number of samples selected from the unqualified sample group is less than the number of samples selected from the qualified sample group, the sample weight of each question-answer pair in the qualified sample group will be used as the probability that each question-answer pair in the qualified sample group will be randomly selected, and the complementary weights corresponding to the sample weights of each question-answer pair in the unqualified sample group will be used as the probability that each question-answer pair in the unqualified sample group will be randomly selected.

[0192] If the number of samples selected from the unqualified sample group is greater than the number of samples selected from the qualified sample group, the sample weight of each question-answer pair in the unqualified sample group will be used as the probability that each question-answer pair in the unqualified sample group will be randomly selected, and the complementary weights corresponding to the sample weights of each question-answer pair in the qualified sample group will be used as the probability that each question-answer pair in the qualified sample group will be randomly selected.

[0193] If the number of samples selected from the unqualified sample group is equal to the number of samples selected from the qualified sample group, the sample weight of each question-answer pair is used as the probability that each question-answer pair sample is randomly selected. In another exemplary embodiment, the sample selection execution submodule includes:

[0194] The data partitioning unit is configured to divide the question-answer pair samples included in the training sample set into two sample groups with different sample label categories;

[0195] The sub-interval partitioning unit is configured to generate standardized weight intervals corresponding to each sample group, and divide each standardized weight interval into multiple sub-intervals according to the probability that the question-answer pair samples included in each sample group are randomly selected.

[0196] The sample selection unit is configured to select question-answer pair samples corresponding to the target sub-interval to which the random number belongs based on the random number within the standardized weight interval, until the total number of question-answer pair samples selected from each sample group satisfies the proportion of qualified question-answer pair samples in different training sample subsets.

[0197] In another exemplary embodiment, each question-answer pair sample in the sample subset is mapped one-to-one with each sub-interval within the standardized weight interval; the sub-interval partitioning unit includes:

[0198] The probability summation subunit is configured to sum the probabilities of randomly selecting the question-answer pairs included in each sample group to obtain the total probability corresponding to each sample group.

[0199] The boundary partitioning subunit is configured to determine the boundary information of each sub-interval within the standardized weight interval based on the order of the question-answer pair samples included in each sample group and the total probability corresponding to each sample group, so as to partition the standardized weight interval into sub-intervals based on the boundary information.

[0200] It should be noted that the apparatus and method provided in the above embodiments belong to the same concept, and the specific manner in which each module and unit performs its operation has been described in detail in the method embodiments, and will not be repeated here. In practical applications, the data processing apparatus provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation here.

[0201] Embodiments of this application also provide an electronic device, including: one or more processors; and a memory for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the data processing methods provided in the above embodiments.

[0202] Figure 12 A schematic diagram of a computer system suitable for implementing an electronic device according to embodiments of this application is shown. It should be noted that the electronic device can be... Figure 1 The user terminal 110 or server 130 in the implementation environment shown can also be a terminal or server in other implementation environments; there are no restrictions here. It should also be noted that... Figure 12 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0203] like Figure 12As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes based on a computer program stored in Read-Only Memory (ROM) 1202 or a computer program loaded from storage portion 1208 into Random Access Memory (RAM) 1203, such as performing the methods described in the above embodiments. Various computer programs and data required for system operation are also stored in RAM 1203. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. An Input / Output (I / O) interface 1205 is also connected to bus 1204.

[0204] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.

[0205] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.

[0206] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0207] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0208] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0209] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor of an electronic device, implements the data processing method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0210] Another aspect of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the data processing methods provided in the various embodiments described above.

[0211] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

[0212] It is understood that in the specific implementation of this application, data related to question-and-answer pairs, sample tags, and question statements are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A data processing method, characterized in that, The method includes: Obtain a training sample set; the training sample set includes question-answer pair samples and sample labels, the sample labels being used to characterize whether the matching degree of the question-answer pair samples meets the standard; Question-answer pairs are selected from the training sample set based on the sample labels to obtain at least two training sample subsets; the proportion of qualified question-answer pairs in different training sample subsets is different. The target model is trained using at least two subsets of training samples to obtain a quality assessment model corresponding to each subset of training samples. The target model includes a pre-trained question-answering model and a fine-tuning module connected to the pre-trained question-answering model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

2. The method according to claim 1, characterized in that, The step of selecting question-answer pair samples from the training sample set based on the sample labels to obtain at least two training sample subsets includes: Obtain the sample weights of the question-answer pair samples; the larger the sample weights, the greater the influence of the question-answer pair samples on the training of the target model; Based on the proportion of qualified question-answer pairs in different training sample subsets and the sample weights of the question-answer pairs, the probability of a question-answer pair being randomly selected into different training sample subsets is determined. Based on the probability that the question-answer pair samples are randomly selected into different training sample subsets, question-answer pair samples are selected from the training sample set to obtain different training sample subsets.

3. The method according to claim 2, characterized in that, The step of obtaining the sample weights of the question-answer pair samples includes: The target model is used to predict the quality labels of the question-answer pair samples, and the prediction confidence of the question-answer pair samples is determined based on the prediction results; the prediction confidence represents the reliability of the target model in predicting the quality labels of the question-answer pair samples. The sample weights of the question-answer pair samples are determined based on the prediction confidence of the question-answer pair samples and the prediction results.

4. The method according to claim 3, characterized in that, The step of determining the sample weights of the question-answer pair samples based on the prediction confidence of the question-answer pair samples and the prediction results includes: If the quality label predicted by the target model is consistent with the sample label, the sample weight of the question-answer pair sample is determined based on the inverse relationship between sample weight and prediction confidence. If the quality label predicted by the target model is inconsistent with the sample label, the sample weight of the question-and-answer pair sample is determined based on the fact that the sample weight is directly proportional to the prediction confidence.

5. The method according to claim 2, characterized in that, The step of determining the probability that a question-answer pair is randomly selected into different training sample subsets based on the proportion of qualified question-answer pairs in different training sample subsets and the sample weights of the question-answer pairs includes: The question-answer pairs included in the training sample set are divided into a qualified sample group and a non-qualified sample group; Based on the proportion of qualified question-answer pairs in different training sample subsets, determine the number of samples to be selected from the qualified sample group and the unqualified sample group respectively. Based on the number of samples selected from the qualified sample group and the unqualified sample group, the probability that each question-answer pair sample is randomly selected into different training sample subsets is calculated.

6. The method according to claim 5, characterized in that, The proportion of qualified question-answer pairs in different training sample subsets includes a first ratio between the number of unqualified question-answer pairs and the number of qualified question-answer pairs. The step of determining the number of samples to be selected from the qualified sample group and the unqualified sample group based on the proportion of qualified question-answer pairs in different training sample subsets includes: Calculate a second ratio between the total number of samples in the non-compliant sample group and the total number of samples in the compliant sample group; Based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets, the number of samples selected from the qualified sample group and the unqualified sample group is determined respectively.

7. The method according to claim 6, characterized in that, The step of determining the number of samples to be selected from the qualified sample group and the unqualified sample group based on the relationship between the second ratio and the first ratio corresponding to different training sample subsets includes: If the second ratio is less than or equal to the first ratio, then the total number of samples in the non-compliant sample group is used as the number of samples selected from the non-compliant sample group, and the quotient of the total number of samples in the compliant sample group and the first ratio is used as the number of samples selected from the compliant sample group. If the second ratio is greater than the first ratio, then the total number of samples in the qualified sample group is used as the number of samples selected from the qualified sample group, and the product of the total number of samples in the qualified sample group and the first ratio is used as the number of samples selected from the unqualified sample group.

8. The method according to claim 5, characterized in that, The step of determining the probability that each question-answer pair sample is randomly selected into different training sample subsets based on the number of samples selected from the qualified sample group and the unqualified sample group includes: Based on the relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, and the sample weight of each question-answer pair, the probability of each question-answer pair being randomly selected is determined.

9. The method according to claim 8, characterized in that, The determination of the probability of each question-answer pair being randomly selected, based on the relationship between the number of samples selected from the qualified sample group and the number of samples selected from the unqualified sample group, and the sample weight of each question-answer pair sample, includes: If the number of samples selected from the non-compliant sample group is less than the number of samples selected from the compliant sample group, the sample weight of each question-answer pair in the compliant sample group is used as the probability that each question-answer pair in the compliant sample group is randomly selected, and the complementary weights corresponding to the sample weights of each question-answer pair in the non-compliant sample group are used as the probability that each question-answer pair in the non-compliant sample group is randomly selected. If the number of samples selected from the non-compliant sample group is greater than the number of samples selected from the compliant sample group, the sample weight of each question-answer pair in the non-compliant sample group is used as the probability that each question-answer pair in the non-compliant sample group is randomly selected, and the complementary weights corresponding to the sample weights of each question-answer pair in the compliant sample group are used as the probability that each question-answer pair in the compliant sample group is randomly selected. If the number of samples selected from the non-compliant sample group is equal to the number of samples selected from the compliant sample group, the sample weight of each question-answer pair sample is used as the probability that each question-answer pair sample is randomly selected.

10. The method according to claim 2, characterized in that, The step of selecting question-answer pair samples from the training sample set based on the probability that the question-answer pair samples are randomly selected into different training sample subsets to obtain different training sample subsets includes: The question-answer pairs included in the training sample set are divided into two sample groups with different sample label categories; Generate standardized weight intervals for each sample group, and divide each standardized weight interval into multiple sub-intervals based on the probability that the question-answer pair samples included in each sample group are randomly selected. Based on the random number within the standardized weight interval, select the question-answer pair sample corresponding to the target sub-interval to which the random number belongs, until the total number of question-answer pair samples selected from each sample group satisfies the proportion of qualified question-answer pair samples in different training sample subsets.

11. The method according to claim 11, characterized in that, Each question-answer pair sample in the sample subset is mapped one-to-one with each sub-interval within the standardized weight interval; the standardized weight interval corresponding to each sample group is generated, and each standardized weight interval is divided into multiple sub-intervals according to the probability that the question-answer pair samples included in each sample group are randomly selected, including: The probability of each question-and-answer pair sample being randomly selected in each sample group is summed to obtain the total probability for each sample group. Based on the order of the question-answer pairs included in each sample group and the total probability corresponding to each sample group, the boundary information of each sub-interval within the standardized weight interval is determined, so as to divide the standardized weight interval into sub-intervals based on the boundary information.

12. A data processing method, characterized in that, The method is applied to an intelligent customer service system, which is equipped with a customer service question-and-answer model. The method includes: Obtain the response statement output by the customer service question-and-answer model for the question statement; From multiple quality assessment models corresponding to different quality assessment standards, a target quality assessment model that matches the business needs of the intelligent customer service system is determined; the multiple quality assessment models are obtained by training based on the method described in any one of claims 1-11. The target quality assessment model is used to assess the quality of the response statement, and the response statement is used to respond to the question statement if the quality meets the standard.

13. The method according to claim 12, characterized in that, The step of selecting a target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards includes: The business traffic represented by the business demands of the intelligent customer service system is statistically analyzed. Select a target quality assessment standard that matches the business traffic, and use the quality assessment model corresponding to the target quality assessment standard as the target quality assessment model that matches the business needs of the intelligent customer service system; the amount of business traffic is negatively correlated with the level of the quality assessment standard.

14. The method according to claim 12, characterized in that, The multiple quality assessment models include a pre-trained question answering model and multiple fine-tuning modules connected to the pre-trained question answering model, and the target quality assessment model includes the pre-trained question answering model and the target fine-tuning module; The step of using the target quality assessment model to assess the quality of the response statement, and using the response statement to respond to the question statement when the quality meets the standard, includes: The pre-trained question-answering model and the target fine-tuning module are used to evaluate the quality of the answer statement so that the answer statement can be used to respond to the question statement if the quality meets the standard.

15. A data processing apparatus, characterized in that, The device includes: The data acquisition module is configured to acquire a training sample set; the training sample set includes question-answer pair samples and sample labels, the sample labels being used to characterize whether the matching degree of the question-answer pair samples meets the standard; The sample selection module is configured to select question-answer pair samples from the training sample set according to the sample labels to obtain at least two training sample subsets; the proportion of qualified question-answer pair samples in different training sample subsets is different. The model training module is configured to train the target model using at least two training sample subsets to obtain a quality assessment model corresponding to each training sample subset; the target model includes a pre-trained question answering model and a fine-tuning module connected to the pre-trained question answering model, wherein the model parameters of the fine-tuning module are adjusted during the training of the target model.

16. A data processing apparatus, characterized in that, The device is configured in an intelligent customer service system, which is equipped with a pre-trained question-answering model. The device includes: The statement acquisition module is configured to acquire the answer statement output by the pre-trained question-answering model for the question statement; The model determination module is configured to determine a target quality assessment model that matches the business needs of the intelligent customer service system from multiple quality assessment models corresponding to different quality assessment standards; the multiple quality assessment models are obtained by training based on the method described in any one of claims 1-11. The quality assessment module is configured to use the target quality assessment model to assess the quality of the answer statement, and to use the answer statement to respond to the question statement if the quality meets the standard.

17. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more computer programs that, when executed by one or more processors, cause the electronic device to perform the method as described in any one of claims 1-14.

18. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the processor of the electronic device, causes the electronic device to perform the method of any one of claims 1-14.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor of the electronic device, it implements the method as described in any one of claims 1-14.