Data processing method and device in federal learning, equipment, medium and product

By constructing a distributed, multi-center attribute authority chain system, the problems of vulnerability to attacks and data leakage of a single authority center are solved. Encryption protection based on attribute sets and access control policies is achieved, thereby improving the security and reliability of federated learning.

CN121864281APending Publication Date: 2026-04-14CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing federated learning suffers from several problems: a single-attribute authority center is vulnerable to attack, trust is difficult to gain recognition from multiple parties, and there is a lack of encryption protection mechanisms based on the attributes of the participants and preset access control policies, resulting in a high risk of data leakage and affecting the security and reliability of joint modeling.

Method used

Construct a distributed, multi-center attribute authority chain system based on a consortium blockchain architecture. Pre-store the attribute sets and access control policies of each participant in the federated learning. Generate the target decryption key and encryption key through the attribute authority chain system to ensure that only legitimate participants can obtain plaintext or encrypted model data and perform local model processing operations.

Benefits of technology

It effectively prevents unauthorized parties from obtaining model data, reduces the risk of data leakage, improves the security and reliability of federated learning, enhances trust among multiple parties, and meets the security requirements of large-scale distributed federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864281A_ABST
    Figure CN121864281A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device in federal learning, equipment, a medium and a product, and relates to the technical field of data processing. According to the method, a distributed multi-center attribute authority chain system based on an alliance chain architecture is constructed, and an attribute set and an access control strategy of each participant of federal learning are pre-stored in the system, so that the risk that a single center is easy to face centralized attacks is avoided, and the multi-party trust degree is enhanced. Besides, in the data processing process, the target decryption key is generated after the key acquisition request is verified based on the attribute set and the access control strategy, it is ensured that only the permitted participant can acquire the key, and then the encryption model data is decrypted by using the key to obtain the plaintext model data. And finally executing local model processing operation to generate target model data. Therefore, an encryption protection mechanism based on the attribute set and the access control strategy is provided for model data transmission, the data leakage risk is reduced, and the security and reliability of federated learning joint modeling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data processing method, apparatus, device, medium and product for federated learning. Background Technology

[0002] Currently, federated learning, as a technology to achieve "usable but invisible" data, has been widely applied in multi-party collaborative modeling scenarios. During the training process of federated learning models, participating parties need to obtain model data from their respective interacting parties for local processing. Secure access control and lawful transmission of model data are prerequisites for ensuring the security of collaborative modeling.

[0003] In existing technologies, attribute encryption schemes are commonly used for data access control. However, these schemes rely on a single attribute authority to construct access control policies and generate encryption / decryption keys. This single authority is vulnerable to centralized attacks, and the trustworthiness of its management is difficult to gain widespread acceptance, making it unsuitable for the security requirements of large-scale distributed federated learning. Furthermore, the lack of encryption mechanisms based on participant attributes and pre-defined access control policies during model data transmission in federated learning allows unauthorized participants to potentially access model data without permission, leading to data leaks and compromising the security and reliability of federated learning's collaborative modeling. Summary of the Invention

[0004] This application provides a data processing method, apparatus, device, medium, and product for federated learning to solve the problems existing in the prior art.

[0005] Firstly, this application provides a data processing method for federated learning, including:

[0006] Upon receiving the federated learning model training instruction, a target decryption key acquisition request is sent to the attribute authority chain system; the attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture, and the attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning.

[0007] The system receives the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein the target decryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy;

[0008] Based on the target decryption key, the encrypted model data obtained from the corresponding interaction party is decrypted to obtain plaintext model data;

[0009] Local model processing operations are performed based on the plaintext model data to generate target model data.

[0010] One possible design also includes:

[0011] Send a target encryption key acquisition request to the attribute authority chain system;

[0012] The system receives the target encryption key returned by the attribute authority chain system after responding to the target encryption key acquisition request; wherein the target encryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy;

[0013] The target model data is encrypted using the target encryption key to obtain encrypted model data;

[0014] The encrypted model data is sent to the corresponding interactive party, and the data processing information is uploaded to the blockchain evidence storage and traceability system for evidence storage.

[0015] In one possible design, the encrypted model data is encrypted global model data, and the corresponding interaction party is a federated learning server.

[0016] The target decryption key is the decryption key corresponding to the key policy attribute encryption mechanism. The encrypted global model data is generated by the federated learning server through the key policy-based attribute encryption mechanism, and only participants that meet the preset access structure can decrypt it using the corresponding decryption key.

[0017] In one possible design, the target model data is the model update parameters, and the corresponding interaction party is the federated learning server.

[0018] The target encryption key is the encryption key corresponding to the ciphertext policy attribute encryption mechanism. The encryption model data is generated by the attribute encryption mechanism based on the ciphertext policy, and only federated learning servers with preset attribute sets can decrypt it using the corresponding decryption key.

[0019] In one possible design, the attribute authority chain system performs verification based on a pre-stored attribute set and access control policy, including:

[0020] The attribute authority chain system extracts the initiator attribute information carried in the target decryption key acquisition request or the target encryption key acquisition request;

[0021] The initiator attribute information is compared with the pre-stored corresponding participant attribute set. If the comparison is consistent and conforms to the corresponding access control policy, the verification is deemed successful; if the comparison is inconsistent or does not conform to the access control policy, the verification is deemed unsuccessful.

[0022] In one possible design, the execution of local model processing operations based on the plaintext model data includes:

[0023] If the executing entity is a federated learning client, then the plaintext model data is trained iteratively based on the local training data to generate model update parameters as the target model data;

[0024] If the executing entity is a federated learning server, then the plaintext model update parameters obtained after decrypting the encrypted model data sent by multiple clients are aggregated to generate updated global model data as the target model data.

[0025] Secondly, this application provides a data processing apparatus for federated learning, comprising:

[0026] The key request sending module is used to send a target decryption key acquisition request to the attribute authority chain system in response to receiving the federated learning model training instruction; the attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture, and the attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning.

[0027] The decryption key receiving module is used to receive the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein, the target decryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy;

[0028] The model data decryption module is used to decrypt the encrypted model data obtained from the corresponding interaction party based on the target decryption key to obtain plaintext model data.

[0029] The local model processing module is used to perform local model processing operations based on the plaintext model data to generate target model data.

[0030] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0031] The memory stores computer-executed instructions;

[0032] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.

[0033] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.

[0034] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects.

[0035] This application provides a data processing method, apparatus, device, medium, and product for federated learning. By constructing a distributed, multi-center attribute authority chain system based on a consortium blockchain architecture, the attribute sets and access control policies of each participant in the federated learning are pre-stored within it. This avoids the risk of centralized attacks vulnerable to single-center attacks, enhances trust among multiple parties, and better meets the security requirements of large-scale distributed federated learning. Furthermore, during data processing, a target decryption key acquisition request is first sent to the attribute authority chain system. After verification based on the attribute set and access control policy, the attribute authority chain system generates the target decryption key, ensuring that only authorized participants can obtain it. The target decryption key is then used to decrypt the encrypted model data obtained from the interacting parties to obtain plaintext model data. Finally, local model processing operations are performed to generate the target model data. Thus, this approach provides an encryption protection mechanism for model data transmission based on attribute sets and access control policies, effectively preventing unauthorized participants from obtaining model data, reducing the risk of data leakage, and improving the security and reliability of federated learning collaborative modeling. Attached Figure Description

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

[0037] Figure 1 An application scenario diagram corresponding to a data processing method in federated learning provided in one embodiment of this application;

[0038] Figure 2 A flowchart illustrating a data processing method in federated learning, provided as an embodiment of this application;

[0039] Figure 3 A flowchart illustrating a data processing method in federated learning, provided as another embodiment of this application;

[0040] Figure 4 A schematic diagram of a data processing apparatus in federated learning provided in one embodiment of this application;

[0041] Figure 5 This is a structural example diagram of an electronic device provided in an embodiment of this application.

[0042] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0043] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0044] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.

[0045] Currently, federated learning, as a technology to achieve data availability without visibility, has been widely applied in multi-party collaborative modeling scenarios. During the training process of federated learning models, participating parties need to obtain model data from their respective interacting parties for local processing. Secure access control and lawful transmission of model data are prerequisites for ensuring the security of collaborative modeling.

[0046] In existing technologies, attribute encryption schemes are commonly used for data access control. However, these schemes rely on a single attribute authority to construct access control policies and generate encryption / decryption keys. This single authority is vulnerable to centralized attacks, and the trustworthiness of its management is difficult to gain widespread acceptance, making it unsuitable for the security requirements of large-scale distributed federated learning. Furthermore, the lack of encryption mechanisms based on participant attributes and pre-defined access control policies during model data transmission in federated learning allows unauthorized participants to potentially access model data without permission, leading to data leaks and compromising the security and reliability of federated learning's collaborative modeling.

[0047] Figure 1 An application scenario diagram corresponding to a data processing method in federated learning provided in one embodiment of this application is shown, such as... Figure 1 As shown, the application scenario provided in this embodiment includes federated learning participant nodes 10, attribute authority chain system 11, and federated learning interaction nodes 12. Among them, federated learning participant nodes 10 and attribute authority chain system 11 establish an encrypted communication connection through a consortium blockchain P2P network, and federated learning participant nodes 10 and federated learning interaction nodes 12 realize model data interaction through a dedicated federated learning data transmission link, ensuring the security of the data transmission link.

[0048] Optionally, when the federated learning participant node 10 needs to conduct local model training and needs to obtain model data from the federated learning interaction node 12, the local model training module of the federated learning participant node 10 responds to the received federated learning model training instruction and generates a target decryption key acquisition request. The target decryption key acquisition request carries the participant's own attribute identifier, the target interaction identifier, and the federated learning task ID, and is sent to the attribute authority chain system 11 through the consortium blockchain encrypted communication link.

[0049] Optionally, after receiving a request, the attribute authority chain system 11 has multiple attribute management nodes collaboratively verify the attribute identifiers of the participants, and the policy verification node invokes a pre-stored access control policy to determine whether the federated learning participant node 10 has the authority to access the interaction party's model data. If the multi-node consensus verification passes, the key generation node generates a unique target decryption key based on the participant attributes, interaction party attributes, and access control policy, and returns it to the requesting federated learning participant node 10 via an encrypted response message.

[0050] Optionally, after receiving the target decryption key, federated learning participant node 10 sends a model data acquisition request to federated learning interaction node 12 via the dedicated federated learning data transmission link. Federated learning interaction node 12 verifies the identity of federated learning participant node 10 based on its own access control policy, encrypts the model data generated from local model training using a preset encryption algorithm, generates encrypted model data, and sends it to federated learning participant node 10. The data encryption / decryption module of federated learning participant node 10 calls the target decryption key to decrypt the encrypted model data, obtaining plaintext model data, ensuring that the model data can only be parsed by legitimate participants.

[0051] Optionally, after obtaining the plaintext model data, the federated learning participant node 10 combines the plaintext model data with the local original data and performs local model processing operations (such as model parameter fusion, gradient iteration calculation, model performance optimization, etc.) to generate target model data (such as updated local model parameters and optimized gradient data) that meet the requirements of federated learning joint modeling.

[0052] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0053] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0054] Figure 2 A flowchart illustrating a data processing method in federated learning, as provided in one embodiment of this application, is shown below. Figure 2 As shown, the execution subject of this embodiment is a data processing device in federated learning. This device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; alternatively, it can be implemented through a physical device that integrates or installs the relevant computer program, such as a chip or electronic device. The electronic device may be a computer or a server, etc. This embodiment provides a data processing method in federated learning, including the following steps:

[0055] S201. Upon receiving the federated learning model training instruction, a request to obtain the target decryption key is sent to the attribute authority chain system. The attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture. The attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning.

[0056] Optionally, when a participant receives a federated learning model training instruction, it needs to first obtain the target decryption key used to decrypt the interaction party's model data, and therefore sends a target decryption key acquisition request to the attribute authority chain system. Optionally, this federated learning model training instruction can be issued by the federated learning coordination node, or triggered by the participant itself according to the training progress.

[0057] The attribute authority chain system is a distributed, multi-center system built on a consortium blockchain architecture. Multiple participants in the federated learning process (such as industry regulatory bodies, technology providers, and third-party auditing firms) jointly participate in node construction and maintenance, eliminating the presence of a single controlling entity. This attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning process.

[0058] The attribute set is used to uniquely identify the identity, permissions, business scope, and other information of the participants. For example, the attributes of the client may include "authorized participant" and "qualification level", while the attributes of the server may include "trusted server", "model aggregation permission" and "data audit permission". The attribute set is submitted to the attribute authority chain system by each participant when joining the federated learning system. After the authenticity is verified by multiple nodes, it is stored on the chain.

[0059] The access control policy is based on the pre-defined joint modeling requirements of federated learning and is used to define the access permission rules for model data. For example, "only clients with the 'authorized participant' attribute can decrypt and obtain the global model", and "only servers with the 'trusted server' attribute can decrypt and obtain the model update parameters uploaded by the client". The access control policy is determined by the participants in the federated learning through negotiation, and then filed and uploaded to the blockchain in the attribute authority chain system to ensure that it cannot be tampered with.

[0060] The target decryption key acquisition request includes information such as the requester identifier (e.g., participant ID), the identifier of the model data to be accessed (e.g., global model version number, training rounds corresponding to model update parameters, etc.), and the requester attribute proof, which are used by the attribute authority chain system to verify the requester's legitimate identity and access rights.

[0061] S202. Receive the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein, the target decryption key is generated by the attribute authority chain system after verification based on the pre-stored attribute set and access control policy.

[0062] Optionally, after receiving a request to obtain the target decryption key, the attribute authority chain system queries the requester's pre-stored attribute set in the on-chain data of the attribute authority chain system based on the requester's identifier and attribute proof to verify the legitimacy of the requester's identity, such as whether it is a registered federated learning participant. Based on the identifier of the model data to be accessed, the system retrieves the corresponding preset access control policy; it compares the requester's pre-stored attribute set with the access control policy to verify whether the requester meets the access permission requirements, such as whether the client attributes match the global model's access policy and whether the server attributes match the model update parameter access policy.

[0063] Optionally, if the verification passes, multiple nodes of the attribute authority chain system will collaborate to generate the target decryption key based on a distributed key generation algorithm, in order to avoid a single node controlling the key and improve key security. The target decryption key will then be encrypted and returned to the requester. If the verification fails, such as if the requester is an unauthorized participant or the attribute does not meet the access policy, an access denial response will be returned.

[0064] The target decryption key is a decryption key that matches the encryption method of the corresponding interacting party. Before transmitting model data, the corresponding interacting party has obtained the corresponding encryption key through the attribute authority chain system based on the same access control policy and its own attributes, and then encrypts the model data. For example, when the server distributes the global model, it encrypts it based on the KP-ABE attribute encryption mechanism, and the client needs to obtain the corresponding KP-ABE decryption key; when the client uploads model update parameters, it encrypts them based on the CP-ABE attribute encryption mechanism, and the server needs to obtain the corresponding CP-ABE decryption key to ensure consistency between encryption and decryption.

[0065] S203. Based on the target decryption key, decrypt the encrypted model data obtained from the corresponding interaction party to obtain the plaintext model data.

[0066] Optionally, after receiving the target decryption key, the requesting party first decrypts the encrypted target decryption key, which can be obtained in plaintext form based on the requesting party's own private key or pre-shared key. Subsequently, the requesting party uses the target decryption key to decrypt the encrypted model data obtained from the corresponding interacting party. The encrypted model data can be the encrypted global model obtained by the client from the server, or the encrypted model update parameters obtained by the server from the client.

[0067] Since the generation of the target decryption key is based on the verification of the requester's attributes and access control policies, only legitimate participants who meet the permission requirements can obtain the valid target decryption key. Even if an unauthorized participant steals the encrypted model data, they will not be able to decrypt the plaintext model data because they cannot obtain the target decryption key, thus achieving secure access control of the model data.

[0068] S204. Perform local model processing operations based on plaintext model data to generate target model data.

[0069] Specifically, after obtaining the plaintext model data, the requesting party performs corresponding local model processing operations based on its own local business needs. Optionally, if the requesting party is a client and the plaintext model data is a global model distributed by the server, the client combines local raw data (such as user credit data of financial institutions) to perform local training on the global model, update the model parameters (such as adjusting the weights and biases of the neural network), and generate the target model data, that is, the updated parameters of the locally trained model.

[0070] Optionally, if the requester is the server and the plaintext model data consists of model update parameters uploaded by multiple clients, the server uses a federated learning model aggregation algorithm to aggregate the model update parameters of all legitimate clients to generate the target model data, i.e., the updated global model.

[0071] Optionally, after generating the target model data, if it is necessary to transmit the target model data to other interacting parties, such as when a client uploads model update parameters or a server distributes the updated global model, the requesting party needs to repeat steps S201-S202 above to request the corresponding encryption key from the attribute authority chain system, encrypt the target model data, and then transmit it to ensure the security of the model data throughout its entire lifecycle.

[0072] This application provides a data processing method for federated learning. By constructing a distributed, multi-center attribute authority chain system based on a consortium blockchain architecture, the attribute sets and access control policies of each participant in the federated learning are pre-stored within it. This avoids the risk of centralized attacks that can occur with a single center, enhances trust among multiple parties, and better meets the security requirements of large-scale distributed federated learning. Furthermore, during data processing, a target decryption key acquisition request is first sent to the attribute authority chain system. After verification based on the attribute set and access control policy, the attribute authority chain system generates the target decryption key, ensuring that only authorized participants can obtain it. The target decryption key is then used to decrypt the encrypted model data obtained from the interacting parties to obtain plaintext model data. Finally, local model processing operations are performed to generate the target model data. Thus, this method provides an encryption protection mechanism for model data transmission based on attribute sets and access control policies, effectively preventing unauthorized participants from obtaining model data, reducing the risk of data leakage, and improving the security and reliability of federated learning collaborative modeling.

[0073] Figure 3 A flowchart illustrating a data processing method in federated learning, as provided in another embodiment of this application, is shown below. Figure 3 As shown, as an optional implementation, based on any of the above embodiments, the following steps are also included:

[0074] S301. Send a request to the attribute authority chain system to obtain the target encryption key.

[0075] Optionally, after the participating party (client or server) generates the target model data, such as the model update parameters generated by the client or the updated global model generated by the server, it needs to send a target encryption key acquisition request to the attribute authority chain system.

[0076] The request to obtain the target encryption key may include a requester identifier, a target model data identifier, recipient attribute information, and a requester attribute proof. Optionally, the requester identifier may be a participant ID or a node number; the target model data identifier may be the training epoch corresponding to the model update parameters or the global model version number; the recipient attribute information may be the attribute requirements specified by the server when the client uploads parameters or the attribute requirements specified by the server when distributing the model; and the requester attribute proof is used to verify whether the requester has the legitimate authority to generate and transmit the target model data.

[0077] It should be noted that in this embodiment, the attribute authority chain system is still a distributed multi-center system built on the consortium blockchain architecture. It pre-stores the attribute sets and access control policies of all participants. Its function is to verify the legitimacy of the requester, the transmission permission of the target model data, and generate a target encryption key that matches the attributes of the receiver, so as to ensure the controllability of encryption behavior.

[0078] S302. Receive the target encryption key returned by the attribute authority chain system after responding to the target encryption key acquisition request; wherein, the target encryption key is generated by the attribute authority chain system after verification based on the pre-stored attribute set and access control policy.

[0079] Optionally, after receiving a request to obtain the target encryption key, the attribute authority chain system queries the pre-stored attribute set on the chain based on the requester's identifier and attribute proof to confirm that the requester is a legitimate participant in federated learning and has the authority to generate target model data, such as whether the client has completed local training registration and whether the server has model aggregation permissions. Then, based on the target model data identifier, the system retrieves the corresponding access control policy and, combined with the receiver's attribute information, confirms that the attribute combination of the requester and receiver satisfies the data transmission rules. For example, model update parameters uploaded by the client can only be received by servers with model aggregation permissions, and global models distributed by the server can only be received by clients with domain-specific matching.

[0080] Optionally, if all the above verifications pass, multiple nodes in the attribute authority chain system collaborate to generate the target encryption key based on a distributed key generation algorithm. The target encryption key and the target decryption key subsequently obtained by the recipient are paired keys, and the encryption algorithm remains consistent with the basic scheme: the KP-ABE algorithm is used when the server distributes the model, and the CP-ABE algorithm is used when the client uploads parameters. Optionally, if the above verifications fail, an encryption permission rejection response is returned, and the rejection record is stored on the blockchain.

[0081] Optionally, after the target encryption key is generated, it is returned to the requester by the attribute authority chain system through an encrypted channel to ensure the security of the key transmission process.

[0082] S303. Encrypt the target model data using the target encryption key to obtain encrypted model data.

[0083] Optionally, after receiving the target encryption key, the requesting party first decrypts it through the local security module to obtain the target encryption key in plaintext form, and then uses the attribute encryption algorithm (KP-ABE or CP-ABE) corresponding to the key to encrypt the target model data generated by S204.

[0084] Optionally, if the requester is a server and the target model data is the updated global model, the KP-ABE algorithm is used for encryption, and an access control policy is embedded during the encryption process, such as "only authorized participants and specialized fields are matched", to ensure that only clients that meet the access control policy can decrypt the data.

[0085] Optionally, if the requester is a client and the target model data is model update parameters, the CP-ABE algorithm is used for encryption. During the encryption process, the receiver attribute requirements, such as "trusted server and model aggregation permissions", are embedded to ensure that only servers that meet the attribute requirements can decrypt the data.

[0086] Specifically, after encryption is completed, encrypted model data is obtained. This encrypted model data can only be decrypted by the target decryption key obtained by the recipient with the corresponding attributes through the attribute authority chain system. Even if it is stolen during transmission, unauthorized users cannot crack it.

[0087] S304. Send the encrypted model data to the corresponding interactive party and upload the data processing information to the blockchain evidence storage and traceability system for evidence storage.

[0088] Optionally, the requester may send the encrypted model data to the corresponding interacting party through a secure communication channel of the federated learning system (such as an encrypted TCP connection or a blockchain P2P network), with transport layer encryption used during transmission to further ensure channel security.

[0089] Optionally, the requester may upload information about the data processing process to the blockchain evidence storage and traceability system while sending the encrypted model data.

[0090] Optionally, the data processing information includes, but is not limited to, basic identification information, process information, and permission information. The basic identification information may include the requester identifier, receiver identifier, target model data identifier, and encryption key identifier; the process information may include encryption time, sending time, transmission channel identifier, and data verification value; and the permission information may include the corresponding access control policy number and the verification record from the attribute authority chain system.

[0091] Optionally, the blockchain-based evidence storage and traceability system performs hash calculations on the information during data processing and stores it on the blockchain. Leveraging the immutability and time-series nature of blockchain, it ensures the integrity and traceability of the processed data. After receiving the encrypted model data, the recipient can query the corresponding evidence information through the blockchain-based evidence storage and traceability system to verify the legality and integrity of the data, such as confirming through data verification values ​​that the data has not been tampered with.

[0092] It should be noted that, as mentioned in this application, "on-chain" refers to uploading certain data to a blockchain-based evidence storage and traceability system.

[0093] This application provides a data processing method in federated learning. It involves sending a target encryption key acquisition request to a distributed multi-center attribute authority chain system based on a consortium blockchain architecture, and receiving the target encryption key returned by the attribute authority chain system after verification based on a pre-stored attribute set and access control policies. The target encryption key is then used to encrypt the generated target model data to obtain encrypted model data. This ensures that the target encryption key is generated after verification based on multi-party attributes and preset policies, effectively preventing unauthorized access and tampering of data. The encrypted model data is then sent to the corresponding interaction party, ensuring confidentiality during transmission and avoiding the risk of data leakage. Furthermore, the data processing information is uploaded to a blockchain evidence storage and traceability system for evidence storage. Utilizing the immutable and traceable characteristics of blockchain, reliable evidence records are provided for the data processing process, making the entire data processing flow traceable and improving data security and credibility.

[0094] As an optional implementation, based on any of the above embodiments, the encrypted model data is encrypted global model data, and the corresponding interaction party is the federated learning server.

[0095] The encrypted global model data is ciphertext data generated by the federated learning server based on the initial global model or the iteratively updated global model through the KP-ABE encryption mechanism. It is the basic data for the client to carry out local training. The plaintext form of the encrypted global model data can only be obtained by clients that meet the preset access structure.

[0096] Specifically, the target decryption key is the decryption key corresponding to the key policy attribute encryption mechanism. The encrypted global model data is generated by the federated learning server through the key policy-based attribute encryption mechanism, and only participants that meet the preset access structure can decrypt it using the corresponding decryption key.

[0097] The preset access structure is an access control rule determined by all participating parties and filed in the attribute authority chain system based on the requirements of federated learning joint modeling. It is embedded in the KP-ABE encryption key and is used to limit the legitimate recipients of encrypted global model data.

[0098] The target decryption key (KP-ABE decryption key) is a decryption key generated by the attribute authority chain system after verifying that the access structure proof submitted by the client meets the preset access structure. It can only decrypt encrypted global model data corresponding to the preset access structure.

[0099] The attribute authority chain system pre-stores server attribute sets (such as "Trusted Global Model Distributor = Yes", "Model Encryption Permission = Yes"), client attribute sets (such as authorization status, business domain, qualification level, etc.) and preset access structures, and is responsible for access structure verification, KP-ABE encryption / decryption key generation and record storage.

[0100] This application provides a data processing method in federated learning. It explicitly defines encrypted model data as encrypted global model data and sets the corresponding interaction party as the federated learning server. This makes data interaction more targeted and specific. In the complex multi-party collaboration scenario of federated learning, it can accurately carry out secure processing and interaction around the global model data, effectively avoiding data transmission chaos and misoperation, and improving the standardization and efficiency of the data processing flow. Furthermore, a key policy attribute encryption mechanism is adopted. The target decryption key serves as the decryption key corresponding to this attribute encryption mechanism. The encrypted global model data is generated by the federated learning server based on this encryption mechanism, and only participants meeting the preset access structure are allowed to decrypt it using the corresponding decryption key. This effectively prevents unauthorized participants from stealing and tampering with the global model data, ensuring the security and confidentiality of data during the federated learning process.

[0101] As an optional implementation, based on any of the above embodiments, the target model data is the model update parameters, and the corresponding interaction party is the federated learning server.

[0102] Among them, the model update parameters are data generated by the client to optimize the global model after conducting local training based on the plaintext global model and local data. These data include model gradients, weight adjustment values, parameter biases, etc., and are the core input for federated learning iterative optimization. The encrypted transmission of model update parameters must ensure that only the authenticated server can obtain the plaintext.

[0103] Specifically, the target encryption key is the encryption key corresponding to the ciphertext policy attribute encryption mechanism. The encrypted model data is generated by the attribute encryption mechanism based on the ciphertext policy, and only federated learning servers with preset attribute sets can decrypt it using the corresponding decryption key.

[0104] The preset attribute set is a combination of legal server-side attributes determined by the participating parties through negotiation and filed in the attribute authority chain system based on the requirements of federated learning joint modeling. It is embedded in the ciphertext encrypted by CP-ABE and used to limit the legal recipients of model update parameters.

[0105] Optionally, the preset attribute set can be configured with a combination of "required attributes and optional attributes", supporting multi-attribute combination verification. Plaintext can only be obtained through decryption when the actual attribute set of the server completely matches the preset attribute set.

[0106] Optionally, the target encryption key (CP-ABE encryption key) is an encryption key generated by the attribute authority chain system after the client's authentication identity and upload permission have been verified. The client uses this key to encrypt the model update parameters and generate ciphertext data that can only be decrypted by the authentication server.

[0107] This application provides a data processing method for federated learning, which sets the target model data as the model update parameters and explicitly defines the corresponding interaction party as the federated learning server, thus meeting the needs of distributed collaborative training in federated learning. During the federated learning process, after each participant generates model update parameters locally, they must securely transmit them to the server for aggregation and other operations. This ensures the accuracy of the data interaction objects and content, effectively avoiding training deviations or failures caused by incorrect data pointers or content confusion, and improving the efficiency and stability of federated learning training. Furthermore, a ciphertext policy attribute encryption mechanism is adopted, with the target encryption key serving as the key corresponding to the ciphertext policy attribute encryption mechanism. Encrypted model data is generated based on this encryption mechanism, and only federated learning servers with a preset attribute set can decrypt it using the corresponding decryption key. This enhances the confidentiality and security of data during transmission and storage, preventing model security issues and data privacy risks caused by the leakage of model update parameters.

[0108] As an optional implementation, based on any of the above embodiments, the attribute authority chain system performs verification based on a pre-stored attribute set and access control policy, including the following steps:

[0109] First, the attribute authority chain system extracts the initiator attribute information carried in the target decryption key acquisition request or the target encryption key acquisition request.

[0110] Among them, the initiator attribute information is provided by the initiator (client or server) of the key acquisition request (target decryption key acquisition request or target encryption key acquisition request) to prove its own identity and permissions.

[0111] Optionally, after receiving the key acquisition request sent by the initiator, the attribute authority chain system first extracts the complete attribute information of the initiator from the request message.

[0112] Optionally, the initiator's attribute information may include basic attribute fields and verification auxiliary fields. The basic attribute fields may include attribute type (e.g., identity type, permission type, qualification type), attribute value (e.g., "Yes / No", "Completed"), attribute validity period, and issuing authority identifier. The verification auxiliary fields may include the digital signature of the attribute issuing authority and the hash value of the attribute information.

[0113] Optionally, if the request contains issues such as missing attribute information (e.g., no attribute validity period provided, missing issuing authority signature) or format errors (e.g., attribute value does not match attribute type), the verification is deemed to have failed, and the rejection reason "incomplete attribute information / format error" is recorded.

[0114] Secondly, the initiator's attribute information is compared with the pre-stored corresponding participant attribute set. If the comparison matches and conforms to the corresponding access control policy, the verification is deemed successful; if the comparison does not match or does not conform to the access control policy, the verification is deemed unsuccessful.

[0115] Among them, the pre-stored corresponding participant attribute set is the attribute set submitted by the initiator to the attribute authority chain system when joining the federated learning system and stored on the chain after being verified by multiple nodes. It is the benchmark data for identity legitimacy and authorization, containing complete fields corresponding to the initiator's attribute information (attribute type, standard attribute value, validity period range, list of legal issuing institutions, etc.) and has the characteristic of being tamper-proof.

[0116] The corresponding access control policies and permission rules bound to the request key type (encryption key / decryption key) and target model data (global model / model update parameters) are pre-stored in the attribute authority chain system and filed on the chain, supporting logic such as Boolean operations, threshold operations, and range restrictions.

[0117] Optionally, the attribute authority chain system retrieves the corresponding participant attribute set pre-stored by the initiator from the chain, and performs consistency comparison based on attribute completeness, attribute authenticity, and attribute validity. Only when all comparisons pass can the system proceed to the next step of corresponding access control policy verification.

[0118] Among them, attribute integrity comparison can verify whether the extracted initiator attribute information includes the "required attributes" in the pre-stored attribute set (such as the identity attribute "authorized participant" and the permission attribute "model training permission"), ensuring that no required attributes are missing; optional attributes can be flexibly configured to verify integrity according to the request scenario.

[0119] Among them, attribute authenticity comparison can be used to verify whether the attribute issuing authority is the certified issuing authority recorded in the pre-stored attribute set (such as a third-party authoritative certification authority), or it can be used to verify whether the digital signature of the attribute issuing authority is valid. The signature is decrypted using the issuing authority's public key and compared with the hash value of the attribute information to confirm that the attribute information has not been tampered with.

[0120] Among them, attribute validity comparison can be used to verify whether the validity period of the initiator's attribute information is within the validity period range of the pre-stored attribute set; if the attribute has a status identifier, it is necessary to verify whether the status is normal.

[0121] Optionally, if any of the above comparisons are inconsistent, the attribute comparison is deemed to have failed, the verification process is terminated, the attribute authority chain system returns a "attribute inconsistency" rejection response, and the comparison details are stored on the chain for evidence.

[0122] Optionally, after the attribute comparison is successful, the attribute authority chain system retrieves the access control policy corresponding to the current request. For example, when the server requests the KP-ABE encryption key, it retrieves the access control policy corresponding to the global model distribution; when the client requests the CP-ABE encryption key, it retrieves the access control policy corresponding to the model update parameter upload, and parses and verifies the access control policy.

[0123] Optionally, the logical rules of the access control policy are first parsed to clarify attribute combination relationships (such as AND / OR / NOT operations), threshold conditions (such as "at least 3 attributes match"), and scope restrictions (such as "qualification level ≥ Level 3"). Secondly, the initiator attribute information, which has passed consistency comparison, is matched item by item with the parsed policy rules. Finally, if the initiator attribute information fully meets all the conditions of the policy rules, the policy compliance check is deemed successful; if any condition is not met, such as the policy requiring "(authorized participant = yes) ∩ (qualification level = Level 3A)," and the initiator's qualification level is "Level 3B," the policy compliance check is deemed unsuccessful.

[0124] Optionally, if both the attribute consistency comparison and the access control policy compliance verification pass, the overall verification is deemed to have passed. The attribute authority chain system generates the corresponding target encryption key or target decryption key, returns it to the initiator, and stores the entire verification process information, such as attribute extraction results, comparison details, policy parsing process, and verification results, on the chain for evidence storage.

[0125] Optionally, if any step of the verification fails, the overall verification is deemed to have failed, the attribute authority chain system returns a rejection response, clarifies the reason for the failure, and records the failure details and the initiator's request information on the chain for evidence storage.

[0126] This application provides a data processing method in federated learning. In the key acquisition verification stage, the attribute authority chain system performs verification based on a pre-stored attribute set and access control policies. It extracts the initiator attribute information carried in the target decryption key acquisition request or target encryption key acquisition request, providing a data foundation for subsequent verification. The initiator attribute information is compared with the pre-stored corresponding participant attribute set to ensure the authenticity and accuracy of the initiator's identity and attributes. Verification is considered successful only when the comparison matches and simultaneously conforms to the corresponding access control policy. This dual verification enhances the rigor and reliability of the verification process. If the comparison is inconsistent or does not conform to the access control policy, verification is deemed a failure, avoiding data security risks caused by key leakage or incorrect allocation, such as unauthorized data access or tampering.

[0127] As an optional implementation, based on any of the above embodiments, a local model processing operation is performed based on the plaintext model data, specifically including:

[0128] If the executing entity is a federated learning client, then the plaintext model data is trained iteratively based on the local training data to generate model update parameters as the target model data.

[0129] It should be noted that in this embodiment, the executing entities include federated learning clients (such as medical institutions, enterprise nodes, etc. participating in joint modeling) and federated learning servers (such as nodes, data centers, etc. responsible for model aggregation). The two perform differentiated local processing operations according to their roles in federated learning.

[0130] Plaintext model data refers to the global model data obtained by the federated learning client through the target decryption key, such as the global model after the initial iteration update.

[0131] Local training data refers to raw data stored locally on the federated learning client and not transmitted externally, such as patient diagnosis and treatment data in medical scenarios and user credit data in financial scenarios. It is used only for model training on the local federated learning client and is not leaked to external nodes.

[0132] Among them, the model update parameters are core data generated by the federated learning client through local training iterations and used to optimize the global model. These include model gradients, weight adjustment values, parameter biases, training loss values, etc., and must be encrypted by CP-ABE before being uploaded to the server.

[0133] Optionally, after the federated learning client decrypts the plaintext model data, it can call the local secure computing module to preprocess the local training data (such as data cleaning, normalization, and missing value imputation). The entire preprocessing process is executed locally on the client and does not involve external data transmission. Afterward, based on the client attribute set and access control policies pre-stored in the attribute authority chain system, the compliance of the local training data is verified. If data preprocessing fails or compliance verification fails, the training process is terminated, and a training termination record is uploaded to the blockchain evidence storage and traceability system; if verification passes, the training iteration phase begins.

[0134] Optionally, the federated learning client loads plaintext model data and combines it with preprocessed local training data. It then uses a preset training algorithm (such as backpropagation or gradient descent) for local training iterations. During training, access control policies are followed. Furthermore, the hyperparameters of the training iterations (such as learning rate, number of iterations, and batch size) must be consistent with the server's preset global training scheme to ensure a unified training direction across all clients. After each training iteration, metrics such as training loss and accuracy are calculated. If the metrics do not reach a preset threshold, iteration continues; if the threshold is reached or the maximum number of iterations is reached, training terminates.

[0135] Optionally, after training is terminated, the federated learning client extracts information such as gradient changes and weight adjustment results after model training, generates model update parameters, and performs quality verification on the model update parameters.

[0136] After the quality verification is passed, the updated model parameters are used as the target model data and the subsequent encrypted upload process is initiated (corresponding to S301-S304). If the verification fails, the training iteration is re-executed or the upload is terminated. The upload failure is recorded in the blockchain evidence storage and traceability system.

[0137] Optionally, the federated learning client uploads training information to the blockchain evidence storage and traceability system throughout the entire process of training preprocessing, training iteration, parameter generation and verification to ensure that the training process is traceable.

[0138] Specifically, if the executing entity is the federated learning server, the plaintext model update parameters obtained after decrypting the encrypted model data sent by multiple clients are aggregated to generate updated global model data as the target model data.

[0139] The updated global model data is a new global model generated by the federated learning server through an aggregation algorithm that integrates and optimizes the plaintext model update parameters of multiple federated learning clients. It needs to be encrypted with KP-ABE and then distributed to the federated learning clients for the next round of training.

[0140] Optionally, after the federated learning server decrypts the encrypted model update parameters of multiple federated learning clients, it records information such as the identifier of each federated learning client, the training round corresponding to the parameter, and the parameter hash value.

[0141] Optionally, the federated learning server loads the baseline global model for the current round (i.e., the global model distributed in the previous round) and calls a preset aggregation algorithm (such as the FedAvg federated averaging algorithm, FedProx algorithm, etc.) to integrate all valid plaintext model update parameters. During the aggregation process, weighted optimization can be performed based on client attributes. For example, based on attributes such as the client's qualification level, data quality rating, and historical training contribution in the attribute authority chain system, differentiated weights can be assigned to the model update parameters of different clients to improve the accuracy and fairness of the global model. In addition, the entire aggregation process is executed in the local secure environment of the federated learning server to avoid parameter leakage, and the aggregation algorithm parameters, weight allocation rules, and aggregation calculation process logs are recorded.

[0142] Optionally, the federated learning server outputs updated global model parameters through an aggregation algorithm, and generates updated global model data by combining the structure of the baseline global model. Then, the updated global model data is evaluated for performance using preset evaluation metrics (such as accuracy, recall, F1 score, loss value, etc.). Testing is conducted based on a validation dataset stored locally on the server. If the performance evaluation meets the expected target (e.g., accuracy ≥ 95%), the global model data is used as the target model data and enters the subsequent encrypted distribution stage (corresponding to S301-S304). If the expected performance is not met, the aggregation algorithm parameters or weight allocation rules can be adjusted for re-aggregation, or it can be determined that iterative training needs to continue, returning to the client for the next round of training.

[0143] Optionally, throughout the entire process of parameter verification, aggregation processing, model generation, and performance evaluation, the federated learning server uploads information such as the parameter verification results of each client, a list of valid parameters, aggregation algorithm configuration, weight allocation rules, aggregation process logs, performance evaluation report of the updated global model, and global model data hash value to the blockchain evidence storage and traceability system to ensure that the aggregation process is traceable.

[0144] Figure 4 A schematic diagram of a data processing apparatus in federated learning provided in one embodiment of this application is shown below. Figure 4 As shown, the data processing device for federated learning provided in this embodiment is located in an electronic device. The data processing device 40 for federated learning provided in this embodiment includes: a key request sending module 41, a decryption key receiving module 42, a model data decryption module 43, and a local model processing module 44.

[0145] Specifically, the key request sending module 41 is used to send a target decryption key acquisition request to the attribute authority chain system in response to receiving the federated learning model training instruction; the attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture, and the attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning; the decryption key receiving module 42 is used to receive the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein, the target decryption key is generated by the attribute authority chain system after verification based on the pre-stored attribute set and access control policy; the model data decryption module 43 is used to decrypt the encrypted model data obtained from the corresponding interaction party based on the target decryption key to obtain plaintext model data; the local model processing module 44 is used to perform local model processing operations based on the plaintext model data to generate target model data.

[0146] Optionally, the data processing apparatus in federated learning provided in this embodiment further includes an encryption module.

[0147] Optionally, the encryption module is used to: send a target encryption key acquisition request to the attribute authority chain system; receive the target encryption key returned by the attribute authority chain system after responding to the target encryption key acquisition request; wherein the target encryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy; encrypt the target model data using the target encryption key to obtain encrypted model data; send the encrypted model data to the corresponding interaction party, and upload the data processing information to the blockchain evidence storage and traceability system for evidence storage.

[0148] Optionally, the encrypted model data is encrypted global model data, and the corresponding interaction party is the federated learning server; the target decryption key is the decryption key corresponding to the key policy attribute encryption mechanism. The encrypted global model data is generated by the federated learning server through the attribute encryption mechanism based on the key policy, and only participants that meet the preset access structure can decrypt it using the corresponding decryption key.

[0149] Optionally, the target model data is the model update parameters, and the corresponding interaction party is the federated learning server; the target encryption key is the encryption key corresponding to the ciphertext policy attribute encryption mechanism, the encrypted model data is generated by the attribute encryption mechanism based on the ciphertext policy, and only the federated learning server with the preset attribute set can decrypt it using the corresponding decryption key.

[0150] Optionally, the attribute authority chain system verifies the pass based on a pre-stored attribute set and access control policy, including: the attribute authority chain system extracts the initiator attribute information carried in the target decryption key acquisition request or the target encryption key acquisition request; compares the initiator attribute information with the pre-stored corresponding participant attribute set; if the comparison is consistent and conforms to the corresponding access control policy, the verification is deemed successful; if the comparison is inconsistent or does not conform to the access control policy, the verification is deemed unsuccessful.

[0151] Optionally, the local model processing module 44, when performing local model processing operations based on plaintext model data, is specifically used for: if the executing entity is a federated learning client, then training and iterating on the plaintext model data based on the local training data to generate model update parameters as target model data; if the executing entity is a federated learning server, then aggregating the plaintext model update parameters obtained after decrypting the encrypted model data sent by multiple clients to generate updated global model data as target model data.

[0152] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, as shown below. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: a processor 51 and a memory 52 communicatively connected to the processor 51.

[0153] The memory 52 stores computer-executed instructions; the processor 51 executes the computer-executed instructions stored in the memory 52 to implement a data processing method in federated learning provided in any of the above embodiments.

[0154] The program may include program code, which includes computer-executable instructions. Memory 52 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.

[0155] In this embodiment, the memory 52 and the processor 51 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single straight line, but this does not mean that there is only one bus or one type of bus.

[0156] This application also provides a computer-readable storage medium, which stores computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement a data processing method in federated learning provided in any of the above embodiments.

[0157] This application also provides a computer program product, including a computer program that, when executed by a processor, implements a data processing method in federated learning provided in any of the above embodiments.

[0158] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0159] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0160] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0161] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0162] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0163] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0164] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.

[0165] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method in federated learning, characterized in that, include: Upon receiving the federated learning model training instruction, a request to obtain the target decryption key is sent to the attribute authority chain system. The attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture. The attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning process. The system receives the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein the target decryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy; Based on the target decryption key, the encrypted model data obtained from the corresponding interaction party is decrypted to obtain plaintext model data; Local model processing operations are performed based on the plaintext model data to generate target model data.

2. The method according to claim 1, characterized in that, Also includes: Send a target encryption key acquisition request to the attribute authority chain system; The system receives the target encryption key returned by the attribute authority chain system after responding to the target encryption key acquisition request; wherein the target encryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy; The target model data is encrypted using the target encryption key to obtain encrypted model data; The encrypted model data is sent to the corresponding interactive party, and the data processing information is uploaded to the blockchain evidence storage and traceability system for evidence storage.

3. The method according to claim 1, characterized in that, The encrypted model data is encrypted global model data, and the corresponding interaction party is the federated learning server. The target decryption key is the decryption key corresponding to the key policy attribute encryption mechanism. The encrypted global model data is generated by the federated learning server through the key policy-based attribute encryption mechanism, and only participants that meet the preset access structure can decrypt it using the corresponding decryption key.

4. The method according to claim 2, characterized in that, The target model data is the model update parameters, and the corresponding interaction party is the federated learning server. The target encryption key is the encryption key corresponding to the ciphertext policy attribute encryption mechanism. The encryption model data is generated by the attribute encryption mechanism based on the ciphertext policy, and only federated learning servers with preset attribute sets can decrypt it using the corresponding decryption key.

5. The method according to claim 2, characterized in that, The attribute authority chain system performs verification based on a pre-stored attribute set and access control policy, including: The attribute authority chain system extracts the initiator attribute information carried in the target decryption key acquisition request or the target encryption key acquisition request; The initiator attribute information is compared with the pre-stored corresponding participant attribute set. If the comparison is consistent and conforms to the corresponding access control policy, the verification is deemed successful; if the comparison is inconsistent or does not conform to the access control policy, the verification is deemed unsuccessful.

6. The method according to any one of claims 1-5, characterized in that, The step of performing local model processing based on the plaintext model data includes: If the executing entity is a federated learning client, then the plaintext model data is trained iteratively based on the local training data to generate model update parameters as the target model data; If the executing entity is a federated learning server, then the plaintext model update parameters obtained after decrypting the encrypted model data sent by multiple clients are aggregated to generate updated global model data as the target model data.

7. A data processing apparatus for federated learning, characterized in that, include: The key request sending module is used to send a target decryption key acquisition request to the attribute authority chain system in response to receiving a federated learning model training instruction; The attribute authority chain system is a distributed multi-center system built on a consortium blockchain architecture. The attribute authority chain system pre-stores the attribute sets and access control policies of each participant in the federated learning process. The decryption key receiving module is used to receive the target decryption key returned by the attribute authority chain system after responding to the target decryption key acquisition request; wherein, the target decryption key is generated by the attribute authority chain system after verification based on a pre-stored attribute set and access control policy; The model data decryption module is used to decrypt the encrypted model data obtained from the corresponding interaction party based on the target decryption key to obtain plaintext model data. The local model processing module is used to perform local model processing operations based on the plaintext model data to generate target model data.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-6.