Model security training method and device in Internet of Things architecture, equipment and medium
By segmenting the global model into sensitive models and shared representation models in the IoT architecture, and training in a trusted execution environment and a rich execution environment, combining key negotiation and robust aggregation algorithm, the integrity and confidentiality of model updates in the IoT architecture in the communication process is solved, achieving higher security and privacy protection.
Patent Information
- Application Number
- CN202510010998.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the IoT architecture, how to protect the integrity and confidentiality of model updates during communication and prevent data breaches and privacy violations.
By segmenting the global model in federated learning into sensitive models and shared representation models, and training in trusted execution environments and rich execution environments, combining Diffie-Hellman key negotiation algorithm and robust aggregation algorithm, we ensure the confidentiality and integrity of model updates during transmission.
Effectively prevent attacks from malicious devices, protect the integrity and confidentiality of model updates, prevent data breaches and privacy violations, and enhance the security of the federated learning process.
Smart Images

Figure CN119728285A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things security, and in particular to a model security training method, device, equipment and medium in an Internet of Things architecture. Background Art
[0002] With the rapid development of IoT technology, it has been widely used in smart homes, smart cities, industrial manufacturing and other fields, bringing great convenience to people's lives and work. At the same time, the popularity of IoT is also accompanied by a series of security issues, especially in data processing and user privacy protection. Since IoT devices are usually distributed in various environments and most devices do not have strong security protection capabilities, they can easily become targets of attackers, leading to problems such as data leakage and privacy infringement.
[0003] To address these challenges, federated learning, as an emerging distributed machine learning technology, has received widespread attention. Federated learning allows multiple participants to jointly train a model without sharing the original data, thereby effectively protecting the privacy and security of the data. In federated learning, each participant trains the model on a local dataset and only sends model updates (such as gradients or parameters) to a central server for aggregation. This approach not only avoids direct data exchange, but also reduces the risk of data leakage, effectively protecting user privacy.
[0004] Research on security enhancement technology for federated learning under the IoT architecture is still in its infancy. This is mainly reflected in the following aspects: First, the diversity and heterogeneity of IoT devices lead to large differences in security performance between devices. How to ensure that all devices participating in federated learning have sufficient security protection capabilities is an urgent problem to be solved. Secondly, the communication security between IoT devices is also a major challenge. Since IoT devices are usually connected through wireless networks, communication links are vulnerable to eavesdropping and tampering by attackers. How to ensure the confidentiality and integrity of data during communication is the key to the application of federated learning in the IoT.
[0005] Although federated learning has achieved remarkable results in protecting data privacy, there is still a risk of privacy leakage. For example, an attacker may infer certain sensitive information of the original data by analyzing the model updates shared by multiple participants. Therefore, how to further enhance the privacy protection capabilities of federated learning and prevent data leakage is a hot topic and difficulty in current research. The trusted execution environment ensures security and privacy when processing sensitive data by providing hardware-level security isolation and encryption protection. There are still many challenges in applying trusted execution environment technology to federated learning scenarios in the IoT architecture. For example, how to ensure the correct deployment and configuration of the trusted execution environment, and how to ensure security without sacrificing system performance and efficiency.
[0006] In order to overcome these challenges, it is particularly important to study the security enhancement technology of federated learning in the IoT architecture based on the trusted execution environment. TEE (Trusted Execution Environment) is an execution environment that can provide hardware-level security guarantees, which can ensure that sensitive operations are performed in a trusted environment and prevent unauthorized access and tampering. By deploying the key parts of federated learning in TEE, the security of the entire system can be greatly improved. TEE can ensure the trustworthiness of IoT devices and prevent attacks from malicious devices; at the same time, it can also protect the integrity and confidentiality of model updates during communication to prevent data leakage and privacy violations.
[0007] In summary, how to protect the integrity and confidentiality of model updates during the communication process is an urgent problem to be solved. Summary of the invention
[0008] In view of this, the purpose of the present invention is to provide a model security training method, device, equipment and medium in the Internet of Things architecture, which can protect the integrity and confidentiality of model updates during communication. The specific scheme is as follows:
[0009] In a first aspect, the present application provides a model security training method in an Internet of Things architecture, which is applied to any Internet of Things device in the Internet of Things architecture; the Internet of Things architecture also includes a server that establishes a communication connection with each of the Internet of Things devices; wherein the method includes:
[0010] Acquire the current global model and the current training strategy sent by the server, and divide the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy;
[0011] Training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model;
[0012] Transmitting the trained shared representation model to the server so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model;
[0013] The aggregated shared representation model transmitted by the server is merged with the trained sensitive model in the preset trusted execution environment, and the current global model obtained after the merger is transmitted to the server, so that the server determines a new current training strategy when the current global model has not converged, and then sends the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
[0014] Optionally, the training of the first model portion in a preset trusted execution environment to obtain a trained sensitive model, and then training of the second model portion in a preset rich execution environment to obtain a trained shared representation model, further includes:
[0015] Lock the second model part, train the first model part in a preset trusted execution environment to obtain a trained sensitive model, then lock the trained sensitive model, and train the second model part in a preset rich execution environment to obtain a trained shared representation model.
[0016] Optionally, the method further includes:
[0017] A Diffie-Hellman key agreement algorithm is used to establish secure socket layer encrypted communication between the preset trusted execution environment of the Internet of Things device and the server, so as to transmit the trained shared representation model to the server.
[0018] Optionally, transmitting the trained shared representation model to the server so that the server aggregates gradient information of model parameters of the trained shared representation model includes:
[0019] The trained shared representation model is transmitted to the server so that the server can remove the trained shared representation model with abnormal parameters through a robust aggregation algorithm, and after completing the removal operation, the gradient information of the model parameters of the trained shared representation model is aggregated.
[0020] Optionally, after transmitting the combined current global model to the server, the method further includes:
[0021] The server uses a soft clustering algorithm to classify the current global models sent by each of the IoT devices, determines the membership of the current global model sent by each of the IoT devices according to the classification results, and aggregates the gradient information of the model parameters of the current global model sent by each of the IoT devices based on the membership of the current global model.
[0022] Optionally, aggregating the gradient information of the model parameters of the current global model sent by each of the IoT devices based on the membership degree of the current global model includes:
[0023] The server divides the current global models sent by each IoT device into a first current global model set and a second current global model set using the median of the membership degree of the current global model, and aggregates the gradient information of the model parameters of the current global models in the first current global model set and the second current global model set, respectively, so as to determine a new current training strategy based on the aggregated current global model.
[0024] Optionally, after respectively aggregating the gradient information of the model parameters of the current global models in the first current global model set and the second current global model set, the method further includes:
[0025] The server sends the aggregated current global model to the corresponding IoT device, so that the IoT device performs the next round of iterative training on the aggregated current global model according to the new current training strategy.
[0026] In a second aspect, the present application provides a model security training device in an Internet of Things architecture, comprising:
[0027] A current global model segmentation module, used to obtain the current global model and the current training strategy sent by the server, and segment the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy;
[0028] A model training module, used for training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model;
[0029] a post-aggregation shared representation model acquisition module, used to transmit the trained shared representation model to the server, so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model;
[0030] The current global model training completion module is used to merge the aggregated shared representation model transmitted by the server with the trained sensitive model in the preset trusted execution environment, and transmit the merged current global model to the server, so that the server can determine a new current training strategy when the current global model has not converged, and then send the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
[0031] In a third aspect, the present application provides an electronic device, including:
[0032] Memory, used to store computer programs;
[0033] A processor is used to execute the computer program to implement the model security training method in the aforementioned Internet of Things architecture.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the model security training method in the aforementioned Internet of Things architecture.
[0035] In summary, the present application obtains the current global model and the current training strategy sent by the server, and divides the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy; trains the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then trains the second model part in a preset rich execution environment to obtain a trained shared representation model; transmits the trained shared representation model to the server so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model; merges the aggregated shared representation model transmitted by the server with the trained sensitive model in the preset trusted execution environment, and transmits the merged current global model to the server so that the server determines a new current training strategy when the current global model has not converged, and then sends the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions. It can be seen from this that the present application first obtains the current global model and the training strategy sent by the server, and then divides the current global model into a first model part and a second model part according to the training strategy. Afterwards, the first model part is trained in the trusted execution environment to obtain a trained sensitive model, and at the same time, the second model part is trained in the rich execution environment to obtain a trained shared representation model, and the trained shared representation models sent by each client are aggregated to obtain an aggregated shared representation model. The aggregated shared representation model is then merged with the trained sensitive model to obtain the corresponding current global model, a new current training strategy is determined according to the current global model, and an iterative update operation is performed according to the new current training strategy. This process is continued until the target global model converges, and the model security training is completed. In this way, the present application can prevent attacks from malicious devices by splitting the initial global model into a shared representation model and a sensitive model, and training the shared representation model and the sensitive model through a rich execution environment and an executable environment respectively. It can also protect the integrity and confidentiality of model updates during communication, and prevent data leakage and privacy infringement. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flow chart of a model security training method in an Internet of Things architecture provided by the present invention;
[0038] Figure 2 A schematic diagram of model security training in a specific Internet of Things architecture disclosed in the present invention;
[0039] Figure 3 It is a schematic diagram of the structure of a model security training device in an Internet of Things architecture disclosed by the present invention;
[0040] Figure 4 The present invention is a structural diagram of an electronic device disclosed in the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] At present, the research on security enhancement technology for federated learning under the IoT architecture is still in its infancy. This is mainly reflected in the following aspects: First, the diversity and heterogeneity of IoT devices lead to large differences in security performance between devices. How to ensure that all devices participating in federated learning have sufficient security protection capabilities is an urgent problem to be solved. Secondly, the communication security between IoT devices is also a major challenge. Since IoT devices are usually connected through wireless networks, communication links are vulnerable to eavesdropping and tampering by attackers. How to ensure the confidentiality and integrity of data during communication is the key to the application of federated learning in the IoT. Although federated learning has achieved remarkable results in protecting data privacy, there is still a risk of privacy leakage. For example, attackers may infer certain sensitive information of the original data by analyzing model updates shared by multiple participants. Therefore, how to further enhance the privacy protection capabilities of federated learning and prevent data leakage is a hot topic and difficulty in current research. The trusted execution environment ensures security and privacy when processing sensitive data by providing hardware-level security isolation and encryption protection. There are still many challenges in applying the trusted execution environment technology to the federated learning scenario in the IoT architecture. In this way, the present application provides a model security training method, apparatus, device and medium in an Internet of Things architecture, which can protect the integrity and confidentiality of model updates during the communication process.
[0043] See also Figure 1 As shown, an embodiment of the present invention discloses a model security training method in an Internet of Things architecture, which is applied to any Internet of Things device in the Internet of Things architecture; the Internet of Things architecture also includes a server that establishes a communication connection with each of the Internet of Things devices; wherein the method includes:
[0044] Step S11, obtaining the current global model and the current training strategy sent by the server, and dividing the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy.
[0045] In this embodiment, the IoT devices in the IoT architecture in federated learning are first determined, and then the server that establishes a communication connection with each IoT device is determined. Subsequently, the IoT device is connected to the server, and the IoT device obtains the current global model and the corresponding current training strategy sent by the server. Among them, by identifying and grouping the authenticated IoT devices, the model parameters and model structure of the global model are distributed according to the current training strategy under federated learning. After verification and verification of the users on the chain, attacks by malicious users can be effectively prevented. Next, the current global model is segmented according to the current training strategy obtained, and the current global model is segmented into a first model part for learning sensitive content and a second model part for learning shared representation. It can be understood that the main purpose of the first model part is to learn sensitive content in IoT devices. Sensitive content may involve user privacy data, specific restricted domain knowledge, or related information that requires special treatment and focuses on its accuracy and compliance. The structure and parameters of this part of the model will focus on effective learning and feature extraction of these sensitive contents; the second model part learns shared representation, which is a common feature and pattern that can be generally applied to different scenarios, different data types or different tasks, and can play a role in wider applications or further model expansion and fusion.
[0046] Step S12: training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model.
[0047] In this embodiment, after the current global model is divided into a first model part and a second model part, the second model part is locked, the first model part is trained in a preset trusted execution environment to obtain a trained sensitive model, and then the trained sensitive model is locked, and the second model part is trained in a preset rich execution environment to obtain a trained shared representation model. Specifically, the second model part is first frozen, and then the first model part is trained in a preset trusted execution environment of the IoT device using the local sensitive data of the IoT device to obtain the trained sensitive model. After obtaining the trained sensitive model, the trained sensitive model is frozen, and the second model part is trained in a preset rich execution environment using the local data of the IoT device that does not contain privacy content to obtain the trained shared representation model.
[0048] Step S13: transmitting the trained shared representation model to the server so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model.
[0049] In this embodiment, in order to transmit the trained shared representation model to the server, the Diffie-Hellman key negotiation algorithm is used to establish secure socket layer encrypted communication between the preset trusted execution environment of the IoT device and the server, so as to transmit the trained shared representation model to the server. Specifically, by using the Diffie-Hellman key negotiation algorithm to establish SSL (Secure Socket Layer) encrypted communication between the preset rich execution environment of the IoT device and the server, the theft and forgery of private data are prevented, and secure encryption and decryption technology is used to complete the constraints on the server's decryption function, ensuring that it cannot complete the decryption and theft of individual private gradients.
[0050] Furthermore, the trained shared representation model is transmitted to the server through secure socket layer encrypted communication, so that the server can remove the trained shared representation model with abnormal parameters through a robust aggregation algorithm. After the removal operation is completed, the gradient information of the model parameters of the trained shared representation model is aggregated. Specifically, the trained shared representation model is sent to the server through secure socket layer encrypted communication. After receiving the model, the server uses a robust aggregation algorithm to check. Once the trained shared representation model is found to have abnormal parameters, it will be removed to ensure the quality of data for subsequent processing. After the removal is completed, the server will aggregate the gradient information of the model parameters of the remaining trained shared representation models to integrate more valuable information for subsequent optimization and adjustment of the model.
[0051] Step S14: merge the aggregated shared representation model transmitted by the server with the trained sensitive model in the preset trusted execution environment, and transmit the merged current global model to the server, so that the server determines a new current training strategy when the current global model has not converged, and then sends the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
[0052] In this embodiment, the IoT device receives an aggregated shared representation model from a server, then merges the aggregated shared representation model with a trained sensitive model in a preset trusted execution environment of the IoT device, and then transmits the merged current global model back to the server.
[0053] Further, the server uses a soft clustering algorithm to classify the current global models sent by each IoT device, determines the membership of the current global model sent by each IoT device according to the classification result, and aggregates the gradient information of the model parameters of the current global model sent by each IoT device based on the membership of the current global model. Specifically, the server obtains the current global model sent by each IoT device. Then, the soft clustering algorithm is started to classify these current global models. During the classification process, the soft clustering algorithm will integrate the various features of the current global model, divide each current global model into different category clusters, and determine the membership of each current global model relative to each category cluster. It can be understood that the server can use the median of the membership of the current global model to divide the current global model sent by each IoT device into a first current global model set and a second current global model set, and aggregate the gradient information of the model parameters of the current global model in the first current global model set and the second current global model set, so as to determine a new current training strategy according to the aggregated current global model. In addition, in the process of aggregating the current global model, the current global model with abnormal parameters will be excluded through the robust aggregation algorithm, and then the gradient information of the model parameters of the remaining current global model will be aggregated.
[0054] Subsequently, the server sends the aggregated current global model to the corresponding IoT device so that the IoT device can perform the next round of iterative training on the aggregated current global model according to the new current training strategy. Specifically, the server updates the aggregated current global model and feeds it back to the IoT device so that the IoT device can continue the next round of training using the updated model. In addition, after receiving the aggregation result, the IoT device verifies the correctness of the gradient information aggregation result of the current global model through the pre-established gradient information verification algorithm to ensure that the server cannot falsify the gradient result, thereby ensuring the efficiency and stability of the overall model training. Then, the IoT device uses the aggregated current global model fed back by the server to perform the next round of model security training, and iterates the model training process until the global model converges appropriately. As the last step of each training, a new training strategy will be determined for the next training process in this process, that is, the training tasks completed by TEE and REE (Execution Environment) in the IoT device will be further updated.
[0055] It can be seen that the embodiment of the present application first obtains the current global model and training strategy sent by the server, and then divides the current global model into a first model part and a second model part according to the training strategy. After that, the first model part is trained in a trusted execution environment to obtain a trained sensitive model, and the second model part is trained in a rich execution environment to obtain a trained shared representation model, and the trained shared representation models sent by each client are aggregated to obtain an aggregated shared representation model. Then, the aggregated shared representation model is merged with the trained sensitive model to obtain the corresponding current global model, a new current training strategy is determined according to the current global model, and an iterative update operation is performed according to the new current training strategy. The process continues until the target global model converges, and the model security training is completed. In this way, the embodiment of the present application can prevent attacks from malicious devices by splitting the initial global model into a shared representation model and a sensitive model, and training the shared representation model and the sensitive model through a rich execution environment and an executable environment respectively, and can also protect the integrity and confidentiality of the model update during the communication process, and prevent data leakage and privacy infringement.
[0056] Based on the above embodiment, the present application discloses a model security training method in an IoT architecture, which is applied to any IoT device in the IoT architecture and can protect the integrity and confidentiality of model updates during communication. Figure 2 The model security training method in the specific IoT architecture shown is described in detail.
[0057] The present application first obtains the current global model and the corresponding current training strategy sent by the server in any IoT device in the joint learning IoT architecture, and performs a segmentation operation on the current global model according to the obtained current training strategy, and divides the current global model into a first model part for learning sensitive content and a second model part for learning shared representation. Then, the second model part is formed, and then the local sensitive data of the IoT device is used to train the first model part in the preset trusted execution environment of the IoT device to obtain the trained sensitive model. After obtaining the trained sensitive model, the trained sensitive model will be frozen, and then the second model part will be trained in the preset rich execution environment to obtain the trained shared representation model. The trained shared representation model is sent to the server by means of secure socket layer encrypted communication. After the server removes the trained shared representation model with abnormal parameters, the gradient information of the model parameters of the remaining trained shared representation model is aggregated. After that, the server sends the aggregated shared representation model to the IoT device, and then merges the aggregated shared representation model with the trained sensitive model in the preset trusted execution environment of the IoT device, and then transmits the current global model obtained after the merger back to the server. Finally, the server obtains the current global models sent by each IoT device, and classifies these current global models through the soft clustering algorithm, divides each current global model into different category clusters, and determines the membership of each current global model relative to each category cluster. According to the obtained membership, the current global models in different category clusters are aggregated, and a new current training strategy is determined according to the aggregated current global model. The new training strategy and the aggregated current global model are sent to the IoT device, and the IoT device performs the next round of model security training for the aggregated current global model according to the new training strategy. In this way, the security and confidentiality of the federated learning process are effectively enhanced.
[0058] See also Figure 3 As shown, an embodiment of the present invention discloses a model security training device in an Internet of Things architecture, including:
[0059] A current global model segmentation module 11 is used to obtain the current global model and the current training strategy sent by the server, and segment the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy;
[0060] A model training module 12, configured to train the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then train the second model part in a preset rich execution environment to obtain a trained shared representation model;
[0061] A post-aggregation shared representation model acquisition module 13, used to transmit the trained shared representation model to the server, so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model;
[0062] The current global model training completion module 14 is used to merge the aggregated shared representation model transmitted by the server with the trained sensitive model in the preset trusted execution environment, and transmit the merged current global model to the server, so that the server can determine a new current training strategy when the current global model has not converged, and then send the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
[0063] It can be seen that the present application first obtains the current global model and training strategy sent by the server, and then divides the current global model into a first model part and a second model part according to the training strategy. Afterwards, the first model part is trained in a trusted execution environment to obtain a trained sensitive model, and at the same time, the second model part is trained in a rich execution environment to obtain a trained shared representation model, and the trained shared representation models sent by each client are aggregated to obtain an aggregated shared representation model. Subsequently, the aggregated shared representation model is merged with the trained sensitive model to obtain the corresponding current global model, a new current training strategy is determined according to the current global model, and an iterative update operation is performed according to the new current training strategy. The process continues until the target global model converges, and the model security training is completed. In this way, the present application can prevent attacks from malicious devices by splitting the initial global model into a shared representation model and a sensitive model, and training the shared representation model and the sensitive model through a rich execution environment and an executable environment respectively, and can also protect the integrity and confidentiality of the model update during the communication process, and prevent data leakage and privacy infringement.
[0064] In some specific embodiments, the model training module 12 may further include:
[0065] A model locking unit is used to lock the second model part, train the first model part in a preset trusted execution environment to obtain a trained sensitive model, then lock the trained sensitive model, and train the second model part in a preset rich execution environment to obtain a trained shared representation model.
[0066] In some specific embodiments, the model security training device in the Internet of Things architecture may also include:
[0067] The encrypted communication building module is used to use the Diffie-Hellman key agreement algorithm to build a secure socket layer encrypted communication between the preset trusted execution environment of the Internet of Things device and the server, so as to transmit the trained shared representation model to the server.
[0068] In some specific embodiments, the post-merge shared representation model acquisition module 13 may specifically include:
[0069] The first gradient information aggregation unit is used to transmit the trained shared representation model to the server so that the server can eliminate the trained shared representation model with abnormal parameters through a robust aggregation algorithm, and after completing the elimination operation, aggregate the gradient information of the model parameters of the trained shared representation model.
[0070] In some specific embodiments, the model security training device in the Internet of Things architecture may also include:
[0071] The second gradient information aggregation module is used for the server to classify the current global model sent by each of the IoT devices using a soft clustering algorithm, determine the membership of the current global model sent by each of the IoT devices according to the classification result, and aggregate the gradient information of the model parameters of the current global model sent by each of the IoT devices based on the membership of the current global model.
[0072] In some specific embodiments, the second gradient information aggregation module may specifically include:
[0073] The current training strategy submodule is used for the server to divide the current global models sent by each IoT device into a first current global model set and a second current global model set using the median of the membership degree of the current global model, and to aggregate the gradient information of the model parameters of the current global models in the first current global model set and the second current global model set, respectively, so as to determine a new current training strategy according to the aggregated current global model.
[0074] In some specific embodiments, the model security training device in the Internet of Things architecture may also include:
[0075] An iterative training module is used for the server to send the aggregated current global model to the corresponding IoT device, so that the IoT device performs the next round of iterative training on the aggregated current global model according to the new current training strategy.
[0076] Furthermore, the present application also discloses an electronic device. Figure 4This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0077] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the model security training method in the Internet of Things architecture disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0078] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0079] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0080] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the model security training method in the Internet of Things architecture executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0081] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the model security training method in the aforementioned Internet of Things architecture is implemented. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0082] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0083] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0084] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0085] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0086] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A model security training method in an Internet of Things architecture, characterized in that: Applied to any IoT device in the IoT architecture; the IoT architecture also includes a server that establishes a communication connection with each of the IoT devices; wherein the method includes: Acquire the current global model and the current training strategy sent by the server, and divide the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy; Training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model; Transmitting the trained shared representation model to the server so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model; The aggregated shared representation model transmitted by the server is merged with the trained sensitive model in the preset trusted execution environment, and the current global model obtained after the merger is transmitted to the server, so that the server determines a new current training strategy when the current global model has not converged, and then sends the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
2. The model security training method in the Internet of Things architecture according to claim 1 is characterized in that: The step of training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model, further includes: Lock the second model part, train the first model part in a preset trusted execution environment to obtain a trained sensitive model, then lock the trained sensitive model, and train the second model part in a preset rich execution environment to obtain a trained shared representation model.
3. The model security training method in the Internet of Things architecture according to claim 1 is characterized in that: Also includes: A Diffie-Hellman key agreement algorithm is used to establish secure socket layer encrypted communication between the preset trusted execution environment of the Internet of Things device and the server, so as to transmit the trained shared representation model to the server.
4. The model security training method in the Internet of Things architecture according to claim 1 is characterized in that: The step of transmitting the trained shared representation model to the server so that the server aggregates gradient information of model parameters of the trained shared representation model comprises: The trained shared representation model is transmitted to the server so that the server can remove the trained shared representation model with abnormal parameters through a robust aggregation algorithm, and after completing the removal operation, the gradient information of the model parameters of the trained shared representation model is aggregated.
5. The model security training method in the Internet of Things architecture according to any one of claims 1 to 4, characterized in that: After transmitting the combined current global model to the server, the method further includes: The server uses a soft clustering algorithm to classify the current global models sent by each of the IoT devices, determines the membership of the current global model sent by each of the IoT devices according to the classification results, and aggregates the gradient information of the model parameters of the current global model sent by each of the IoT devices based on the membership of the current global model.
6. The model security training method in the Internet of Things architecture according to claim 5 is characterized in that: The aggregating the gradient information of the model parameters of the current global model sent by each of the IoT devices based on the membership degree of the current global model includes: The server divides the current global models sent by each IoT device into a first current global model set and a second current global model set using the median of the membership degree of the current global model, and aggregates the gradient information of the model parameters of the current global models in the first current global model set and the second current global model set, respectively, so as to determine a new current training strategy based on the aggregated current global model.
7. The model security training method in the Internet of Things architecture according to claim 6 is characterized in that: After respectively aggregating the gradient information of the model parameters of the current global models in the first current global model set and the second current global model set, the method further includes: The server sends the aggregated current global model to the corresponding IoT device, so that the IoT device performs the next round of iterative training on the aggregated current global model according to the new current training strategy.
8. A model security training device in an Internet of Things architecture, characterized in that: include: A current global model segmentation module, used to obtain the current global model and the current training strategy sent by the server, and segment the current global model into a first model part for learning sensitive content and a second model part for learning shared representation according to the current training strategy; A model training module, used for training the first model part in a preset trusted execution environment to obtain a trained sensitive model, and then training the second model part in a preset rich execution environment to obtain a trained shared representation model; a post-aggregation shared representation model acquisition module, used to transmit the trained shared representation model to the server, so that the server aggregates the gradient information of the model parameters of the trained shared representation model to obtain an aggregated shared representation model; The current global model training completion module is used to merge the aggregated shared representation model transmitted by the server with the trained sensitive model in the preset trusted execution environment, and transmit the merged current global model to the server, so that the server can determine a new current training strategy when the current global model has not converged, and then send the current training strategy to each of the IoT devices to trigger the next round of iterative training until the current global model meets the preset convergence conditions.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the model security training method in the Internet of Things architecture as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to save a computer program; wherein, when the computer program is executed by a processor, the model security training method in the Internet of Things architecture as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Client selection method and device for split federal learning
CN116915726A
Federated learning method and system, electronic device, and storage medium
US20230083116A1