A domain adaptation based asynchronous federated learning intelligent inspection method and system
By employing a domain-adaptive asynchronous aggregated federated learning method, this study addresses the issues of poor model generalization and privacy security in the detection of oil leaks in power equipment. It achieves efficient and accurate intelligent inspection, applicable to fields such as power systems, industrial manufacturing, and urban management.
Patent Information
- Application Number
- CN202411029040.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Traditional centralized power grid intelligent inspection methods suffer from poor model generalization ability and data privacy and security risks when dealing with oil leakage detection of power equipment, and are difficult to update in real time to adapt to dynamic environmental changes.
An asynchronous aggregate federated learning method based on domain adaptation is adopted. The global model is received by the edge server and initialized and trained locally. The model for detecting oil leakage in power equipment is updated by combining asynchronous parameters and uploaded to the cloud server within a specified time window for global model iteration. Global momentum and learning rate are used to adjust the model to adapt to the characteristics of different domains.
It achieves efficient and accurate detection of oil leaks in power equipment, protects data privacy, and improves the adaptability and stability of the model, making it suitable for intelligent inspection scenarios such as power systems, industrial manufacturing, and urban management.
Smart Images

Figure CN119046564B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent power grid inspection technology, and in particular to an intelligent inspection method and system based on domain-adaptive asynchronous aggregation federated learning. Background Technology
[0002] In the context of intelligent power grid inspection, oil leakage detection in power equipment is a significant yet challenging task. Oil leakage problems often occur in various complex power equipment, such as transformers and circuit breakers, which are widely distributed and operate under diverse environmental conditions.
[0003] Traditional centralized detection methods face the following challenges: uneven and heterogeneous data distribution across devices leads to poor model generalization ability; furthermore, directly uploading large amounts of data containing sensitive information to a central server for centralized processing poses significant privacy and security risks. In addition, the dynamic changes in the operating environment of power equipment require detection models to be updated in real time, maintaining high accuracy and high efficiency. Summary of the Invention
[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0005] In view of the aforementioned existing problems, the present invention is proposed.
[0006] Therefore, this invention provides a domain-adaptive asynchronous aggregation federated learning intelligent inspection method and system that can solve the problems mentioned in the background art.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] In a first aspect, the present invention provides an asynchronous aggregation federated learning-based intelligent inspection method based on domain adaptation, comprising:
[0009] After receiving the global model transmitted from the cloud server, the edge server initializes the local edge model based on the global model;
[0010] The edge server sends the initialized local edge model to the client, and the client trains a power equipment oil leakage detection model based on the initialized local edge model.
[0011] The edge server receives the trained power equipment oil leakage detection model and updates the trained power equipment oil leakage detection model in combination with asynchronous parameters;
[0012] The edge server transmits the updated power equipment oil leakage detection model to the cloud server after a specified time window;
[0013] The edge server obtains the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and performs iterative operations.
[0014] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the edge server, after receiving the global model transmitted from the cloud server, initializes the local edge model according to the global model, including:
[0015] When edge server m receives the current global model x from cloud server t At that time, the edge model is initialized to Represented as:
[0016]
[0017] Where β represents the global momentum decay factor, K m η represents the number of updates to the edge model. c Δt represents the learning rate of the marginal model, and Δt represents the global momentum.
[0018] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the method further includes: after the edge server receives the global model transmitted from the cloud server, initializing the local edge model according to the global model.
[0019] When edge servers participate in each round of global model aggregation, the global momentum Δt is calculated based on the historical cloud model and is not transmitted from the cloud server, i.e.:
[0020] Δ t =x t -x t-1
[0021] Where, x t Current global model, x t-1 This represents the global model from the previous round.
[0022] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the method includes: the edge server transmitting the updated power equipment oil leakage detection model to the cloud server after a specified time window.
[0023] After the specified time window, all edge servers upload the standardized model changes to the cloud server. Represented as:
[0024]
[0025] in, Indicates the Kth m The edge model after initialization.
[0026] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the edge server receives the trained power equipment oil leakage detection model and updates the trained power equipment oil leakage detection model in conjunction with asynchronous parameters, including:
[0027] The update method is as follows:
[0028]
[0029] Where τ is the model's timeliness, α τ It is the client's contribution to the edge model, α. τ The smaller the value, the more times federated learning training is performed, α τ The larger the value, the greater the fluctuation in accuracy. This represents the edge model after the (k+1)th initialization. This represents the edge model after the k-th initialization. This represents the original model of client i.
[0030] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the method further includes: the edge server receiving the trained power equipment oil leakage detection model and updating the trained power equipment oil leakage detection model in conjunction with asynchronous parameters.
[0031] By adjusting α τ The value of adaptively controls the convergence speed and accuracy fluctuations during the model learning process;
[0032] α τ The value is determined by the following function:
[0033] α τ =α*v τ
[0034] τ=kk i
[0035] Where α∈(0,1) are the weights of the baseline model, v∈(0,1) are the penalty coefficients of the outdated model, τ is the outdatedness of the client model, and k represents the clock of the current edge model. i This represents the clock of client model i.
[0036] As a preferred embodiment of the domain-adaptive asynchronous aggregation federated learning intelligent inspection method described in this invention, the edge server obtains the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and performs iterative operations including:
[0037] Cloud server computing is driving a new round of global model development:
[0038] x t+1 =x t -η c Δ t+1
[0039]
[0040] Where, Δ t+1 This is global pseudo-gradient information, where M represents the total number of edge servers participating in the iteration. M is equal to N, and N is a normalization constant adjusted according to the importance of the changes uploaded by each edge server. η n This represents a normalization factor used to balance the contributions of edge servers.
[0041] Secondly, the present invention provides a domain-adaptive asynchronous aggregation federated learning intelligent inspection system, comprising:
[0042] The first transmission module is used to control the edge server to receive the global model transmitted from the cloud server and initialize the local edge model according to the global model.
[0043] The second transmission module is used to control the edge server to send the initialized local edge model to the client, and the client trains the power equipment oil leakage detection model based on the initialized local edge model.
[0044] The third transmission module is used to control the edge server to receive the power equipment oil leakage detection model after training, and to update the power equipment oil leakage detection model after training by combining asynchronous parameters.
[0045] The fourth transmission module is used to control the edge server to transmit the updated power equipment oil leakage detection model to the cloud server after a specified time window;
[0046] The fifth transmission module is used to control the edge server to obtain the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and to perform iterative operations.
[0047] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0048] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0049] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention proposes a domain-adaptive asynchronous aggregation federated learning-based intelligent inspection method and system. By utilizing domain adaptation technology and asynchronous aggregation federated learning algorithms, it achieves intelligent inspection and updating of power equipment oil leakage detection models. The unique features of the domain-adaptive asynchronous aggregation federated learning-based intelligent inspection method and system proposed in this invention lie in its high efficiency, accuracy, and scalability, making it a leader in the field of intelligent inspection. This method can automatically adjust the learning strategy according to different domain characteristics, thereby improving inspection accuracy while ensuring learning effectiveness. Furthermore, its asynchronous aggregation characteristic allows each inspection node to work independently yet effectively collaborate, greatly improving the system's stability and reliability. This method and system have a wide range of applications, applicable to various intelligent inspection scenarios such as power systems, industrial manufacturing, and urban management. Its emergence not only brings new development opportunities to the field of intelligent inspection but also provides strong technical support for the development of related fields. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0051] Figure 1 A flowchart illustrating a domain-adaptive asynchronous aggregation federated learning intelligent inspection method and system provided in one embodiment of the present invention;
[0052] Figure 2 This is an internal structure diagram of a computer device for a domain-adaptive asynchronous aggregation federated learning intelligent inspection method and system provided in one embodiment of the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0054] Example 1
[0055] Reference Figures 1-2 This is the first embodiment of the present invention. This embodiment provides a domain-adaptive asynchronous aggregation federated learning intelligent inspection method and system, including a domain-adaptive asynchronous aggregation federated learning intelligent inspection method and a domain-adaptive asynchronous aggregation federated learning intelligent inspection system. The domain-adaptive asynchronous aggregation federated learning intelligent inspection method includes:
[0056] Before detailing the embodiments of this application, some related concepts will be explained for clarity.
[0057] Edge servers: Edge servers are servers that operate at the "edge" of the network, closer to data sources and users, such as IoT devices, mobile devices, or sensor networks. In this context of federated learning, edge servers are responsible for processing data from clients, performing some steps of model training, and communicating with the central cloud server. Edge servers can reduce data transmission latency, improve data privacy and security, and also reduce the load on cloud servers.
[0058] Global Model: In a federated learning framework, the global model is a central model maintained by the cloud server. It integrates information provided by all edge servers and clients participating in the training. The goal of the global model is to learn a model with good generalization performance by aggregating updates from all edge models. This model can adapt to data distributions in different edge environments.
[0059] Local edge model training for power equipment oil leak detection: This refers to training a model for a specific task (such as detecting oil leaks in power equipment) on an edge server using a local dataset. The edge server first initializes a local model based on a global model received from the cloud server. Then, the edge server trains the model using its local dataset to adapt it to the characteristics of domain-specific data. After training, the edge server updates the model and feeds it back to the cloud server to further optimize the global model.
[0060] Designated Time Window: In federated learning, a designated time window refers to the time period during which model updates are synchronized between edge servers and cloud servers. Within this time window, the edge server can independently train the model and perform multiple iterations until the time window ends, at which point it sends its model updates back to the cloud server. This mechanism allows edge servers to train without a real-time connection to the cloud, thus achieving asynchronous aggregation and improving system flexibility and efficiency.
[0061] In related technologies, intelligent inspection often relies on a single, centralized model for training and prediction. This approach often faces numerous challenges when dealing with large-scale, distributed scenarios, such as data transmission latency and difficulties in synchronizing model updates. Furthermore, because oil leakage detection in power equipment involves various complex factors, such as equipment model, operating environment, and operating time, a single model often struggles to adapt to all situations, resulting in poor inspection performance.
[0062] This application provides a solution to the problems mentioned above. The following will describe in detail how to implement the domain-adaptive asynchronous aggregation federated learning intelligent inspection method with multiple embodiments.
[0063] Figure 1 A flowchart illustrating a domain-adaptive asynchronous aggregation federated learning-based intelligent inspection method and system is presented, including:
[0064] S101, After receiving the global model transmitted from the cloud server, the edge server initializes the local edge model based on the global model;
[0065] Specifically, after receiving the global model from the cloud server, the edge server initializes the local edge model based on the global model, including:
[0066] When edge server m receives the current global model x from cloud server t At that time, the edge model is initialized to Represented as:
[0067]
[0068] Where β represents the global momentum decay factor, K m η represents the number of updates to the edge model. c Δt represents the learning rate of the marginal model, and Δt represents the global momentum.
[0069] It should be noted that initializing the local edge model through a global model ensures that all edge servers have a consistent model foundation in the initial state, which facilitates subsequent model updates and aggregation. Furthermore, by introducing parameters such as the global momentum decay factor, the number of edge model updates, and the learning rate, the model initialization process can be further adjusted and optimized to adapt to different inspection scenarios and requirements.
[0070] In this embodiment of the application, after the edge server receives the global model transmitted from the cloud server, the initialization of the local edge model based on the global model further includes:
[0071] When edge servers participate in each round of global model aggregation, the global momentum Δt is calculated based on the historical cloud model and is not transmitted from the cloud server, i.e.:
[0072] Δ t =x t -x t-1
[0073] Where, x t Current global model, x t-1 This represents the global model from the previous round.
[0074] It should be noted that global momentum reduces the amount of data transmission between cloud servers and edge servers, improving system efficiency. Simultaneously, by calculating global momentum locally, edge servers can participate more autonomously in the model aggregation process, enhancing the system's flexibility and scalability.
[0075] S102, the edge server sends the initialized local edge model to the client, and the client trains the power equipment oil leakage detection model based on the initialized local edge model;
[0076] In this embodiment, the edge server receives a global model from the cloud server. This model is the result of contributions from all edge servers participating in the training. The edge server initializes its local edge model based on the global model. This may involve copying model parameters, initializing weights, and setting other training-related parameters, such as learning rate and momentum. The edge server then distributes the initialized local edge model to each client through a secure communication channel. The client can be an Internet of Things (IoT) device installed near power equipment, a mobile device, or any terminal capable of collecting and processing data.
[0077] In this embodiment, during client-side model training, the client collects relevant data from the power equipment, such as temperature, pressure, and vibration indicators. This data is crucial for detecting oil leaks in the power equipment. After data collection, the client preprocesses the data, including cleaning, normalization, and format conversion, to adapt it to the model's input requirements. The client loads the local edge model received from the edge server and performs necessary configurations based on the characteristics of the local dataset, such as adjusting batch size and selecting a loss function. The client trains the model using the local dataset. This process typically includes forward propagation, loss calculation, backpropagation, and parameter updates. Since the data is only stored locally on the client, this approach helps protect data privacy. During training, the client may periodically evaluate the model's performance on local data. If the model performs poorly, it may need to adjust hyperparameters or perform data augmentation. Once local training is complete, the client packages the model updates (usually weight differences) and prepares to upload them to the edge server.
[0078] In this embodiment of the application, the specific steps for the client to perform model training are as follows:
[0079] Data preprocessing, in addition to basic missing value handling, employs more sophisticated statistical methods to identify outliers, such as Z-score or IQR methods. Z-score outlier identification is represented as follows:
[0080]
[0081] Among them, z i Let z be the Z-score of the i-th sample, μ be the sample mean, and σ be the sample standard deviation. i >k or z i If x <- k (k is usually 3), then x is considered to be... i It is an outlier.
[0082] Furthermore, the data is normalized using Min-Maximization and combined with regularization terms to prevent overfitting.
[0083] Normalization can be expressed as:
[0084]
[0085] Here, r is the random perturbation term, and λ is the regularization strength, which helps to increase the diversity of the data.
[0086] Furthermore, format conversion uses an embedding layer to process categorical features in order to capture underlying semantic relationships.
[0087] Furthermore, the traditional Adam algorithm may cause the norm of the weights to gradually increase over time, even when the learning rate is close to zero. This application addresses this problem by improving the Adam algorithm to separate weight decay and gradient update. The update rule of the improved Adam algorithm in this application is as follows:
[0088] m t =β1m t-1 +(1-β1)g t
[0089]
[0090]
[0091] Among them, m t and v t These are the first and second moment estimates of the gradient, β1 and β2 are the decay rates, α is the learning rate, ∈ is a very small value to prevent division by zero, and λ is the weight decay coefficient, which is independent of gradient updates and acts directly on the weights, thus avoiding the problem of weight inflation over time.
[0092] Furthermore, forward propagation: using a deep neural network for forward propagation, the output of each layer can be represented as:
[0093] h (l) =σ(W (l) h (l-1) +b (l) )
[0094] Among them, h (l) It is the output of the l-th layer, W (l) and b (l) These are the weight matrix and bias vector of the layer, respectively, and σ is the non-linear activation function.
[0095] Furthermore, the improved loss function in this application slightly smooths the label distribution during training to reduce the model's overconfidence in the training data, thereby improving generalization ability. The improved loss function is defined as follows:
[0096]
[0097] Where C is the total number of categories, and ∈ is a smoothing factor, usually a small positive value (e.g., 0.1). This way, even if the label is 1, its target probability will be slightly reduced to 1-∈, while the target probabilities of other categories will increase accordingly. i p is the weight of the i-th sample. i It is the model's predicted probability for the i-th sample.
[0098] Furthermore, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters.
[0099] Furthermore, the improved Adam algorithm is used for parameter updates, as described above.
[0100] Furthermore, the client only uploads the differences in parameters, rather than the complete parameter set, which can further reduce the amount of data transmitted through compression techniques.
[0101] Δθ=θ new -θ old
[0102] Quantization and differential coding can also be used, which can be represented as:
[0103] Δθ q =Q(Δθ)
[0104] Q is the quantization function, which converts a floating-point number into a fewer-bit integer to reduce transmission overhead.
[0105] In an alternative embodiment, the client can dynamically generate additional data during training, such as rotations, flips, or added noise, to enhance the model's generalization ability. This can be achieved by randomly transforming the matrix T.
[0106] x′=T(x)
[0107] It should be noted that local training allows clients to adapt more quickly to the characteristics of local datasets because model training is based on real-time, local data. Data privacy is protected because all data remains local to the client and is not directly transmitted to external servers. This aligns with current stringent requirements for privacy and data security, especially when dealing with sensitive data such as medical records and personal financial information. This contributes to improved model accuracy and real-time performance.
[0108] Secondly, by improving the Adam algorithm and separating weight decay and gradient update, this application effectively solves the problem of weight inflation over time. This helps maintain the stability and reliability of the model and prevents performance degradation or instability during training.
[0109] Furthermore, this application introduces an improved loss function that slightly smooths the label distribution during training to reduce the model's overconfidence in the training data. This helps improve the model's generalization ability, enabling it to perform well on unseen data.
[0110] Finally, the client only uploads the differences in parameters instead of the complete parameter set, which significantly reduces the amount of data transmitted. By combining compression techniques (such as quantization and differential coding), transmission overhead can be further reduced, improving data transmission efficiency.
[0111] In summary, the method described in this application not only protects data privacy but also improves the training efficiency and performance of the model through a series of optimization measures. This makes the method promising for applications in fields such as distributed learning and edge computing.
[0112] S103, the edge server receives the trained power equipment oil leakage detection model and updates the trained power equipment oil leakage detection model in combination with asynchronous parameters;
[0113] The edge server receives the trained power equipment oil leakage detection model and updates it using asynchronous parameters, including:
[0114] Specifically, the update method is as follows:
[0115]
[0116] Where τ is the model's time-out degree (i.e., the asynchronous parameter), α τ It is the client's contribution to the edge model, α. τ The smaller the value, the more times federated learning training is performed, α τ The larger the value, the greater the fluctuation in accuracy. This represents the edge model after the (k+1)th initialization. This represents the edge model after the k-th initialization. This represents the original model of client i.
[0117] Furthermore, the process of the edge server receiving the trained oil leakage detection model for power equipment and updating the model using asynchronous parameters also includes:
[0118] By adjusting α τ The value of adaptively controls the convergence speed and accuracy fluctuations during the model learning process;
[0119] α τ The value is determined by the following function:
[0120] α τ =α*v τ
[0121] τ=kk i
[0122] Where α∈(0,1) are the weights of the baseline model, v∈(0,1) are the penalty coefficients of the outdated model, τ is the outdatedness of the client model, and k represents the clock of the current edge model. i This represents the clock of client model i.
[0123] S104, the edge server transmits the updated power equipment oil leakage detection model to the cloud server after a specified time window;
[0124] The edge server will transmit the updated power equipment oil leakage detection model to the cloud server after a specified time window, including:
[0125] After the specified time window, all edge servers upload the standardized model changes to the cloud server. Represented as:
[0126]
[0127] in, Indicates the Kth m The edge model after initialization.
[0128] It should be noted that by periodically transmitting the updated power equipment oil leakage detection model from the edge server to the cloud server, global updates and sharing of the model are achieved. This approach offers several significant advantages:
[0129] First, cloud servers, as a centralized storage and processing platform, possess powerful computing and data storage capabilities. By transmitting updated models to cloud servers, it can be ensured that all edge servers have access to the latest, optimized models, thereby further improving the accuracy and efficiency of oil leakage detection in power equipment.
[0130] Secondly, through global updates and sharing on the cloud server, models can be quickly synchronized and deployed across different edge servers. When a new oil leakage detection model for power equipment is developed or optimized, the updated model only needs to be transmitted to the cloud server, and then the cloud server distributes the updated model to each edge server, thus enabling rapid deployment and application of the model.
[0131] Furthermore, continuous learning and optimization of the model can be achieved through global updates and sharing on the cloud server. In the distributed learning framework, each edge server trains the model based on local data and uploads the training results to the cloud server. The cloud server can then globally optimize and update the model based on these training results, and redistribute the updated model to each edge server, forming a closed loop of continuous learning and optimization.
[0132] Finally, through global updates and sharing on cloud servers, the model can be applied across regions and devices. In power systems, power equipment may be distributed across different geographical locations and on different devices. By transmitting the updated model to the cloud server, it can be ensured that power equipment in all geographical locations and on all devices can use the latest, optimized model, thereby enabling cross-regional and cross-device oil leakage detection of power equipment.
[0133] S105, the edge server obtains the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and performs iterative operations.
[0134] The edge server obtains the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and performs iterative operations including:
[0135] Cloud server computing is driving a new round of global model development:
[0136] x t+1 =x t -η c Δ t+1
[0137]
[0138] Where, Δ t+1 This is global pseudo-gradient information, where M represents the total number of edge servers participating in the iteration. M is equal to N, and N is a normalization constant adjusted according to the importance of the changes uploaded by each edge server. η n This represents a normalization factor used to balance the contributions of edge servers.
[0139] In an optional embodiment, the edge server can continuously monitor the client's upload frequency and training quality, and adjust the global model's update frequency and iteration strategy as needed.
[0140] To ensure the stability and performance of the distributed learning system, the edge server continuously monitors the upload frequency and training quality of each client. If it detects that a client's upload frequency is too low or its training quality is poor, the edge server will make timely adjustments, such as increasing the client's upload frequency, adjusting its training dataset, or optimizing its training strategy. Simultaneously, the edge server will also adjust the global model's update frequency and iteration strategy based on the global model's performance to ensure continuous optimization and improvement of the entire system.
[0141] In an optional embodiment, the edge server periodically collects upload times and training quality reports from each client. Statistical methods are used to analyze the data to identify abnormal patterns and performance bottlenecks. Based on the monitoring logic described above, corresponding adjustment strategies are executed. After adjustments are implemented, system performance continues to be monitored, and the effectiveness of the adjustments is evaluated. Based on the evaluation results, the monitoring logic and adjustment strategies are continuously fine-tuned to achieve optimal system performance.
[0142] In one optional implementation, a reasonable upload frequency threshold is set, such as uploading an update every 30 minutes. If a client fails to upload an update for an extended period beyond the threshold, the edge server should mark the client as abnormal. If abnormal, a warning message is sent to remind the client to check its network connection or hardware status. The client's priority is increased, and it is attempted to request updates more frequently. If the problem persists, consider temporarily excluding the client from the current iteration to avoid slowing down the overall process.
[0143] Use metrics such as accuracy, loss function value, and AUC to evaluate training quality. Set a minimum training quality standard; clients falling below this standard are considered to have poor training quality. If a client is considered to have poor quality, provide more detailed training guidelines or parameter suggestions. Adjust the client's training dataset, adding more representative or challenging samples. Consider reinitializing the client's local model or providing a better version of the model as a starting point.
[0144] Use performance metrics on the validation set to evaluate the overall model performance. Track the trends in these metrics to determine if the model has stabilized or still has room for improvement. Set a performance target, such as achieving 95% accuracy or a loss function value below a certain threshold. If iteration is required, there are two iteration methods to choose from: rapid iteration: if model performance improves rapidly, the update frequency can be increased appropriately to accelerate the optimization process; stable iteration: if model performance tends to stabilize, the update frequency can be reduced to avoid unnecessary computational and communication overhead.
[0145] If existing iterative strategies fail to meet performance targets, consider introducing new optimization algorithms, such as different gradient descent methods or regularization techniques. Dynamically adjust the global model's learning rate based on the model's convergence speed to accelerate early learning and refine later adjustments. If the model performs poorly in certain categories, consider increasing the weight of data in those categories or introducing additional data sources.
[0146] It should be noted that by introducing iterative operations of the global model, the accuracy and generalization ability of the power equipment oil leakage detection model are further improved. The global model is calculated based on the model changes uploaded by all edge servers, meaning it integrates the local learning results of each edge server, thus more comprehensively reflecting the actual operating conditions and oil leakage risks of power equipment. Through iterative operations, the global model can be continuously updated and optimized based on new data and experience, further improving the accuracy and efficiency of power equipment oil leakage detection.
[0147] Furthermore, iterative operations on the global model facilitate rapid model deployment and updates. Once a new oil leakage detection model for power equipment is calculated, the cloud server can quickly distribute it to various edge servers, which can then directly load and use this global model to detect oil leakage in power equipment. This approach not only reduces model transmission overhead but also improves model deployment efficiency, enabling oil leakage detection for power equipment to respond more quickly and accurately to changes in actual operating conditions.
[0148] Finally, iterative operations on the global model also facilitate continuous learning and optimization. Within the distributed learning framework, each edge server trains the model based on local data and uploads the training results to the cloud server. Through iterative operations on the global model, these training results can be effectively integrated to form a more accurate and comprehensive oil leakage detection model for power equipment. Simultaneously, with the continuous addition of new data and iterative updates to the model, its accuracy and generalization ability can be continuously improved, enabling continuous learning and optimization.
[0149] In summary, this invention proposes a domain-adaptive asynchronous aggregation federated learning-based intelligent inspection method and system. By utilizing domain adaptation technology and asynchronous aggregation federated learning algorithms, it achieves intelligent inspection and updating of power equipment oil leakage detection models. The unique features of this domain-adaptive asynchronous aggregation federated learning-based intelligent inspection method and system lie in its high efficiency, accuracy, and scalability, making it a leader in the field of intelligent inspection. This method can automatically adjust its learning strategy according to different domain characteristics, thereby improving inspection accuracy while ensuring learning effectiveness. Furthermore, its asynchronous aggregation characteristic allows each inspection node to work independently yet effectively collaborate, greatly improving system stability and reliability. This method and system have a wide range of applications, applicable to various intelligent inspection scenarios such as power systems, industrial manufacturing, and urban management. Its emergence not only brings new development opportunities to the field of intelligent inspection but also provides strong technical support for the development of related fields.
[0150] This embodiment also provides a domain-adaptive asynchronous aggregation federated learning intelligent inspection system, including:
[0151] The first transmission module is used to control the edge server to receive the global model transmitted from the cloud server and initialize the local edge model according to the global model.
[0152] The second transmission module is used to control the edge server to send the initialized local edge model to the client, and the client trains the power equipment oil leakage detection model based on the initialized local edge model.
[0153] The third transmission module is used to control the edge server to receive the power equipment oil leakage detection model after training, and to update the power equipment oil leakage detection model after training by combining asynchronous parameters.
[0154] The fourth transmission module is used to control the edge server to transmit the updated power equipment oil leakage detection model to the cloud server after a specified time window;
[0155] The fifth transmission module is used to control the edge server to obtain the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and to perform iterative operations.
[0156] The above-mentioned unit modules can be embedded in the processor of the computer device in hardware form or independent of it, or they can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0157] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows. Figure 2 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a domain-adaptive asynchronous aggregated federated learning intelligent inspection method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0158] This embodiment also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:
[0159] After receiving the global model transmitted from the cloud server, the edge server initializes the local edge model based on the global model;
[0160] The edge server sends the initialized local edge model to the client, and the client trains a power equipment oil leakage detection model based on the initialized local edge model.
[0161] The edge server receives the trained power equipment oil leakage detection model and updates the trained power equipment oil leakage detection model in combination with asynchronous parameters;
[0162] The edge server transmits the updated power equipment oil leakage detection model to the cloud server after a specified time window;
[0163] The edge server obtains the new global model calculated by the cloud server based on the updated power equipment oil leakage detection model, and performs iterative operations.
[0164] Example 2
[0165] Reference Figures 1-2 As one embodiment of the present invention, an asynchronous aggregation federated learning intelligent inspection method and system based on domain adaptation is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0166] In one specific embodiment, a smart grid maintenance system is established for a power company. In this system, edge servers are located at various substations and are responsible for collecting and analyzing the status data of power equipment, paying particular attention to oil leaks, which is crucial for preventing power outages.
[0167] The system architecture is as follows:
[0168] Cloud servers: Located in data centers, responsible for the overall management of the model, including model initialization, updates, and iterations. Edge servers: Deployed in various substations, responsible for local model training and updates. Clients: These are IoT sensors installed on power equipment; they collect data and participate in the model training process.
[0169] Specific steps and procedures:
[0170] The cloud server prepares an initial global model and distributes it to all edge servers.
[0171] The edge servers initialize their respective local edge models based on the global model;
[0172] Client-side sensors collect data related to oil leaks from electrical equipment and send it to the nearest edge server.
[0173] Edge servers use local edge models to train the collected data to optimize model parameters and adapt them to the specific environmental conditions of the substation where they are located.
[0174] After the edge server completes local training, it updates the model based on asynchronous parameters. This involves evaluating the model's obsolescence and the client's contribution to the model.
[0175] The updated model was standardized and stored on an edge server.
[0176] After the specified time window ends, the edge server sends the updated model changes to the cloud server.
[0177] The cloud server uses the changes uploaded by all edge servers to calculate a new round of global model. A weighted average is used here, where the weights reflect the contribution of each edge server and the importance of the model update.
[0178] The new global model calculated by the cloud server is distributed back to all edge servers to begin the next iteration process.
[0179] This process is repeated until the predetermined number of iterations is reached or the model converges to a satisfactory performance level.
[0180] The results are as follows:
[0181] Table 1: Training progress and model updates of edge servers
[0182]
[0183] Table 2: Performance Comparison of Edge Server Model Before and After Update
[0184] Edge Server ID Initial model accuracy Updated model accuracy Performance improvement percentage E1 85.0% 90.2% 5.2% E2 82.5% 88.7% 6.2% ... ... ... ...
[0185] Table 3: Relationship between asynchronous parameter τ and model lag
[0186] Edge Server ID τ (Model timeout) Model update frequency Precision fluctuation E1 0.05 Once per hour Small E2 0.10 Once every two hours middle ... ... ... ...
[0187] Table 4: Global Model Iteration Record of Cloud Server
[0188] Number of iterations Global model accuracy Number of participating edge servers Convergence state 1 80.0% 10 Unconverged 2 83.5% 10 Unconverged ... ... ... ... 10 92.3% 10 Convergence
[0189] Table 5: Overview of changes in the uploaded model from the edge server
[0190] Edge Server ID Last upload time Upload time Model change magnitude Upload delay E1 2024-03-22 09:35 2024-03-22 10:35 1.2MB 0ms E2 2024-03-22 09:45 2024-03-22 10:45 1.5MB 50ms ... ... ... ... ...
[0191] Table 6: Relationship between model learning rate and accuracy fluctuation
[0192]
[0193]
[0194] Table 7: Dynamic Model Updates and Marginal Model Learning Rate Adjustments
[0195] Edge Server ID Initial learning rate Updated learning rate Update criteria (τ, model obsolescence, etc.) E1 0.01 0.009 τ = 0.05, low model timeout. E2 0.01 0.007 τ = 0.10, model outdatedness is medium. ... ... ... ...
[0196] Table 8: Case Studies of Model Training and Oil Leakage Detection in Power Equipment
[0197] Test Case ID Edge Server ID Test results Actual results Correct / Incorrect C1 E1 Oil leakage Oil leakage correct C2 E2 No leakage No leakage correct ... ... ... ... ...
[0198] As iterations progressed, the global model gradually adapted to the oil leakage detection needs of power equipment in different substations, improving the accuracy and efficiency of intelligent inspection. Data privacy was protected because sensitive power equipment data never left the network boundary where the substation was located.
[0199] This example demonstrates how federated learning can be used in practical applications to optimize the maintenance of power equipment, especially when dealing with large-scale and distributed power grid infrastructure.
[0200] In summary, the domain-adaptive asynchronous aggregation federated learning intelligent inspection method and system proposed in this invention are unique in their high efficiency, accuracy, and scalability, making them leaders in the field of intelligent inspection. This method can automatically adjust the learning strategy according to different domain characteristics, thereby improving inspection accuracy while ensuring learning effectiveness. Furthermore, its asynchronous aggregation characteristic allows each inspection node to work independently yet effectively collaborate, greatly improving the system's stability and reliability. This method and system have a wide range of applications, applicable to various intelligent inspection scenarios such as power systems, industrial manufacturing, and urban management. Its emergence not only brings new development opportunities to the field of intelligent inspection but also provides strong technical support for the development of related fields.
[0201] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0202] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0203] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0204] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0205] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0206] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0207] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A domain adaptation based asynchronous federated learning intelligent inspection method, characterized in that, Comprise: After the edge server receives the global model transmitted from the cloud server, the local edge model is initialized according to the global model; The edge server distributes the initialized local edge model to the client, and the client trains the power equipment oil leakage detection model according to the initialized local edge model; The edge server receives the trained power equipment oil leakage detection model, and updates the trained power equipment oil leakage detection model combined with the asynchronous parameters; The edge server transmits the updated power equipment oil leakage detection model to the cloud server after a specified time window, comprising: After a specified time window, all edge servers upload the standardized model change to the cloud server is represented as: wherein, represents the Kth m initialized edge model; x t represents the current global model; The edge server obtains a new round of global model calculated by the cloud server according to the updated power equipment oil leakage detection model, and performs iteration operation, comprising: The cloud server calculates a new round of global model: x t+1 = x t - η c Δ t+1 where Δ t+1 is the global pseudo-gradient information, M represents the total number of edge servers participating in iteration, M is equal to N, N is a normalization constant, which is adjusted according to the importance of the change uploaded by each edge server, η n represents a normalization factor for balancing the contribution of edge servers; η c represents the learning rate of the edge model.
2. The domain adaptation based asynchronous federated learning intelligent patrol method of claim 1, wherein, After the edge server receives the global model transmitted from the cloud server, the local edge model is initialized according to the global model, comprising: When the edge server m receives the current global model x t from the cloud server, the edge model is initialized to is represented as: where β denotes a global momentum decay factor, K m denotes the number of updates of the edge model, η c denotes the learning rate of the edge model, Δ t denotes the global momentum.
3. The domain adaptation based asynchronous federated learning intelligent patrol method of claim 2, wherein, After the edge server receives the global model transmitted from the cloud server, the local edge model is initialized according to the global model, further comprising: When the edge server participates in the global model aggregation of each round, the global momentum Δ t According to the historical cloud model, it is calculated without transmission from the cloud server, that is: Δ t = x t - x t-1 where x t Current global model, x t-1 Represents the global model of the previous round.
4. The domain adaptation based asynchronous federated learning intelligent patrol method of claim 3, wherein, The edge server receives the trained power equipment oil leakage detection model, and updates the trained power equipment oil leakage detection model combined with the asynchronous parameters, comprising: The update method is: where τ is the staleness of the model, a τ is the contribution of the client to the edge model, a τ The smaller the value, the more the number of federated learning training, a τ The greater the value, the greater the fluctuation of accuracy, denotes the edge model after the k+1 initialization, denotes the edge model after the k initialization, denotes the original model of the client i.
5. The domain adaptation based asynchronous federated learning intelligent patrol method of claim 4, wherein, The edge server receives the trained power equipment oil leakage detection model, and updates the trained power equipment oil leakage detection model combined with the asynchronous parameters, further comprising: By adjusting the value of a τ Adaptively control the convergence speed and accuracy fluctuations in the model learning process; a τ The value of a is determined by the function: α τ =α*v τ τ = k - k i where a e (0, 1) is the benchmark model weight, v e (0, 1) is the penalty coefficient of the outdated model, τ is the degree of the outdated model, k represents the clock of the current edge model, k i represents the clock of the client i model.
6. A domain-adaptive asynchronous aggregated federated learning intelligent inspection system, applying the domain-adaptive asynchronous aggregated federated learning intelligent inspection method of any one of claims 1-5, characterized in that, Comprise: The first transmission module is used to control the edge server to receive the global model transmitted from the cloud server, and initialize the local edge model according to the global model; The second transmission module is used to control the edge server to distribute the initialized local edge model to the client, and the client trains the power equipment oil leakage detection model according to the initialized local edge model; The third transmission module is used to control the edge server to receive the trained power equipment oil leakage detection model, and update the trained power equipment oil leakage detection model combined with the asynchronous parameters; The fourth transmission module is used to control the edge server to transmit the updated power equipment oil leakage detection model to the cloud server after a specified time window; The fifth transmission module is used to control the edge server to obtain a new round of global model calculated by the cloud server according to the updated power equipment oil leakage detection model, and perform iteration operation. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The processor executes the computer program to realize the steps of the method in any one of claims 1-5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1-5.
Citation Information
Patent Citations
Road unmanned aerial vehicle inspection data processing method based on federal adaptive learning
CN115376031A
Vehicle networking abnormal flow detection method based on adaptive federated learning
CN117807496A