Federal learning city information model based on block chain and MPC and construction method thereof
Through the federated learning method of blockchain and multi-party secure computing, data privacy leakage and computing pressure problems in urban information models are solved, data security sharing and model optimization are realized, and the security and performance of urban information models are improved.
Patent Information
- Application Number
- CN202510477049.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-08
AI Technical Summary
In data processing, traditional urban information models have problems such as data privacy leakage, high computing and storage pressure, high data tampering risks, and insufficient model security and generalization capabilities.
The federated learning method based on blockchain and multi-party security computing is adopted, and by using multi-party security computing technology in the blockchain environment, the privacy protection of local data of various urban management departments is realized, and security aggregation and model optimization are carried out in a distributed environment.
On the premise of ensuring data privacy, the security and performance of the urban information model are improved, the privacy leakage and computing pressure problems under centralized systems are solved, and the security and generalization capabilities of the model are enhanced.
Smart Images

Figure CN120277721A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart city management and information security, and particularly relates to a federated learning urban information model based on blockchain and multi-party secure computation and a construction method thereof. Background Art
[0002] With the gradual popularization of the application of the City Information Modeling (CIM) in urban management, various urban management systems (such as transportation, energy, environmental protection, security, etc.) need to process a large amount of multi-source heterogeneous data. As a comprehensive urban management information model framework, CIM is committed to realizing the integration and intelligent analysis of multi-source data. Traditional CIM data processing methods usually rely on centralized data collection and processing methods, uploading all data to a central server for analysis. The above methods have the following problems: 1. Data privacy and security: Centralized data storage and processing are prone to data privacy leakage and security problems. Sensitive information in the city (such as personal location data, behavior data, etc.) has the risk of being misused when centrally uploaded.
[0003] 2. Computational and storage pressure: The central server needs to process a large amount of data, resulting in high computational and storage pressure, and it is difficult to guarantee the response speed and real-time performance of the system.
[0004] 3. Data tampering and non-traceability: The single-point failure and data tampering risks of the centralized storage system are high, and it is difficult to guarantee the integrity and source credibility of the data.
[0005] 4. Model security and generalization ability deficiency: The centralized model is difficult to capture the feature differences between different cities and regions, and is vulnerable to attacks by malicious participants. The security and generalization ability of the model are insufficient.
[0006] To address these challenges, this patent proposes a federated learning urban information model based on blockchain and multi-party secure computation and a construction method thereof. Through multi-party secure computation (MPC) technology, on the premise of ensuring the data privacy of all parties, it securely aggregates distributed data, and combines blockchain technology to ensure the immutability and traceability of data sharing, effectively improving the security, privacy protection and system performance of CIM. Summary of the Invention
[0007] Aiming at the deficiencies of the prior art, the present invention provides a federated learning urban information model based on blockchain and multi-party secure computation and a construction method thereof. By using multi-party secure computation technology in a blockchain environment, it realizes the privacy protection of local data of each urban management department or data holder, and at the same time ensures efficient cooperation and model optimization in a distributed environment.
[0008] The present invention achieves the above object through the following technical solutions: A method for constructing a federated learning urban information model based on blockchain and MPC, comprising the following steps: S1: Each urban management department or data holder collects urban information data locally, performs data preprocessing, and trains a local urban information model locally; S2: Use a multi-party secure computing framework to perform secret sharing encryption on the local model parameters, generate parameter shares, and upload the encrypted parameter shares to the blockchain network; S3: The smart contract on the blockchain verifies and stores the uploaded encrypted parameter shares, and performs secure aggregation calculation through a multi-party secure computing protocol without revealing the data of each party to generate global model parameters; S4: The smart contract distributes the global model parameters to each participant. After receiving the global model parameters, the participant updates the local model parameters, and the update formula is as follows: ; Where: represents the updated local model parameters; represents the global model parameters aggregated in the current round; represents the local model parameters in the current round; is a smoothing coefficient used to balance the weights of global parameters and local parameters; S5: Each participant continues local training based on the updated local model parameters, and updates the global model parameters through the weighted aggregation mechanism in the multi-party secure computing protocol; S6: Repeat steps S1 to S5 until the global model parameters converge or reach a predetermined accuracy standard, and complete the security optimization of the urban information model.
[0009] Further, the urban information data includes any one or more of traffic flow, energy consumption, environmental monitoring, and public safety.
[0010] Further, homomorphic encryption technology is used to encrypt the local model parameters and global model parameters.
[0011] Further, differential privacy noise is added to the encrypted local model parameter data.
[0012] The present invention also provides an urban information model constructed by using the above method.
[0013] Furthermore, the model is applicable to various smart city application scenarios including traffic management optimization, energy scheduling, environmental quality prediction, and public safety monitoring. By means of decentralization and secure aggregation, it effectively alleviates the problems of privacy leakage and computational pressure in a centralized system, and significantly improves the security and overall performance of the urban information model system.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: A federated learning urban information model based on blockchain and MPC and its construction method proposed by the present invention serve the fields of smart city management and information security. Through multi-party secure computing technology, it ensures data privacy and security without revealing the local data of each city management department, and realizes the secure sharing and model optimization of data. The MPC protocol allows all parties to perform collaborative computing in the encrypted state of data, ensuring the secure aggregation and update of global model parameters. At the same time, combining the decentralization and traceability characteristics of blockchain technology, it realizes the immutability and traceability of the data sharing process, provides an immutable verification mechanism for the data sharing process, and prevents data tampering and forgery. The method of the present invention not only improves the security of data and models while enhancing the performance of the urban information model, but also can effectively cope with the computational pressure of the centralized system, is applicable to smart city scenarios such as urban traffic, energy optimization, and environmental monitoring, and effectively solves the problems of data privacy leakage, computational pressure, and model security in the centralized system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flowchart of the present invention; Figure 2 is a schematic diagram of the multi-party computing and data security protection architecture; Figure 3 is a schematic diagram of the privacy computing process based on blockchain and multi-party secure computing. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] Hereinafter, exemplary embodiments of the present invention will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present invention can be more thoroughly understood and the scope of the present invention can be completely conveyed to those skilled in the art. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the drawings and in combination with the embodiments.
[0017] Refer to Figures 1 to 3, the present invention proposes a federated learning urban information model based on blockchain and multi-party secure computation and its construction method. By introducing the decentralized and traceable characteristics of blockchain, it realizes the security audit and verification of the model training and parameter aggregation process; through multi-party secure computation and differential privacy technology, it realizes the privacy protection of the local data of each participating party (urban management department or data holder), avoiding data leakage and model security risks that are prone to occur in traditional centralized methods.
[0018] The system architecture for constructing and training the urban information model of the present invention mainly includes the following modules: (1) Data collection and preprocessing module Each data holder (such as an urban management department) collects urban information data (including traffic flow, energy consumption, environmental monitoring, public safety, etc.) through sensors or data platforms, and performs preprocessing operations such as data cleaning, missing value filling, and outlier detection locally to ensure data quality. Due to the introduction of multi-party secure computation, the data of each party will not be leaked in the subsequent shared computing stage.
[0019] (2) Local model training and encryption module After each data holder completes data preprocessing, it locally trains a model using the private dataset to obtain initial model parameters. To ensure the security of sensitive information, these locally trained model parameters will then be encrypted using homomorphic encryption, secret sharing, or encryption combined with differential privacy (such as injecting Gaussian noise into the parameters) to generate encrypted parameters that meet the requirements of multi-party secure computation.
[0020] (3) Federated learning and multi-party secure computation module The multi-party computation and data security protection architecture is as Figure 2 shown. With the support of the blockchain network, the system securely aggregates the encrypted model parameters uploaded by each participating party. The multi-party secure computation protocol can achieve the secure computation of global model parameters without exposing the original parameters or data of each party. Blockchain provides a distributed ledger and smart contract functions for recording, verifying the encrypted parameters submitted by each party, and triggering the execution of the MPC protocol.
[0021] (4) Model update and distribution module After verifying the global model parameters obtained by aggregation through a smart contract, the system securely distributes them to all participating parties. Each participating party updates its local model accordingly (for example, using exponential moving average or other fusion strategies), further improving the overall performance and generalization ability of the model while retaining the local data characteristics.
[0022] (5) Privacy protection module This module runs through the entire process. By combining differential privacy technology under the MPC framework, noise (such as Gaussian noise) is injected into the local parameters to prevent external attackers from inferring the original training data. Even if the attacker obtains the encrypted or noisy parameters, it is difficult to recover the local sensitive data, thus effectively protecting the privacy of all parties.
[0023] In the above process, after the data is collected from sensors and various data platforms, it is preprocessed locally and the initial model training is completed. Subsequently, encryption and differential privacy operations are performed on the model parameters, and the submission and storage are completed through the blockchain. Then, the secure aggregation of the encrypted parameters of all parties is carried out using the multi-party secure computing protocol, and the generated global model parameters are distributed to all participating parties. This process is repeated iteratively, and finally, the secure and efficient training and deployment of the urban information model are achieved.
[0024] Based on the above system architecture, the training of the urban information model is carried out as Figure 1 shown below. The specific steps are as follows: S1: Local data collection and initial model training, specifically: Each participating party (such as the urban management department) collects the urban information dataset locally, including but not limited to data such as traffic flow, energy consumption, environmental monitoring, and public safety. Preprocess it (including data cleaning, missing value filling, outlier screening, feature selection, etc.) to obtain data with available quality. Use the preprocessed data locally to train the initial urban information model and obtain the initial model parameters . Let be a given loss function (such as mean squared error MSE, cross-entropy Cross-Entropy, etc.). Then the local loss function of the th participating party can be written as:
[0025] where: represents the input feature, represents the corresponding true label or target value, represents the prediction result of the model for when the model parameters are .
[0026] Through stochastic gradient descent (SGD) or other optimization algorithms, minimize to obtain the initial model parameters of the th participating party. This step is only completed locally and does not require cross-party communication.
[0027] S2: Local model parameter encryption and upload, specifically: After each participant completes local training, the local model parameters for the current round are obtained. . To protect privacy, first perform secret sharing on , splitting the parameters into several "shares", i.e.,
[0028] Use homomorphic encryption to encrypt the parameter vectors so that addition operations can still be performed in the encrypted state.
[0029] It is also possible to add small perturbations by adding random noise before uploading the parameters to further reduce the possibility of the parameters being reverse-engineered back to the original data.
[0030] The encrypted local parameter shares are submitted to the blockchain network. The distributed ledger and consensus mechanism of the blockchain can ensure the integrity and immutability of the uploaded data. At this time, even if other participants obtain these encrypted values, it is difficult to decrypt and restore the original , thus protecting local data privacy.
[0031] S3: Global parameter aggregation of blockchain and multi-party secure computation, specifically: The smart contract on the blockchain verifies whether all encrypted parameter shares from all participants have been received. Once the condition is met, the smart contract automatically triggers the multi-party secure computation (MPC) protocol, enabling all parties to complete the global model parameter aggregation without disclosing their own original data or plaintext parameters.
[0032] Under the MPC framework, the encrypted parameter shares (including data scale weights) of all participants will be securely merged to generate the global model parameters . A common approach is weighted average:
[0033] Where: represents the encrypted model parameters submitted by the th participant in the current round of training; is the total number of participants, is the data scale of the th participant, represents the total amount of data samples of all participants.
[0034] The multi-party secure computation protocol can be automatically started through the smart contract on the blockchain to ensure the secure aggregation of global model parameters by all participants without disclosing the original data.
[0035] S4: Global model parameter distribution and local fusion update, specifically: The aggregated global model parameters It is distributed by the smart contract to each participating party (if it is still in the encrypted state, the parties decrypt it through negotiation or continue to use it in the encrypted state), so as to realize the sharing of the global training results.
[0036] After each participating party receives it, it can fuse and update it with its own current local model parameters Typically, the exponential moving average (EMA) strategy is adopted:
[0037] where: represents the local model parameters after fusion update; is the smoothing coefficient, which is used to balance the importance of global information and the existing local model.
[0038] S5: New round of local training and weighted aggregation update, specifically: Each participating party uses the fused local model parameters as the initial parameters for the new round of iteration, and trains again on the local dataset to obtain the updated local model parameters. At this time, homomorphic encryption and differential privacy processing can also be used again as needed.
[0039] After completing the new round of training, each participating party uploads the new encrypted local model parameters to the blockchain, and then the smart contract automatically triggers the MPC protocol to calculate the new global model parameters.
[0040] Iterate in a cycle until the model converges or meets the termination conditions.
[0041] S6: Iterate until convergence and final verification, specifically: Repeat steps S1 - S5 to continuously update the local model parameters and global model parameters. When one of the following conditions is met, it can be considered that the model training converges or reaches the preset performance threshold: (1) The global loss function (or validation set error) is lower than the specified threshold; (2) For several consecutive rounds of iteration, the improvement in the global model accuracy is less than a certain minimum increment; (3) The number of training rounds reaches the maximum limit, etc.
[0042] Under the blockchain network, every parameter upload, aggregation calculation, and final global model parameter distribution are recorded and traceable. The smart contract and related audit mechanisms can verify the consistency and accuracy of the global model and each party's local model after each iteration to prevent malicious nodes from tampering with or forging data. This security audit and verification can utilize the native traceability feature of the blockchain smart contract, or can also be combined with external audit tools to further verify and archive the results.
[0043] After convergence, the final global model parameters obtained are denoted as ; Each party also has its own final local model parameters .
[0044] The urban information model can be applied to various smart city scenarios including traffic management, energy scheduling, environmental prediction, public safety monitoring, etc.
[0045] The execution process of the blockchain and smart contract of the present invention is as follows: After local model training and parameter encryption are completed, each data holder uploads its encrypted model parameters to the blockchain. The role of the blockchain is to ensure the authenticity and immutability of the data, and automatically trigger a multi-party secure computing protocol through a smart contract to securely compute the global model parameters. The specific process is as follows: (1) Encrypted parameter upload and verification After each data holder completes local model training and encryption (which may include differential privacy processing), it uploads the obtained encrypted model parameters to the blockchain. The blockchain verifies the authenticity and integrity of the uploaded data through a consensus mechanism (such as PoW, PoS, or PBFT, etc.) and stores it in a distributed ledger to ensure that no node can tamper with or forge the recorded encrypted parameters.
[0046] (2) Smart contract triggers the MPC protocol The privacy computing process of the blockchain and multi-party secure computing is as Figure 3 shown. When the encrypted parameters of all participating parties are uploaded and verified, the smart contract on the blockchain will automatically start the multi-party secure computing protocol according to the set trigger conditions. Through the automated execution of the smart contract, each holder completes secure aggregation computing in the encrypted state without exposing each other's plaintext data or intermediate parameters.
[0047] (3) MPC aggregation computing process In the MPC protocol, each participating party distributes the parameter shares it generates to other parties and performs local aggregation after receiving each share. Subsequently, the system combines the intermediate aggregation results of all participating parties to finally obtain the global model parameters. The entire computing process is carried out in the encrypted state, and no single participating party can restore the sensitive information of other parties.
[0048] (4) Result verification and distribution After multi-party secure computing is completed, the smart contract verifies the aggregated global model parameters and records the verification results on the blockchain to ensure that no participating party cheats or tampers with the results during the computing process. After verification, the smart contract securely distributes the global model parameters to each data holder so that they can continue to optimize their local models based on the global model. The traceable and immutable characteristics of the blockchain enable each round of computing process and results to be audited and verified.
[0049] The deployment and application scenarios of the urban information model system obtained based on the above training method are as follows: The optimized CIM system can be applied to multiple urban management scenarios, such as traffic management (for traffic flow prediction and signal optimization), energy management (for energy consumption optimization and energy scheduling), and environmental monitoring (for real-time air quality monitoring and pollution source identification). The MPC technology ensures data privacy and security in these application scenarios, supports cross-departmental data collaboration, and improves the intelligence and efficiency of urban management.
[0050] The present invention combines multi-party secure computing and blockchain technology to optimize the application of federated learning in the urban information model while ensuring data privacy and security. MPC ensures that the data of all parties participate in the calculation in an encrypted state without exposing the local data. This method not only improves the security and reliability of the model but also enhances the prediction accuracy and adaptability of the model, and is applicable to various management scenarios of smart cities. Through this innovative architecture, the present invention provides an efficient and secure decision-making support solution for urban management.
[0051] The present invention has been described in detail through embodiments, but the content described is only an exemplary embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. The protection scope of the present invention is defined by the claims. Any use of the technical solutions described in the present invention, or any similar technical solutions designed by those skilled in the art under the inspiration of the technical solutions of the present invention to achieve the above technical effects within the essence and protection scope of the present invention, or any equivalent changes and improvements made to the application scope, shall still fall within the patent coverage protection scope of the present invention. It should be noted that for the sake of clear description, some components and processes that are not directly and obviously related to the protection scope of the present invention but are known to those skilled in the art are omitted in the description of the present invention.
Claims
1. A method for constructing a federated learning urban information model based on blockchain and MPC, characterized in that It includes the following steps: S1: Each city management department or data holder collects urban information data locally, preprocesses the data, and trains a local urban information model locally; S2: Use a multi-party secure computing framework to perform secret sharing encryption on the local model parameters, generate parameter shares, and upload the encrypted parameter shares to the blockchain network; S3: The smart contract on the blockchain verifies and stores the uploaded encrypted parameter shares, and performs secure aggregation calculation through a multi-party secure computing protocol without revealing the data of each party to generate global model parameters; S4: The smart contract distributes the global model parameters to each participant. After receiving the global model parameters, the participant updates the local model parameters, and the update formula is as follows: ; Wherein: represents the updated local model parameters; represents the global model parameters aggregated in the current round; represents the local model parameters in the current round; is the smoothing coefficient, used to balance the weights of the global parameters and the local parameters; S5: Each participant continues local training based on the updated local model parameters, and updates the global model parameters through the weighted aggregation mechanism in the multi-party secure computing protocol; S6: Repeat steps S1 to S5 until the global model parameters converge or reach a predetermined accuracy standard, and complete the secure optimization of the urban information model.
2. The method according to claim 1, wherein The urban information data includes any one or more of traffic flow, energy consumption, environmental monitoring, and public safety.
3. The method according to claim 1, characterized in that, Homomorphic encryption technology is used to encrypt the local model parameters and global model parameters.
4. The method according to claim 3, characterized in that, Differential privacy noise is added to the encrypted local model parameter data.
5. An urban information model, characterized in that, Constructed according to the method described in any one of claims 1 to 4.
6. The City Information Model according to claim 5, characterized in that, The urban information model is applicable to smart city application scenarios including traffic management optimization, energy scheduling, environmental quality prediction, and public safety monitoring.
Citation Information
Cited By
Heterogeneous government affair data acquisition and analysis system based on data government and privacy protection
CN122333513A