Meteorological monitoring method and system based on GRU neural network and differential privacy federated learning
By using GRU neural network and differential privacy federated learning LPDP-FedProx algorithm in the meteorological monitoring system, the problems of traditional meteorological monitoring systems in data processing and privacy protection are solved, and more efficient and safe meteorological data monitoring and early warning capabilities are achieved. .
Patent Information
- Application Number
- CN202411134963.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Traditional meteorological monitoring systems are not flexible and efficient enough to process multi-region, multi-device, and multi-modal data, and there are problems of data silos, privacy protection and computing resources. The existing federated learning algorithms are relatively weak in processing equipment heterogeneity. , resulting in unstable global model.
Using a federated learning method based on GRU neural network and differential privacy, combined with the LPDP-FedProx algorithm, a federated learning framework that can effectively process heterogeneous data is built. It ensures data privacy through local model training and differential privacy protection, and improves federated learning. Safety and efficiency.
It realizes the privacy protection of local data, improves the security and efficiency of federated learning, reduces the burden of data transmission and central processing, is highly adaptable, and can respond to meteorological changes and complex weather events faster.
Smart Images

Figure CN119129706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of meteorological monitoring technology, and specifically but not limited to, to a meteorological monitoring method and system based on GRU neural network and differential privacy federated learning. Background Art
[0002] Meteorological monitoring is an important field of atmospheric science. Meteorological monitoring refers to the activities of meteorological monitoring agencies to conduct overall monitoring and early warning of meteorological environmental conditions through meteorological monitoring systems. The meteorological monitoring system monitors and reports indicators reflecting meteorological quality to determine meteorological environmental data such as rainfall, wind speed and direction in the area. The core goal of meteorological monitoring is to provide data on the current status and changing trends of meteorological elements, predict meteorological changes, smoothly solve current major meteorological problems, and serve meteorological management. With the development of microelectronics technology, computer technology, satellite technology and material science, many technologies have been applied to meteorological observation automation, such as modern agricultural development, forest fire prevention, highway environmental monitoring, school environmental monitoring, etc., which greatly improves the detection accuracy and maintainability of meteorological monitoring. However, with the continuous development of meteorological monitoring systems, the traditional centralized data processing model is not flexible and efficient enough in dealing with the challenges of multi-regional, multi-device and multi-modal data. In addition, traditional meteorological monitoring systems often face problems such as data islands, privacy protection and limited computing resources. On the one hand, for more complex weather events, some existing meteorological monitoring systems can only monitor data in a single mode; on the other hand, meteorological monitoring involves a large amount of meteorological data and information sharing, and ensuring the security and privacy of this data is an important challenge. If the security issues of the meteorological monitoring system are not resolved, it may lead to data leakage and tampering of meteorological stations. The meteorological monitoring system requires more intelligent, secure, and adaptable solutions to better cope with challenges such as meteorological changes and complex weather events.
[0003] At present, common systems for meteorological monitoring, such as precipitation monitoring, wind detection, and humidity monitoring, only use some characteristics of the current regional weather environment to monitor a single event. This wastes a lot of effective features. Monitoring these meteorological events separately wastes a lot of space and time resources. In addition, meteorological monitoring equipment in different regions needs to transmit these monitoring data to the central server, which inevitably leads to latency and privacy issues, and increases a lot of communication overhead, which makes the processing efficiency of meteorological data low. Compared with traditional meteorological monitoring methods, the federated learning method can better associate the monitoring of various meteorological events, improve the generalization ability and accuracy of the model, and has been widely used in many fields. As an emerging technology driven by big data, federated learning can make full use of meteorological data collected by different devices, train meteorological monitoring models more efficiently, and more accurately monitor and predict different meteorological events in different regions. Among them, the Federated Average Algorithm (FedAvg) brings new solutions to various meteorological monitoring tasks. Traditional meteorological monitoring methods may involve centralizing data to a central server for processing. In contrast, the federated average algorithm allows data to be retained on local meteorological devices, reducing dependence on data centers and helping to cope with large-scale and decentralized meteorological data. At the same time, the algorithm can adapt to the distribution of meteorological data in different regions because the model is trained on local meteorological devices and each device is able to perform local training on its own data. However, the federated average algorithm is relatively weak in handling heterogeneity between devices. In some cases, differences in performance and data distribution between devices may lead to instability in the global model.
[0004] In view of this, it is necessary to provide a new method to solve at least part of the above problems. Summary of the invention
[0005] In response to one or more problems in the prior art, the present invention proposes a meteorological monitoring method based on GRU neural network and differential privacy federated learning, combines the personalized differential privacy algorithm with the FedProx federated learning algorithm, proposes the LPDP-FedProx federated learning algorithm, and constructs a federated learning framework that can effectively process heterogeneous data, effectively protect the privacy of local data, and improve the security of federated learning.
[0006] The technical solution to achieve the purpose of the present invention is:
[0007] A meteorological monitoring method based on GRU neural network and differential privacy federated learning, including:
[0008] S1. Preprocessing: The client collects local meteorological data and preprocesses it, and generates a meteorological time series data sequence based on the preprocessed data;
[0009] S2, initialization: Each client obtains the initialization parameters of the global model from the central server, and each device selects the appropriate model structure according to its own heterogeneity;
[0010] S3, local training: according to the generated meteorological time series data sequence, the local meteorological monitoring model based on the GRU neural network is trained;
[0011] S4, local model update: After the local training is completed, the client updates the parameters of the local model through the LPDP-FedProx federated learning algorithm, and uploads the updated model parameters to the central server through the communication module;
[0012] S5, global model aggregation: After receiving the model parameters from multiple clients, the central server aggregates the model according to the global model weighted average aggregation algorithm;
[0013] S6, Update feedback: The central server feeds back the updated global model parameters to each client. After receiving the feedback, the client performs the next round of local training until the best monitoring model is obtained.
[0014] S7. Visualization of meteorological monitoring: Use the global model to monitor and warn meteorological parameters, and visualize the parameters and warning information.
[0015] Furthermore, in the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention, the preprocessing of local meteorological data in S1 includes data collection, filtering, cleaning and enhancement, wherein data filtering includes encrypting the data using homomorphic encryption technology, and data cleaning includes estimating missing values, resolving conflicts and standardizing data in local meteorological equipment.
[0016] Furthermore, in the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention, the local meteorological monitoring model training based on GRU neural network in S3 includes:
[0017] S3-1. Input the preprocessed meteorological data sequence into the GRU neural network. The input of the tth time step is recorded as x t , the gate signal r is calculated t and z t , the calculation formula is as follows:
[0018] r t =σ(W r ·[h t-1 ,x t ])
[0019] z t =σ(W z ·[ht-1 ,x t ])
[0020] Among them, σ(·) represents the sigmoid function, which is used to compress the result between 0 and 1, W r Represents the reset gate weight matrix, W z represents the update gate weight matrix. These two weight matrices are used to linearly transform the input of the current time step and the hidden state of the previous time step. [] represents the connection of two vectors. h t-1 Represents the output of the previous time step;
[0021] S3-2. Calculate candidate hidden layers The formula is as follows:
[0022]
[0023] Where tanh(·) represents the tanh activation function, which is used to scale the activation result between -1 and 1 to obtain the candidate hidden layer state. is the weight matrix, which is used to linearly transform the output of the reset gate and the input of the current time step. * represents matrix multiplication;
[0024] S3-3, z t Determine the hidden layer h from the previous time step t-1 How much information is forgotten and how much hidden layer information of the current time step is added Calculate h t , the formula is as follows:
[0025]
[0026] Among them, h t This is the final output of the GRU neural network.
[0027] Furthermore, in the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention, the model aggregation in S5 specifically includes:
[0028] S5-1. In the first round of training, the central server selects a part of clients {C1, C2…C k} as a participant and initialize the global model Then the global model Sent to each client through the base station as the client's local GRU model The initialization model, and then each client C k The LPDP-FedProx algorithm is used to guide the parameter update of the local model and utilize the private dataset D kTrain the local meteorological monitoring model to generate an updated local model. The update formula is as follows:
[0029]
[0030] Among them, α represents the learning rate, represents the calculation of gradient, represents the loss function of each client k;
[0031] S5-2. The central server calculates the aggregate value of the updated client model parameters to complete model aggregation. The model aggregation formula is as follows:
[0032]
[0033] Among them, N k represents the data volume (data set) of the kth client, and N represents the total volume of the data sets of k clients;
[0034] S5-3. The central server updates the next round of global model based on the aggregation results:
[0035]
[0036] S5-4. Perform performance evaluation on the updated global model, iteratively update the model based on the evaluation results, and continuously optimize the global model.
[0037] Furthermore, in the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention, the specific steps of updating the parameters of the local model by using the LPDP-FedProx federated learning algorithm in S4 include:
[0038] S4-1. Define a sampling threshold to divide the original data set into an unsampled part and a sampled part;
[0039] Users in the unsampled part will waste their privacy budget because their data is not used, resulting in sampling errors:
[0040]
[0041] If the privacy budget of the user in the sampled part is higher than the threshold, the user's data will be protected by noise higher than the privacy requirement, resulting in noise error:
[0042]
[0043] in, is the user's privacy budget, is the privacy budget of the i-th user, τ is the sampling threshold;
[0044] S4-2. The minimum value of the loss function is used to determine the sampling threshold, and the weights of the sampling error and the noise error are allowed to be adaptively modified. The loss function is defined as:
[0045]
[0046] For a given Range When the threshold value τ minimizes the waste function and When , this value is the optimal sampling threshold;
[0047] S4-3. Use the optimal sampling threshold calculated in each round to sample the client data, and iterate multiple times until the remaining value of the privacy budget is less than the given value. Through this sampling method, the original data set is subsampled to minimize the error caused by random sampling and noise to the algorithm;
[0048] S4-4. Use the secondary sampling data to train the local GRU model and update the local model parameters
[0049]
[0050] Among them, h k is the local objective function, F k (θ) is the local loss function on the kth device and μ is the regularization parameter.
[0051] A meteorological monitoring system based on GRU neural network and differential privacy federated learning, including:
[0052] Local meteorological equipment, with built-in GRU neural network, is used to collect and preprocess meteorological data locally, train local meteorological monitoring models, and update model parameters based on the LPDP-FedProx federated learning algorithm;
[0053] The central server aggregates local meteorological monitoring model parameters and updates the global model based on the LPDP-FedProx federated learning algorithm, and then sends the updated model parameters to each client;
[0054] Communication module for transmitting model parameters between local meteorological equipment and central server.
[0055] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0056] 1. In the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention, local meteorological equipment performs model training respectively, and only transmits the model and updated parameters to the central server. The original data and model parameters are processed using differential privacy technology, ensuring that local data can be effectively protected from privacy and improving the security of federated learning.
[0057] 2. The meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention allows model training on local meteorological equipment without transmitting original data to the central server. It can adapt to new data and situations more quickly, thereby improving the real-time performance and efficiency of the system.
[0058] 3. The meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention only needs to transmit a small amount of model parameters to the central server, which reduces data transmission, reduces the burden of central processing, and improves the overall computing speed.
[0059] 4. The meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention introduces the GRU neural network when training the model on the local device, which reduces the problem of gradient vanishing during model training. At the same time, since the GRU has fewer parameters and a simpler structure, it reduces memory usage and consumption, making the training of the local model simpler and more efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings are used to provide a further understanding of the present invention and are used together with the description to explain the embodiments of the present invention, but do not constitute a limitation of the present invention. In the accompanying drawings:
[0061] Figure 1 A flow chart of the meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention is shown.
[0062] Figure 2 The GRU neural network principle diagram of the present invention is shown.
[0063] Figure 3 The flowchart of the differential privacy federated learning algorithm of the present invention is shown. DETAILED DESCRIPTION
[0064] In order to further understand the present invention, preferred embodiments of the present invention are described below in conjunction with examples. However, it should be understood that these descriptions are only for further illustrating the features and advantages of the present invention, rather than limiting the claims of the present invention.
[0065] The description in this section is only for typical embodiments, and the present invention is not limited to the scope of the embodiments. The combination of different embodiments, the mutual replacement of some technical features in different embodiments, and the mutual replacement of the same or similar prior art means with some technical features in the embodiments are also within the scope of the description and protection of the present invention.
[0066] At present, meteorological monitoring is usually done by each meteorological monitoring station collecting local meteorological data separately to complete the training of meteorological monitoring prediction models. However, it is not possible to train a high-precision meteorological monitoring model using limited local meteorological data, and the trained model has poor generalization ability and cannot be applied to meteorological monitoring at other meteorological stations. Therefore, a cloud-edge collaborative training model can be introduced to solve this problem, that is, a central server is built on the cloud, and then the meteorological data collected by each meteorological station is uploaded to the cloud. In this way, the cloud can obtain a large amount of labeled meteorological data, so a high-precision and generalized meteorological monitoring model can be centrally trained on the cloud to achieve more accurate meteorological monitoring. However, this strategy faces the challenge of data security. Due to the privacy of meteorological data, each meteorological station cannot fully trust each other, so it is difficult to share data among meteorological stations, resulting in data islands, so that a large amount of data cannot be fully used.
[0067] To solve this problem, Figure 3 The present invention introduces a federated learning framework. Each weather station collects local meteorological data and independently trains a meteorological monitoring model. The model parameters are then uploaded to the central server. The central server aggregates and updates the model through the LPDP-FedProx algorithm, and transmits the updated model parameters back to each weather station. The model is iterated several times to obtain an optimal monitoring model. In this process, the client only uploads the model parameters instead of the original meteorological data, so user privacy is well protected, and a large amount of data is fully utilized.
[0068] Figure 1 The overall flow chart of a meteorological monitoring method based on GRU neural network and differential privacy federated learning of the present invention is shown. It mainly includes: data preprocessing, local model training based on GRU neural network and federated learning deduction process based on LPDP-FedProx. The specific steps are as follows:
[0069] S1. Data collection and preprocessing: This process mainly includes operations such as data collection, filtering, cleaning and enhancement, the purpose of which is to alleviate statistical heterogeneity. When using the federated learning method for meteorological monitoring, many heterogeneity problems will arise, which will cause the performance of the global model to decline to varying degrees. These heterogeneity problems can be roughly divided into four categories: statistical heterogeneity, model heterogeneity, communication heterogeneity, and device heterogeneity. Statistical heterogeneity refers to the situation in which the data distribution of edge devices in federated learning is inconsistent and does not follow the same sampling, that is, the data is non-independent and identically distributed (Non-IID). Due to the differences in local data distribution of each meteorological station, for example, coastal areas may pay more attention to meteorological data of tides and waves, while inland areas may pay more attention to meteorological data such as soil moisture. The local optimization goals of edge devices are inconsistent with the global optimization goals. Therefore, statistical heterogeneity may cause local models to converge in different directions, reaching local optimality instead of global optimality, thereby reducing the performance of federated learning.
[0070] In federated learning, the quantity, quality, and diversity of data collection determine how much useful information the edge device provides to the federated learning system. Therefore, local data collection is an important part that needs to be optimized in federated learning. Therefore, the present invention considers various data-related factors (error rate, classification distribution, content diversity, and data size) that may affect model performance to measure the quality of sample data.
[0071] Data filtering is the process of removing or excluding irrelevant or malicious data from a data set. The present invention uses homomorphic encryption technology to encrypt data, which allows computing operations to be performed in an encrypted state without decrypting the ciphertext. Through homomorphic encryption filtering, various computing operations can be performed on the data while protecting data privacy.
[0072] Data cleansing is the process of correcting or improving incomplete, inaccurate, or inconsistent data in federated learning, typically by applying techniques locally on the client to impute missing values, resolve conflicts, and standardize data.
[0073] Data augmentation is a technique to artificially expand the training dataset by generating more data from limited raw data, which can effectively alleviate the problem of insufficient data in federated learning. For example, for meteorological data in polar regions and deep sea, the existing data may be insufficient due to limited technological development. In this case, data augmentation methods can be used to increase the amount of data.
[0074] Through the above data preprocessing operations, the quality and usability of the dataset can be improved, while the statistical heterogeneity can be reduced, making the dataset more suitable for model training.
[0075] S2. Local meteorological monitoring model training based on GRU neural network: Considering that meteorological data has strong temporal and spatial correlation and long-term dependencies, and GRU neural network has good performance and effect in processing this type of data, the present invention uses GRU neural network to train the local model. Figure 2 The following is a basic schematic diagram of the GRU neural network. In the figure, z represents the update gate and r represents the reset gate. represents the candidate hidden layer, and h represents the hidden layer information outputted at the end.
[0076] GRU neural network is a variant of LSTM (Long Short Term Memory). GRU merges the input gate and forget gate in LSTM into an update gate, and merges the hidden layer and memory unit into a reset gate. The update gate determines how much previous memory information is retained to the current time step, and the reset gate determines how the current information is combined with the previous memory information. While retaining the advantages of LSTM such as the gating mechanism and memory unit, the GRU neural network improves computational efficiency and reduces gradient explosion by simplifying the structure and optimizing parameters, thereby improving the training efficiency and performance of the model to a certain extent.
[0077] The training process of the local meteorological monitoring model based on the GRU neural network is as follows: the preprocessed meteorological data sequence is input into the GRU neural network, and the input of the tth time step is recorded as x t , the gate signal r is calculated t and z t , the calculation formula is as follows:
[0078] r t =σ(W r ·[h t-1 ,x t ])
[0079] z t =σ(W z ·[h t-1 ,x t ])
[0080] Among them, σ(·) represents the sigmoid function, which is used to compress the result between 0 and 1, W r Represents the reset gate weight matrix, W z represents the update gate weight matrix. These two weight matrices are used to linearly transform the input of the current time step and the hidden state of the previous time step. [] represents the connection of two vectors. h t-1 Represents the output of the previous time step.
[0081] Before calculating the candidate hidden layer, the present invention designs a shared hidden layer to meet the needs of multi-task learning. The shared hidden layer allows different tasks to share the underlying features of the model. This allows the model to learn a common feature representation, thereby better adapting to the needs of different tasks and improving data utilization efficiency. In addition, the shared hidden layer enables multiple tasks to share the same model parameters, thereby reducing the number of model parameters, reducing the complexity of the model, and better training the model on limited data to prevent overfitting.
[0082] Then calculate the candidate hidden layer The formula is as follows:
[0083]
[0084] Where tanh(·) represents the tanh activation function, which is used to scale the activation result between -1 and 1 to obtain the candidate hidden layer state. is a weight matrix used to linearly transform the output of the reset gate and the input of the current time step. * represents matrix multiplication.
[0085] Finally t Determine the hidden layer h from the previous time step t-1 How much information is forgotten in the hidden layer, how much hidden layer information of the current time step needs to be added Calculate h t The formula is as follows:
[0086]
[0087] h t This is the final output of the GRU neural network.
[0088] S3. Federated learning deduction process based on LPDP-FedProx: Figure 3 The overall framework diagram of a meteorological monitoring method based on federated learning is shown. As shown in the figure, the architecture is divided into three layers, namely the cloud layer, the fog layer and the Internet of Things layer. The cloud layer is a central server that performs global model aggregation and updates, and it has high computing power and storage capacity. The fog layer is composed of multiple edge servers (base stations, etc.), which is responsible for the communication between the cloud layer and the Internet of Things layer, that is, the communication between the central server and the meteorological station equipment in various places. The Internet of Things layer is composed of edge devices (sensors and computers at meteorological stations in various places), which is responsible for local model training and transmitting model parameters to the central server through the fog layer. Compared with the traditional two-layer federated learning architecture, the present invention introduces an intermediate layer, namely the fog layer, which can perform the model aggregation step, which greatly alleviates the communication pressure between the cloud layer and the Internet of Things layer.
[0089] First, in the first round of training, the central server selects the local devices {C1, C2…C k} as a participant and initialize the global model Then the global model Sent to each edge device through the fog layer base station as a local GRU model Initialization, then each local device C k Using private dataset D k Perform the following local model update:
[0090]
[0091] Among them, α represents the learning rate, represents the calculation of gradient, represents the loss function of each local device k.
[0092] Next, the central server calculates the aggregate value of the updated model parameters of the edge devices to complete the model aggregation. The model aggregation formula is as follows:
[0093]
[0094] Among them, N k represents the data volume (data set) of the kth local device, and N represents the total amount of data sets of k local devices.
[0095] The central server then updates the global model for the next round based on the aggregated results:
[0096]
[0097] Finally, the updated global model is evaluated for performance, such as the accuracy of meteorological monitoring or prediction, etc. Based on the evaluation results, the model is iteratively updated to continuously optimize the global model to adapt to complex meteorological events.
[0098] Specifically, in the process of updating the local model, the present invention uses the FedProx algorithm as the baseline algorithm, integrates the differential privacy technology into the baseline algorithm, and proposes the LPDP-FedProx algorithm. FedProx adds a proximal term on the basis of FedAvg to solve the problems caused by device heterogeneity and data heterogeneity. FedProx takes into account the differences in communication and computing capabilities of different devices. Different devices do not need to be trained for the same number of rounds. The local model does not need to be trained particularly accurately, but only needs to obtain an inexact solution, thus alleviating the problem of device heterogeneity. In order to make the FedProx model converge faster to achieve higher efficiency, while better ensuring data security and saving communication overhead, the present invention proposes a personalized local differential privacy method LPDP, and improves FedProx using LPDP.
[0099] LPDP is mainly implemented through sampling and adding noise, while random sampling and random noise will lead to sampling error and noise error. Sampling error refers to the impact of random sampling on the training effect of the original data set, and noise error refers to the degree of disturbance of the client's unused privacy requirements on the training effect. By defining the sampling threshold, the original data set is divided into an unsampled part and a sampled part. Users in the unsampled part will waste their privacy budget because their data is not used, which will lead to sampling error; and if the privacy budget of the user in the sampled part is higher than the threshold, the user's data will be protected by noise that is higher than the privacy requirement, resulting in noise error. Sampling error and noise error are defined as:
[0100]
[0101] in, is the user's privacy budget, is the privacy budget of the i-th user, and τ is the sampling threshold.
[0102] Since the sampling threshold has opposite effects on the sampling error and the noise error, a larger threshold can reduce the effect of the noise error on the algorithm; conversely, it will increase the effect of the sampling error on the algorithm. In order to obtain the best sampling threshold in each round of calculation, the present invention uses the minimum value of the loss function to determine the sampling threshold and allows the weights of the two types of errors to be modified adaptively. The loss function can be defined as:
[0103]
[0104] For a given Range When the threshold value τ minimizes the waste function and When , this value is the optimal sampling threshold.
[0105] The client data is sampled using the optimal sampling threshold calculated in each round, and iterated multiple times until the remaining value of the privacy budget is less than the given value. This sampling method is used to subsample the original data set, which can minimize the error caused by random sampling and noise to the algorithm.
[0106] LPDP sets different privacy budgets on different devices according to the user's personalized privacy needs, reducing the waste of privacy budgets and improving the convergence speed of FedProx. At the same time, it adds noise perturbations to the original data and local model parameters, improving the security of federated learning.
[0107] Next, use the secondary sampling data to train the local GRU model and update the local model parameters The model can be regarded as an inexact solution. Specifically, this inexact solution is called The definition is as follows: For an objective function h to be optimized k (θ; θ t ), if any:
[0108]
[0109] in, Then we call θ * Yes k One Inexact solution. Among them, F k (·) represents the local loss function and μ represents the regularization parameter.
[0110] Then, the local model parameters It can be calculated by the following formula:
[0111]
[0112] Among them, h k is the local objective function, F k (θ) is the local loss function on the kth device and μ is the regularization parameter.
[0113] After getting the updated local model parameters Finally, the differential privacy method is used to add noise perturbation to improve the confidentiality and privacy security of the data.
[0114] FedProx regularization terms The difference between the global model parameters and the local model parameters on each device is taken into account, which helps to better maintain the consistency between the global model and the local model during the optimization process. Among them, the selection of the hyperparameter μ is crucial to the convergence of the model. When μ = 0, as the data heterogeneity increases, the model convergence deteriorates. When μ> 0, as the statistical heterogeneity increases, the convergence performance is maintained relatively well, but when μ is too large, the convergence speed will slow down, so it is particularly important to select a suitable μ value. Considering that the present invention only needs to determine the optimal value of a hyperparameter, it is more appropriate to use a grid search method. First, the candidate range of the hyperparameter μ is determined to be [0.01, 1], and the parameter value is taken in a mixed interval, that is, 0.01, 0.02, ..., 0.1, 0.2, ..., 1 is taken as a candidate value. Then for each μ value, the model is trained using a cross-validated training set, and the performance of the model is evaluated on the validation set. According to the results of cross-validation, the μ value with the best performance on the validation set is selected.
[0115] S4. Visualization: Use the best global model to monitor and predict weather in various places. Through the visualization module, various meteorological data and their changes are displayed, and timely warnings are issued when extreme weather is predicted. Users can obtain relevant information in real time on the device through the visualization module, so as to reasonably arrange travel time and avoid losses.
[0116] The description and application of the present invention here are illustrative, and it is not intended to limit the scope of the present invention to the above-mentioned embodiments. The effects or advantages involved in the specification may not be reflected in the actual experimental examples due to the uncertainty of specific condition parameters or other factors, and the effects or advantages are not used to limit the scope of the invention. The deformation and change of the embodiments disclosed here are possible, and the replacement of the embodiments and the various equivalent parts are well known to those of ordinary skill in the art. It should be clear to those skilled in the art that the present invention can be implemented in other forms, structures, arrangements, proportions, and with other components, materials and parts without departing from the spirit or essential features of the present invention. Other deformations and changes can be made to the embodiments disclosed here without departing from the scope and spirit of the present invention.
Claims
1. A meteorological monitoring method based on GRU neural network and differential privacy federated learning, characterized in that: include: S1. Preprocessing: The client collects local meteorological data and preprocesses it, and generates a meteorological time series data sequence based on the preprocessed data; S2, initialization: Each client obtains the initialization parameters of the global model from the central server, and each device selects the appropriate model structure according to its own heterogeneity; S3, local training: according to the generated meteorological time series data sequence, the local meteorological monitoring model based on the GRU neural network is trained; S4, local model update: After the local training is completed, the client updates the parameters of the local model through the LPDP-FedProx federated learning algorithm, and uploads the updated model parameters to the central server through the communication module; S5, global model aggregation: After receiving the model parameters from multiple clients, the central server aggregates the model according to the global model weighted average aggregation algorithm; S6, Update feedback: The central server feeds back the updated global model parameters to each client. After receiving the feedback, the client performs the next round of local training until the best monitoring model is obtained. S7. Visualization of meteorological monitoring: Use the global model to monitor and warn meteorological parameters, and visualize the parameters and warning information.
2. The meteorological monitoring method based on GRU neural network and differential privacy federated learning according to claim 1, characterized in that: The preprocessing of local meteorological data in S1 includes data collection, filtering, cleaning and enhancement, among which data filtering includes encrypting the data using homomorphic encryption technology, and data cleaning includes estimating missing values, resolving conflicts and standardizing data in local meteorological equipment.
3. The meteorological monitoring method based on GRU neural network and differential privacy federated learning according to claim 1, characterized in that: The local meteorological monitoring model training based on the GRU neural network in S3 includes: S3-1. Input the preprocessed meteorological data sequence into the GRU neural network. The input of the tth time step is recorded as x t , the gate signal r is calculated t and z t , the calculation formula is as follows: r t =σ(W r ·[h t-1 ,x t ]) z t =σ(W z ·[h t-1 ,x t ]) Among them, σ(·) represents the sigmoid function, which is used to compress the result between 0 and 1, W r Represents the reset gate weight matrix, W z represents the update gate weight matrix. These two weight matrices are used to linearly transform the input of the current time step and the hidden state of the previous time step. [] represents the connection of two vectors. h t-1 Represents the output of the previous time step; S3-2. Calculate candidate hidden layers The formula is as follows: Where tanh(·) represents the tanh activation function, which is used to scale the activation result between -1 and 1 to obtain the candidate hidden layer state. is the weight matrix, which is used to linearly transform the output of the reset gate and the input of the current time step. * represents matrix multiplication; S3-3, z t Determine the hidden layer h from the previous time step t-1 How much information is forgotten and how much hidden layer information of the current time step is added Calculate h t , the formula is as follows: Among them, h t This is the final output of the GRU neural network.
4. The meteorological monitoring method based on GRU neural network and differential privacy federated learning according to claim 1, characterized in that: Model aggregation in S5 specifically includes: S5-1. In the first round of training, the central server selects a part of clients {C1, C2…C k } as a participant and initialize the global model Then the global model Sent to each client through the base station as the client's local GRU model The initialization model, and then each client C k The LPDP-FedProx algorithm is used to guide the parameter update of the local model and utilize the private dataset D k Train the local meteorological monitoring model to generate an updated local model. The update formula is as follows: Among them, α represents the learning rate, represents the calculation of gradient, represents the loss function of each client k; S5-2. The central server calculates the aggregate value of the updated client model parameters to complete model aggregation. The model aggregation formula is as follows: Among them, N k represents the data volume (data set) of the kth client, and N represents the total volume of the data sets of k clients; S5-3. The central server updates the next round of global model based on the aggregation results: S5-4. Perform performance evaluation on the updated global model, iteratively update the model based on the evaluation results, and continuously optimize the global model.
5. The meteorological monitoring method based on GRU neural network and differential privacy federated learning according to claim 1, characterized in that: The specific steps of updating the parameters of the local model through the LPDP-FedProx federated learning algorithm in S4 include: S4-1. Define a sampling threshold to divide the original data set into an unsampled part and a sampled part; Users in the unsampled part will waste their privacy budget because their data is not used, resulting in sampling errors: If the privacy budget of the user in the sampled part is higher than the threshold, the user's data will be protected by noise higher than the privacy requirement, resulting in noise error: in, is the user's privacy budget, is the privacy budget of the i-th user, τ is the sampling threshold; S4-2. The minimum value of the loss function is used to determine the sampling threshold, and the weights of the sampling error and the noise error are allowed to be adaptively modified. The loss function is defined as: For a given Range When the threshold value τ minimizes the waste function and When , this value is the optimal sampling threshold; S4-3. Use the optimal sampling threshold calculated in each round to sample the client data, and iterate multiple times until the remaining value of the privacy budget is less than the given value. Through this sampling method, the original data set is subsampled to minimize the error caused by random sampling and noise to the algorithm; S4-4. Use the secondary sampling data to train the local GRU model and update the local model parameters Among them, h k is the local objective function, F k (θ) is the local loss function on the kth device and μ is the regularization parameter.
6. A meteorological monitoring system based on GRU neural network and differential privacy federated learning, characterized in that: include: Local meteorological equipment, with built-in GRU neural network, is used to collect and preprocess meteorological data locally, train local meteorological monitoring models, and update model parameters based on the LPDP-FedProx federated learning algorithm; The central server aggregates local meteorological monitoring model parameters and updates the global model based on the LPDP-FedProx federated learning algorithm, and then sends the updated model parameters to each client; Communication module for transmitting model parameters between local meteorological equipment and central server.
Citation Information
Patent Citations
Online course recommendation method and system taking federated learning as core
CN113626687A
Non-intrusive electrical load monitoring method based on FedProx federated learning and GRU
CN115952907A
Satellite Internet traffic prediction method, system and device based on federated learning framework, and medium
CN117135090A
Wind power plant weather forecast algorithm based on federated learning
CN117761802A
Optical mineral identification system and method based on federal learning
CN118072096A
Cited By
Community discovery method and device for multi-modal spatio-temporal correlation privacy protection
CN119760451A
Cross-travel platform supply and demand prediction method based on graph federal learning
CN119863269A
Remote data fusion system based on real world data platform
CN120337164A
Fishery intelligent monitoring analysis and dynamic optimization method based on federated learning
CN120409625A
Verifiable privacy protection federated learning method based on sensitive samples
CN121094058A
