Urban information model enhancement method based on federal learning
By introducing a federated learning framework and EMA update mechanism into the urban information model, the problems of data privacy leakage, high computing pressure and insufficient generalization capabilities in the traditional urban information model are solved, and a more efficient and secure urban information model is achieved.
Patent Information
- Application Number
- CN202510345539.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional urban information models have problems such as data privacy leakage, high computing and storage pressure, and insufficient model generalization capabilities due to centralized data processing methods.
The urban information model enhancement method based on federated learning is adopted to collect and train data locally on each data holder, and jointly train and model parameter aggregation is carried out through the central coordination server, and global model update and distribution are optimized using the EMA update mechanism and the optimal parameter dictionary.
It effectively improves the prediction accuracy and adaptability of the urban information model, ensures data privacy and security, reduces computing and storage pressure, and improves the generalization ability of the model.
Smart Images

Figure CN119863174A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart city management, and specifically relates to a city information model enhancement method based on federated learning. Background Art
[0002] With the acceleration of urbanization and the continuous development of smart cities, various urban management systems (such as transportation, energy, environmental protection, safety, etc.) need to process and analyze massive multi-source heterogeneous data. These data usually come from various urban management departments and sensor devices, including vehicle flow, energy consumption data, air quality, video surveillance, etc.
[0003] Traditional urban information models usually rely on centralized data collection and processing, uploading all data to a central server for analysis. However, this approach has the following problems: 1. Data privacy and security: Centralized data processing methods are prone to data privacy leaks and security issues. Sensitive information in the city (such as individual location information, behavioral data, etc.) is at risk of being leaked when it is uploaded centrally.
[0004] 2. Computing and storage pressure: The central server needs to process massive amounts of data, which leads to excessive computing and storage pressure, and the system's response speed and real-time performance are difficult to guarantee.
[0005] 3. Insufficient model generalization ability: The centralized model is difficult to capture the differential characteristics between different cities and regions, resulting in poor generalization ability of the model. Summary of the invention
[0006] In view of the high privacy risk, high computational pressure, and insufficient generalization ability of traditional urban information models, this paper proposes a method for enhancing urban information models based on federated learning. This method shares knowledge through joint training while each data holder retains the data locally, improves the overall performance of the model, and ensures the privacy and security of the data. By introducing the EMA update mechanism and the optimal parameter dictionary, the efficiency of global model update and distribution is further optimized, ensuring the stability of the global model and the autonomy of the participants.
[0007] In order to achieve the above object, the present invention is implemented by the following technical scheme: A method for enhancing a city information model based on federated learning is performed according to the following steps: Step S1: Each city management department or participant collects data locally, trains the initial city information model locally, optimizes the model parameters, and obtains the local model parameters. ; Step S2: Encrypt the local model parameters and send them to the central coordination server. The central coordination server aggregates the local model parameters of each participant through the EMA mechanism to generate global model parameters. ; Step S3: The central coordination server distributes the global model parameters to each participant, and each participant receives the global model parameters. , and by constructing the optimal parameter dictionary, the global model parameters With local optimal parameters Compare and update the local model parameters when the global model parameters are better than the local optimal parameters, otherwise do not update; Step S4: Each participant continues to perform local training based on the updated local model parameters and updates the local model parameters through the EMA mechanism; Step S5, repeating steps S2 to S4 until the global model converges, and the enhancement of the city information model is completed.
[0008] Furthermore, the local model parameters in step S1 It is obtained by minimizing the loss function: ; in, is the learning rate, is the loss function Parameters The gradient of is the global current model parameter, is the current model parameter of the i-th client.
[0009] Furthermore, the global model parameters in step S2 The calculation formula is as follows: ; in, is the EMA coefficient, which controls the weight of new and old parameters. is the number of holders participating in the training, For the The amount of data held by each party, It is the sum of the data volume of all holders.
[0010] Furthermore, the EMA updating method in step S2 and step S4 is defined as: ; in, are the current model parameters, is the smoothing coefficient of EMA, To receive the model parameters obtained through local training, are the model parameters of the previous round.
[0011] Furthermore, in step S5, the criterion for determining whether the global model converges is that the global loss function is lower than a predetermined threshold or the accuracy improvement of the global model is lower than a set minimum value.
[0012] Furthermore, the data collected in step S1 includes urban traffic data, energy consumption data, environmental monitoring data and public safety data.
[0013] Furthermore, the encryption technology in step S2 adopts homomorphic encryption technology and differential privacy protection technology.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: the method of the present invention effectively improves the prediction accuracy and adaptability of the urban information model by introducing a federated learning framework in the urban management system while ensuring data privacy, and optimizes the stability and flexibility of the global model distribution process through the EMA update mechanism and the optimal parameter dictionary.
[0015] The present invention can be applied to multiple scenarios in urban management systems. For example, in traffic management, it can be used to predict traffic flow in real time, identify potential congested areas, and optimize the scheduling of traffic lights. In energy management, it can be used to predict energy consumption trends, optimize energy allocation strategies, and improve energy efficiency. In environmental monitoring, it can be used to monitor air quality, identify pollution sources, and assist in the formulation of environmental governance policies. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is the overall architecture diagram of the urban information model based on federated learning.
[0017] Figure 2 This is the flowchart of federated learning. DETAILED DESCRIPTION
[0018] The following will describe the implementation methods of the present invention in detail with reference to the accompanying drawings and examples, so as to fully understand and implement the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects.
[0019] like Figure 1 , Figure 2 As shown, the overall architecture of the method of the present invention includes the following modules: 1. Local data processing module: It is executed in each data holder (such as each city management department) and is responsible for the preprocessing and feature extraction of local data.
[0020] 2. Federated learning training module: Each data holder trains the model locally and sends the model parameters to the central coordination server after training.
[0021] 3. Global model update module: The central coordination server aggregates the model parameters uploaded by each holder based on the federated learning algorithm (such as FedAvg) and exponential moving average (EMA), generates a global model and distributes it to each holder.
[0022] 4. Security and privacy protection module: It uses encryption technology (such as homomorphic encryption), differential privacy protection and secure multi-party computing to ensure the security of data during transmission and aggregation.
[0023] 5. Model application module: The enhanced model is applied to various management scenarios of smart cities, such as traffic management, energy optimization, and environmental monitoring.
[0024] Based on the above modules, the specific process of the method of the present invention is described in detail below. A method for enhancing a city information model based on federated learning is performed according to the following steps: Step S1: Each city management department or participant collects data locally, trains the initial city information model locally, optimizes the model parameters, and obtains the local model parameters. Assume that Holders have local datasets and the corresponding model parameters The goal of local model training is to minimize the loss function: ; in, is the learning rate, is the loss function Parameters gradient.
[0025] Data collection includes urban traffic data, energy consumption data, environmental monitoring data and public safety data. These data collection can collect traffic flow, energy consumption data, air quality and other related information from sensors, monitoring equipment, data platforms and other channels. The collected data is preprocessed: including data cleaning, missing value filling, outlier detection, etc. to ensure data quality. Then, feature data such as vehicle flow, average speed, energy consumption rate, pollutant concentration, etc. are obtained from the preprocessed data.
[0026] Step S2: local model parameters After encryption, it is sent to the central coordination server, which aggregates the local model parameters of each participant through the exponential moving average EMA mechanism to generate the global model parameters. , the formula is as follows: ; in, is the EMA coefficient, which controls the weight of new and old parameters. is the number of holders participating in the training, For the The amount of data held by each party, It is the sum of the data volume of all holders.
[0027] To ensure data privacy and security, differential privacy protection technology is used to inject noise into the parameters during parameter transmission to prevent the original data from being inferred through the parameters. At the same time, homomorphic encryption is used to ensure the security of the parameters during transmission.
[0028] Step S3: The central coordination server distributes the global model parameters to each participant. Each participant receives the global model parameters and constructs an optimal parameter dictionary to convert the global model parameters into With local optimal parameters After comparison, when the global model parameters are better than the local optimal parameters, the local model parameters are updated, otherwise no update is performed.
[0029] like , then update the local optimal parameter .
[0030] Otherwise, keep the existing local parameters unchanged.
[0031] Step S4: Each participant continues to perform local training based on the updated local model parameters and updates the local model parameters through the EMA mechanism. The EMA update method is defined as: ; in, are the current model parameters, is the smoothing coefficient of EMA, To receive the model parameters obtained through local training, are the model parameters of the previous round.
[0032] Step S5: Repeat steps S2 to S4 until the global model converges and the city information model is enhanced. Through multiple rounds of federated learning iterations, the EMA coefficient is dynamically adjusted according to the actual effect. and , and data weight , improve the model convergence speed and prediction accuracy. In addition, combined with model pruning, quantization and other technologies, the model's computing efficiency and storage requirements are optimized, reducing transmission overhead.
[0033] Through multiple rounds of iterative optimization, an enhanced global model is obtained. This model can be deployed in urban management systems for real-time analysis and optimization of various urban management tasks, such as traffic flow prediction, energy allocation optimization, and environmental pollution monitoring.
[0034] The present invention combines federated learning, EMA update mechanism and optimal parameter dictionary to effectively enhance the prediction and generalization capabilities of the urban information model while ensuring data privacy. The method is applicable to a variety of application scenarios in smart city construction and provides efficient and reliable technical support for urban management.
[0035] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for enhancing an urban information model based on federated learning, characterized in that: Follow these steps: Step S1: Each city management department or participant collects data locally, trains the initial city information model locally, optimizes the model parameters, and obtains the local model parameters. ; Step S2: Encrypt the local model parameters and send them to the central coordination server. The central coordination server aggregates the local model parameters of each participant through the exponential moving average (EMA) mechanism to generate the global model parameters. ; Step S3: The central coordination server distributes the global model parameters to each participant, and each participant receives the global model parameters. , and by constructing the optimal parameter dictionary, the global model parameters With local optimal parameters Compare and update the local model parameters when the global model parameters are better than the local optimal parameters, otherwise do not update; Step S4: Each participant continues to perform local training based on the updated local model parameters and updates the local model parameters through the EMA mechanism; Step S5, repeating steps S2 to S4 until the global model converges, and the enhancement of the city information model is completed.
2. The method for enhancing the urban information model based on federated learning according to claim 1, characterized in that: The local model parameters in step S1 It is obtained by minimizing the loss function: ; in, is the learning rate, is the loss function Parameters The gradient of is the global current model parameter, is the current model parameter of the i-th client.
3. The method for enhancing the urban information model based on federated learning according to claim 2 is characterized in that: The global model parameters in step S2 The calculation formula is as follows: ; in, is the EMA coefficient, which controls the weight of new and old parameters. is the number of holders participating in the training, For the The amount of data held by each party, It is the sum of the data volume of all holders.
4. The method for enhancing a city information model based on federated learning according to claim 1, characterized in that: The EMA updating method in step S2 and step S4 is defined as: ; in, are the current model parameters, is the smoothing coefficient of EMA, To receive the model parameters obtained through local training, are the model parameters of the previous round.
5. The method for enhancing the city information model based on federated learning according to claim 4 is characterized in that: In step S5, the criterion for determining whether the global model converges is that the global loss function is lower than a predetermined threshold or the accuracy improvement of the global model is lower than a set minimum value.
6. The method for enhancing the city information model based on federated learning according to claim 5, characterized in that: The data collected in step S1 includes urban traffic data, energy consumption data, environmental monitoring data and public safety data.
7. The method for enhancing a city information model based on federated learning according to claim 1, characterized in that: The encryption technology in step S2 adopts homomorphic encryption technology and differential privacy protection technology.
Citation Information
Patent Citations
Robust heterogeneous federated learning method and system based on multiple models
CN118036713A
Large-scale heterogeneous industrial Internet of Things network intrusion detection method based on federated learning
CN118432885A
Federal evolution multi-agent auxiliary feature selection model construction method
CN118820696A
Traffic flow prediction method based on federated learning and graph neural network
CN118840860A
Federal learning-based model training method and system, and related equipment
CN118982063A