Federal learning-based model training method, electronic equipment, medium and product

By adopting a federated learning-based model training method in Taichung, the problem of multi-field business functions integration relying on manual completion is solved, and the automated integration of multi-field business functions is realized, which improves development efficiency and ensures data privacy.

CN119443206APending Publication Date: 2025-02-14CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411515882.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Current capabilities. The integration solution of the multi-field business function in the middle platform relies on manual business integration, which leads to more difficult development process and affects development efficiency.

Method used

A model training method based on federated learning is adopted to train the participants' local business model, and the intermediate model update data is generated, and the doping factor is added to disturb and noise, and the model parameters are updated through the coordinator.

Benefits of technology

While ensuring data privacy, the integration of business functions in multiple fields has been achieved, which reduces labor and time costs, improves development efficiency, avoids model overfitting, and increases model generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443206A_ABST
    Figure CN119443206A_ABST
Patent Text Reader

Abstract

The invention discloses a model training method based on federated learning, an electronic device, a medium and a product, and relates to the technical field of artificial intelligence. In the embodiment of the invention, first intermediate model updating data generated in a training process is encrypted, a doping factor is added into the encrypted data, so that first exchange data is obtained, and the first exchange data is sent to other participants through a coordinator for model parameter updating. And meanwhile, the participants also receive second decryption data sent by the coordinator for decrypting the second exchange data of other participants by the coordinator, and update the model parameters of the local service model by using the second decryption data. According to the method, a traditional data integration mode depending on manpower is abandoned, the manpower and time cost is reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model training method, electronic equipment, medium and product based on federated learning. Background Art

[0002] There are three main types of data integration solutions for multiple business domains in the current capability platform: domain-driven design, service abstraction and sharing, and technology selection. Domain-driven design uses domain-driven design to sort out complex systems, extract commonalities by combing through the role journey maps involved in the business application system, and form shared service capabilities; service abstraction and sharing abstracts the common services in multiple business systems to form independent and reusable service components, and realizes collaborative work between different business systems through service sharing; technology selection usually involves selecting a suitable technology stack and architecture design to support collaborative work and resource sharing between different business systems. However, most of the above-mentioned capability platform multi-domain business function integration solutions require technical personnel to have a high level of business understanding and modeling capabilities during the application process, that is, they rely on manual completion of business integration, which makes the development process more difficult and affects development efficiency.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a model training method, electronic equipment, medium and product based on federated learning, aiming to solve the technical problem that the current capability center multi-domain business function integration solution relies on manual business integration, making the development process more difficult and affecting development efficiency.

[0005] To achieve the above objectives, the present application proposes a model training method based on federated learning, which is applied to any participant participating in federated learning. The model training method based on federated learning includes the following steps:

[0006] Based on the target data features of each public sample object in the local area of ​​the participant, the local business model of the participant is trained to obtain first intermediate model update data in the training process;

[0007] After encrypting the first intermediate model update data, a doping factor is added to obtain first exchange data, and the first exchange data is sent to a coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning;

[0008] The second decrypted data sent by the coordinator for decrypting the second exchanged data of the other participants is received, and the model parameters of the local business model are updated based on the second decrypted data.

[0009] Optionally, the step of updating the model parameters of the local business model based on the second decrypted data includes:

[0010] removing the noise characteristics of the doping factor in the second decrypted data to obtain the perturbation model update data of the other participants, wherein the perturbation model update data is obtained by perturbing the second model update data obtained by the other participants in the training process using the perturbation coefficient of the doping factor in the second decrypted data;

[0011] Based on the gradient direction represented by the disturbance model update data, the model parameters in the local business model are updated.

[0012] Optionally, before the step of training the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant, the method includes:

[0013] Filtering the public sample objects from the local sample objects of the participant, wherein the public sample objects are sample objects shared by the participant and other participants;

[0014] The target data features are extracted from the original data of each public sample object locally held by the participant.

[0015] Optionally, the step of extracting the target data features from the original data of each public sample object locally held by the participant includes:

[0016] By using the target word vector model corresponding to the participant, feature extraction is performed on the original data of each public sample object to obtain basic data features possessed by each public sample object at the participant;

[0017] Re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features;

[0018] The deep data features are screened by a preset regression model, and redundant features in the deep data features are removed to obtain candidate data features;

[0019] The candidate data features are compressed by dimensionality reduction using the target autoencoder model corresponding to the participant to obtain the target data features.

[0020] Optionally, the target word vector model is obtained by training the original text data of each sample object locally of the participant. Before the step of extracting features from the original data of each public sample object by using the target word vector model corresponding to the participant to obtain basic data features of each public sample object possessed by the participant, the method includes:

[0021] For any text word in the original text data, input the text word into an initial word vector model to obtain a context prediction result of the text word in the original text data by the initial word vector model;

[0022] Based on the actual context of the text word in the original text data and the difference between the context prediction result, the model parameters in the initial word vector model are updated, and the target word vector model is obtained after the initial word vector model meets the preset first update condition.

[0023] Optionally, before the step of re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features, the method includes:

[0024] Extracting a text feature vector set from the original text data by using the target word vector model;

[0025] For any one of the text feature vectors in the text feature vector set, input the text feature vector into an initial BERT pre-trained model to obtain a model output result corresponding to the text feature vector, wherein an activation function of the initial BERT pre-trained model is selected based on the business capabilities of the participant;

[0026] Based on the difference between the model output result and the task label marked with the text feature vector, the target model parameters in the initial BERT pre-trained model are updated, and after the initial BERT pre-trained model meets the preset second update condition, the target BERT pre-trained model is obtained.

[0027] Optionally, before the step of performing dimensionality reduction compression on the candidate data features through the target autoencoder model corresponding to the participant to obtain the target data features, the method includes:

[0028] Extracting a deep feature vector set from the text feature vector set through the target BERT pre-trained model, wherein the deep feature vector set is an output result of a hidden layer at a preset position in the target BERT pre-trained model;

[0029] For any one of the deep feature vectors in the deep feature vector set, inputting the deep feature vector into an initial autoencoder model to obtain encoding and decoding features of the deep feature vector;

[0030] Determining a model loss based on the deep feature vector, the encoding and decoding features, and a preset comprehensive loss function of the initial autoencoder model, wherein the preset comprehensive loss function is composed of a reconstruction loss function and a KL divergence loss function;

[0031] The model parameters in the initial autoencoder model are updated based on the model loss, and the target autoencoder model is obtained after the initial autoencoder model meets a preset third update condition.

[0032] In addition, to achieve the above objectives, the present application also proposes a model training device based on federated learning, and the model training device based on federated learning includes:

[0033] A first training module, used to train the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant, and obtain first intermediate model update data in the training process;

[0034] A sending module, configured to encrypt the first intermediate model update data and add a doping factor to obtain first exchange data, and send the first exchange data to a coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning;

[0035] The second training module is used to receive the second decrypted data sent by the coordinator for decrypting the second exchange data of the other participants, and update the model parameters of the local business model based on the second decrypted data.

[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the model training method based on federated learning as described above.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the model training method based on federated learning as described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the model training method based on federated learning as described above.

[0039] One or more technical solutions proposed in this application have at least the following technical effects:

[0040] In an embodiment of the present application, for any participant, the local business model of the participant is trained based on the target data features of each public sample object in the local area of ​​the participant to obtain the first intermediate model update data in the training process; the first exchange data obtained by adding a doping factor after encrypting the first intermediate model update data, and the first exchange data is sent to the coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data, and after the coordinator receives the first exchange data, the first exchange data is decrypted to obtain the first decrypted data, and the first decrypted data is sent to other participants participating in the federated learning; the second decrypted data sent by the coordinator to decrypt the second exchange data of the other participants is received, and the model parameters of the local business model are updated based on the second decrypted data. That is, when the participant uses the target data features of each public sample object in the local area for training, the first intermediate model update data generated in the training process will be encrypted, and the doping factor will be added to the encrypted data to obtain the first exchange data, and the first exchange data will be sent to other participants through the coordinator for model parameter update. At the same time, the above-mentioned participants will also receive the second decrypted data sent by the coordinator, which is used by the coordinator to decrypt the second exchanged data of other participants, and use the second decrypted data to update the model parameters of the local business model.

[0041] It is understandable that, since the doping factor added to the shared exchange data can be used for noise addition, the shared exchange data is no longer the exact proportion of the original first intermediate model update data, which increases the difficulty for attackers to infer the original data. And the added doping factor will participate in the model training process of other participants to perturb the intermediate model update data, so that the size of the model update data is changed while keeping the direction of the model update unchanged, which confuses the source of the model update data to a certain extent. At the same time, under the perturbation of the doping factor, the model can be prevented from overfitting and the generalization ability of the final model can be increased. Moreover, since the local business model uses the target data features of each public sample object in the local area for training, it also uses the second decrypted data of other participants for training, so that the business functions of other participants are also integrated into the final local business model, thereby realizing the integration of multi-domain business functions while ensuring data privacy. And it abandons the traditional data integration method that relies on manual labor, reduces manpower and time costs, and improves development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 This is a flowchart of the first embodiment of the model training method based on federated learning in this application;

[0045] Figure 2 This is a flow chart of the second embodiment of the model training method based on federated learning in this application;

[0046] Figure 3 This is an overall schematic diagram of the model training in the model training method based on federated learning in this application;

[0047] Figure 4 This is a schematic diagram of the structure corresponding to the model training device based on federated learning in this application;

[0048] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the model training method based on federated learning in an embodiment of the present application.

[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0052] There are three main data integration solutions for multiple business domains in the current capability middle platform: domain-driven design, service abstraction and sharing, and technology selection. Among them, domain-driven design uses domain-driven design to sort out complex systems, extract commonalities by combing the role journey map involved in the business application system, and form shared service capabilities; service abstraction and sharing abstracts the common services in multiple business systems to form independent and reusable service components, and realizes the collaborative work between different business systems through service sharing; technology selection usually involves selecting appropriate technology stacks and architecture designs to support collaborative work and resource sharing between different business systems. However, most of the above-mentioned capability middle platform multi-domain business function integration solutions require technical personnel to have a high level of business understanding and modeling capabilities in the application process, that is, they rely on manual completion of business integration, making the development process more difficult and affecting development efficiency. In addition, in the process of multi-domain business function integration, data privacy issues between business systems in different fields will also be involved, which further aggravates the difficulty of integration.

[0053] The main solution of the embodiment of the present application is: based on the target data characteristics of each public sample object in the local area of ​​the participant, the local business model of the participant is trained to obtain the first intermediate model update data in the training process; the first exchange data is obtained by adding a doping factor to the first intermediate model update data after encrypting the first intermediate model update data, and the first exchange data is sent to the coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data; after receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning; receives the second decrypted data sent by the coordinator to decrypt the second exchange data of the other participants, and updates the model parameters of the local business model based on the second decrypted data.

[0054] When the participants use the target data features of each public sample object in the local area for training, the first intermediate model update data generated during the training process will be encrypted, and the doping factor will be added to the encrypted data to obtain the first exchange data, and the first exchange data will be sent to other participants through the coordinator for model parameter update. At the same time, the above-mentioned participants will also receive the second decrypted data sent by the coordinator to decrypt the second exchange data of other participants, and use the second decrypted data to update the model parameters of the local business model. It can be understood that since the doping factor added to the shared exchange data can be used for noise addition, the shared exchange data is no longer the exact proportion of the original first intermediate model update data, which increases the difficulty for attackers to infer the original data. And the added doping factor will participate in the model training process of other participants to perturb the intermediate model update data, so that the size of the model update data is changed while keeping the direction of the model update unchanged, which confuses the source of the model update data to a certain extent. At the same time, under the perturbation of the doping factor, the model can be prevented from overfitting and the generalization ability of the final model can be increased. In addition to using the target data features of each public sample object in the local area for training, the local business model will also use the second decrypted data of other participants for training, so that the business functions of other participants are also integrated into the final local business model, thereby achieving the integration of multi-domain business functions while ensuring data privacy. It also abandons the traditional data integration method that relies on manual labor, reduces manpower and time costs, and improves development efficiency.

[0055] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a cloud platform, a computer, a mobile phone, etc., or an electronic device that can realize the above functions.

[0056] Based on this, the embodiment of the present application provides a model training method based on federated learning, referring to Figure 1 , which is a flow chart of the first embodiment of the model training method based on federated learning in this application.

[0057] In this embodiment, the model training method based on federated learning is applied to any participant participating in federated learning, and includes steps S10 to S30:

[0058] Step S10, training the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant to obtain first intermediate model update data in the training process;

[0059] It should be noted that in order to integrate the business service functions of multiple business systems, in this embodiment, the data features of different business systems will be integrated for model training through federated learning while ensuring the data privacy of multiple business systems, so that the model finally obtained through federated learning has the comprehensive ability to provide business services for multiple business systems, and realize the integration of multi-field business functions. It should also be noted that the participants in federated learning usually refer to business systems that provide different business contents. For example, in this embodiment, according to the different business contents, different business systems such as business operation, management operation, network operation, and business service can be roughly divided into multiple participants in the business platform. And the content of each participant's participation in the federated learning process is roughly the same, so in this embodiment, one of the participants will be used as an example for explanation.

[0060] Exemplarily, a local business model will be deployed locally in the above-mentioned participant. First, the participant will train based on local data. Local data refers to the target data features of each public sample object in the local area, wherein each public sample object refers to a sample object shared with other participants, and the target data feature refers to the feature extraction of the original data of each public sample object in the local area of ​​the participant. It is worth noting that the sample object usually refers to the source of the data, such as the target data feature source of a public sample object, and in the actual scenario, the sample object can refer to the customer. Correspondingly, for the same customer, it usually has different aspects of data in different business systems. After obtaining the target data features of each public sample object, the participant uses the target data features to train the local business model, that is, to update the model parameters in the local business model. Usually, in the process of training the local business model, the model loss of the local business model is calculated according to the output result of the local business model, the label marked with the target data feature, and the loss function corresponding to the local business model, and the gradient is determined according to the model loss, and then the model parameters in the local business model are updated based on the gradient. It is worth noting that when the model parameters are updated, the model loss and gradient used are the first intermediate model update data generated during the training process. And the first intermediate model update data will be shared with other participants for model training of other participants. It is understandable that since what is shared between participants is the intermediate model update parameters, rather than the original data of the public sample object, the leakage of the local privacy data of the participants is avoided to a certain extent.

[0061] Step S20, encrypting the first intermediate model update data and adding a doping factor to obtain first exchange data, and sending the first exchange data to the coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning;

[0062] It should be noted that in order to prevent model reverse engineering from inferring the input of the local business model based on the first intermediate model update data, in this embodiment, the first intermediate model update data will also be encrypted to further ensure the privacy of the data.

[0063] Exemplarily, after obtaining the intermediate model update parameters, the above-mentioned participants will encrypt the intermediate model update parameters. For the encryption part, the participants can use the public key distributed by the coordinator in federated learning for encryption. It is worth noting that the above-mentioned coordinator does not participate in the training of the model. The coordinator is mainly used for the decryption and transfer of the first intermediate model update data between the participants, that is, the coordinator stores the private key corresponding to the above-mentioned public key, which is used to decrypt the encrypted intermediate model update parameters.

[0064] Furthermore, after the participant encrypts the intermediate model update parameters, the doping factor is added to the encrypted result to obtain the first exchange data. The doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. For example, the doping factor may include a perturbation coefficient and a noise feature. Adding the perturbation coefficient may be multiplying the encrypted result of the intermediate model update parameter by the perturbation coefficient, and the added noise feature may be a preset mask. It is understandable that adding the doping factor to the encryption result can make the shared exchange data no longer the exact proportion of the original first intermediate model update data, thereby increasing the difficulty for the attacker to infer the original data. And the added perturbation coefficient will participate in the model training process of other participants. The perturbation coefficient will keep the direction of the model update unchanged and change its size, which confuses the source of the update to a certain extent. At the same time, due to the addition of the perturbation coefficient, the model can be prevented from overfitting and the generalization ability of the final model can be increased.

[0065] In addition, after receiving the first exchange data sent by the above-mentioned participants, the coordinator will first remove the noise features in the first exchange data, then use the pre-stored secret key to decrypt it, and re-add the noise features to the decryption result to obtain the first decrypted data. The coordinator then sends the obtained first decrypted data to other participants in the federated learning for model training (update) of other participants.

[0066] In addition, it should be noted that the above-mentioned local business model can be a CNN-LSTM neural network model, and the local business model is constructed with tasks corresponding to the above-mentioned participant capability types.

[0067] The encrypted loss Loss (i.e., loss function L) calculated by the participants is as follows:

[0068]

[0069] In the formula, X 1 Indicates the first participant, represents the feature space of the first participant, represents the local model parameters of the nth participant, y i Represents sample x i The corresponding label, i∈[1,N], N is the number of samples, and λ is the regularization coefficient used to prevent the model from overfitting.

[0070] The encrypted gradient calculated by the participants is as follows:

[0071]

[0072] In the formula, is the loss function Find the derivative, L is the loss function, is the local model parameter of the ith participant,

[0073] Then add the perturbation coefficient α and the noise feature (i.e., mask) to the above encrypted gradient [[R A ]], get the first exchange data [[W i ]]as follows:

[0074]

[0075] Among them, the mask [[R A ]]When other participants perform model training, it will be removed, and the disturbance coefficient α will be involved in the model training.

[0076] Step S30: receiving second decrypted data sent by the coordinator for decrypting the second exchanged data of the other participants, and updating the model parameters of the local business model based on the second decrypted data.

[0077] Exemplarily, the above-mentioned participants will also receive the second decrypted data sent by the coordinator, which is used by the coordinator to decrypt the second exchange data of other participants. Among them, the generation process of the second exchange data can refer to the generation process of the first exchange data mentioned above, which will not be repeated here. The participants then perform denoising on the received second decrypted data, remove the noise features in the second decrypted data, and use the denoising results to update the model parameters in the local business model. For example, the model parameters in the local business model are updated by back propagation according to the gradient direction represented by the denoising results. Specifically, the number of update processes will not be repeated. Repeat the above process to train the local business model until the training requirements of the model are met. Since the above-mentioned local business model is not only trained using the target data features of each public sample object in the local area, it is also trained using the second decrypted data of other participants, so that the business functions of other participants are also integrated into the final local business model, thereby realizing the integration of multi-domain business functions.

[0078] In this embodiment, for any participant, the local business model of the participant is trained based on the target data features of each public sample object in the local area of ​​the participant to obtain the first intermediate model update data in the training process; the first exchange data is obtained by adding a doping factor after encrypting the first intermediate model update data, and the first exchange data is sent to the coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data, and after receiving the first exchange data, the coordinator decrypts the first exchange data to obtain the first decrypted data, and sends the first decrypted data to other participants participating in the federated learning; receives the second decrypted data sent by the coordinator to decrypt the second exchange data of the other participants, and updates the model parameters of the local business model based on the second decrypted data. That is, when the participant uses the target data features of each public sample object in the local area for training, the first intermediate model update data generated in the training process will be encrypted, and the doping factor will be added to the encrypted data to obtain the first exchange data, and the first exchange data will be sent to other participants through the coordinator for model parameter update. At the same time, the above-mentioned participants will also receive the second decrypted data sent by the coordinator, which is used by the coordinator to decrypt the second exchanged data of other participants, and use the second decrypted data to update the model parameters of the local business model.

[0079] It is understandable that, since the doping factor added to the shared exchange data can be used for noise addition, the shared exchange data is no longer the exact proportion of the original first intermediate model update data, which increases the difficulty for attackers to infer the original data. And the added doping factor will participate in the model training process of other participants to perturb the intermediate model update data, so that the size of the model update data is changed while keeping the direction of the model update unchanged, which confuses the source of the model update data to a certain extent. At the same time, under the perturbation of the doping factor, the model can be prevented from overfitting and the generalization ability of the final model can be increased. Moreover, since the local business model uses the target data features of each public sample object in the local area for training, it also uses the second decrypted data of other participants for training, so that the business functions of other participants are also integrated into the final local business model, thereby realizing the integration of multi-domain business functions while ensuring data privacy. And it abandons the traditional data integration method that relies on manual labor, reduces manpower and time costs, and improves development efficiency.

[0080] In a feasible implementation manner, the step of updating the model parameters of the local business model based on the second decrypted data includes steps S31 to S32:

[0081] Step S31, removing the noise characteristics of the doping factor in the second decrypted data, and obtaining the perturbation model update data of the other participants, wherein the perturbation model update data is obtained by perturbing the second model update data obtained by the other participants in the training process by using the perturbation coefficient of the doping factor in the second decrypted data;

[0082] Step S32: updating the model parameters in the local business model based on the gradient direction represented by the disturbance model update data.

[0083] It should be noted that the above-mentioned noise feature can be a mask known to all participants and the coordinator. Therefore, after the above-mentioned participants obtain the second decrypted data, the second decrypted data can be used to subtract the noise feature to obtain the perturbation model update data generated by other participants. Among them, the perturbation model update data is obtained by perturbing the second model update data obtained by other participants during the training process using the perturbation coefficient of the doping factor in the second decrypted data. That is, the perturbation model update data at this time is the loss and gradient generated by other participants when they use their own local data for training combined with the perturbation coefficient, which can characterize the gradient direction. Correspondingly, the above-mentioned participants then update the model parameters in the local business model according to the gradient direction represented by the perturbation model update data and use the back propagation update algorithm.

[0084] In a feasible implementation manner, before the step of training the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant, the method includes steps S100 to S200:

[0085] Step S100, filtering out the public sample objects from the local sample objects of the participant, wherein the public sample objects are sample objects shared by the participant and other participants;

[0086] Step S200: extracting the target data features from the original data of each public sample object locally stored in the participating party.

[0087] It should be noted that participants need to pre-process local data before training based on local data. Pre-processing may include data collection and cleaning, including removing duplicate records, processing missing values, identifying and correcting abnormal values ​​or outliers, etc., which will not be described in detail here.

[0088] Exemplarily, for the process of screening each public sample object, each participant can use the ID or key of each local sample object (for example, when the sample object is a customer, the ID or key can be the customer's ID card and telephone number, etc.) as an identifier, and use a hash function to convert the identifier of each sample object into a hash value, compare the hash values ​​of each participant, and use the sample object corresponding to the hash value possessed by each participant as the public sample object. After screening out the public sample objects, the above-mentioned participants extract the target data features from the original data of each public sample object possessed locally. Among them, in the process of extraction, the original data can be vectorized and feature extracted by using a pre-trained word vector model, a BERT pre-trained model, etc. to obtain the above-mentioned target data features. So as to train the local business model through the target data features.

[0089] Reference Figure 2 , is a flowchart of a second embodiment proposed based on the first embodiment of the model training method based on federated learning of the present application. In this embodiment, the same or similar contents as the above embodiments can be referred to the above introduction and will not be repeated later. The step of extracting the target data features from the original data of each public sample object locally owned by the participant includes steps S210 to S240:

[0090] Step S210, extracting features from the original data of each public sample object through the target word vector model corresponding to the participant, and obtaining basic data features of each public sample object in the participant;

[0091] Step S220, re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features;

[0092] Step S230, screening the deep data features through a preset regression model, removing redundant features in the deep data features to obtain candidate data features;

[0093] Step S240: Perform dimensionality reduction compression on the candidate data features through the target autoencoder model corresponding to the participant to obtain the target data features.

[0094] Exemplarily, the original data (text or vocabulary) of each public sample object in the local area of ​​the above-mentioned participant can first be randomly initialized as an initial vector. The obtained initial vector is input into the above-mentioned target word vector model for feature extraction, so as to obtain the basic data features of each public sample object in the above-mentioned participant. Among them, the above-mentioned target word vector model can be a word2vec model based on Skip-Gram (the Skip-Gram model uses the word vector of the target word to predict the word vector of its context vocabulary), and the target word vector model is pre-trained with the independent local data of the above-mentioned participant, so that the target word vector model can fully explore the data characteristics of the participant. In addition, the above-mentioned basic data features can be the results of the output of the last hidden layer in the target word vector model.

[0095] After obtaining the basic data features, the above-mentioned participants can then input the basic data features into the target BERT pre-trained model corresponding to the participant, and extract features from the basic data features through the target BERT pre-trained model to obtain deep data features. Similarly, the deep data features can be the result of the final hidden layer output of the target BERT pre-trained model. It should be noted that word2vec is trained based on the co-occurrence frequency of words, and can capture the relative semantic relationship between words, but cannot fully understand the complex contextual semantics. The word vector generated by the BERT pre-trained model is dynamic. Given a word, the word vector generated in different contexts is different, so it can capture richer semantic information, especially complex contextual dependencies. That is, because the feature vector extracted by training word2vec based on a large amount of corpus can capture the association between words, but the extracted feature vector does not contain sequence semantic information, the feature vector extracted by the word2vec model is used as the input of the BERT pre-trained model, and the BERT pre-trained model is used to further extract deep feature vectors. Similarly, the target BERT pre-training model can be obtained by fine-tuning the BERT pre-training model through the pre-training tasks corresponding to the business functions of the participants, so that the BERT corresponding to the above participants can learn the data features of the business field of the participants, thereby extracting deep features.

[0096] After the deep data features are extracted, the preset regression model is used to screen the deep data features, and the redundant features in the deep data features are removed to obtain the candidate data features. Among them, the preset regression model can be a LASSO regression model. The LASSO regression model has L1 regularization and can perform feature selection to reduce the complexity of the model. Therefore, before the actual application, the feature vector generated by BERT can be used as input to train the LASSO regression model. The trained LASSO regression model will compress the unimportant feature coefficients in the deep data features to zero, and realize automatic feature selection. Therefore, the parameter evaluation of the LASSO regression model and the importance of the feature vector extracted by the target BERT pre-training model are selected to select features that are more relevant to the label. The word vector generated by the target BERT pre-training model has a high dimension (such as for the BERT-base model, it is usually 768 dimensions). Using the LASSO regression model for feature selection can effectively remove irrelevant or redundant features in the deep data features obtained by the target BERT pre-training model, retain the most important features for the target variable, and obtain the target data features.

[0097] It should be noted that the feature vector dimension of the candidate data features after feature screening is still at the level of hundreds of dimensions. Each participant still needs to consume a lot of computing resources when using the candidate data features for training deep learning. Therefore, it is necessary to perform feature dimensionality reduction to map the original high-dimensional features to a low-dimensional space, thereby reducing the feature dimension, reducing model parameters, simplifying calculations, and improving the efficiency of training and prediction. The above-mentioned participants can input the above-mentioned candidate data features into the corresponding target autoencoder model, perform dimensionality reduction compression on the candidate data features, and the result of the dimensionality reduction compression is the above-mentioned target data features. It is worth noting that the above-mentioned target autoencoder model actually includes two parts, an encoder and a decoder. In the present embodiment, the dimensionality reduction compression is mainly performed through the encoder, that is, the latent variables obtained by the encoder are used as the above-mentioned target data features.

[0098] In a feasible implementation manner, the target word vector model is obtained by training the original text data of each sample object locally of the participant. Before the step of extracting features from the original data of each public sample object by the target word vector model corresponding to the participant to obtain the basic data features of each public sample object possessed by the participant, the method includes steps S211 to S212:

[0099] Step S211, for any text word in the original text data, input the text word into an initial word vector model to obtain a context prediction result of the initial word vector model on the text word in the original text data;

[0100] Step S212, updating the model parameters in the initial word vector model based on the difference between the actual context of the text word in the original text data and the context prediction result, and obtaining the target word vector model after the initial word vector model meets the preset first update condition.

[0101] It should be noted that, in this embodiment, the target word vector model is trained by the original text data of each sample object in the local area of ​​the above-mentioned participant, that is, during the model training, it will not distinguish whether the sample object belongs to a public sample object.

[0102] Exemplarily, since the training process of each text word is basically the same, one of them will be taken as an example for explanation in this embodiment. For any text word in the original text data, the text word is input into the initial word vector model to obtain the context prediction result of the initial word vector for the text word in the original text data. Then, the model loss of the initial word vector model is calculated based on the difference between the context prediction result and the real context of the text word in the original text data, and then the model parameters in the initial word vector model are updated based on the model loss. And the initial word vector model is iteratively trained by repeating the above process. And after the initial word vector model meets the preset first update condition, the above target word vector model can be obtained. Among them, the preset first update condition can be a preset number of training times, model convergence or traversal of each text word, etc., which will not be repeated here.

[0103] In a feasible implementation manner, before the step of re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features, the method includes steps S221 to S223:

[0104] Step S221, extracting a text feature vector set from the original text data through the target word vector model;

[0105] Step S222: for any one text feature vector in the text feature vector set, input the text feature vector into an initial BERT pre-trained model to obtain a model output result corresponding to the text feature vector, wherein the activation function of the initial BERT pre-trained model is selected based on the business capability of the participant;

[0106] Step S223, based on the difference between the model output result and the task label marked with the text feature vector, the target model parameters in the initial BERT pre-trained model are updated, and after the initial BERT pre-trained model meets the preset second update condition, the target BERT pre-trained model is obtained.

[0107] It should be noted that when training the initial BERT pre-trained model, the trained target word vector model is first used to extract a text feature vector set from the original text data. It is understandable that the text feature vector set extracted from the original text data can be the result of the output of the last hidden layer of the target word vector model.

[0108] For any text feature vector in the text feature vector set, the text feature vector is input into the initial BERT pre-trained model to obtain the model output result corresponding to the text feature vector. It is worth noting that the activation function of the initial BERT pre-trained model is selected according to the business capabilities of the participants. The business capabilities corresponding to each participant can be roughly divided into business operation, management operation, network operation, business service, etc. Different fine-tuning tasks can be designed for each participant corresponding to the initial BERT pre-trained model for different business capability types, and different activation functions can be selected.

[0109] In the case of business operation types, a text classification task can be constructed for customer service records, fault reports, business emails and other data in the original text data to classify customer service satisfaction, fault types, business emails, etc. Softmax can be used as the activation function and cross-entropy loss (Cross-Entropy Loss) can be used as the loss function to train the classification model; for data containing customer names, product names, problem types and key entities in business process logs, a named entity recognition (NER) task can be constructed, and sigmoid can be used as the activation function and cross-entropy loss (Cross-EntropyLoss) as the loss function to train the user information extraction model, where both the classification model and the user information extraction model can be the type of the initial BERT pre-trained model.

[0110] In the case of management operation type. Predict the relationship between each instruction and the execution result of the management process part in the original text data, as well as the correlation between the management instructions. Use the feature vector extracted by the word2vec model as input, load the BERT pre-trained model, and build a correlation prediction model based on the current management instruction. That is, predicting the execution result of the current instruction or the next management instruction is a fine-tuning task of the initial BERT pre-trained model. Accordingly, use softmax as the activation function and cross-entropy loss (Cross-Entropy Loss) as the loss function to train the prediction model, and the prediction model can also be one of the types of the above-mentioned initial BERT pre-trained model.

[0111] In the case of network operation type. For the data of operation instructions in the network operation process and network traffic data in the original text data, fine-tuning tasks such as instruction type recognition task, execution result association task, and fault prediction task are constructed. In the instruction type recognition task, the BERT pre-trained model is loaded, and the instruction recognition task is constructed. According to the current operation instruction, the type of the current instruction is identified, such as query, modify, delete, restart, etc.; in the execution result association task, the initial BERT pre-trained model is loaded, and the association relationship prediction model is constructed to determine whether the current instruction is related to the execution result; in the fault prediction task, according to the collected network traffic data, the initial BERT pre-trained model is loaded, and a network traffic pattern recognition model is constructed to determine the probability of failure in the current network environment. In the case of the above network operation type, the fine-tuning tasks can use softmax as the activation function and cross-entropy loss (Cross-Entropy Loss) as the loss function to train the prediction model.

[0112] In the case of business service types. For the customer data and service result data related to business services in the original text data, construct user basic information extraction tasks and user behavior recognition tasks. In the user information extraction task, load the BERT pre-trained model, build a named entity recognition (NER) task, use sigmod as the activation function, and cross-entropy loss (Cross-Entropy Loss) as the loss function to train the user information extraction model, and extract customer name, contact information, address, company information and other information from the user basic information related data; in the user behavior recognition task, load the BERT pre-trained model, build a recognition model, and identify user behavior types based on user behavior related data, such as website visits, application use, interaction and other behaviors. Use softmax as the activation function and cross-entropy loss (Cross-Entropy Loss) as the loss function to train the prediction model.

[0113] The above content is an example of fine-tuning tasks for the initial BERT pre-training model under different circumstances. Therefore, in this embodiment, the specific fine-tuning tasks or the business capabilities of the participants are restricted. After obtaining the model output results, the target model parameters in the initial BERT pre-training model are updated according to the difference between the model output results and the marked task labels of the above text feature vectors. Among them, the type of the marked task label of the text feature vector depends on the fine-tuning task of the initial BERT pre-training model. For example, for the fine-tuning task of classification, the type of the task label of the text feature vector can be a specific category, and for the fine-tuning task of recognition, the type of the task label of the text feature vector can be a real recognition result, etc., which are described one by one here.

[0114] Similarly, after the initial BERT pre-trained model meets the preset second update condition, the target BERT pre-trained model can be obtained. Similarly, the above-mentioned second update condition can be a preset number of training times, model convergence, and traversal of each text feature vector in the text feature vector set.

[0115] In a feasible implementation manner, before the step of performing dimensionality reduction compression on the candidate data features through the target autoencoder model corresponding to the participant to obtain the target data features, the method includes steps S241 to S244:

[0116] Step S241, extracting a deep feature vector set from the text feature vector set through the target BERT pre-training model, wherein the deep feature vector set is an output result of a hidden layer at a preset position in the target BERT pre-training model;

[0117] Step S242, for any one deep feature vector in the deep feature vector set, input the deep feature vector into an initial autoencoder model to obtain encoding and decoding features of the deep feature vector;

[0118] Step S243, determining the model loss based on the deep feature vector, the encoding and decoding features, and a preset comprehensive loss function of the initial autoencoder model, wherein the preset comprehensive loss function is composed of a reconstruction loss function and a KL divergence loss function;

[0119] Step S244, updating the model parameters in the initial autoencoder model based on the model loss, and obtaining the target autoencoder model after the initial autoencoder model satisfies a preset third update condition.

[0120] Similarly, before training the initial autoencoder model, the target BERT pre-trained model can be used to extract a deep feature vector set from the text feature vector set. The deep feature vector set is the output result of the hidden layer at a preset position in the target BERT pre-trained model, where the preset position can be the last layer in the BERT pre-trained model.

[0121] For any deep feature vector in the deep feature vector set, the deep feature vector is input into the initial autoencoder model, and the initial autoencoder model will output the encoding and decoding features of the deep feature vector. Then, the model loss of the initial autoencoder model is calculated based on the deep feature vector, the encoding and decoding features, and the preset comprehensive loss function of the initial autoencoder model. Among them, the preset comprehensive loss function is composed of a reconstruction loss function and a KL divergence loss function. Among them, the reconstruction loss function is used to measure the difference between the deep feature vector and the encoding and decoding features, and the KL divergence loss function is used to ensure that the learned potential space distribution is close to the prior distribution. The preset comprehensive loss function can be obtained by adding the reconstruction loss function and the KL divergence loss function with an adjustment coefficient.

[0122] After obtaining the model loss, the model parameters in the initial autoencoder model are updated using the back propagation update algorithm based on the model loss. After the initial autoencoder model satisfies the preset third update condition, the target autoencoder is obtained. Similarly, the preset third update condition can be a preset number of updates, model convergence, and traversal of each deep feature vector.

[0123] Exemplarily, the training process of the above target autoencoder can be as follows:

[0124] 1. Forward propagation: The deep feature vector extracted by BERT is input into the encoder in the autoencoder, mapped into the distribution parameters of the latent space, and the latent variables are sampled from the distribution parameters output by the encoder using the reparameterization technique. The latent variables are input into the decoder in the autoencoder to obtain the encoding and decoding features.

[0125] 2. Calculate the loss: The loss here includes two parts, namely reconstruction loss and KL divergence loss. Reconstruction loss is the difference between the reconstructed data and the original data, and the mean square error (MSE) is used as the reconstruction loss; KL divergence loss is the difference between the potential distribution output by the encoder and the prior distribution, that is, the KL divergence between the two vectors.

[0126] The above preset comprehensive loss function is as follows:

[0127] Loss=Reconstruction Loss+β*KL Divergence Loss

[0128] Among them, β is the temperature parameter, which is used in the training process according to Dynamic adjustment, epoch represents the training round as a set hyperparameter.

[0129] 3. Back propagation: The gradient of the loss with respect to the model parameters is calculated through back propagation, and Adam is used as the optimizer to update the model parameters to minimize the total loss.

[0130] 4. Model saving: After the training is completed, save the model parameters of the trained autoencoder.

[0131] Reference Figure 3 This is an overall schematic diagram of the model training in this application, such as Figure 3 As shown in the figure, business areas A to C actually correspond to different participants, and the original data between different participants is not shared. The participants encrypt the entities and compare the encrypted entities. The encrypted entities that can be aligned are the shared entities (i.e., public sample objects). The original data of each public sample object of each participant will be extracted by word2vec (target word vector model), BERT (target BERT pre-trained model) and VAE (target autoencoder). The results of feature extraction are used to train the local business model of the corresponding participant, and the participants will exchange the gradients (i.e., intermediate model update parameters) generated during their training process through the coordinator, and add multiplicative noise (perturbation coefficient) and mask (noise feature) during the exchange, so as to conduct vertical federated learning.

[0132] This application also provides a model training device based on federated learning, referring to Figure 4 , the model training device based on federated learning includes:

[0133] A first training module 10 is used to train the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant to obtain first intermediate model update data in the training process;

[0134] A sending module 20 is used to encrypt the first intermediate model update data and add a doping factor to obtain first exchange data, and send the first exchange data to a coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning;

[0135] The second training module 30 is configured to receive second decrypted data sent by the coordinator for decrypting the second exchanged data of the other participants, and update the model parameters of the local business model based on the second decrypted data.

[0136] Optionally, the second training module 30 is further used for:

[0137] removing the noise characteristics of the doping factor in the second decrypted data to obtain the perturbation model update data of the other participants, wherein the perturbation model update data is obtained by perturbing the second model update data obtained by the other participants in the training process using the perturbation coefficient of the doping factor in the second decrypted data;

[0138] Based on the gradient direction represented by the disturbance model update data, the model parameters in the local business model are updated.

[0139] Optionally, the model training device based on federated learning further includes a preprocessing module 40, and the preprocessing module 40 is used to:

[0140] Filtering the public sample objects from the local sample objects of the participant, wherein the public sample objects are sample objects shared by the participant and other participants;

[0141] The target data features are extracted from the original data of each public sample object locally held by the participant.

[0142] Optionally, the preprocessing module 40 is further used for:

[0143] By using the target word vector model corresponding to the participant, feature extraction is performed on the original data of each public sample object to obtain basic data features possessed by each public sample object at the participant;

[0144] Re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features;

[0145] The deep data features are screened by a preset regression model, and redundant features in the deep data features are removed to obtain candidate data features;

[0146] The candidate data features are compressed by dimensionality reduction using the target autoencoder model corresponding to the participant to obtain the target data features.

[0147] Optionally, the target word vector model is obtained by training the original text data of each sample object locally of the participant, and the model training device based on federated learning further includes a third training module 50, and the third training module 50 is used to:

[0148] For any text word in the original text data, input the text word into an initial word vector model to obtain a context prediction result of the text word in the original text data by the initial word vector model;

[0149] Based on the actual context of the text word in the original text data and the difference between the context prediction result, the model parameters in the initial word vector model are updated, and the target word vector model is obtained after the initial word vector model meets the preset first update condition.

[0150] Optionally, the third training module 50 is further used for:

[0151] Extracting a text feature vector set from the original text data by using the target word vector model;

[0152] For any one of the text feature vectors in the text feature vector set, input the text feature vector into an initial BERT pre-trained model to obtain a model output result corresponding to the text feature vector, wherein an activation function of the initial BERT pre-trained model is selected based on the business capabilities of the participant;

[0153] Based on the difference between the model output result and the task label marked with the text feature vector, the target model parameters in the initial BERT pre-trained model are updated, and after the initial BERT pre-trained model meets the preset second update condition, the target BERT pre-trained model is obtained.

[0154] Optionally, the third training module 50 is further used for:

[0155] Extracting a deep feature vector set from the text feature vector set through the target BERT pre-trained model, wherein the deep feature vector set is an output result of a hidden layer at a preset position in the target BERT pre-trained model;

[0156] For any one of the deep feature vectors in the deep feature vector set, inputting the deep feature vector into an initial autoencoder model to obtain encoding and decoding features of the deep feature vector;

[0157] Determining a model loss based on the deep feature vector, the encoding and decoding features, and a preset comprehensive loss function of the initial autoencoder model, wherein the preset comprehensive loss function is composed of a reconstruction loss function and a KL divergence loss function;

[0158] The model parameters in the initial autoencoder model are updated based on the model loss, and the target autoencoder model is obtained after the initial autoencoder model meets the preset third update condition. The model training device based on federated learning provided in the present application adopts the model training method based on federated learning in the above-mentioned embodiment, which can solve the technical problem that the current capability center multi-domain business function integration solution relies on manual business integration, making the development process more difficult and affecting development efficiency. Compared with the prior art, the beneficial effects of the model training device based on federated learning provided in the present application are the same as the beneficial effects of the model training method based on federated learning provided in the above-mentioned embodiment, and the other technical features in the model training device based on federated learning are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0159] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model training method based on federated learning in the above-mentioned embodiment one.

[0160] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to mobile terminals such as computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as computers. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0161] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0162] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0163] The electronic device provided by the present application adopts the model training method based on federated learning in the above embodiment, which can solve the technical problem that the current capability center multi-domain business function integration solution relies on manual completion of business integration, making the development process more difficult and affecting development efficiency. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the model training method based on federated learning provided in the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0164] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0165] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present 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.

[0166] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the model training method based on federated learning in the above-mentioned embodiment.

[0167] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0168] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0169] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device:

[0170] Based on the target data features of each public sample object in the local area of ​​the participant, the local business model of the participant is trained to obtain first intermediate model update data in the training process;

[0171] After encrypting the first intermediate model update data, a doping factor is added to obtain first exchange data, and the first exchange data is sent to a coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning;

[0172] The second decrypted data sent by the coordinator for decrypting the second exchanged data of the other participants is received, and the model parameters of the local business model are updated based on the second decrypted data.

[0173] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0174] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0175] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0176] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned model training method based on federated learning, and can solve the technical problem that the current capability center multi-domain business function integration solution relies on manual business integration, making the development process more difficult and affecting development efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the model training method based on federated learning provided in the above-mentioned embodiment, which will not be repeated here.

[0177] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned model training method based on federated learning.

[0178] The computer program product provided in this application can solve the technical problem of model training based on federated learning. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the model training method based on federated learning provided in the above embodiment, which will not be repeated here.

[0179] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A model training method based on federated learning, characterized in that: Applied to any participant in federated learning, the model training method based on federated learning includes the following steps: Based on the target data features of each public sample object in the local area of ​​the participant, the local business model of the participant is trained to obtain first intermediate model update data in the training process; After encrypting the first intermediate model update data, a doping factor is added to obtain first exchange data, and the first exchange data is sent to a coordinator participating in the federated learning, wherein the doping factor in the first exchange data is used to perturb and add noise to the encrypted first intermediate model update data. After receiving the first exchange data, the coordinator decrypts the first exchange data to obtain first decrypted data, and sends the first decrypted data to other participants participating in the federated learning; The second decrypted data sent by the coordinator for decrypting the second exchanged data of the other participants is received, and the model parameters of the local business model are updated based on the second decrypted data.

2. The model training method based on federated learning according to claim 1, characterized in that: The step of updating the model parameters of the local business model based on the second decrypted data comprises: removing the noise characteristics of the doping factor in the second decrypted data to obtain the perturbation model update data of the other participants, wherein the perturbation model update data is obtained by perturbing the second model update data obtained by the other participants in the training process using the perturbation coefficient of the doping factor in the second decrypted data; Based on the gradient direction represented by the disturbance model update data, the model parameters in the local business model are updated.

3. The model training method based on federated learning according to claim 1, characterized in that: Before the step of training the local business model of the participant based on the target data features of each public sample object in the local area of ​​the participant, the method includes: Filtering the public sample objects from the local sample objects of the participant, wherein the public sample objects are sample objects shared by the participant and other participants; The target data features are extracted from the original data of each public sample object locally held by the participant.

4. The model training method based on federated learning as claimed in claim 3, characterized in that: The step of extracting the target data features from the original data of each public sample object locally held by the participant comprises: By using the target word vector model corresponding to the participant, feature extraction is performed on the original data of each public sample object to obtain basic data features possessed by each public sample object at the participant; Re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features; The deep data features are screened by a preset regression model, and redundant features in the deep data features are removed to obtain candidate data features; The candidate data features are compressed by dimensionality reduction using the target autoencoder model corresponding to the participant to obtain the target data features.

5. The model training method based on federated learning as claimed in claim 4, characterized in that: The target word vector model is obtained by training the original text data of each sample object locally of the participant. Before the step of extracting features from the original data of each public sample object by the target word vector model corresponding to the participant to obtain basic data features of each public sample object in the participant, the method includes: For any text word in the original text data, input the text word into an initial word vector model to obtain a context prediction result of the text word in the original text data by the initial word vector model; Based on the actual context of the text word in the original text data and the difference between the context prediction result, the model parameters in the initial word vector model are updated, and the target word vector model is obtained after the initial word vector model meets the preset first update condition.

6. The model training method based on federated learning as claimed in claim 5, characterized in that: Before the step of re-extracting the basic data features through the target BERT pre-trained model corresponding to the participant to obtain deep data features, the method includes: Extracting a text feature vector set from the original text data by using the target word vector model; For any one of the text feature vectors in the text feature vector set, input the text feature vector into an initial BERT pre-trained model to obtain a model output result corresponding to the text feature vector, wherein an activation function of the initial BERT pre-trained model is selected based on the business capabilities of the participant; Based on the difference between the model output result and the task label marked with the text feature vector, the target model parameters in the initial BERT pre-trained model are updated, and after the initial BERT pre-trained model meets the preset second update condition, the target BERT pre-trained model is obtained.

7. The model training method based on federated learning according to claim 6, characterized in that: Before the step of performing dimensionality reduction compression on the candidate data features through the target autoencoder model corresponding to the participant to obtain the target data features, the method includes: Extracting a deep feature vector set from the text feature vector set through the target BERT pre-trained model, wherein the deep feature vector set is an output result of a hidden layer at a preset position in the target BERT pre-trained model; For any one of the deep feature vectors in the deep feature vector set, inputting the deep feature vector into an initial autoencoder model to obtain encoding and decoding features of the deep feature vector; Determining a model loss based on the deep feature vector, the encoding and decoding features, and a preset comprehensive loss function of the initial autoencoder model, wherein the preset comprehensive loss function is composed of a reconstruction loss function and a KL divergence loss function; The model parameters in the initial autoencoder model are updated based on the model loss, and the target autoencoder model is obtained after the initial autoencoder model meets a preset third update condition.

8. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of model training based on federated learning as described in any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of model training based on federated learning are implemented as described in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the steps of model training based on federated learning as described in any one of claims 1 to 7.