Data processing method, device, equipment, system, storage medium and product
By passing the model that has been distilled through knowledge in model training, and using private domain data to train the model, calculate the accuracy increase value to determine the billing fee, the problems of private domain data privacy protection and value billing are solved, and the model training is realized Optimization and promotion of private domain data circulation.
Patent Information
- Application Number
- CN202411365165.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to effectively protect the privacy of private domain data in model training, and the value of training data is unreasonable, resulting in insufficient circulation of private domain data in the model training field.
The billing fee for the private domain data is determined by passing the knowledge-distilled model between the first device and the second device with the private domain data, using the private domain data to train the model, and calculating the accuracy enhancement value through the test data set.
While protecting the privacy of private domain data, the optimization effect of model training is achieved, and the private domain data owners are encouraged to contribute data through a reasonable billing mechanism, which promotes the circulation of private domain data in the model training field.
Smart Images

Figure CN119400160A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and in particular to a data processing method, device, equipment, system, storage medium and product. Background Art
[0002] With the continuous development of big data and artificial intelligence technology, large language models have achieved remarkable results in the field of natural language processing. These large language models have the characteristics of large number of model parameters and large training data requirements. In related technologies, there is a tendency to use more training data to train models with larger number of parameters in order to achieve better model inference results.
[0003] If the current trend continues, the currently available public training data will soon be exhausted. By then, a large amount of private domain data will be required to participate in the training to further improve the effect of model training. During the training process, how to protect the privacy of sensitive content in private domain data and reasonably charge the value of training data is of great significance for promoting data circulation in related fields and thus encouraging more private domain data owners to contribute their data for training. Summary of the invention
[0004] In view of this, embodiments of the present application provide a data processing method, apparatus, device, system, storage medium and product, which aim to promote the circulation of private domain data in the field of model training.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a first device, and the method includes:
[0007] Sending a second model to a second device having private domain data; wherein the second model is a model obtained by performing knowledge distillation on the initial first model;
[0008] Receive a third model sent by the second device; wherein the third model is a model obtained by training the second model based on private domain data, and the third model is used to update the first model.
[0009] In the above scheme, the method further comprises:
[0010] Acquire and send a test data set to the second device;
[0011] Processing the test data set based on the second model and the third model to generate a first accuracy improvement value, where the first accuracy improvement value represents an accuracy improvement value of the third model calculated based on the test data set compared with the second model;
[0012] receiving a second accuracy improvement value sent by the second device, where the second accuracy improvement value represents an accuracy improvement value of the third model calculated by the second device based on the test data set compared with the second model;
[0013] Based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device is generated.
[0014] In the above solution, generating the billing fee corresponding to the private domain data of the second device based on the first accuracy improvement value and the second accuracy improvement value includes:
[0015] If it is determined that the first accuracy improvement value is equal to the second accuracy improvement value, generating a billing fee corresponding to the private domain data of the second device based on a set rate coefficient and the first accuracy improvement value or the second accuracy improvement value;
[0016] If it is determined that the first accuracy improvement value is not equal to the second accuracy improvement value, the calculation results of the first accuracy improvement value and the second accuracy improvement value are verified, and the final accuracy improvement value is determined based on the verification results, and the billing fee corresponding to the private domain data of the second device is generated based on the set rate coefficient and the final accuracy improvement value.
[0017] In the above solution, verifying the calculation results of the first accuracy improvement value and the second accuracy improvement value, and determining the final accuracy improvement value based on the verification results, includes:
[0018] Based on the second model and the third model, obtain a first prediction result of the test data in the test data set in a set order, and receive a second prediction result of the same test data sent by the second device;
[0019] If it is determined that the first prediction result is the same as the second prediction result, continue to compare the first prediction result and the second prediction result of the next test data until the first prediction result and the second prediction result of all the test data are the same, and obtain the first accuracy improvement value of the first device and the second accuracy improvement value of the second device again, and calculate to obtain the final accuracy improvement value;
[0020] If it is determined that the first prediction result is different from the second prediction result, the calculation results of each network layer after the second model and the third model on the first device side are input with the second model and the third model on the second device side after the same data is input; and the model parameters are updated based on the calculation results, so that the model parameters of the second model on the first device side and the second device side are the same, and the model parameters of the third model are the same, and the first accuracy improvement value of the first device and the second accuracy improvement value of the second device are obtained again, and the final accuracy improvement value is calculated.
[0021] In the above solution, before generating the billing fee corresponding to the private domain data of the second device, the method further includes:
[0022] Receive a review result of the test data set sent by the second device, and determine that the review result is passed.
[0023] In the above solution, the first model is an initial model trained based on public domain data, and the method further includes:
[0024] The first model is converted into the second model based on forward knowledge distillation.
[0025] In the above solution, converting the first model into the second model based on forward knowledge distillation includes:
[0026] The first model is used as a teacher model, the initial second model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the second model.
[0027] In the above solution, the first model includes at least a Transformer layer, the number of Transformer layers in the second model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0028] Update the parameters of each Transformer layer in the student model in reverse.
[0029] In the above scheme, the method further comprises:
[0030] Reverse knowledge distillation is performed on the first model based on the third model to obtain a fourth model.
[0031] In the above solution, the reverse knowledge distillation of the first model is performed based on the third model to obtain the fourth model, including:
[0032] The third model is used as a teacher model, the first model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the fourth model.
[0033] In the above solution, the first model includes at least a Transformer layer, the number of Transformer layers in the third model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0034] Update the parameters of each Transformer layer in the student model in reverse.
[0035] In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a second device having private domain data, and the method includes:
[0036] Receiving a second model from the first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model;
[0037] Training the second model based on the private domain data to obtain a third model;
[0038] The third model is sent to the first device; wherein the third model is used to update the first model.
[0039] In the above scheme, the method further comprises:
[0040] Receiving a test data set sent by the first device;
[0041] Processing the test data set based on the second model and the third model to generate a second accuracy improvement value;
[0042] Send the second accuracy improvement value to the first device.
[0043] In the above scheme, the method further comprises:
[0044] The test data set is reviewed, and a review result is sent to the first device.
[0045] In the above solution, the review of the test data includes at least one of the following: data format review, data field review and data quality review;
[0046] Before generating the second accuracy improvement value, the method further includes:
[0047] Determine that the audit result is audit passed.
[0048] In a third aspect, an embodiment of the present application provides a data processing apparatus, applied to a first device, the apparatus comprising:
[0049] A first sending module is used to send a second model to a second device having private domain data; wherein the second model is a model obtained by performing knowledge distillation on the initial first model;
[0050] The first receiving module is used to receive the third model sent by the second device; wherein the third model is a model obtained by training the second model based on private domain data, and the third model is used to update the first model.
[0051] In a fourth aspect, an embodiment of the present application provides a data processing device, which is applied to a second device having private domain data, and the device includes:
[0052] A second receiving module is used to receive a second model from the first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model;
[0053] A training module, used for training the second model based on private domain data to obtain a third model;
[0054] The second sending module is used to send the third model to the first device; wherein the third model is used to update the first model.
[0055] In a fifth aspect, an embodiment of the present application provides a first device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when used to run the computer program, executes the steps of the method described in the first aspect of the embodiment of the present application.
[0056] In the sixth aspect, an embodiment of the present application provides a second device having private domain data, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein when the processor is used to run the computer program, the steps of the method described in the second aspect of the embodiment of the present application are executed.
[0057] In the seventh aspect, an embodiment of the present application provides a data processing system, comprising: the first device described in the fifth aspect of the embodiment of the present application and at least one second device described in the sixth aspect of the embodiment of the present application.
[0058] In an eighth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect of the embodiment of the present application are implemented.
[0059] In a ninth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect or the second aspect of the embodiment of the present application.
[0060] The technical solution provided by the embodiment of the present application is that the first device sends the second model to the second device that owns the private domain data; wherein the second model is a model obtained by knowledge distillation of the initial first model; and receives the third model sent by the second device; wherein the third model is a model obtained by training the second model based on the private domain data, and the third model is used to update the first model. In this way, the training optimization effect of the model can be achieved between the first device as the model training party and the second device as the private domain data owner, on the premise that their respective key data do not leave the domain, which is conducive to meeting the purpose of training and optimizing the model with a large number of parameters based on private domain data; in addition, since both the first device and the second device have the second model and the third model, it provides a basis for reasonable billing of private domain data as training data, which can better motivate private domain data owners to contribute their data for training, thereby better promoting the circulation of private domain data in the field of model training. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a flow chart of a data processing method according to an embodiment of the present application;
[0062] Figure 2 This is a schematic diagram of the structure of a large language model in an embodiment of the present application;
[0063] Figure 3 This is a schematic diagram of the internal structure of the Transformer layer in an embodiment of the present application;
[0064] Figure 4 This is a flowchart of a data processing method according to another embodiment of the present application;
[0065] Figure 5 This is a schematic diagram of the composition of the data processing system of the application embodiment of the present application;
[0066] Figure 6 A schematic diagram of the business process of an embodiment of the present application;
[0067] Figure 7 A flowchart of the training process of the model of the application embodiment of the present application;
[0068] Figure 8 A flowchart of the billing process of the present application embodiment;
[0069] Fig. 9 A flowchart of an error checking process in an embodiment of the present application;
[0070] Fig.10 A flow chart of the internal verification process of the model of the application embodiment of the present application;
[0071] Fig.11 This is a structural diagram of a data processing device according to an embodiment of the present application;
[0072] Fig.12 This is a structural schematic diagram of a data processing device according to another embodiment of the present application;
[0073] Fig.13 This is a schematic diagram of the structure of the first device in the embodiment of the present application;
[0074] Fig.14 This is a schematic diagram of the structure of the second device according to an embodiment of the present application. DETAILED DESCRIPTION
[0075] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0077] In order to achieve privacy protection of private domain data during model training, and reasonably charge the value of training data, thereby promoting data circulation in related fields, an embodiment of the present application provides a data processing method, which is based on the cooperation between a first device serving as a model training party and a second device serving as an owner of private domain data. The data processing methods on the first device side and the second device side are described below respectively.
[0078] like Figure 1 As shown, an embodiment of the present application provides a data processing method, which is applied to a first device, and the method includes:
[0079] Step 101, sending a second model to a second device that has private domain data; wherein the second model is a model obtained by performing knowledge distillation on the initial first model.
[0080] Step 102, receiving a third model sent by the second device; wherein the third model is a model obtained by training the second model based on private domain data, and the third model is used to update the first model.
[0081] It can be understood that the data processing method of the embodiment of the present application can achieve the effect of model training optimization between the first device as the model training party and the second device as the private domain data owner, under the premise that their respective key data do not leave the domain, which is conducive to meeting the purpose of training and optimizing models with a large number of parameters based on private domain data; in addition, since the first device and the second device both have the second model and the third model, it provides a basis for reasonable billing of private domain data as training data, which can better incentivize private domain data owners to contribute their data for training, thereby better promoting the circulation of private domain data in the field of model training.
[0082] Exemplarily, the first model is an initial model trained based on public domain data. It is understandable that the first device can train the defined model based on public domain data to obtain the trained initial model. In order to improve the model adaptability performance of the initial model, it is necessary to further train with the help of private domain data in a specific field. Based on this, in order to avoid the leakage of the initial model, the first device can first convert the first model into a second model based on forward knowledge distillation, and then send the second model to the second device of the private domain data owner, and the second device trains the second model based on the private domain data to obtain a third model with improved performance.
[0083] Exemplarily, the method further includes:
[0084] The first model is converted into the second model based on forward knowledge distillation.
[0085] Exemplarily, converting the first model into the second model based on forward knowledge distillation includes:
[0086] The first model is used as a teacher model, the initial second model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the second model.
[0087] It is understandable that the first device can construct an initial second model based on the first model, and use an algorithm for calculating distillation loss to obtain the distillation loss between the first model and the second model, and then reversely update the model parameters of the second model based on the distillation loss until the distillation loss converges or the number of training times meets the set number of times, thereby obtaining a second model that meets the requirements. The second model can be understood as a compressed model of the first model after forward distillation.
[0088] Exemplarily, the first model includes at least a Transformer layer, the number of Transformer layers in the second model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0089] Update the parameters of each Transformer layer in the student model in reverse.
[0090] In one application example, the first model is a large language model (LLM), which refers to a deep learning model trained using a large amount of text data. It can generate natural language text or understand the meaning of language text. The large language model can handle a variety of natural language tasks, such as text classification, question and answer, dialogue, etc., and is an important path to artificial intelligence.
[0091] Figure 2 The structure of a large language model is shown, which includes a word segmenter, an embedding layer, multiple Transformer layers, and a prediction layer.
[0092] Among them, Transformer is a sequence model based on self-attention mechanism and multi-attention mechanism, which was originally proposed by Google's research team and applied to machine translation tasks. Different from traditional recurrent neural networks (RNN) and convolutional neural networks (CNN), Transformer introduces self-attention mechanism and multi-attention mechanism to process input sequence and output sequence, so that the neural network can better capture the long-range dependencies in the sequence, and can also perform parallel calculations, greatly improving the computational efficiency. Among them, Decoder is mainly used to generate output data based on the input vector. Its input data is the output data from the previous time step, so it can generate output data with contextual information; Encoder is mainly used to encode the input data into a high-dimensional vector. This vector contains all the information of the input data and can be used for subsequent task processing.
[0093] For example, the internal structure of the Transformer layer is as follows Figure 3 As shown. Figure 3 In the figure, the left half is the Encoder module of the Transformer architecture, and the right half is the Decoder module of the Transformer architecture. Inside the Encoder and Decoder, there is an internal neural network structure composed of sub-modules such as Multi-Head Attention, Residual Connection and Layer Normalization (Add & Norm), and Feed Forward.
[0094] In actual large-scale model applications, Figure 2 The Transformer layer in can only use Figure 3The Encoder part or the Decoder part in the model, for example, the Bert model only uses the Encoder part, and the LLaMA and GPT models only use the Decoder part. The number of Transformer layers can be different. For example, the GPT2 model, the GPT2 SMALL model has a total of 12 Transformer layers, and the GPT2 EXTRA LARGE model has a total of 48 Transformer layers. This embodiment of the application does not specifically limit this.
[0095] It should be noted that the second model corresponding to the large language model (i.e., the first model) also has Figure 2 The structure shown also includes: a word segmenter, an embedding layer, multiple Transformer layers, and a prediction layer. The word segmenter, embedding layer, and prediction layer are the same as those in the first model, and the structure of the Transformer layer in the second model is also the same as that in the first model, but the number of Transformer layers in the second model is less than that in the first model.
[0096] Here, after the second device receives the second model sent by the first device, the second device can train the second model based on the private domain data to obtain a third model with improved reasoning performance, and the second device can send the trained third model to the first device.
[0097] Exemplarily, the method further includes:
[0098] Reverse knowledge distillation is performed on the first model based on the third model to obtain a fourth model.
[0099] Exemplarily, performing reverse knowledge distillation on the first model based on the third model to obtain a fourth model includes:
[0100] The third model is used as the teacher model, the first model is used as the student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the fourth model.
[0101] Here, reverse knowledge distillation can be understood with reference to the aforementioned forward knowledge distillation. Specifically, it can be understood that the relative relationship between the teacher model and the student model has been swapped. The updating principle of the model parameters is similar and will not be repeated here.
[0102] Exemplarily, the first model includes at least a Transformer layer, the number of Transformer layers in the third model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0103] Update the parameters of each Transformer layer in the student model in reverse.
[0104] It can be understood that since the third model is a model trained based on private domain data and with improved performance, the first device performs reverse knowledge distillation on the first model based on the third model. In this way, the reasoning performance of the first model can be effectively improved, and the training optimization effect of the model can be achieved under the premise that the key data of the first device and the second device do not leave the domain. In addition, since the first device and the second device both have the second model and the third model, it provides a basis for reasonable billing of private domain data as training data, which can better incentivize private domain data owners to contribute their data for training, thereby better promoting the circulation of private domain data in the field of model training.
[0105] Exemplarily, the method further includes:
[0106] Acquire and send a test data set to the second device;
[0107] Processing the test data set based on the second model and the third model to generate a first accuracy improvement value, wherein the first accuracy improvement value represents an accuracy improvement value of the accuracy improvement performance of the third model calculated based on the test data set compared with that of the second model;
[0108] receiving a second accuracy improvement value sent by the second device, where the second accuracy improvement value represents an accuracy improvement value of the third model calculated by the second device based on the test data set compared with the accuracy improvement performance of the second model;
[0109] Based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device is generated.
[0110] It is understandable that the first device can obtain and send a test data set to the second device, and charge for the training data provided by the second device based on the common test data set, the second model, and the third model. Specifically, the first device can input the test data set into the second model and the third model respectively to obtain the first accuracy improvement value, and the second device can input the received test data set into the second model and the third model respectively to obtain the second accuracy improvement value and send the second accuracy improvement value to the first device. In this way, the first device can generate the billing fee corresponding to the private domain data of the second device based on the first accuracy improvement value and the second accuracy improvement value. Since the billing fee is generated based on the calculation results of both the data training party and the private domain data owner, it can meet the demand for fair and reasonable billing.
[0111] Exemplarily, the generating, based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device includes:
[0112] If it is determined that the first accuracy improvement value is equal to the second accuracy improvement value, generating a billing fee corresponding to the private domain data of the second device based on a set rate coefficient and the first accuracy improvement value or the second accuracy improvement value;
[0113] If it is determined that the first accuracy improvement value is not equal to the second accuracy improvement value, the calculation results of the first accuracy improvement value and the second accuracy improvement value are verified, and the final accuracy improvement value is determined based on the verification results, and the billing fee corresponding to the private domain data of the second device is generated based on the set rate coefficient and the final accuracy improvement value.
[0114] It can be understood that since the first device and the second device have the same test data set, the second model and the third model, the calculated first accuracy improvement value and the second accuracy improvement value should be the same. If the two are equal, it means that the calculated accuracy improvement value is recognized by both parties, and billing can be based on the rate coefficient agreed upon in advance by both parties. For example, the set rate coefficient is multiplied by the accuracy improvement value (since the first accuracy improvement value is equal to the second accuracy improvement value, either one can be used) to obtain the billing fee. In this way, the fairness of billing can be improved, and the situation where the model training party is undercharged and / or the data owner is overcharged can be effectively prevented.
[0115] Exemplarily, after receiving the test data set sent by the first device, the second device may also review the test data set and determine whether to start the subsequent billing calculation process based on the review result. In other words, the first device receives the review result of the test data set sent by the second device, and after determining that the review result is passed, starts the subsequent billing calculation process.
[0116] Here, the second device can review the data of the test data set to determine at least one of whether the data format is compliant, whether the data field meets the requirements, and whether the data quality meets the standards. If the review is determined to be passed, the first device is notified to start the subsequent billing calculation process, that is, the first device processes the test data set based on the second model and the third model to generate a first accuracy improvement value, the second device processes the test data set based on the second model and the third model to generate a first accuracy improvement value, and the second device sends the second accuracy improvement value to the first device, and the first device generates the billing fee corresponding to the private domain data of the second device based on the first accuracy improvement value and the second accuracy improvement value.
[0117] It should be noted that if the first device determines that the first accuracy improvement value is not equal to the second accuracy improvement value, it means that there is a dispute between the accuracy improvement values calculated by both parties. At this time, the calculation results of the first accuracy improvement value and the second accuracy improvement value can be verified, and the final accuracy improvement value can be determined based on the verification results. Then, based on the set rate coefficient and the final accuracy improvement value, the billing fee corresponding to the private domain data of the second device is generated.
[0118] Exemplarily, verifying the calculation results of the first accuracy improvement value and the second accuracy improvement value, and determining the final accuracy improvement value based on the verification results, includes:
[0119] Based on the second model and the third model, obtain a first prediction result of the test data in the test data set in a set order, and receive a second prediction result of the same test data sent by the second device;
[0120] If it is determined that the first prediction result is the same as the second prediction result, continue to compare the first prediction result and the second prediction result of the next test data until the first prediction result and the second prediction result of all the test data are the same, and obtain the first accuracy improvement value of the first device and the second accuracy improvement value of the second device again, and calculate to obtain the final accuracy improvement value;
[0121] If it is determined that the first prediction result is different from the second prediction result, the calculation results of each network layer after the second model and the third model on the first device side are input with the second model and the third model on the second device side after the same data is input; and the model parameters are updated based on the calculation results, so that the model parameters of the second model on the first device side and the second device side are the same, and the model parameters of the third model are the same, and the first accuracy improvement value of the first device and the second accuracy improvement value of the second device are obtained again, and the final accuracy improvement value is calculated.
[0122] It should be noted that if the first accuracy improvement value and the second accuracy improvement value calculated again by both parties are the same, they will be used as the final accuracy improvement value. If they are different, manual arbitration can be introduced, and the final accuracy improvement value is determined based on the results of the manual arbitration. The specific manual arbitration processing method is not limited in the embodiments of this application.
[0123] Exemplarily, the embodiment of the present application further provides a data processing method, which is applied to a second device having private domain data, such as Figure 4 As shown, the method includes:
[0124] Step 401, receiving a second model from a first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model.
[0125] Step 402: Train the second model based on the private domain data to obtain a third model.
[0126] Step 403: Send the third model to the first device; wherein the third model is used to update the first model.
[0127] It can be understood that the data processing method of the embodiment of the present application can achieve the effect of model training optimization between the first device as the model training party and the second device as the private domain data owner, under the premise that their respective key data do not leave the domain, which is conducive to meeting the purpose of training and optimizing models with a large number of parameters based on private domain data; in addition, since the first device and the second device both have the second model and the third model, it provides a basis for reasonable billing of private domain data as training data, which can better incentivize private domain data owners to contribute their data for training, thereby better promoting the circulation of private domain data in the field of model training.
[0128] Exemplarily, the method further includes:
[0129] Receiving a test data set sent by the first device;
[0130] Processing the test data set based on the second model and the third model to generate a second accuracy improvement value;
[0131] Send the second accuracy improvement value to the first device.
[0132] It can be understood that since the first device and the second device have the same test data set, the second model and the third model, the calculated first accuracy improvement value and the second accuracy improvement value should be the same. If the two are equal, it means that the calculated accuracy improvement value is recognized by both parties, and billing can be based on the rate coefficient agreed upon in advance by both parties. For example, the set rate coefficient is multiplied by the accuracy improvement value (since the first accuracy improvement value is equal to the second accuracy improvement value, either one can be used) to obtain the billing fee. In this way, the fairness of billing can be improved, and the situation where the model training party is undercharged and / or the data owner is overcharged can be effectively prevented.
[0133] Exemplarily, after receiving the test data set sent by the first device, the second device may further review the test data set and decide whether to initiate a subsequent billing calculation process based on the review result.
[0134] Exemplarily, the method further includes:
[0135] The test data set is reviewed, and a review result is sent to the first device.
[0136] Here, the second device can perform at least one of data format review, data field review, and data quality review on the data of the test data set, and send the review result to the first device. For example, perform at least one of the review of whether the data format is compliant, whether the data field meets the requirements, and whether the data quality meets the standards. If it is determined that the review is passed, the first device is notified to start the subsequent billing calculation process, that is, the first device processes the test data set based on the second model and the third model to generate a first accuracy improvement value, the second device processes the test data set based on the second model and the third model to generate a first accuracy improvement value, and the second device sends the second accuracy improvement value to the first device, and the first device generates the billing fee corresponding to the private domain data of the second device based on the first accuracy improvement value and the second accuracy improvement value.
[0137] The present application is further described in detail below in conjunction with an application example.
[0138] In this application embodiment, the data processing system is composed of a large model training party and a private domain data owner. The large model training party corresponds to the aforementioned first device, and the private domain data owner corresponds to the aforementioned second device. Figure 5 As shown, the big model trainer has used public data to train the original big model A (corresponding to the first model mentioned above), and hopes to use the private domain data set S in the private domain data owner to optimize the original big model A into model A' (corresponding to the fourth model mentioned above).
[0139] Based on the above data processing system, the business process of the embodiment of the present application is as follows: Figure 6 As shown in the figure, it includes two process stages: privacy-protected model training and training effect billing. The specific process is as follows: First, the big model training party and the private domain data owner conduct privacy-protected model training. Under the premise of not disclosing the original content of the private domain data, the private domain data is used to optimize the original big model. When the training is completed, billing (and charging) is performed based on the training effect, thus completing the entire data circulation process.
[0140] The following are examples of the training process and the billing process:
[0141] 1. Training Process
[0142] This application embodiment adopts the method of knowledge distillation to achieve the purpose of helping the original model of the training model trainer under the premise that the data of the private domain data owner does not leave the domain. Figure 7 , including the following steps:
[0143] Step 701, using model A to distill model B.
[0144] Step 702: Send model B to the data owner.
[0145] Step 703: Continue to train model B locally using private domain data to obtain model B'.
[0146] Step 704: Send model B' to the large model training party.
[0147] Step 705: reverse distill model A using model B' to obtain model A'.
[0148] Here, the large model training party first performs knowledge distillation on its original large model A to obtain the compressed model B after distillation. In this knowledge distillation process, model A is the teacher model and model B is the student model. Model B and model A both have Figure 2 The structure of model B is the same as that of model A. The structure of the Transformer layer in model B is also the same as that in model A, but the total number of Transformer layers is much smaller than that of model A. The number of layers in model A is counted as n A , the number of layers of model B is n B , let every k Transformer layers in A distill out 1 Transformer layer in B, and we can get the following formula (1):
[0149] nA=k×nB
[0150] For the mth layer in model B, corresponding to the k×mth layer in model A, the distillation loss can be calculated using the following method:
[0151]
[0152] Lnidn=MSE(HHS)
[0153] Ltotal=Lattn+Lhidn
[0154] Among them, the distillation loss Ltota of the Transformer layer l Including attention-based first distillation loss Latt n and the second distillation loss Lhid based on the hidden layer n In the above formula (2), h represents the number of attention heads in the Transformer layer. represents the attention matrix value in the i-th attention head in the teacher model, represents the attention matrix value in the i-th attention head in the student model, and MSE represents the minimum mean square error operation. In the above formula (3), H T represents the hidden state value in the teacher model, H S Represents the hidden state value in the student model.
[0155] The total distillation loss Lal of each Transformer layer in model B l It can be expressed by the following formula (5):
[0156]
[0157] Thus, based on the total distillation loss Lal according to Model B l Reversely update the parameters of each Transformer layer in model B until the total distillation loss converges or the number of training times meets the set number of times, and obtain the distilled model B.
[0158] After distilling model B, the large model training party sends it to the private domain data owner. The private domain data owner continues to train model B locally using its own private domain data to obtain the optimized model B', and then sends model B' to the large model training party.
[0159] The large model training party uses model B' as the teacher model and model A as the student model to perform reverse distillation on model A. The specific operation is to replace the original embedding layer and prediction layer parameters in model A with the new embedding layer and prediction layer parameters in model B', and then use a process similar to formula (2) to formula (5) to use the calculated total distillation loss to update the parameters in the Transformer layer in model A. After completion, the optimized large model A' can be obtained.
[0160] 2. Billing Process
[0161] In the above training process, the private data owner contributes his private data to help the large model trainer optimize its model. The billing process indirectly measures the effect of this behavior and uses it as the basis for billing. Figure 8 , the billing process includes the following steps:
[0162] Step 801, prepare a test data set D.
[0163] Here, the large model training party accurately tests the data set D, which serves as the test basis for subsequent billing.
[0164] Step 802, send for review.
[0165] Here, the large model training party sends the test data set D to the private domain data owner for review. The private domain data owner can conduct data format review, data field review, data quality review, etc. on the data in the test data set D to ensure that the test data meets the requirements.
[0166] Step 803, determine whether it has passed the review, if not, return to step 801, if so, execute step 804.
[0167] Here, if the private domain data owner determines that the review has not passed, it returns to step 801, and the large model training party re-accurately tests the data set D. If the review has passed, step 804 is executed.
[0168] Step 804, start the test.
[0169] Here, after the private domain data owner confirms that the review has passed, he can start the local test and notify the large model training party to start the test, that is, both parties calculate the accuracy improvement value separately.
[0170] Step 805: The large model training party calculates the accuracy improvement value.
[0171] Here, the large model training party inputs the test data set D into the original compression model B, and summarizes the detection results of all data based on the prediction results of model B and the real label data corresponding to the input data in D, and then calculates the prediction accuracy of the test data set D at model B (denoted as p1). The same method can be used to calculate the prediction accuracy p2 of the test data set D at model B'. Then p2-p1 is the accuracy improvement value (corresponding to the first accuracy improvement value mentioned above).
[0172] Step 806: The private domain data owner calculates the accuracy improvement value.
[0173] Similar to step 805, the private domain data owner can also calculate the accuracy improvement value (corresponding to the second accuracy improvement value mentioned above) and send it to the large model training party.
[0174] Step 807, compare whether the values of both parties are consistent, if not, execute step 808, if so, execute step 809.
[0175] Step 808, error checking process.
[0176] Step 809, calculating the fee according to the accuracy improvement value.
[0177] It is understandable that the big model training party and the private domain data owner both have model B, model B' and test data set D. The two parties calculate the accuracy improvement value respectively, and then verify whether the values calculated by the two parties are the same. If they are the same, the accuracy improvement value is multiplied by the rate coefficient c (i.e. c×(p2-p1)) agreed in advance by both parties, which is the fee that the private domain data owner will charge the model training party for contributing its own data to participate in the training.
[0178] In actual applications, there may be other reasons that lead to different comparison results, such as errors in the calculation process of one party, or the large model training party deliberately under-calculates (in order to pay less), or the private domain data owner deliberately over-calculates (in order to charge more). The following is an exemplary description of the error checking process involved in step 808:
[0179] like Fig. 9 As shown in the figure, the large model training party takes a piece of data d (denoted as (x, y), where x is the input and y is the label) from the test data set D and sends it to the private domain data owner. Then the two parties input x into the local models B and B' respectively to obtain the predicted data and Compare the predicted data obtained by the two parties. If the results are equal, the large model training party takes out the next piece of data for comparison as above. If all the comparison results are equal, it means that for all the data in data set D, the predicted data and label data of the two parties are the same. At this time, the two parties will count the results separately, recalculate the accuracy and verify again. If the results of the two parties are the same, the subsequent process can be executed. If all the predicted data and label data are the same, but the statistical results of the two parties are still different, manual arbitration is required.
[0180] If the comparison results of the two prediction data are different in the above process, the following model internal verification process can be performed at the model level, depending on whether the results of model B or B' are different. Fig.10 As shown in the figure, the input data of the two models are the same. Both sides start from the first layer of the model (the word segmentation layer) to the last layer of the model (the prediction layer), and then compare each other layer by layer. The intra-layer comparison method is to compare the calculation results of both parties synchronously at each computing node in turn. For example, for Figure 3 In the left half, after input embedding and positional encoding, the first step is multi-head attention calculation. Each attention calculation method is to first calculate Q, K, V, and then calculate
[0181]
[0182] Where Q represents the query matrix, K represents the key matrix, V represents the value matrix, and d kis the dimension of the K matrix, and softmax() is a normalized exponential function. After each step of calculation (such as calculating Q), the calculation results of both parties are compared. If they are the same, the next step of calculation is performed. Otherwise, the model parameters of both parties involved in the calculation are compared. If there is a inequality, the corresponding model parameters of both parties are corrected to be equal. If the model parameters are the same, the input data is also the same (the input data is the output data of the previous step. If the previous step has not been wrong, the input data here should also be the same), but the calculation results of both parties are different, manual arbitration is required. After determining that the model parameters of the second model and the model parameters of the third model of both parties are the same, the first accuracy improvement value and the second accuracy improvement value calculated based on the test data set D can be obtained again to obtain the final accuracy improvement value.
[0183] It can be understood that when the method of this application embodiment uses private domain data for large model training, the two-way knowledge distillation method is used to prevent the key data of both the large model training party and the private domain data owner from leaving the domain, thereby protecting the data privacy of both parties. And based on the model training, a billing method and process are also proposed, thus forming a complete data circulation and billing method for large model application private domain data.
[0184] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a data processing device, which is applied to the first device. The data processing device corresponds to the data processing method on the first device side mentioned above, and each step in the embodiment of the data processing method on the first device side mentioned above is also fully applicable to the embodiment of the data processing device.
[0185] like Fig.11 As shown, the data processing device includes: a first sending module 1101 and a first receiving module 1102. The first sending module 1101 is used to send the second model to the second device having private domain data; wherein the second model is a model after knowledge distillation of the initial first model; the first receiving module 1102 is used to receive the third model sent by the second device; wherein the third model is a model after the second model is trained based on the private domain data, and the third model is used to update the first model.
[0186] Exemplarily, the data processing device further includes: a charging module 1103, specifically configured to:
[0187] Acquire and send a test data set to the second device;
[0188] Processing the test data set based on the second model and the third model to generate a first accuracy improvement value, wherein the first accuracy improvement value represents an accuracy improvement value of the accuracy improvement performance of the third model calculated based on the test data set compared with that of the second model;
[0189] receiving a second accuracy improvement value sent by the second device, where the second accuracy improvement value represents an accuracy improvement value of the third model calculated by the second device based on the test data set compared with the accuracy improvement performance of the second model;
[0190] Based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device is generated.
[0191] Exemplarily, the generating, based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device includes:
[0192] If it is determined that the first accuracy improvement value is equal to the second accuracy improvement value, generating a billing fee corresponding to the private domain data of the second device based on a set rate coefficient and the first accuracy improvement value or the second accuracy improvement value;
[0193] If it is determined that the first accuracy improvement value is not equal to the second accuracy improvement value, the calculation results of the first accuracy improvement value and the second accuracy improvement value are verified, and the final accuracy improvement value is determined based on the verification results, and the billing fee corresponding to the private domain data of the second device is generated based on the set rate coefficient and the final accuracy improvement value.
[0194] Exemplarily, verifying the calculation results of the first accuracy improvement value and the second accuracy improvement value, and determining the final accuracy improvement value based on the verification results, includes:
[0195] Based on the second model and the third model, obtain a first prediction result of the test data in the test data set in a set order, and receive a second prediction result of the same test data sent by the second device;
[0196] If it is determined that the first prediction result is the same as the second prediction result, continue to compare the first prediction result and the second prediction result of the next test data until the first prediction result and the second prediction result of all the test data are the same, and obtain the first accuracy improvement value of the first device and the second accuracy improvement value of the second device again, and calculate to obtain the final accuracy improvement value;
[0197] If it is determined that the first prediction result is different from the second prediction result, the calculation results of each network layer after the second model and the third model on the first device side are input with the second model and the third model on the second device side after the same data is input; and the model parameters are updated based on the calculation results, so that the model parameters of the second model on the first device side and the second device side are the same, and the model parameters of the third model are the same, and the first accuracy improvement value of the first device and the second accuracy improvement value of the second device are obtained again, and the final accuracy improvement value is calculated.
[0198] Exemplarily, before the billing module 1103 generates the billing fee corresponding to the private domain data of the second device, it is also used to:
[0199] Receive a review result of the test data set sent by the second device, and determine that the review result is passed.
[0200] Exemplarily, the data processing device also includes: a first distillation module 1104, used to convert the first model into the second model based on forward knowledge distillation.
[0201] Exemplarily, the first model is an initial model trained based on public domain data, and the first distillation module 1104 is specifically used for:
[0202] The first model is used as a teacher model, the initial second model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the second model.
[0203] Exemplarily, the first model includes at least a Transformer layer, the number of Transformer layers in the second model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0204] Update the parameters of each Transformer layer in the student model in reverse.
[0205] Exemplarily, the data processing device further includes: a second distillation module 1105, configured to perform reverse knowledge distillation on the first model based on the third model to obtain a fourth model.
[0206] Exemplarily, the second distillation module 1105 is specifically used for:
[0207] The third model is used as the teacher model, the first model is used as the student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the fourth model.
[0208] Exemplarily, the first model includes at least a Transformer layer, the number of Transformer layers in the third model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes:
[0209] Update the parameters of each Transformer layer in the student model in reverse.
[0210] In actual application, the first sending module 1101, the first receiving module 1102, the billing module 1103, the first distillation module 1104 and the second distillation module 1105 can be implemented by a processor in the first device. Of course, the processor needs to run the computer program in the memory to implement its functions.
[0211] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a data processing device, which is applied to the second device. The data processing device corresponds to the data processing method on the second device side mentioned above, and each step in the embodiment of the data processing method on the second device side mentioned above is also fully applicable to the embodiment of the present data processing device.
[0212] like Fig.12 As shown, the data processing device includes: a second receiving module 1201, a training module 1202 and a second sending module 1203.
[0213] The second receiving module 1201 is used to receive a second model from the first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model;
[0214] The training module 1202 is used to train the second model based on private domain data to obtain a third model;
[0215] The second sending module 1203 is used to send the third model to the first device; wherein the third model is used to update the first model.
[0216] Exemplarily, the data processing device further includes: a testing module 1204, specifically configured to:
[0217] Receiving a test data set sent by the first device;
[0218] Processing the test data set based on the second model and the third model to generate a second accuracy improvement value;
[0219] Send the second accuracy improvement value to the first device.
[0220] Exemplarily, the data processing apparatus further includes: an audit module 1205, configured to audit the test data set and send the audit result to the first device.
[0221] Exemplarily, the audit module 1205 audits the test data, including at least one of the following: data format audit, data field audit and data quality audit; before the test module 1204 generates the second accuracy improvement value, it is also used to determine that the audit result is audit passed.
[0222] In actual application, the second receiving module 1201, the training module 1202, the second sending module 1203, the testing module 1204 and the auditing module 1205 can be implemented by a processor in the second device. Of course, the processor needs to run the computer program in the memory to implement its functions.
[0223] It should be noted that: when the data processing device provided in the above embodiment performs data processing, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the data processing device provided in the above embodiment and the data processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0224] Based on the hardware implementation of the above program modules and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a first device. Fig.13 Only an exemplary structure of the first device is shown, not all structures, and can be implemented as needed. Fig.13 Partial or complete structure shown.
[0225] like Fig.13 As shown, the first device 1300 provided in the embodiment of the present application includes: at least one processor 1301, a memory 1302, a user interface 1303 and at least one network interface 1304. The various components in the first device 1300 are coupled together through a bus system 1305. It can be understood that the bus system 1305 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1305 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.13 Various buses are labeled as bus system 1305 .
[0226] The user interface 1303 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0227] The memory 1302 in the embodiment of the present application is used to store various types of data to support the operation of the first device. Examples of such data include: any computer program used to operate on the first device.
[0228] The data processing method disclosed in the embodiment of the present application can be applied to the processor 1301, or implemented by the processor 1301. The processor 1301 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the data processing method can be completed by the hardware integrated logic circuit or software instructions in the processor 1301. The above-mentioned processor 1301 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1301 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1302, and the processor 1301 reads the information in the memory 1302, and completes the steps of the data processing method provided in the embodiment of the present application in combination with its hardware.
[0229] In an exemplary embodiment, the first device 1300 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.
[0230] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a second device. Fig.14 Only an exemplary structure of the second device is shown, not all structures, and it can be implemented as needed. Fig.14 Partial or complete structure shown.
[0231] like Fig.14As shown, the second device 1400 provided in the embodiment of the present application includes: at least one processor 1401, a memory 1402, a user interface 1403 and at least one network interface 1404. The various components in the second device 1400 are coupled together through a bus system 1405. It can be understood that the bus system 1405 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1405 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Fig.14 Various buses are labeled as bus system 1405.
[0232] The user interface 1403 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0233] The memory 1402 in the embodiment of the present application is used to store various types of data to support the operation of the second device. Examples of such data include: any computer program used to operate on the second device.
[0234] The data processing method disclosed in the embodiment of the present application can be applied to the processor 1401, or implemented by the processor 1401. The processor 1401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the data processing method can be completed by the hardware integrated logic circuit or software instructions in the processor 1401. The above-mentioned processor 1401 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1401 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1402, and the processor 1401 reads the information in the memory 1402, and completes the steps of the data processing method provided in the embodiment of the present application in combination with its hardware.
[0235] In an exemplary embodiment, the second device 1400 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.
[0236] It can be understood that the memory 1302, 1402 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0237] In an exemplary embodiment, the embodiment of the present application further provides a data processing system, including: a first device 1300 and at least one second device 1400. The first device 1300, as a large model training party, and the second device 1400, as a private domain data owner, can implement the aforementioned data processing method of the embodiment of the present application, thereby implementing model training on the basis of protecting the privacy data of both parties, and can implement the billing of private domain data through a billing process jointly calculated and verified by both parties, which can better motivate private domain data owners to contribute their data for training, thereby better promoting the circulation of private domain data in the field of model training.
[0238] In an exemplary embodiment, the embodiment of the present application further provides a computer storage medium, which can be a computer-readable storage medium, for example, including a memory 1302 storing a computer program, which can be executed by the processor 1301 of the first device 1300 to complete the steps described in the method of the embodiment of the present application; for another example, including a memory 1402 storing a computer program, which can be executed by the processor 1401 of the second device 1400 to complete the steps described in the method of the embodiment of the present application. The computer-readable storage medium can be a memory such as ROM, PROM, EPROM, EEPROM, FlashMemory, magnetic surface storage, optical disk, or CD-ROM.
[0239] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the processor 1301 of the first device 1300 or the processor 1401 of the second device 1400 to complete the steps described in the method of the embodiment of the present application.
[0240] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0241] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0242] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: Applied to a first device, the method includes: Sending a second model to a second device having private domain data; wherein the second model is a model obtained by performing knowledge distillation on the initial first model; Receive a third model sent by the second device; wherein the third model is a model obtained by training the second model based on private domain data, and the third model is used to update the first model.
2. The method according to claim 1, further comprising: Acquire and send a test data set to the second device; Processing the test data set based on the second model and the third model to generate a first accuracy improvement value, where the first accuracy improvement value represents an accuracy improvement value of the third model calculated based on the test data set compared with the second model; receiving a second accuracy improvement value sent by the second device, where the second accuracy improvement value represents an accuracy improvement value of the third model calculated by the second device based on the test data set compared with the second model; Based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device is generated.
3. The method according to claim 2, characterized in that The generating, based on the first accuracy improvement value and the second accuracy improvement value, a billing fee corresponding to the private domain data of the second device includes: If it is determined that the first accuracy improvement value is equal to the second accuracy improvement value, generating a billing fee corresponding to the private domain data of the second device based on a set rate coefficient and the first accuracy improvement value or the second accuracy improvement value; If it is determined that the first accuracy improvement value is not equal to the second accuracy improvement value, the calculation results of the first accuracy improvement value and the second accuracy improvement value are verified, and the final accuracy improvement value is determined based on the verification results, and the billing fee corresponding to the private domain data of the second device is generated based on the set rate coefficient and the final accuracy improvement value.
4. The method according to claim 3, characterized in that The step of verifying the calculation results of the first accuracy improvement value and the second accuracy improvement value, and determining a final accuracy improvement value based on the verification results, includes: Based on the second model and the third model, obtain a first prediction result of the test data in the test data set in a set order, and receive a second prediction result of the same test data sent by the second device; If it is determined that the first prediction result is the same as the second prediction result, continue to compare the first prediction result and the second prediction result of the next test data until the first prediction result and the second prediction result of all the test data are the same, and obtain the first accuracy improvement value of the first device and the second accuracy improvement value of the second device again, and calculate to obtain the final accuracy improvement value; If it is determined that the first prediction result is different from the second prediction result, the calculation results of each network layer after the second model and the third model on the first device side are input with the second model and the third model on the second device side after the same data is input; and the model parameters are updated based on the calculation results, so that the model parameters of the second model on the first device side and the second device side are the same, and the model parameters of the third model are the same, and the first accuracy improvement value of the first device and the second accuracy improvement value of the second device are obtained again, and the final accuracy improvement value is calculated.
5. The method according to claim 2, characterized in that: Before generating the billing fee corresponding to the private domain data of the second device, the method further includes: Receive a review result of the test data set sent by the second device, and determine that the review result is passed.
6. The method according to claim 1, characterized in that The first model is an initial model trained based on public domain data, and the method further includes: The first model is converted into the second model based on forward knowledge distillation.
7. The method according to claim 6, characterized in that The converting the first model into the second model based on forward knowledge distillation includes: The first model is used as a teacher model, the initial second model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the second model.
8. The method according to claim 7, characterized in that The first model includes at least a Transformer layer, the number of Transformer layers in the second model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes: Update the parameters of each Transformer layer in the student model in reverse.
9. The method according to claim 1, characterized in that: The method further comprises: Reverse knowledge distillation is performed on the first model based on the third model to obtain a fourth model.
10. The method according to claim 9, characterized in that The performing reverse knowledge distillation on the first model based on the third model to obtain a fourth model includes: The third model is used as a teacher model, the first model is used as a student model, based on the distillation loss between the teacher model and the student model, the model parameters of the student model are reversely updated, and the updated student model is used as the fourth model.
11. The method according to claim 10, characterized in that The first model includes at least a Transformer layer, the number of Transformer layers in the third model is smaller than that of the first model, and the reverse updating of the model parameters of the student model includes: Update the parameters of each Transformer layer in the student model in reverse.
12. A data processing method, characterized in that: Applied to a second device having private domain data, the method includes: Receiving a second model from the first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model; Training the second model based on the private domain data to obtain a third model; The third model is sent to the first device; wherein the third model is used to update the first model.
13. The method according to claim 12, characterized in that The method further comprises: Receiving a test data set sent by the first device; Processing the test data set based on the second model and the third model to generate a second accuracy improvement value; Send the second accuracy improvement value to the first device.
14. The method according to claim 13, characterized in that The method further comprises: The test data set is reviewed, and a review result is sent to the first device.
15. The method according to claim 14, characterized in that The review of the test data includes at least one of the following: data format review, data field review, and data quality review; Before generating the second accuracy improvement value, the method further includes: Determine that the audit result is audit passed.
16. A data processing device, characterized in that: Applied to a first device, the apparatus comprises: A first sending module is used to send a second model to a second device having private domain data; wherein the second model is a model obtained by performing knowledge distillation on the initial first model; The first receiving module is used to receive the third model sent by the second device; wherein the third model is a model obtained by training the second model based on private domain data, and the third model is used to update the first model.
17. A data processing device, characterized in that: Applied to a second device having private domain data, the apparatus comprises: A second receiving module is used to receive a second model from the first device; wherein the second model is a model obtained by performing knowledge distillation on the initial first model; A training module, used for training the second model based on private domain data to obtain a third model; The second sending module is used to send the third model to the first device; wherein the third model is used to update the first model.
18. A first device, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 1 to 11 when running a computer program.
19. A second device having private domain data, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 12 to 15 when running a computer program.
20. A data processing system, characterized in that: include: A first device as claimed in claim 18 and at least one second device as claimed in claim 19.
21. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.
22. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.