Model training method and system, computer-readable storage medium and electronic device

Through the trusted execution environment and distributed federated learning, the model dictionary and parameters are separated, and the private data of multiple participating sub-nodes are used for local model training, which solves the problems of high cost and low accuracy of basic model training, and achieves security and accuracy. The improvement has expanded the application scenarios.

CN115438734BActive Publication Date: 2024-09-06CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211102643.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2024-09-06
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The training method of the basic model has problems such as high cost and low training accuracy, which affects the user experience of the model.

Method used

The trusted execution environment and distributed federated learning are used to separate the model dictionary and model parameters. Local model training is performed through multiple participating sub-nodes, and the model update parameters are uploaded to the central service node to update the cloud model, using different participating sub-nodes. private data, reducing model training costs and improving model training accuracy.

Benefits of technology

It ensures the security of the basic model in the cloud, reduces the cost of model training, increases the amount of training data, improves the accuracy of model training, expands the application scenarios of the basic model, and meets the model needs of various users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438734B
    Figure CN115438734B
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and to a model training method and system, a computer-readable storage medium, and an electronic device. The model training system includes a central service node, a participating sub-node, and a trusted execution environment node. The model training method includes: the trusted execution environment node resets the private dictionary of each participating sub-node to obtain a private reset dictionary, and the private dictionary is constructed according to the private data of the participating sub-node; the participating sub-node performs local model training based on the private reset dictionary according to the training task issued by the central service node to update the local model parameters; the central service node aggregates the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result. The present disclosure can reduce the cost of model training and improve the security of data in model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a model training method, a model training system, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the rapid development of computer and artificial intelligence technology, the generation of large-scale data sets has made it possible to train large-scale models. Among them, foundation models are gradually becoming larger and larger to meet higher accuracy requirements. Based on the powerful expressiveness of foundation models, they can better solve artificial intelligence algorithm learning problems in various application scenarios.

[0003] At present, the training method of the basic model has problems of high cost and low training accuracy, which affects the user experience of the model to a certain extent.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a model training method and system, a computer-readable storage medium and an electronic device, thereby reducing the cost of model training and improving the accuracy of model training.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a model training method is provided, which is applied to a model training system, wherein the model training system includes a central service node, a participating sub-node, and a trusted execution environment node, and the method includes:

[0008] The trusted execution environment node resets the private dictionary of each participating sub-node to obtain a private reset dictionary, where the private dictionary is constructed according to the private data of the participating sub-node;

[0009] The participating sub-node performs local model training based on the private reset dictionary according to the training task issued by the central service node to update local model parameters;

[0010] The central service node aggregates the model update parameters of each participating sub-node to update the cloud model according to the aggregation result.

[0011] In an exemplary embodiment of the present disclosure, before the trusted execution environment node resets the private dictionary of each participating sub-node to obtain the private reset dictionary, the method further includes:

[0012] The participating child node constructs its own private dictionary;

[0013] The participating sub-node encrypts the private dictionary and sends it to the trusted execution environment node;

[0014] Wherein, any of the participating sub-nodes constructs the private dictionary, including:

[0015] Extracting basic element features of the private data, and determining identification information of each of the basic element features according to a predetermined identification rule;

[0016] The private dictionary is generated according to the correspondence between the basic element features and the identification information.

[0017] In an exemplary embodiment of the present disclosure, the trusted execution environment node resets the private dictionary of each participating sub-node to obtain a private reset dictionary, including:

[0018] The trusted execution environment node aggregates the private dictionaries of the participating sub-nodes;

[0019] The trusted execution environment node adds obfuscated content to the aggregated private dictionary to construct a random dictionary, wherein the obfuscated content is different from the content corresponding to each of the private dictionaries;

[0020] The random dictionary is used to reset the private dictionary of the participating child node, wherein the reset result includes the content of the private dictionary of the participating child node and the random content in the random dictionary, and the random content is different from the content of the private dictionary.

[0021] In an exemplary embodiment of the present disclosure, before the participating subnode performs local model training based on the private reset dictionary according to the training task issued by the central service node to update the cloud model according to the aggregation result, the method further includes:

[0022] The trusted execution environment node randomly selects identification information of a first target quantity based on the random dictionary and notifies the central service node;

[0023] The central service node constructs the training task according to the dictionary content indicated by the identification information of the first target quantity and sends it to each of the participating sub-nodes.

[0024] In an exemplary embodiment of the present disclosure, the central service node aggregates the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result, including:

[0025] The following process is executed repeatedly until the cloud model parameters meet the preset training stop conditions:

[0026] The central service node aggregates the model update parameters of each participating sub-node to obtain parameter aggregation information, and uses the parameter aggregation information as the cloud model parameters;

[0027] The central service node sends the parameter aggregation information to each of the participating sub-nodes, so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and a corresponding private reset dictionary to update local model parameters.

[0028] In an exemplary embodiment of the present disclosure, before the central service node sends the parameter aggregation information to each of the participating sub-nodes so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, the method further includes:

[0029] The central service node adjusts the training task according to the dictionary content indicated by the identification information of the second target quantity, where the identification information of the second target quantity is randomly selected by the trusted execution environment node from the random dictionary, and the identification information of the second target quantity is different from the identification information of the first target quantity.

[0030] In an exemplary embodiment of the present disclosure, the central service node sends the parameter aggregation information to each of the participating sub-nodes, so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, including:

[0031] The central service node sends the parameter aggregation information to each of the participating sub-nodes;

[0032] For any of the participating sub-nodes, updating the local model parameters once according to the parameter aggregation information;

[0033] According to the private reset dictionary, the local model after the first update is trained according to the adjusted training task to perform a second update on the local model parameters.

[0034] In an exemplary embodiment of the present disclosure, the local model of each participating sub-node includes the same model hyper-parameters, and the model hyper-parameters are obtained by pre-negotiation by each participating sub-node.

[0035] According to one aspect of the present disclosure, there is provided a model training system, the model training system comprising a central service node, a participating sub-node and a trusted execution environment node;

[0036] The trusted execution environment node is used to reset the private dictionary of each participating sub-node to obtain a private reset dictionary, where the private dictionary is constructed according to the private data of the participating sub-node;

[0037] The participating subnode is used to perform local model training based on the private reset dictionary according to the training task issued by the central service node to update local model parameters;

[0038] The central service node is used to aggregate the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result.

[0039] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above methods is implemented.

[0040] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned methods by executing the executable instructions.

[0041] The model training method in the exemplary embodiment of the present disclosure, on the one hand, uses a trusted execution environment and distributed federated learning to separate the model dictionary and model parameters of the basic model, thereby ensuring the security of the cloud-based basic model and improving the security of data in model training; on the other hand, multiple participating sub-nodes perform local model training respectively, and upload the obtained model update parameters to the central service node to update the cloud model, and utilize the private data of different participating sub-nodes to reduce the model training cost, increase the amount of training data, improve the model training accuracy, and expand the application scenarios of the trained basic model to meet the model requirements of various users.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0044] Figure 1 An application scenario diagram according to an exemplary embodiment of the present disclosure is shown;

[0045] Figure 2 A flow chart of a model training method according to an exemplary embodiment of the present disclosure is shown;

[0046] Figure 3 A schematic diagram showing the contents of a private dictionary of a medical participation sub-node according to an exemplary embodiment of the present disclosure is shown;

[0047] Figure 4 A flowchart of an implementation method for obtaining a private reset dictionary according to an exemplary embodiment of the present disclosure is shown;

[0048] Figure 5 A flowchart showing an implementation method of updating global model parameters according to an exemplary embodiment of the present disclosure is shown;

[0049] Figure 6 A flowchart of updating local model parameters according to an exemplary embodiment of the present disclosure is shown;

[0050] Figure 7 A schematic diagram of model parameter interaction between a central service node and participating sub-nodes according to an exemplary embodiment of the present disclosure is shown;

[0051] Figure 8 A flowchart of performing model training based on a model training system according to an exemplary embodiment of the present disclosure is shown;

[0052] Fig. 9 A schematic diagram of the architecture of a model training system according to an exemplary embodiment of the present disclosure is shown;

[0053] Fig.10 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown.

[0054] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0055] The exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and the concepts of the exemplary embodiments will be fully conveyed to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their detailed description will be omitted.

[0056] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0057] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.

[0058] In the related art of this field, the basic model is usually trained independently by different users and opened to the outside world. During the model training process, due to the huge training parameters of the basic model, each user's independent training not only wastes energy, but also due to the limited training data used by each user, it is difficult to train a basic model that meets the user's needs.

[0059] Based on this, in an exemplary embodiment of the present disclosure, a model training method is first provided. Figure 1 FIG. 1 is an application scenario diagram involved in the exemplary embodiment of the present disclosure. Figure 1 As shown, the participating sub-nodes 110 are participating servers that need to participate in model training. Each participating sub-node 110 stores its own private data and cannot read the data of other participating sub-nodes 110.

[0060] Among them, each participating sub-node 110 sends its own private dictionary to the trusted execution environment node 120, and the central service node 130 sends the random acquisition training task to each participating sub-node 110 based on the private dictionary aggregated in the trusted execution environment node 120. Each participating sub-node 110 performs local model training locally and uploads the local model parameters to the central service node 130. The central service node 130 aggregates the local model parameters of each participating sub-node to obtain the global cloud model parameters.

[0061] It is worth mentioning that Figure 1 The number of participating sub-nodes 110 in the example is only illustrative, and any number of participating sub-nodes may be provided according to actual implementation requirements. The central service node and participating sub-nodes may be a single server or multiple servers, such as a server cluster, etc., and the embodiments of the present disclosure do not specifically limit this.

[0062] like Figure 2 A flow chart of a model training method according to an embodiment of the present disclosure is shown. Figure 2 As shown, the model training method of the embodiment of the present disclosure may include steps S210 to S230:

[0063] Step S210: the trusted execution environment node resets the private dictionary of each participating child node to obtain a private reset dictionary, where the private dictionary is constructed based on the private data of the participating child node;

[0064] Step S220: The participating subnode performs local model training based on the private reset dictionary and the training task issued by the central service node to update the local model parameters;

[0065] Step S230: The central service node aggregates the model update parameters of each participating sub-node to update the cloud model according to the aggregation result.

[0066] According to the model training method of the embodiment of the present invention, a trusted execution environment and distributed federated learning are used to separate the model dictionary and model parameters of the basic model, thereby ensuring the security of the cloud-based basic model; multiple participating sub-nodes perform local model training respectively, and upload the obtained model update parameters to the central service node to update the cloud-based model, and utilize the private data of different participating sub-nodes to reduce the model training cost, increase the amount of training data, improve the model training accuracy, and expand the application scenarios of the trained basic model to meet the model requirements of various users.

[0067] Combine the following Figure 2 The model training method of the embodiment of the present disclosure is explained in detail.

[0068] In step S210, the trusted execution environment node resets the private dictionary of each participating child node to obtain a private reset dictionary, where the private dictionary is constructed based on the private data of the participating child nodes.

[0069] In an exemplary embodiment of the present disclosure, each participating sub-node may include participants in different fields, such as finance, medical care, insurance, multimedia and other fields. Trusted execution environment (TEE) is an independent processing environment with computing and storage functions that can provide security and integrity protection. In the hardware, an isolated memory is allocated separately for sensitive data. All sensitive data calculations are performed in this memory, and except for authorized interfaces, other parts of the hardware cannot access the information in the isolated memory. The embodiment of the present disclosure aggregates the private dictionaries of each participating sub-node through a trusted execution environment node, and performs relevant processing operations to protect the privacy data of each participating sub-node.

[0070] The private dictionary is constructed for the private data of each participating child node. Each participating child node can only know the content of its own private dictionary, but cannot know the private dictionaries of other participating child nodes.

[0071] In an exemplary embodiment, before the trusted execution environment node resets the private dictionary of each participating child node and obtains the reset private dictionary, each participating child node constructs its own private dictionary and encrypts the private dictionary and sends it to the trusted execution environment node.

[0072] Any participating child node can construct a private dictionary that includes:

[0073] Extracting basic element features of private data, and determining identification information of each basic element feature according to a predetermined identification rule;

[0074] A private dictionary is generated according to the correspondence between the basic element features and the identification information.

[0075] Taking the private data of a participating child node as text data as an example, the private unstructured data can be segmented into words to obtain basic element features. For example, "The weather is very good today" can be segmented into "today", "day", "sky", "air", "very", "good" according to independent characters, and segmented into "today", "weather", "very good" according to independent words. The embodiment of the present disclosure does not impose any special restrictions on the word segmentation method.

[0076] The predetermined identification rule may be an identification method determined by negotiation among the participating sub-nodes, and may use letters, numbers or other characters to identify the basic element features after segmentation. For example, the identification information corresponding to "today", "day", "weather", "air", "very", and "good" are "a", "b", "b", "c", "d", and "e" respectively, and a private dictionary is generated according to the correspondence between the basic element features and the identification information, such as Figure 3 The private dictionary corresponding to a medical participation sub-node is shown. Figure 3 As shown, a private dictionary is constructed according to the basic element features of the private data of the medical participation sub-node used for training the model and the corresponding identification information. Based on the private dictionary, the corresponding basic element features can be queried according to the identification information.

[0077] Each participating sub-node in the embodiment of the present disclosure generates its own private dictionary in the above manner, which will not be described in detail here.

[0078] In an exemplary embodiment, in order to increase the word-meta information in the private dictionary of each participating sub-node, a random dictionary can also be constructed based on the private dictionary to enrich the content of the private dictionary of the participating sub-node. Based on this, the embodiment of the present disclosure also provides an implementation method for obtaining a private reset dictionary. The trusted execution environment node resets the private dictionary of each participating sub-node, and obtaining the private reset dictionary may include steps S410 to S430:

[0079] Step S410: The trusted execution environment node aggregates the private dictionaries of each participating child node.

[0080] After the participating sub-nodes generate their own private dictionaries, they encrypt and transmit the private dictionaries to the trusted execution environment node. After receiving the private dictionaries, the trusted execution environment node decrypts them and aggregates the private dictionaries of the participating sub-nodes. The private dictionaries are encrypted and transmitted to the trusted execution environment node to ensure the security of the private dictionaries during the transmission process. The embodiments of the present disclosure do not impose any special restrictions on the encryption transmission algorithm. All relevant algorithms applicable to encrypted transmission data are applicable to the present disclosure.

[0081] The trusted execution environment node aggregates the private dictionaries of each participating sub-node. This process merges the private data of each participating sub-node to obtain a global aggregate dictionary. It is worth noting that although the trusted execution environment aggregates the private dictionaries of each participating sub-node, each participating sub-node only knows its own private dictionary and cannot know the private dictionaries of other participating sub-nodes.

[0082] By separating the model parameters of the participating sub-nodes from the private dictionary, the security of the private data of each participating sub-node can be guaranteed. At the same time, the private dictionaries of each participating sub-node can be aggregated based on the trusted execution environment node to ensure that the subsequent data of different participating sub-nodes can iterate the cloud-based model parameters for the same training task.

[0083] Step S420: The trusted execution environment node adds obfuscated content to the aggregated private dictionary to construct a random dictionary.

[0084] In an exemplary embodiment, the obfuscated content is different from the content corresponding to the private dictionary, and the trusted execution environment node can construct a random dictionary based on the aggregated dictionary. The random dictionary includes a forward dictionary, such as Figure 3 As shown, in the forward private dictionary, the corresponding basic element features can be queried according to the identification information. Correspondingly, the random dictionary also includes a reverse dictionary, in which the corresponding identification information can be queried according to the basic element features. Based on the forward dictionary and the reverse dictionary, the forward random dictionary and the reverse random dictionary corresponding to the converged dictionary are constructed.

[0085] Furthermore, the forward and reverse random dictionaries can be randomly disrupted and obfuscated content can be added to construct a random dictionary, wherein the obfuscated content can be obfuscated letters, data or other characters different from the existing content of the forward and reverse random dictionaries, and there is no special restriction on this.

[0086] Since the subsequent trusted execution environment nodes reset the private dictionary according to the random dictionary, by adding obfuscated content to the aggregated private dictionary, the security of the dictionary when it is distributed to each participating sub-node can be increased.

[0087] Step S430: using a random dictionary to reset the private dictionary of the participating child node, wherein the reset result includes the content of the private dictionary of the participating child node and the random content in the random dictionary.

[0088] Since the random dictionary is a fusion of the private dictionaries of each participating child node and adds obfuscated content, after the private dictionaries of the participating child nodes are reset using the random dictionary, the private reset dictionary includes both the original content of the private dictionary and the random content from the random dictionary. The random content is different from the original content of the private dictionary. The random content may include obfuscated content and / or content of the private dictionaries of other participating child nodes.

[0089] It is worth noting that the private reset node obtained by resetting the private dictionary of the participating child node using a random dictionary includes random content, but for the participating child node, only the content of its own private dictionary is recognized, and the actual source of the random content is unknown. Resetting the private dictionary of the participating child node based on the random dictionary increases the security of the trusted execution node when distributing the private reset dictionary.

[0090] In an exemplary embodiment, before the participating subnodes perform local model training based on the private reset dictionary according to the training tasks issued by the central service node to update the cloud model according to the aggregated results, the central service node needs to determine the training tasks to be issued. The embodiment of the present disclosure also provides an implementation method for selecting training tasks, which may include:

[0091] The trusted execution environment node randomly selects identification information of the first target quantity based on the random dictionary and notifies the central service node;

[0092] The central service node constructs a training task according to the dictionary content indicated by the identification information of the first target quantity and sends it to each participating sub-node.

[0093] The trusted execution environment can randomly select identification information based on the random dictionary and notify the central service node. The central service node uses the dictionary content corresponding to the identification information of the first target data randomly selected by the trusted execution environment to build a training task and send the training task to each participating sub-node.

[0094] For example, the central service node can issue training tasks based on the data token (identification information) randomly selected by the trusted execution environment node. Since the random dictionary is obtained by aggregating the private dictionaries of each participating sub-node, the identification information in the random dictionary is randomly selected to issue training tasks. This can ensure that different participating sub-nodes are conducting local model training based on private data for the same training task, thereby ensuring that the private data of different participating sub-nodes are iteratively updating the cloud model parameters for the same task. Among them, the training task can be, for example, a mask task, and there is no special restriction on this.

[0095] In step S220, the participating sub-nodes perform local model training based on the private reset dictionary and according to the training tasks issued by the central service node to update the local model parameters.

[0096] The local models of each participating sub-node include the same model hyperparameters. Model hyperparameters refer to the hyperparameters of the algorithm, not the parameters obtained through sample training. For example, for the Transformer model, the model hyperparameters may include the embedding length, etc. The model hyperparameters are pre-negotiated by each participating sub-node, that is, each participating sub-node pre-negotiates a local model with the same parameters.

[0097] After the participating sub-nodes obtain the private reset dictionary encrypted and sent by the trusted execution environment node, they perform their own local model training according to the private reset dictionary and the training tasks issued by the central service node to update the local model parameters and obtain the model update parameter information. It is worth noting that the process of local model training performed by each participating sub-node is performed according to the respective model type and the set model hyperparameters. The embodiment of the present disclosure does not impose any special restrictions on the specific training process of the local model, which can be set according to the model training requirements of each participating sub-node.

[0098] In step S220, each participating sub-node uses its own private data to perform local model training for the same training task as part of the iterative update of the cloud model parameters, and jointly completes the update of the cloud model parameters.

[0099] It should be noted that in one iterative update, each participating sub-node performs local model training for the same training task to update the local model parameters. In the next iterative update, the training task is re-issued by the central service node, and each participating sub-node trains the local model for the re-issued training task.

[0100] In step S230, the central service node aggregates the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result.

[0101] When each participating sub-node completes an iteration, the local model training is completed to obtain the model update parameters, and the participating sub-nodes encrypt and transmit the model update parameters obtained to the central service node. Among them, the model update parameters include but are not limited to gradient information, training accuracy, model weight information, etc., which are obtained through model training.

[0102] The central service node synchronously or asynchronously aggregates the received gradient information or model parameters to obtain global model parameters. For example, the global training accuracy corresponding to the cloud model is obtained by weighted averaging the training accuracy uploaded by each participating sub-node.

[0103] In an exemplary embodiment, a method for updating global model parameters is provided. Figure 5 A flowchart of updating global model parameters according to an exemplary embodiment of the present disclosure is shown. Figure 5 As shown, the process includes:

[0104] Step S510: Determine whether the cloud model parameters meet the preset training stop conditions.

[0105] The cloud model parameters meet the training stop conditions, including: the number of training iterations corresponding to the cloud model reaches the iteration number threshold; or the global training accuracy of the cloud model reaches the target training accuracy. The global training accuracy is obtained by aggregating the model update parameters uploaded by each participating sub-node.

[0106] Step S520: If the cloud model parameters do not meet the preset training stop conditions, the central service node aggregates the model update parameter information of each participating sub-node to obtain parameter aggregation information. After using the parameter aggregation information as the cloud model parameters, the central service node sends the parameter aggregation information to each participating sub-node.

[0107] After receiving the parameter aggregation information, the participating sub-nodes continue to train the local model based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, and encrypt and transmit the obtained local model parameters to the central service node;

[0108] Step S510 and step S520 are repeatedly executed until the cloud model parameters meet the preset training stop condition.

[0109] Step S530: When the cloud model parameters meet the preset training stop condition, the update of the cloud model parameters is completed.

[0110] The trained cloud model is determined according to the finally obtained cloud model parameters.

[0111] Since the central service node needs to re-issue the training task to each participating sub-node during each iterative update process, the embodiment of the present disclosure also provides an implementation method for adjusting the training task. Before the central service node sends the parameter aggregation information to each participating sub-node so that each participating sub-node performs local model training based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, the central service node also adjusts the training task according to the dictionary content indicated by the identification information of the second target quantity.

[0112] The identification information of the second target quantity is randomly selected by the trusted execution environment node from a random dictionary, and the identification information of the second target quantity is different from the identification information of the first target quantity.

[0113] Specifically, during each iterative update process, the trusted execution environment node needs to randomly select identification information from the random dictionary and notify the central service node, so that the central service node can issue training tasks according to the identification information notified by the trusted execution environment node. In this way, the training tasks for each iterative update training are at least not exactly the same, but during the same iterative update, the training tasks of each participating sub-node are the same.

[0114] There is no special restriction on whether the first target quantity is the same as the second target quantity, but the identification information of the first target quantity is at least not completely the same as the identification information of the second quantity.

[0115] In step S520, in the training process after the second iterative update (including the second iterative update), after the participating child node receives the parameter aggregation information, it continues to train the local model based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, which may include steps S610 to S630:

[0116] Step S610: the central service node sends parameter aggregation information to each participating sub-node.

[0117] Step S620: For any participating child node, update the local model parameters once according to the parameter aggregation information.

[0118] The central service node sends the aggregated parameter aggregation information to each participating sub-node, so that each participating sub-node updates the local model parameters based on the parameter aggregation information.

[0119] Step S630: According to the private reset dictionary, the local model that has been updated once is trained according to the adjusted training task to perform a second update on the local model parameters.

[0120] Each participating sub-node continues to train the local model obtained in step S620 based on the private reset dictionary and the training task adjusted by the central service node to update the local model parameters, and sends the second updated local model parameters to the central service node via encrypted transmission.

[0121] Repeat the above steps S510 and S520 (including steps S610 to S630) until the central service node determines that the cloud model parameters meet the preset training stop condition. Figure 7 As shown, each participating sub-node uploads the local model parameters to the central service node. The central service node aggregates the local model parameters of each participating sub-node, encrypts and sends them to each participating sub-node, realizes the iterative update of the cloud model parameters in the process of continuous updating and iteration, and obtains the global model parameters corresponding to the cloud model parameters.

[0122] Figure 8 A flowchart of a model training system based on an exemplary embodiment of the present disclosure is shown. Figure 8 The model training method of the embodiment of the present disclosure is described.

[0123] First, each participating sub-node builds a private dictionary based on its own private data, and encrypts the private dictionary and transmits it to the trusted execution environment node.

[0124] Secondly, the trusted execution environment node aggregates the private dictionaries of each participating child node, adds obfuscated content to the aggregated private dictionary to construct a random dictionary, and uses the random dictionary to reset the private dictionaries of the participating child nodes to obtain the private reset dictionaries of each participating child node.

[0125] Next, the trusted execution environment node randomly selects identification information of the first target quantity based on the random dictionary and notifies the central service node.

[0126] Then, the central service node constructs a training task according to the dictionary content indicated by the identification information of the first target quantity and sends it to each participating sub-node.

[0127] Furthermore, each participating sub-node performs local model training according to its own private reset dictionary and the training task issued by the central service node to update the local model parameters, and encrypts and transmits the obtained model update parameter information to the central service node.

[0128] Finally, the central service node aggregates the model update parameters of each participating sub-node and updates the cloud model based on the aggregated results. The central service node determines whether the cloud model parameters meet the preset training stop conditions based on the aggregated model update parameters to determine whether to perform the next iterative training.

[0129] Among them, when the central service node determines that the next iterative training is needed, the trusted execution environment node randomly selects the identification information of the second target quantity based on the random dictionary and notifies the central service node, so that the central service node adjusts the training task according to the dictionary content indicated by the identification information of the second target quantity and sends it to each participating sub-node. Each participating sub-node performs local model training according to the received parameter aggregation information and the adjusted training task to update the local model parameters, and encrypts the local model parameters and uploads them to the central service node.

[0130] The above process is repeated until the cloud model parameters meet the preset training stop conditions, such as the global training accuracy reaches the target training accuracy, or the number of training iterations reaches the iteration number threshold. The embodiments of the present disclosure can pre-set the training stop conditions according to actual training needs, and there is no special restriction on this.

[0131] From the above, it can be seen that by integrating the two privacy computing methods of trusted execution environment and federated learning, the model dictionary and model parameters in the basic model training process are separated, thereby ensuring the security of the cloud model during the training process. In each iterative training process, the central service node randomly selects the identification information in the random dictionary in the trusted execution environment node to issue the training task, which can ensure that the private data of different participating sub-nodes are iteratively updated for the same task. The cloud model parameters. In addition, the embodiment of the present disclosure constructs a random dictionary by aggregating the private dictionaries of different participating sub-nodes and adding obfuscated characters. The random dictionary includes multi-dimensional data across domains, languages, and modalities, thereby expanding the application scenarios of the basic model. While increasing the security of the dictionary after distribution through obfuscated characters, the participating sub-nodes jointly participate in the model training, thereby reducing the energy consumption and cost of the basic model training and improving the training accuracy of the model. The model training method of the embodiment of the present disclosure can be widely used in the training of basic models in various application scenarios, such as classification, clustering, regression, and other model training of unstructured text data, and has a wide range of application scenarios.

[0132] According to an exemplary embodiment of the present disclosure, a model training system is also provided, such as Fig. 9 As shown, the model training system 900 includes a central service node 910, a participating sub-node 920 and a trusted execution environment node 930. Among them:

[0133] The trusted execution environment node 930 is used to reset the private dictionary of each participating sub-node 920 to obtain a private reset dictionary, where the private dictionary is constructed based on the private data of the participating sub-node 920;

[0134] The participating subnode 920 is used to perform local model training based on the private reset dictionary according to the training task issued by the central service node 910 to update the local model parameters;

[0135] The central service node 910 is used to aggregate the model update parameters of each participating sub-node 920 to update the cloud model according to the aggregation result.

[0136] In an exemplary embodiment of the present disclosure, the participating sub-node 920 is further used to: construct its own private dictionary; the participating sub-node 920 encrypts the private dictionary and sends it to the trusted execution environment node 930;

[0137] Wherein, any participating sub-node 930 builds a private dictionary, including:

[0138] Extract basic element features of private data, and determine identification information of each basic element feature according to a predetermined identification rule; generate a private dictionary according to the corresponding relationship between the basic element features and the identification information.

[0139] In an exemplary embodiment of the present disclosure, the trusted execution environment node 930 is further configured to:

[0140] The trusted execution environment node 930 aggregates the private dictionaries of each participating sub-node;

[0141] The trusted execution environment node 930 adds obfuscated content to the aggregated private dictionary to construct a random dictionary, wherein the obfuscated content is different from the content corresponding to each of the private dictionaries;

[0142] The trusted execution environment node 930 uses a random dictionary to reset the private dictionary of the participating child node 930, wherein the reset result includes the content of the private dictionary of the participating child node 930 and the random content in the random dictionary, and the random content is different from the content of the private dictionary.

[0143] In an exemplary embodiment of the present disclosure, the trusted execution environment node 930 is further used to randomly select identification information of the first target quantity based on the random dictionary and notify the central service node 910;

[0144] The central service node 910 is further configured to construct a training task according to the dictionary content indicated by the identification information of the first target quantity and send the task to each participating sub-node.

[0145] In an exemplary embodiment of the present disclosure, the following process is executed cyclically until the cloud model parameters meet the preset training stop condition:

[0146] The central service node 910 is also used to aggregate the model update parameters of each participating sub-node 920 to obtain parameter aggregation information, and use the parameter aggregation information as the cloud model parameters;

[0147] The central service node 910 is further used to send parameter aggregation information to each participating sub-node 920, so that each participating sub-node 920 performs local model training based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters.

[0148] In an exemplary embodiment of the present disclosure, the central service node 910 is also used to adjust the training task according to the dictionary content indicated by the identification information of the second target quantity, the identification information of the second target quantity is randomly selected by the trusted execution environment node from the random dictionary, and the identification information of the second target quantity is different from the identification information of the first target quantity.

[0149] In an exemplary embodiment of the present disclosure, the central service node 910 is also used to send parameter aggregation information to each participating sub-node; for any participating sub-node 920, it is also used to update the local model parameters once according to the parameter aggregation information; according to the private reset dictionary, the updated local model is trained according to the adjusted training task to perform a second update on the local model parameters.

[0150] In an exemplary embodiment of the present disclosure, the local model of each participating sub-node includes the same model hyperparameters, and the model hyperparameters are pre-negotiated by each participating sub-node. Since the specific details of each functional module (unit) of the model training system of the exemplary embodiment of the present disclosure have been described in detail in the invention embodiment of the above model training method, they will not be repeated here.

[0151] It should be noted that although several modules or units of the model training system are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0152] In addition, in the exemplary embodiment of the present disclosure, a computer storage medium capable of implementing the above method is also provided. A program product capable of implementing the above method of this specification is stored thereon. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.

[0153] The embodiment of the present disclosure also provides a program product for implementing the above method, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0154] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.

[0155] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0156] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0157] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0158] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method, or program product. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which may be collectively referred to herein as a "circuit", "module", or "system".

[0159] Refer to the following Fig.10 hereinafter describes the electronic device 1000 according to such an embodiment of the present disclosure. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0160] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0161] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.

[0162] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022 , and may further include a read-only memory unit (ROM) 1023 .

[0163] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0164] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0165] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0166] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0167] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0168] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A model training method, characterized in that: Applied to a model training system, the model training system includes a central service node, a trusted execution environment node and a plurality of participating sub-nodes, the participating sub-nodes are participating servers that need to participate in model training, the central service node is a server or a server cluster, the trusted execution environment node is a memory in hardware for providing computing and storage functions, and the method includes: The trusted execution environment node resets the private dictionary of each participating sub-node respectively to obtain a private reset dictionary, where the private dictionary is constructed according to the private data of the participating sub-node; The participating sub-node performs local model training based on the private reset dictionary according to the training task issued by the central service node to update local model parameters; The central service node aggregates the model update parameters of each participating sub-node to update the cloud model according to the aggregation result; The trusted execution environment node resets the private dictionary of each participating sub-node respectively to obtain a private reset dictionary, including: The trusted execution environment node aggregates the private dictionaries of the participating sub-nodes, and adds obfuscated content to the aggregated private dictionaries to construct a random dictionary; The trusted execution environment node uses the random dictionary to reset the private dictionary of the participating child node, wherein the reset result includes the content of the private dictionary of the participating child node and the random content in the random dictionary.

2. The method according to claim 1, characterized in that Before the trusted execution environment node resets the private dictionary of each participating sub-node respectively to obtain the private reset dictionary, the method further includes: The participating child node constructs its own private dictionary; The participating sub-node encrypts the private dictionary and sends it to the trusted execution environment node; Wherein, any of the participating sub-nodes constructs the private dictionary, including: Extracting basic element features of the private data, and determining identification information of each of the basic element features according to a predetermined identification rule; The private dictionary is generated according to the correspondence between the basic element features and the identification information.

3. The method according to claim 1, characterized in that The obfuscated content is different from the content corresponding to each of the private dictionaries; the random content is different from the content of the private dictionary.

4. The method according to claim 1, characterized in that: Before the participating subnode performs local model training based on the private reset dictionary according to the training task issued by the central service node to update the cloud model according to the aggregation result, the method further includes: The trusted execution environment node randomly selects identification information of a first target quantity based on the random dictionary and notifies the central service node; The central service node constructs the training task according to the dictionary content indicated by the identification information of the first target quantity and sends it to each of the participating sub-nodes.

5. The method according to claim 4, characterized in that The central service node aggregates the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result, including: The following process is executed repeatedly until the cloud model parameters meet the preset training stop conditions: The central service node aggregates the model update parameters of each participating sub-node to obtain parameter aggregation information, and uses the parameter aggregation information as the cloud model parameters; The central service node sends the parameter aggregation information to each of the participating sub-nodes, so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and a corresponding private reset dictionary to update local model parameters.

6. The method according to claim 5, characterized in that Before the central service node sends the parameter aggregation information to each of the participating sub-nodes so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and the corresponding private reset dictionary to update the local model parameters, the method further includes: The central service node adjusts the training task according to the dictionary content indicated by the identification information of the second target quantity, where the identification information of the second target quantity is randomly selected by the trusted execution environment node from the random dictionary, and the identification information of the second target quantity is different from the identification information of the first target quantity.

7. The method according to claim 6, characterized in that The central service node sends the parameter aggregation information to each of the participating sub-nodes, so that each of the participating sub-nodes performs local model training based on the parameter aggregation information and a corresponding private reset dictionary to update local model parameters, including: The central service node sends the parameter aggregation information to each of the participating sub-nodes; For any of the participating sub-nodes, updating the local model parameters once according to the parameter aggregation information; According to the private reset dictionary, the local model after the first update is trained according to the adjusted training task to perform a second update on the local model parameters.

8. The method according to any one of claims 1 to 7, characterized in that The local model of each participating sub-node includes the same model hyper-parameters, and the model hyper-parameters are pre-negotiated by each participating sub-node.

9. A model training system, characterized in that: The model training system includes a central service node, a trusted execution environment node and a plurality of participating sub-nodes; the participating sub-nodes are participating servers that need to participate in model training, the central service node is a server or a server cluster, and the trusted execution environment node is a memory in the hardware for providing computing and storage functions; The trusted execution environment node is used to reset the private dictionary of each participating sub-node respectively to obtain a private reset dictionary, where the private dictionary is constructed according to the private data of the participating sub-node; The participating subnode is used to perform local model training based on the private reset dictionary according to the training task issued by the central service node to update local model parameters; The central service node is used to aggregate the model update parameter information of each participating sub-node to update the cloud model according to the aggregation result; The trusted execution environment node resets the private dictionary of each participating sub-node respectively to obtain a private reset dictionary, including: The trusted execution environment node aggregates the private dictionaries of the participating sub-nodes, and adds obfuscated content to the aggregated private dictionaries to construct a random dictionary; The trusted execution environment node uses the random dictionary to reset the private dictionary of the participating child node, wherein the reset result includes the content of the private dictionary of the participating child node and the random content in the random dictionary.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 8 when executed by a processor.