Trusted sandbox-based federated learning model training method and apparatus, and electronic device

By creating a trusted sandbox in a mobile edge computing environment and utilizing blockchain state channels and smart contracts, the privacy protection issue of blockchain platform model training data is solved, enabling trusted sharing of global models and private data, and protecting user rights.

CN114579957BActive Publication Date: 2025-12-05BEIJING UNIV OF POSTS & TELECOMM +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210068424.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-12-05
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

In existing technologies, when combining blockchain and federated learning, there is a problem of protecting the privacy of model training data on the blockchain platform.

Method used

By creating a trusted sandbox in the mobile edge computing environment, and utilizing blockchain state channels and smart contracts, the registration, node selection, model training, and aggregation of MEC servers and local devices are realized, thus protecting data privacy.

Benefits of technology

In a trustless edge computing environment, trusted sharing of global models and private data is achieved, protecting user rights and ensuring data security and privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579957B_ABST
    Figure CN114579957B_ABST
Patent Text Reader

Abstract

The application provides a federated learning model training method and device based on a trusted sandbox and electronic equipment. The method comprises the following steps: in the case of determining that the MEC server belongs to a created trusted sandbox, sending first device information corresponding to the MEC server and second device information corresponding to a plurality of local devices in communication connection with the MEC server to a blockchain platform for registration; determining a plurality of target local devices for federated learning based on a node selection request broadcast by the blockchain platform; receiving a global model and a training request sent by the blockchain platform, controlling the plurality of target local devices, training the global model based on the training request to obtain a local model; and aggregating the local model to obtain a new global model. The federated learning model training method and device based on the trusted sandbox and the electronic equipment provided by the application can solve the problem of privacy protection of model training data of the blockchain platform in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data privacy protection, and in particular to a federated learning model training method and device based on a trusted sandbox and electronic equipment. BACKGROUND

[0002] Data sharing with privacy protection has become an important prerequisite for future networks. As a new trusted data sharing method, the integration of federated learning and blockchain has attracted widespread attention. Federated learning is a framework or system that enables multiple participants to collaborate to build and use machine learning models without disclosing the original and private data owned by the participants, while achieving good performance. However, traditional federated learning achieves data privacy protection through model migration, ignoring the trust issues of data, models and results during transmission and computation. At the same time, blockchain is a distributed ledger technology with multiple backups, which is essentially a distributed database without a central administrator, and data trust is transferred through a consensus mechanism during data sharing. Therefore, the combination of blockchain and federated learning is one of the feasible ways to solve the above problems in the mobile edge computing environment. However, in the existing technical solutions, the combination of blockchain and federated learning still has the problem of protecting the privacy of shared data on the blockchain platform. SUMMARY

[0003] The present application provides a federated learning model training method and device based on a trusted sandbox and electronic equipment to solve the problem of privacy protection of model training data on the blockchain platform when combining blockchain and federated learning in the prior art.

[0004] The present application provides a federated learning model training method based on a trusted sandbox, comprising:

[0005] In the case where it is determined that the MEC server belongs to the created trusted sandbox, the first device information corresponding to the MEC server and the second device information corresponding to a plurality of local devices in communication connection with the MEC server are sent to the blockchain platform for registration;

[0006] Based on the node selection request broadcast by the blockchain platform, a plurality of target local devices for federated learning are determined;

[0007] The global model and the training request sent by the blockchain platform are received, and the global model and the training request are distributed to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model;

[0008] The local models uploaded by the plurality of target local devices are obtained, and the local models are aggregated to obtain a new global model;

[0009] The trusted sandbox is created based on a blockchain state channel by the MEC server.

[0010] The method for training a federated learning model based on a trusted sandbox provided by the application further comprises:

[0011] The first device information and the second device information are sent to a blockchain platform for registration, and after consensus by the blockchain platform, an incentive mechanism of the blockchain platform is obtained, and the incentive mechanism is executed on the target local device.

[0012] The global model is generated by the blockchain platform based on a smart contract.

[0013] The trusted sandbox is created by the MEC server based on a state channel and random selection of idle blockchain node resources.

[0014] The method for training a federated learning model based on a trusted sandbox provided by the application further comprises:

[0015] Training process data corresponding to the local model is obtained, and the training process of the target local device is evaluated based on the training process data.

[0016] The method for training a federated learning model based on a trusted sandbox provided by the application comprises:

[0017] The target local device for federated learning is selected based on the node selection request and in combination with a deep reinforcement learning algorithm.

[0018] The application further provides a device for training a federated learning model based on a trusted sandbox, comprising:

[0019] A first sending module is configured to, in a case where it is determined that the MEC server belongs to a created trusted sandbox, send first device information corresponding to the MEC server and second device information corresponding to a plurality of local devices in communication connection with the MEC server to a blockchain platform for registration.

[0020] A node selection module is configured to determine a plurality of target local devices for federated learning based on a node selection request broadcast by the blockchain platform.

[0021] The training module is configured to receive a global model and a training request sent by the blockchain platform, and distribute the global model and the training request to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model.

[0022] The aggregation module is configured to obtain the local models uploaded by the plurality of target local devices, and aggregate the local models to obtain a new global model.

[0023] The trusted sandbox is created by the MEC server based on a blockchain state channel.

[0024] The application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method for training a federated learning model based on a trusted sandbox according to any one of the above embodiments when executing the program.

[0025] The application further provides a non-transitory computer-readable storage medium, which stores a computer program executable by a processor to implement the steps of the method for training a federated learning model based on a trusted sandbox according to any one of the above embodiments.

[0026] The application further provides a computer program product, which comprises a computer program executable by a processor to implement the steps of the method for training a federated learning model based on a trusted sandbox according to any one of the above embodiments.

[0027] The application provides a method and device for training a federated learning model based on a trusted sandbox, which assigns a blockchain computing attribute by using a state channel, creates a trusted sandbox, instantiates a federated learning task in an edge computing environment without trust, and shares private data such as a global model and a new global model in a trusted environment to protect the rights and interests of users. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the present application or prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings without creative labor based on these drawings.

[0029] Figure 1 is a flowchart of the method for training a federated learning model based on a trusted sandbox provided by the application;

[0030] Figure 2 is a flowchart of the registration stage in the method for training a federated learning model based on a trusted sandbox provided by the application.

[0031] Figure 3 is a flow chart of the task initialization stage in the federated learning model training method based on the trusted sandbox provided by the application;

[0032] Figure 4 is a flow chart of the training and recording stage in the federated learning model training method based on the trusted sandbox provided by the application;

[0033] Figure 5 is a timing diagram corresponding to the federated learning model training method based on the trusted sandbox provided by the application;

[0034] Figure 6 is a system architecture diagram corresponding to the federated learning model training method based on the trusted sandbox provided by the application;

[0035] Figure 7 is a structural schematic diagram of the federated learning model training device based on the trusted sandbox provided by the application;

[0036] Figure 8 is a structural schematic diagram of the electronic device provided by the application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0038] The federated learning model training method, device and electronic device based on the trusted sandbox provided by the application will be described below. Figures 1-8

[0039] As shown in Figure 1 The federated learning model training method based on the trusted sandbox provided by the application is applied to an MEC (Mobile Edge Computing) server. The federated learning model training method based on the trusted sandbox comprises the following steps.

[0040] In step 110, if it is determined that the MEC server belongs to a created trusted sandbox, the first device information corresponding to the MEC server and the second device information corresponding to a plurality of local devices in communication connection with the MEC server are sent to a blockchain platform for registration.

[0041] ​Understandably, a trusted sandbox is one that can be trusted. In the field of computer security, a sandbox is a security mechanism that provides an isolated environment for running programs.

[0042] Under the trusted sandbox, the first device information corresponding to the MEC server and the second device information corresponding to the local device are sent to the blockchain platform for registration to confirm the identity of the MEC server and the local device. After consensus among the blockchain nodes, an incentive mechanism is executed to encourage each device to participate in training. The first device information includes the device data and resource information of the MEC server; the second device information includes the device data and resource information of the local device.

[0043] like Figure 2 As shown, the resource and data registration phase involves: sending the first device information to the blockchain platform, where the MEC server under the trusted sandbox is registered; and sending the second device information to the blockchain platform, where the local device under the trusted sandbox is registered.

[0044] Furthermore, the local device can be a personal computer, vehicle, or mobile phone, etc.

[0045] Step 120: Based on the node selection request broadcast by the blockchain platform, determine multiple target local devices for federated learning.

[0046] Understandably, the target local device used for federated learning is determined from multiple local devices that are connected to the MEC server.

[0047] like Figure 3 As shown, in the federated learning task initialization phase: after receiving the task request, the blockchain platform broadcasts a node selection request to the MEC server. The MEC server then selects a suitable target local device for this federated learning task using a node selection algorithm.

[0048] The MEC server creates a trusted sandbox through a state channel and returns the IDs (Identity Documents) of the corresponding MEC server and local device in the trusted sandbox to the blockchain platform. Finally, after consensus among the blockchain nodes, the federated learning task is successfully created.

[0049] Step 130: Receive the global model and training request sent by the blockchain platform, and allocate the global model and the training request to the multiple target local devices to control the multiple target local devices to train the global model based on the training request to obtain a local model.

[0050] Step 140: Obtain the local models uploaded by the multiple target local devices, and aggregate the local models to obtain a new global model.

[0051] The trusted sandbox is created by the MEC server based on the blockchain state channel.

[0052] Understandably, within a trusted sandbox, a single MEC server can have one or more local devices connected to it. During training, after receiving the global model to be trained from the blockchain platform, the MEC server in the trusted sandbox distributes the global model to the corresponding local devices. Each local device then performs federated learning. The MEC server broadcasts training requests, and upon receiving a training request, the local device begins training the received global model to obtain its own local model.

[0053] Each local device sends its local model back to the MEC server, which then aggregates them to obtain a new global model, which is the federated learning model.

[0054] As we can understand, a state channel, also known as a blockchain state channel, has the following basic components: 1. A portion of the blockchain's state is locked through multiple signatures and a portion of a smart contract, so the participants in this portion must fully agree to each other updating it. 2. Participants update the state themselves by generating and signing transfers, which are ultimately uploaded to the blockchain, rather than being calculated directly on-chain. Each new update refreshes the previous one. 3. Finally, the participants transmit the state back to the blockchain, then close the state channel and lock the state again (usually with a different setup than before).

[0055] It should be noted that MEC servers and local devices can only receive the global model to be trained sent by the blockchain platform after they have completed registration on the blockchain platform.

[0056] like Figure 4 As shown, the training and recording phases are as follows: First, the blockchain platform initializes the smart contract to obtain the global model and sends the global model to the trusted sandbox. The trusted sandbox then distributes the model to specific local devices and broadcasts training requests to each selected node, i.e., the selected local device.

[0057] After local device training is complete, the Trusted Sandbox aggregates the various local models into a new global model and executes incentive strategies and reputation assessment operations. Finally, the results are updated through consensus among blockchain nodes, and the Trusted Sandbox's MEC server stores the resulting new global model on the blockchain platform.

[0058] Further, the time sequence diagram corresponding to the federated learning model training method based on the trusted sandbox provided by the present application can refer to Figure 5 .

[0059] In some embodiments, the federated learning model training method based on the trusted sandbox further comprises:

[0060] The first device information and the second device information are sent to a blockchain platform for registration, and after consensus by the blockchain platform, an incentive mechanism of the blockchain platform is obtained, and the incentive mechanism is executed on the target local device.

[0061] It can be understood that the incentive mechanism can include an economic incentive and a Token (a temporary token in computer identity authentication) allocation system, and the main role is to give each node in the network layer the motivation to maintain the blockchain network, and through the constraints of the system, the nodes maintaining the blockchain system obtain economic returns, and the nodes intentionally destroying the blockchain system receive punishment.

[0062] In some embodiments, the global model is generated by the blockchain platform based on a smart contract (English: Smartcontract).

[0063] It can be understood that a smart contract is a computer protocol designed to disseminate, verify, or execute contracts in an informationized way. The smart contract allows trusted transactions without a third party, and these transactions are traceable and irreversible. The global model is a business model for processing industrial data.

[0064] Further, the trusted sandbox is randomly created based on state channels by the MEC server.

[0065] It can be understood that the idle blockchain node resource can be an idle MEC server. When a MEC server determines that it is in an idle state, a trusted sandbox is created based on the MEC server and the local device in communication connection with the MEC server.

[0066] In some embodiments, the federated learning model training method based on the trusted sandbox further comprises:

[0067] The training process data corresponding to the local model is obtained, and the training process of the target local device is evaluated based on the training process data.

[0068] It can be understood that after the training process of the target local device is evaluated, whether the local device is selected for training next time can be determined based on the evaluation result of the training process of the local device. For example, when the evaluation result of the training process of the local device is poor, other local devices are selected for training next time, and when the evaluation result of the training process of the local device is good, the local device can be selected for training next time.

[0069] In some embodiments, the determining the plurality of target local devices for federated learning based on the node selection request comprises:

[0070] The target local device for federated learning is selected based on the node selection request and in combination with a deep reinforcement learning algorithm.

[0071] It can be understood that the deep reinforcement learning algorithm can be an A3C (Actor-Critic Algorithm) algorithm, a Q-learning algorithm, a DQN algorithm, or a DPG (Deterministic policy gradient) algorithm.

[0072] In some embodiments, as shown in Figure 6 The sandbox and state channel are introduced to build a new data privacy sharing paradigm through blockchain and federated learning. Under this paradigm, a trusted sandbox is randomly created using a state channel, and a joint learning task is instantiated in an untrusted edge computing environment.

[0073] The original data will be paired into a trusted sandbox and destroyed after calculation. At the same time, the results are trusted to be transmitted to the requester, and the trusted sandbox that releases resources is also revoked. This process supports data trusted computing and sharing, but the process security is invisible, called "sandbox computing" or "trusted sandbox computing".

[0074] The blockchain platform is built by exhibiting blockchain nodes on several MEC servers with strong computing, storage, and communication capabilities. The blockchain platform supports user joint learning task requests, network resource trusted management, and data trusted management. At the same time, each MEC server or local device has a federated learning module for federated learning task instantiation. The architecture consists of the following parts:

[0075] Blockchain platform: The blockchain platform is exhibited on multiple MEC servers with strong computing, storage and communication capabilities. The blockchain platform has functions such as network resource trust management, data trust identification service, service request and distribution, network resource scheduling, service quality evaluation, etc. It supports users to randomly create sandboxes for federated learning task requests, and instantiates federated learning tasks using state channels in untrusted edge computing environments. At the same time, the reputation information of local devices is recorded and evaluated on the federated learning node selection platform.

[0076] MEC server: The MEC server supports the deployed federated learning module and the blockchain node, and the MEC server also manages the local devices in the domain. Each MEC server selects the optimal local device group to instantiate the federated learning task based on the intelligent engine. Then distribute the global model to each local device, and aggregate the local model into the global model after training.

[0077] Local device: It is composed of different types of mobile devices and fixed devices (such as vehicles or mobile phones) with federated learning modules for local model training and raw data. These local devices communicate with the MEC server through the base station. Each local device registers the computing, communication and storage resources on the blockchain platform. At the same time, in order to protect the data privacy of users and participate in collaborative work, the raw data identifier is also registered on the blockchain platform and can be verified at any time. Through federated learning, distributed model training is carried out on different local devices. The device uploads the model, rather than uploading the raw data to the MEC server and the blockchain platform.

[0078] In other embodiments, a privacy data sharing architecture based on sandbox computing is proposed. Based on the alliance blockchain, trust can be established between data providers in different Internet of Things domains. In addition, through the state channel and the trusted sandbox, the whole process of the federated learning task can be more effectively supervised. In this way, the architecture supports privacy information sharing in various Internet of Things fields, such as vehicle networking, smart medical care, smart home, wearable devices, robots, etc.

[0079] Medical data such as electronic medical records, medical images, etc. On the one hand, it plays a foundational role in the realization of precision health, on the other hand, these data are often scattered and difficult to share due to their sensitivity. For example: smart watches have collected real-time heartbeat data of individuals, researchers try to use these data to train models to predict strokes months in advance, combined with electronic medical records. However, both smart watch manufacturers and hospital medical records refuse to disclose data for privacy reasons. The privacy data sharing architecture proposed in this paper can ensure that sensitive patient data remain in local institutions or individual consumers, and do not leak to model trainers in the federated machine learning process, ensuring the credibility of the federated learning training process.

[0080] As one of the application scenarios of smart city, the Internet of Vehicles is composed of intelligent vehicles that can collect data, calculate and communicate. The Internet of Vehicles can realize navigation, automatic driving, traffic control, intelligent parking, real-time warning of road conditions (road congestion, road bumps or icing), coordination of vehicles to change lanes, etc. Although the edge computing-based Internet of Vehicles framework has gradually matured, vehicle data in the Internet of Vehicles still involves the driver's driving path information, personal information and other private data. In the application scenario of the Internet of Vehicles, the private data sharing architecture proposed in the application can be used. The whole process of federated learning is supervised by technologies such as trusted sandbox and blockchain, so that the vehicle can train locally and upload the updated model parameters, thereby effectively protecting the security of local private data.

[0081] In summary, the federated learning model training method based on a trusted sandbox provided by the application comprises: in the case of determining that the MEC server belongs to the created trusted sandbox, sending the first device information corresponding to the MEC server and the second device information corresponding to the plurality of local devices in communication connection with the MEC server to the blockchain platform for registration; determining a plurality of target local devices for federated learning based on the node selection request broadcast by the blockchain platform; receiving the global model and the training request sent by the blockchain platform, and distributing the global model and the training request to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model; obtaining the local model uploaded by the plurality of target local devices, and aggregating the local model to obtain a new global model; wherein the trusted sandbox is created based on a blockchain state channel by the MEC server.

[0082] In the federated learning model training method based on a trusted sandbox provided by the application, the state channel is used to give the blockchain computing properties and create a trusted sandbox, which is used to instantiate the federated learning task in a trustless edge computing environment, and share the global model and the new global model and other private data in a trusted environment to protect the rights and interests of users.

[0083] The federated learning model training device based on a trusted sandbox provided by the application is described below. The federated learning model training device based on a trusted sandbox described below can be referred to each other corresponding to the federated learning model training method based on a trusted sandbox described above.

[0084] As Figure 7 shown, the federated learning model training device 700 based on a trusted sandbox provided by the application comprises a first sending module 710, a node selection module 720, a training module 730 and an aggregation module 740.

[0085] The first sending module 710 is configured to, in a case where it is determined that the MEC server belongs to a created trusted sandbox, send first device information corresponding to the MEC server and second device information corresponding to a plurality of local devices in communication connection with the MEC server to a blockchain platform for registration.

[0086] The node selection module 720 is configured to determine a plurality of target local devices for federated learning based on a node selection request broadcast by the blockchain platform.

[0087] The training module 730 is configured to receive a global model and a training request sent by the blockchain platform, and distribute the global model and the training request to the plurality of target local devices, to control the plurality of target local devices to train the global model based on the training request to obtain a local model.

[0088] The aggregation module 740 is configured to obtain the local models uploaded by the plurality of target local devices, and aggregate the local models to obtain a new global model.

[0089] The trusted sandbox is created by the MEC server based on a blockchain state channel.

[0090] In some embodiments, the federated learning model training apparatus 700 based on a trusted sandbox further includes an incentive module.

[0091] The incentive module is configured to send the first device information and the second device information to the blockchain platform for registration, and after consensus by the blockchain platform, obtain an incentive mechanism of the blockchain platform, and execute the incentive mechanism on the target local devices.

[0092] In some embodiments, the global model is generated by the blockchain platform based on a smart contract.

[0093] Further, the trusted sandbox is randomly created by the MEC server based on a state channel and selected idle blockchain node resources.

[0094] In some embodiments, the federated learning model training apparatus 700 based on a trusted sandbox further includes a second sending module.

[0095] The second sending module is configured to obtain training process data corresponding to the local model, and evaluate a training process of the target local device based on the training process data.

[0096] In some embodiments, the node selection module 720 is further configured to select the target local devices for federated learning based on the node selection request and in combination with a deep reinforcement learning algorithm.

[0097] The electronic device, computer program product, and storage medium provided by the present invention are described below. The electronic device, computer program product, and storage medium described below can be referred to in correspondence with the federated learning model training method based on trusted sandbox described above.

[0098] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a federated learning model training method based on a trusted sandbox, the method including:

[0099] Step 110: If it is determined that the MEC server belongs to the created trusted sandbox, send the first device information corresponding to the MEC server and the second device information corresponding to the multiple local devices that communicate with the MEC server to the blockchain platform for registration.

[0100] Step 120: Based on the node selection request broadcast by the blockchain platform, determine multiple target local devices for federated learning;

[0101] Step 130: Receive the global model and training request sent by the blockchain platform, and allocate the global model and the training request to the multiple target local devices to control the multiple target local devices to train the global model based on the training request to obtain a local model;

[0102] Step 140: Obtain the local models uploaded by the multiple target local devices, and aggregate the local models to obtain a new global model;

[0103] The trusted sandbox is created by the MEC server based on the blockchain state channel.

[0104] Further, the logic instructions in the memory 830 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0105] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the federated learning model training method based on the trusted sandbox provided by the above-mentioned method, the method comprises:

[0106] Step 110, in the case of determining that the MEC server belongs to the created trusted sandbox, the first device information corresponding to the MEC server and the second device information corresponding to the plurality of local devices in communication connection with the MEC server are sent to the blockchain platform for registration;

[0107] Step 120, based on the node selection request broadcast by the blockchain platform, a plurality of target local devices for federated learning are determined;

[0108] Step 130, receiving the global model and the training request sent by the blockchain platform, and distributing the global model and the training request to the plurality of target local devices, so as to control the plurality of target local devices to train the global model based on the training request to obtain a local model;

[0109] Step 140, obtaining the local model uploaded by the plurality of target local devices, and aggregating the local model to obtain a new global model;

[0110] Wherein, the trusted sandbox is created based on a blockchain state channel by the MEC server.

[0111] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the federated learning model training method based on a trusted sandbox provided by each method described above, the method comprising:

[0112] Step 110, in the case of determining that the MEC server belongs to the created trusted sandbox, sending the first device information corresponding to the MEC server and the second device information corresponding to the plurality of local devices in communication connection with the MEC server to the blockchain platform for registration;

[0113] Step 120, determining a plurality of target local devices for federated learning based on the node selection request broadcast by the blockchain platform;

[0114] Step 130, receiving the global model and training request sent by the blockchain platform, and distributing the global model and the training request to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model;

[0115] Step 140, obtaining the local model uploaded by the plurality of target local devices, and aggregating the local model to obtain a new global model;

[0116] Wherein, the trusted sandbox is created based on a blockchain state channel by the MEC server.

[0117] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.

[0118] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software plus necessary universal hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in terms of the contribution to the prior art, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0119] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A federated learning model training method based on a trusted sandbox, characterized in that, Comprise: In the case of determining that the MEC server belongs to the created trusted sandbox, the first device information corresponding to the MEC server and the second device information corresponding to a plurality of local devices in communication connection with the MEC server are sent to the blockchain platform for registration; wherein the first device information contains device data and resource information of the MEC server; the second device information contains device data and resource information of the local device; Based on the node selection request broadcast by the blockchain platform, a plurality of target local devices for federated learning are determined; wherein the target local device is determined from a plurality of local devices connected to the MEC server; Receive the global model and training request sent by the blockchain platform, and distribute the global model and the training request to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model; Obtain the local model uploaded by the plurality of target local devices, and aggregate the local model to obtain a new global model; Wherein, the trusted sandbox is created by the MEC server based on the blockchain state channel; further comprising: sending the first device information and the second device information to the blockchain platform for registration, and after consensus by the blockchain platform, obtaining the incentive mechanism of the blockchain platform, and executing the incentive mechanism on the target local device.

2. The trusted sandbox-based federated learning model training method according to claim 1, characterized in that, The global model is generated by the blockchain platform based on a smart contract.

3. The trusted sandbox-based federated learning model training method according to claim 1, characterized in that, The trusted sandbox is randomly created by the MEC server based on the state channel, selecting idle blockchain node resources.

4. The trusted sandbox-based federated learning model training method according to claim 1, characterized in that, Further comprising: Obtain the training process data corresponding to the local model, and evaluate the training process of the target local device based on the training process data.

5. The trusted sandbox-based federated learning model training method according to any one of claims 1-4, characterized in that, Determine a plurality of target local devices for federated learning based on the node selection request, comprising: Based on the node selection request, and combined with a deep reinforcement learning algorithm, select target local devices for federated learning.

6. A trusted sandbox-based federated learning model training apparatus, characterized in that, Comprise: A first sending module for, in the case of determining that the MEC server belongs to the created trusted sandbox, sending the first device information corresponding to the MEC server and the second device information corresponding to a plurality of local devices in communication connection with the MEC server to the blockchain platform for registration; wherein the first device information contains device data and resource information of the MEC server; the second device information contains device data and resource information of the local device; A node selection module for determining a plurality of target local devices for federated learning based on the node selection request broadcast by the blockchain platform; wherein the target local device is determined from a plurality of local devices connected to the MEC server; The training module is configured to receive a global model and a training request sent by the blockchain platform, and distribute the global model and the training request to the plurality of target local devices to control the plurality of target local devices to train the global model based on the training request to obtain a local model. The aggregation module is configured to obtain the local model uploaded by the plurality of target local devices, aggregate the local model, and obtain a new global model. The trusted sandbox is created by the MEC server based on a blockchain state channel; further comprising: sending the first device information and the second device information to the blockchain platform for registration, and after consensus by the blockchain platform, obtaining an incentive mechanism of the blockchain platform, and executing the incentive mechanism on the target local device.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the federated learning model training method based on the trusted sandbox according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the federated learning model training method based on the trusted sandbox according to any one of claims 1 to 5.

9. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the federated learning model training method based on the trusted sandbox according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data trading system

    CN109035014A

  • Federal learning method based on DAG block chain

    CN113919507A