Search

CN-121996935-A - Data processing method, electronic device, storage medium, and computer program product

CN121996935ACN 121996935 ACN121996935 ACN 121996935ACN-121996935-A

Abstract

The application discloses a data processing method, electronic equipment, a storage medium and a computer program product, and relates to the technical fields of large model technology and data query. The method comprises the steps of obtaining seed data, pre-labeling the seed data through a label propagation mode to obtain labeling data, performing data quality inspection on the labeling data to obtain training data, and training an initial intention classification model by adopting the training data to obtain a target intention classification model. The method solves the technical problems of high training cost and low efficiency of the model with the tool selection function in the related technology, and the model obtained by training has poor tool selection accuracy and poor query accuracy.

Inventors

  • WANG XIAOBIN
  • CHEN BOLI
  • XIE PENGJUN

Assignees

  • 阿里巴巴(中国)有限公司

Dates

Publication Date
20260508
Application Date
20241101

Claims (16)

  1. 1. A method of data processing, comprising: obtaining seed data, wherein the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention categories; Pre-labeling the seed data by a label propagation mode to obtain labeling data; performing data quality inspection on the labeling data to obtain training data; Training an initial intention classification model by adopting the training data to obtain a target intention classification model, wherein the target intention classification model is used for carrying out intention classification on target query data so as to select a target tool corresponding to the target query data, and the target intention classification model is also used for calling the target tool to obtain a target query result.
  2. 2. The data processing method according to claim 1, wherein pre-labeling the seed data by the tag propagation method, to obtain the labeled data includes: acquiring historical query data, wherein the historical query data is real query data without labels generated in a historical time period; performing cluster analysis on the historical query data and the sample query data to obtain a cluster result; and carrying out label propagation on the clustering result to obtain the labeling data.
  3. 3. The data processing method according to claim 2, wherein performing cluster analysis on the historical query data and the sample query data to obtain the cluster result includes: Vectorizing the historical query data to obtain a first vector, and vectorizing the sample query data to obtain a second vector; performing similarity calculation on the first vector and the second vector based on a preset threshold condition to obtain a target calculation result; and carrying out cluster analysis on the target calculation result by adopting a preset cluster algorithm to obtain the cluster result.
  4. 4. The data processing method according to claim 3, wherein the predetermined threshold condition includes a multi-level similarity threshold, and performing similarity calculation on the first vector and the second vector based on the predetermined threshold condition, and obtaining the target calculation result includes: selecting a target similarity threshold from the multi-level similarity thresholds; Performing similarity calculation on the first vector and the second vector by adopting a preset vector similarity calculation mode to obtain an initial calculation result; Comparing the initial calculation result with the target similarity threshold value to obtain a comparison result; And screening the initial calculation result based on the comparison result to obtain the target calculation result.
  5. 5. The data processing method according to claim 3, wherein the clustering category corresponding to the clustering result is determined according to a preset intention number.
  6. 6. The data processing method according to claim 2, wherein performing label propagation on the clustering result to obtain the labeling data includes: Determining intention categories of a plurality of clusters contained in the clustering result; And marking the data category in the same cluster among the clusters as the intention category to obtain the marked data.
  7. 7. The data processing method according to claim 6, wherein determining the intention category of the plurality of clusters included in the clustering result includes: Determining the intention category of the plurality of clusters contained in the clustering result based on voting results of sample query data in the same cluster among the plurality of clusters.
  8. 8. The data processing method according to any one of claims 1 to 7, wherein performing a data quality check on the annotation data to obtain the training data includes: setting the sample query data as a reference sample, setting the labeling data as a judgment object, and generating a prompt text; Performing intention judgment on the annotation data based on the prompt text control target language model to obtain a judgment result, wherein the judgment result is used for determining whether the annotation data is matched with the sample intention category or not; And updating a target data pair to the training data in response to the judgment result indicating that the labeling data is not matched with the sample intention type, so as to continue to iteratively train the initial intention classification model by using the updated training data, wherein the target data pair is a non-matched data pair comprising the labeling data and the sample intention type.
  9. 9. The data processing method according to claim 8, characterized in that the data processing method further comprises: And stopping performing iterative training on the initial intention classification model by using the labeling data and the sample intention category in response to the judgment result indicating that the labeling data is matched with the sample intention category.
  10. 10. A method of data processing, comprising: Acquiring target query data; Performing intention classification on the target query data by adopting a target intention classification model so as to select a target tool corresponding to the target query data; invoking the target tool to acquire a target query result; The target intention classification model is obtained after training an initial intention classification model by training data, the training data is obtained after data quality inspection of labeling data, the labeling data is obtained after pre-labeling seed data by a label propagation mode, the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention types.
  11. 11. A method of data processing, comprising: Acquiring weather inquiry data; Performing intent classification on the weather query data by adopting a target intent classification model to select a weather forecast tool corresponding to the weather query data; Invoking the weather forecast tool to obtain a weather inquiry result; The target intention classification model is obtained after training an initial intention classification model by training data, the training data is obtained after data quality inspection of labeling data, the labeling data is obtained after pre-labeling seed data by a label propagation mode, the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention types.
  12. 12. A method of data processing, comprising: acquiring a data processing request through a first application programming interface, wherein request data carried in the data processing request comprises target query data; returning a data processing response through a second application programming interface, wherein response data carried in the data processing response comprises a target query result; The target query result is obtained by adopting a target intention classification model to carry out intention classification on target query data so as to select a target tool corresponding to the target query data and calling the target tool, the target intention classification model is obtained by adopting training data to train an initial intention classification model, the training data is obtained by carrying out data quality inspection on labeling data, the labeling data is obtained by carrying out pre-labeling on seed data in a label propagation mode, the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention types.
  13. 13. A method of data processing, comprising: acquiring a currently input data processing dialogue request, wherein request data carried in the data processing dialogue request comprises target query data; Responding to the data processing dialogue request, and returning a data processing dialogue reply, wherein the information carried in the data processing dialogue reply comprises a target query result; displaying the target query result in a graphical user interface; The target query result is obtained by adopting a target intention classification model to carry out intention classification on target query data so as to select a target tool corresponding to the target query data and calling the target tool, the target intention classification model is obtained by adopting training data to train an initial intention classification model, the training data is obtained by carrying out data quality inspection on labeling data, the labeling data is obtained by carrying out pre-labeling on seed data in a label propagation mode, the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention types.
  14. 14. An electronic device, comprising: A memory storing an executable program; A processor for executing the program, wherein the program when executed performs the data processing method of any one of claims 1 to 13.
  15. 15. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored executable program, wherein the executable program when run controls a device in which the computer readable storage medium is located to perform the data processing method according to any one of claims 1 to 13.
  16. 16. A computer program product comprising a computer program which, when executed by a processor, implements the data processing method of any of claims 1 to 13.

Description

Data processing method, electronic device, storage medium, and computer program product Technical Field The present application relates to the field of large model technology and data query technology, and in particular, to a data processing method, an electronic device, a storage medium, and a computer program product. Background In the technical field of large models, an intelligent agent can understand user input and respond. In particular, the tool selection function is one of important functions of an agent that selects an appropriate tool for responding to a user's demand by understanding the intention of the user input. In this process, the accuracy of the intended understanding of the user input will affect the accuracy of the agent selection tool and thus the agent's output performance. In the related art, an agent generally includes an intention recognition model, user input is mapped to the intention recognition model to perform intention recognition, and a language model (i.e., a student model) corresponding to the agent is obtained by training in a conventional model distillation training manner. Specifically, random sampling is performed on the non-labeled data, the sampling result is used as a prompt (prompt) of a large language model (i.e. a teacher model) to generate an output label corresponding to the non-labeled data (for example, the non-labeled data is query data, the output label is a tool label corresponding to the query data), and the output label is used as a supervision signal to guide training of a student model. However, the above scheme provided by the related art has the defects that the occupation of the user query using the tool selection function in all queries is relatively low, a large amount of resource waste is caused by predicting each user query by adopting a large language model, that is, the model training efficiency is low and the training cost is high, and the accuracy of directly prompting the large language model to perform tool selection (that is, outputting a label) is difficult to meet the accuracy requirement of the training of the intention recognition model, so that the model training effect is poor. From the above, how to train an agent with lower cost and higher efficiency, and improve the accuracy of identifying the intention thereof to enhance the accuracy of tool selection becomes one of the important technical problems in the related art. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a data processing method, electronic equipment, a storage medium and a computer program product, which at least solve the technical problems that the training cost of a model with a tool selection function is high, the efficiency is low, and the tool selection accuracy and the query accuracy of the trained model are poor in the related technology. According to one aspect of the embodiment of the application, a data processing method is provided, which comprises the steps of obtaining seed data, wherein the seed data comprises sample data pairs, the sample data pairs comprise sample query data and sample intention types, pre-labeling the seed data through a label propagation mode to obtain labeling data, performing data quality inspection on the labeling data to obtain training data, training an initial intention classification model by adopting the training data to obtain a target intention classification model, and the target intention classification model is used for carrying out intention classification on the target query data to select a target tool target intention classification model corresponding to the target query data and also used for calling a target tool to obtain a target query result. According to another aspect of the embodiment of the application, the data processing method comprises the steps of obtaining target query data, carrying out intention classification on the target query data by adopting a target intention classification model to select a target tool corresponding to the target query data, and calling the target tool to obtain a target query result, wherein the target intention classification model is obtained by training an initial intention classification model by adopting training data, the training data is obtained by carrying out data quality inspection on labeling data, the labeling data is obtained by carrying out pre-labeling on seed data by a label propagation mode, the seed data comprises sample data pairs, and the sample data pairs comprise sample query data and sample intention types. According to another aspect of the embodiment of the application, the data processing method comprises the steps of obtaining weather query data, carrying out intention classification on the weather query data by adopting a target intention classification model to select a weather forecast tool corresponding to the weather query data, and calling