Lightweight federated learning-based distributed energy equipment working condition state intelligent identification method
By using a lightweight federated learning method to process and optimize the heterogeneous time-series data of distributed energy devices, the problems of limited resources and data privacy protection of edge devices are solved. This enables real-time and accurate identification and control of operating conditions on edge devices, thereby improving the security and stability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-15
AI Technical Summary
In distributed energy systems, existing high-precision deep learning perception models are difficult to deploy on resource-constrained edge devices, and traditional methods are difficult to adapt to the hardware constraints of different devices. At the same time, data privacy protection becomes an obstacle to the implementation of intelligent perception technology, making it difficult to achieve accurate identification and control of device operating conditions.
A lightweight federated learning approach is adopted to construct a lightweight chemical condition identification model by aligning and standardizing heterogeneous time-series data. The network architecture is optimized by using Gumbel-Softmax technology and multi-objective optimization loss function. Combined with the federated learning framework, multi-device collaborative training is achieved, which reduces model parameter redundancy and storage overhead, and improves model adaptability and privacy protection capabilities.
It enables real-time and accurate identification of device operating status on edge devices, improves the perception level and operational reliability of distributed energy systems, reduces inference overhead, enhances the generalization ability and robustness of models, and ensures data privacy and security.
Smart Images

Figure CN122046002A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system automation technology and relates to an intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning. Background Technology
[0002] As the global energy transition deepens, the penetration rate of distributed energy devices such as wind turbines, photovoltaics, energy storage devices, and flexible loads in the power grid is increasing. To ensure the safe and stable operation of the new power system, the energy management system must be able to intelligently sense each distributed node, that is, to sense the operating status, health level, and load characteristics of the equipment in real time and accurately. However, distributed energy systems are highly heterogeneous and subject to environmental uncertainties. Single physical threshold monitoring is difficult to capture complex changes in operating conditions. Traditional centralized big data analysis relies on the full aggregation of raw data. In distributed scenarios involving multiple entities and regions, it faces stringent data privacy protection barriers and the dilemma of "data silos," making it difficult to use a single centralized general model to accommodate the differentiated operating patterns and physical characteristics of massive heterogeneous devices.
[0003] To improve the real-time performance of state awareness, it is inevitable to offload computational tasks to the edge. However, existing high-precision deep learning perception models typically have a huge number of parameters and high computational complexity, making them difficult to deploy and run on resource-constrained edge embedded devices. Traditional model compression methods often sacrifice perception accuracy and are difficult to adaptively optimize for the specific hardware constraints of different devices. How to automatically build a lightweight model that can adapt to the demanding hardware conditions of the edge while ensuring perception accuracy is a bottleneck that urgently needs to be solved to achieve intelligent identification of device operating conditions.
[0004] In distributed energy systems, data privacy is a core obstacle to the implementation of intelligent sensing technology. Energy consumption data or power plant operation data from different stakeholders often involve trade secrets or user privacy, making it impossible to upload them to the cloud for centralized training. Although federated learning provides a collaborative training approach under privacy protection, existing methods mostly adopt a uniform network structure, which is difficult to address the problems of uneven data distribution among nodes and large differences in device performance in distributed systems. Therefore, there is an urgent need for a technical solution that can break down data barriers and adapt to edge hardware constraints. By constructing a lightweight and privacy-preserving intelligent sensing model, accurate device operating conditions and fault labels can be output in real time at the edge, thereby improving the overall sensing level and operational reliability of distributed energy systems. Summary of the Invention
[0005] To address the aforementioned technical problems, the purpose of this invention is to provide a method for intelligent identification of the operating status of distributed energy devices based on lightweight federated learning.
[0006] This invention provides a method for intelligent identification of the operating status of distributed energy devices based on lightweight federated learning, comprising:
[0007] Step 1: Align and local standardize the heterogeneous time-series data of distributed energy devices, and then reconstruct it into a multidimensional tensor through a sliding time window;
[0008] Step 2: Deploy a lightweight chemical condition recognition model for local inference and training on each distributed energy device;
[0009] Step 3: Based on the hardware characteristics, optimize the network path of the lightweight chemical condition identification model using Gumbel-Softmax technology and multi-objective optimization loss function;
[0010] Step 4: Design a federated learning framework, utilizing an adaptive weighted aggregation mechanism based on distribution divergence and cross-domain bidirectional knowledge distillation technology to achieve multi-device collaborative training;
[0011] Step 5: Reconstruct the heterogeneous time-series data of the distributed energy devices collected in real time into a multidimensional tensor and input it into the trained lightweight working condition recognition model to obtain the working condition recognition result.
[0012] Step 6: Generate corresponding control commands based on real-time operating condition identification results to achieve intelligent control of the equipment.
[0013] This invention presents a method for intelligent identification of the operating status of distributed energy devices based on lightweight federated learning. Addressing the intelligent identification and collaborative control needs of edge devices in distributed energy systems under conditions of data heterogeneity, limited computing power, and variable operating conditions, this method forms a complete method chain from data processing, lightweight modeling, adaptive structural optimization to federated collaborative training and control closed loop, offering the following beneficial effects:
[0014] (1) By performing time axis alignment, dimension-wise standardization and sliding window tensor reconstruction on multi-source heterogeneous time series data, the original data can still be uniformly modeled and input even when the sampling frequency, scale and time span are inconsistent. This reduces the interference caused by data missing, scale difference and short-term fluctuation, improves the stability and learnability of feature expression, and provides a standardized input for subsequent model training and online inference.
[0015] (2) By constructing a lightweight working condition identification model adapted to edge devices and introducing a mechanism for reusing convolutional kernels of the same origin, the same convolutional layer can maintain the ability to extract features at multiple scales while avoiding repeated storage of parameters for different kernel lengths, thereby reducing model parameter redundancy and storage overhead. At the same time, by constructing a set of candidate operations and establishing corresponding parameterized descriptions, the computation method of each layer can be flexibly configured between convolutional and non-convolutional operations, enhancing the structural adaptability of the network under different working condition characteristics and improving the feasibility and scalability of edge deployment.
[0016] (3) By evaluating the hardware consumption of candidate structures and combining it with a differentiable structural path selection mechanism, the network structure can simultaneously take into account the recognition effect and edge resource constraints during the training process. On the one hand, hardware evaluation provides differentiable deployment basis such as latency and memory for different candidate structures. On the other hand, the path selection mechanism can achieve differentiable structural preference learning during the training stage and quickly determine a single path that meets the constraints during the deployment stage, thereby reducing inference overhead and improving the real-time operating efficiency and stability of edge devices without sacrificing core recognition capabilities.
[0017] (4) By constructing a multi-objective joint optimization objective, the working condition identification loss and hardware cost are uniformly incorporated into the optimization framework, so that the model forms a preference for low latency and low memory structure during training, avoiding the problem of "good training effect but undeployable", thereby improving the feasibility and engineering availability of the final model on resource-constrained devices.
[0018] (5) By introducing a federated learning framework to achieve multi-device collaborative training, each edge device can complete the sharing and aggregation of model parameters without uploading the original data, thereby reducing the privacy and communication pressure caused by data centralization and improving the model's adaptability to the differences in data distribution among different devices; at the same time, combined with the cross-device knowledge distillation mechanism, the local model can absorb the knowledge constraints of the global model while learning using its own data, alleviating the performance fluctuations caused by inconsistent data distribution among devices, and improving the generalization ability and robustness of the global model. Based on the above identification results and control closed-loop mechanism, the system can map the operating condition identification output to the corresponding control action and provide real-time feedback, thereby realizing timely intervention and continuous optimization of the device operating status, and improving the safety, stability and operational reliability of the distributed energy system. Attached Figure Description
[0019] Figure 1 This is a flowchart of an intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning, according to the present invention. Detailed Implementation
[0020] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0021] The operating data for this implementation method comes from the IES-134 system, which includes 58 electrical load nodes, 53 general electrical nodes, 7 energy storage devices, 1 substation, 5 wind power stations, 15 distributed photovoltaic power stations, and 1 combined heat and power unit.
[0022] like Figure 1 As shown, the present invention provides an intelligent identification method for the operating status of distributed energy devices based on lightweight federated learning, comprising:
[0023] Step 1: Align and locally standardize the heterogeneous time-series data of distributed energy devices, then reconstruct a multidimensional tensor using a sliding time window. This step aims to address the "data silos" and alignment difficulties caused by the different sampling frequencies and significant dimension differences between environmental meteorological data and electrical operation data in distributed energy systems. By constructing a multi-granularity spatiotemporal alignment mechanism and an adaptive standardization method, a standardized input space is provided for subsequent models. Specifically:
[0024] Step 1.1: At the distributed energy station, due to the complexity and variety of equipment, the data sources are heterogeneous, using high-frequency data timestamps. Using a baseline index, linear interpolation is performed on low-frequency environmental data to align it and construct a unified time axis; the aligned environmental feature components The calculation formula is:
[0025]
[0026] in, For the a-th sampling time of the low-frequency environmental data, This refers to the (a+1)th sampling time of the low-frequency environmental data. for Environmental data collected in real time for Real-time environmental data collection; merging originally discrete, heterogeneous data into spatiotemporally aligned feature vectors. This vector contains the current time. All electrical characteristic components and aligned environmental characteristic components:
[0027]
[0028] in, For the g-th electrical characteristic component, Let h be the h-th aligned environmental feature component.
[0029] Step 1.2: For each time step in Step 1.1 Constructed input feature vector Rewritten as Because different devices in a distributed energy system differ in dimensions, range, and fluctuation amplitude, directly inputting the original features into the model can easily lead to an imbalance in the contributions of each dimension, thus affecting training stability and convergence speed. To eliminate the influence of dimensions and accelerate model convergence, vector... For each feature component in the matrix, perform a dimension-by-dimensional independent standard; for the b-th feature component... Calculate its mean and standard deviation within the historical sliding window, and denot them as follows: and The standardized feature values are:
[0030]
[0031] in For the b-th standardized feature component, A preset small constant is used to avoid This introduces a division-by-zero error and enhances numerical stability; the standardized eigenvectors are obtained as follows:
[0032]
[0033] in, For at any time The standardized feature vector.
[0034] Step 1.3: Due to the intermittency and volatility among distributed energy devices, the standardized feature vectors arranged along a unified time axis need to be reconstructed into multidimensional tensors with temporal structure as input to the training system.
[0035] Different times The standardized feature vectors form a sequence. , convert the sequence Divide the time into multiple time windows, and set the time window length to L. If the sampling period is... If the time interval is 1 second and the window covers the past t minutes, then both conditions are met. The standardized feature vectors from L consecutive time steps are stacked in chronological order to obtain the window input:
[0036] ,
[0037] Among them, square brackets This indicates that the frames are assembled in chronological order, and the first window... Each time step corresponds to:
[0038]
[0039] B window samples are drawn from different time points at the end of the window to form a batch, resulting in the training input tensor:
[0040]
[0041] in, by The input sample is constructed for a single window at the end of the window, where B is the batch size and E is the number of channels.
[0042] Step 2: Deploy a lightweight chemical condition recognition model for local inference and training on each distributed energy device.
[0043] The lightweight chemical condition identification model uses an improved lightweight one-dimensional convolutional neural network as its backbone network, with the reconstructed input tensor obtained in step 1 as the core network. As input, the probability vector of equipment operating condition status As output.
[0044] The improved lightweight one-dimensional convolutional neural network includes: an input layer, several one-dimensional convolutional feature extraction modules, a downsampling / pooling module, and a classification output module; wherein, the one-dimensional convolutional feature extraction module is used to process the input tensor along the time dimension. Local pattern extraction is performed on the sequence information, and a typical structure can be represented as:
[0045]
[0046] Multiple one-dimensional convolutional feature extraction modules are stacked hierarchically to obtain multi-scale temporal features. Then, global pooling and fully connected layers are used to output the work condition category results. To adapt to the computing power and storage constraints of edge devices, subsequent steps will perform lightweight optimization on the convolutional layer structure of the network to improve inference efficiency while maintaining classification performance. Specifically, the lightweight one-dimensional convolutional neural network is improved as follows:
[0047] Step 2.1: On the edge devices of the distributed energy system, to further reduce the storage overhead of model parameters while maintaining multi-scale feature extraction capabilities, this step designs a homogeneous multi-scale convolutional kernel reuse mechanism. The core idea is to no longer store convolutional kernels of different scales within the same convolutional layer independently, but instead store only one maximum-scale reused convolutional kernel, which is then used to generate convolutional kernels for each scale, thereby reducing redundant parameters.
[0048] Let the maximum scale of the convolutional kernel of this convolutional layer be... Its convolution kernel length is ,against candidate kernel length The m-th candidate scale convolution kernel is composed of Obtained through center clipping:
[0049]
[0050] in, Indicates from The length of the cut-off at the center position is Sub-kernels; due to the convolution kernels of each candidate scale All are generated by the same multiplexed convolution kernel Therefore, distributed energy devices only need to store and update data. This means that parameter reuse can be achieved across different scales and memory consumption can be significantly reduced.
[0051] During training and inference, when the m-th scale is selected for the convolutional layer, the corresponding convolutional kernel is used directly. Perform a one-dimensional convolution operation on the input features; As trainable parameters, they are updated through backpropagation of the loss function, which in turn synchronously affects the convolutional kernels of various scales obtained by cropping them.
[0052] In the implementation plan, the number of candidate scales is taken. The core lengths are respectively ,and Then only storage is required. This can be obtained by cutting. To adapt to feature extraction needs at different scales.
[0053] To achieve adaptive network architecture configuration under resource-constrained edge device conditions, it is necessary to clarify the set of candidate operations and their parameterized representations for each convolutional layer before performing architecture selection and optimization. Step 2.1 has addressed the issue of "how to reduce storage overhead by reusing convolutional kernels for multi-scale convolutions," but it is still necessary to further specify "what specific candidate operations are available for each layer and how to parameterize these candidate operations using unified variables," so that subsequent steps can select and optimize candidate operations and determine the final network architecture. Here, "candidate" refers to the alternative operations predefined for each convolutional layer before the final network architecture is determined; subsequent steps will determine the final operation adopted by the layer from these candidate operations based on the architecture parameters.
[0054] Step 2.2: For the z-th convolutional layer in the network, define its candidate set of one-dimensional convolutional operations as follows:
[0055]
[0056] Candidate one-dimensional convolution operations are represented as:
[0057]
[0058] Even using candidate convolution kernels Input features along the time dimension Perform one-dimensional convolution operations.
[0059] To parameterize the set of candidate one-dimensional convolutional operations and enable subsequent steps to select and optimize them, an architecture parameter vector corresponding to the set of candidate one-dimensional convolutional operations is introduced for the z-th convolutional layer:
[0060]
[0061] in, With candidate operations Correspondingly, this characterizes the relative priority and tendency of the candidate operation within that layer, and subsequent steps will be based on... The candidate operations in the set are selected and optimized. Finally, the specific operations used in each convolutional layer are determined, resulting in a defined lightweight network structure.
[0062] The lightweight chemical condition identification model constructed through the above steps is a network architecture that includes multiple candidate operations.
[0063] In practice, data The search space network constructed in steps 2.1 and 2.2 performs forward computation, and after processing through convolutional layers, pooling layers, and fully connected layers, it outputs the device's operational state probability vector. , representing the probability of each work condition category. Specifically, the network output is a vector containing four values:
[0064]
[0065] Let be the forward propagation function of the network, representing the network's propagation from the input. To output The mapping process, For all learnable parameters of the network, including weights and biases, The output of the network is the probability vector of operating conditions, representing the probability of the device under each type of operating condition. The corresponding predicted operating state probability of system equipment.
[0066] In this embodiment, it is set For the distributed energy system equipment to operate normally and stably, For distributed energy system equipment, the photovoltaic cloud layer is blocked. For the icing of wind turbine blades in distributed energy systems, This represents a sensor failure in a distributed energy system. The model's output probability vector is... The model predicts that the distributed energy system equipment is currently operating normally and stably.
[0067] Step 3: Based on the hardware characteristics, optimize the network path of the lightweight chemical condition identification model using Gumbel-Softmax technology and multi-objective optimization loss function;
[0068] The network path in step 3 corresponds to a specific network structure configuration: for each convolutional layer z, from the candidate set... Select an operation By combining the selected operations of each convolutional layer in the order of network connections, a network path is obtained:
[0069]
[0070] Let the set of candidate paths be . Since edge devices are constrained in terms of computing power, storage resources, and energy consumption, the goal of this step is to meet hardware constraints and, based on architectural parameters... Candidate operations for each convolutional layer are selected and optimized to determine an optimal structural path, which is then solidified into a deployable, lightweight network structure for subsequent processing of the input tensor. The specific steps for identifying the operating condition are as follows:
[0071] Step 3.1: To enable subsequent steps to select a suitable network structure under resource-constrained edge device conditions, this step evaluates the hardware consumption of candidate operations for each convolutional layer in Step 2.2, obtaining the inference latency and memory usage metrics of each candidate operation on the target edge device, and determining whether it meets the hardware constraints. For the z-th convolutional layer in the network, for any candidate operation... Its hardware inference latency is defined as Memory usage is ,Right now:
[0072]
[0073]
[0074] Among them, inference delay Used to characterize a candidate operation performed on the target edge device. Time required; memory usage Used to characterize the execution of the candidate operation Storage overhead required for time parameters and intermediate features; and The results were obtained by conducting offline benchmark tests on candidate operations on the target distributed energy device. For each candidate operation... The process was repeated several times with a fixed input size, and the average running time was taken as the result. And record the peak memory usage during the process as This forms a hardware consumption lookup table for candidate operations, which is then used for subsequent network path selection.
[0075] Let the selected operation index of the z-th convolutional layer be... Then the candidate path The total inference delay is obtained by summing the delays of the operations selected in each convolutional layer:
[0076]
[0077] The candidate path Memory usage is characterized by the peak memory required in the path:
[0078]
[0079] Step 3.2: After obtaining the hardware inference latency and memory usage of each candidate path in Step 3.1, based on the device operating state probability vector... Scoring is performed on the candidate network paths, and the k-th candidate path is... The path score is defined as:
[0080]
[0081] in, Used to represent the probability under the current operating condition. Select Path The degree of tendency; and These are learnable parameters.
[0082] Introduce Gumbel noise into each candidate path The path selection coefficient is obtained using Gumbel-Softmax:
[0083]
[0084] in, Gumbel noise is used to introduce random exploration; it is obtained from uniformly distributed sampling.
[0085]
[0086] Temperature coefficient Used to control the sharpness of the Gumbel-Softmax output distribution. When the value is larger, the path selection coefficient is smoother and the weights of each candidate path are closer; When the value is smaller, path selection focuses more on candidate paths with higher scores, and... As the path is gradually reduced, it approaches a single path selection, which makes it easier to finally determine a deployable structural path.
[0087] Step 3.3: To reduce the deployment overhead of edge devices while ensuring the performance of classification under operating conditions, a multi-objective joint loss function combining classification loss and hardware cost is constructed. By minimizing this loss, network parameters and structure selection-related parameters are updated simultaneously, thereby obtaining the final network structure that satisfies hardware constraints.
[0088] During the training phase, the input will be... The working condition probability output is obtained through forward computation of the network constructed in step 2. , This represents the probability of the operating condition, compared to the true label. Calculate the classification loss; the classification cross-entropy loss is defined as:
[0089]
[0090] Based on the hardware evaluation results of each candidate structural path in step 3.1, the candidate path set is... The inference latency and memory usage of the k-th candidate path are denoted as follows: and And in step 3.2, the path selection coefficient is obtained through Gumbel-Softmax. The expected hardware cost is defined as:
[0091]
[0092]
[0093] in, This represents the expected inference delay under the current network path selection distribution. This indicates the expected memory usage under the current network path selection distribution.
[0094] Based on this, the multi-objective joint loss function is constructed as follows:
[0095]
[0096] in, , This is an exponential hyperparameter used to adjust the penalty intensity of the hardware cost term; The coefficient for the delay penalty term is the trade-off factor. This is a tradeoff factor for the memory penalty term. The normalization constant for the delay, The normalization constant for the delay; by minimizing Backpropagation is used to update the learnable parameters of the network and the parameters related to path selection in step 3.2, so that the model gradually tends to choose low-latency and low-memory structural paths while improving classification accuracy, and finally converges to obtain the network structure of a deployable lightweight chemical condition recognition model.
[0097] Step 4: Design a federated learning framework, utilizing an adaptive weighted aggregation mechanism based on distribution divergence and cross-domain bidirectional knowledge distillation technology to achieve multi-device collaborative training. To ensure the model maintains stable recognition performance under conditions of multiple edge devices and different data distributions, this step further introduces a federated learning training framework to achieve multi-device collaborative training without uploading the original data.
[0098] The federated learning framework includes a global server and multiple distributed energy devices, i.e., edge devices. The global server deploys a global model with the same network structure as the lightweight chemical condition recognition model of each distributed energy device. The global server is used to maintain global model parameters and perform aggregation updates. Each edge device deploys local model parameters isomorphic to the global model and stores the training dataset locally. In each round of training, the global server distributes global model parameters to each edge device as initialization. Each edge device performs local training based on local data to obtain updated local model parameters or the update amount of local model parameters, and uploads them to the global server. The global server aggregates the updates from each device to obtain new global model parameters, and then distributes them to the next round of training until the model converges. The multi-device collaborative training specifically involves:
[0099] Step 4.1: In the federated collaborative training phase, the global server maintains global model parameters. Each edge device i in the local dataset The local lightweight chemical condition recognition model parameters are trained and the parameter update is uploaded to the global server for aggregation. The network structure deployed on each edge device is isomorphic and consistent with the global model, that is, the same fixed network structure, and only the model parameters are updated locally.
[0100] For distributed energy device i, global parameters are distributed and used for local initialization:
[0101]
[0102] Distributed energy device i performs several steps of gradient descent updates on the lightweight chemical condition identification model based on local samples, and the model output probability is:
[0103]
[0104] in, Let i be the forward inference function, and let i be the local training objective of minimizing the classification loss.
[0105]
[0106]
[0107] Where the number of samples for device i is The true label of the nth sample is , Let y be the number of operating condition categories and y be the one-hot encoded label. This is the predicted probability vector.
[0108] During local training, the s-th update is represented as:
[0109]
[0110] in, The learning rate is used to obtain updated local parameters after local training is completed. And calculate the model parameter update amount:
[0111]
[0112] in, These are the global model parameters maintained by the global server during the t-th round of federated training. The global server and edge devices adopt a homogeneous network structure, and only the parameters are obtained through aggregation updates.
[0113] Step 4.2: Each device will update its data. Uploaded to the global server, in order to reduce the impact of abnormal devices or devices with large distribution differences on the stability of the global model, device updates are adaptively weighted and aggregated based on "update direction consistency".
[0114] First, a reference update direction is constructed based on the update volume uploaded by each device, i.e., a weighted average update:
[0115]
[0116] in, The number of devices participating in this round of training; Let be the number of samples for device j.
[0117] Then, calculate the cosine similarity between the update amount of device i and the reference update direction:
[0118]
[0119] in, This is used to measure the degree of consistency between the update direction of device i and the "common update direction of most devices". The larger the value, the more consistent and reliable the updates.
[0120] Convert similarity into device aggregation weights:
[0121]
[0122] in, This is a smoothing coefficient used to control the degree of concentration in the weight distribution. satisfy .
[0123] Finally, the global server aggregates the update amounts from each device according to their weights to obtain new global model parameters:
[0124]
[0125] Therefore, the weight Its function is to increase the contribution of devices with the same update direction during global updates and reduce the impact of devices that deviate from the overall update direction, thereby improving the stability and generalization ability of global model updates.
[0126] Updated global model It will be distributed to each edge device in subsequent steps and will serve as the source of the teacher model output in step 4.3, guiding further alignment and optimization of the device-side model.
[0127] Step 4.3: To improve the generalization ability of the global model under different device data distributions, a cross-device knowledge distillation mechanism is introduced. This allows the local model on the edge device to be trained using local data while further aligning with the output distribution of the global model, thereby reducing the impact of differences in data distribution between devices.
[0128] In the (t+1)th round, the input sample for device i is denoted as The global model, i.e., the teacher model, has the following output probability distribution for this input:
[0129]
[0130] The output probability distribution of the local model of device i, i.e., the student model, for the same input is:
[0131]
[0132] in, This represents the forward inference function of the model. and This represents the prediction probability vectors for each work condition category by the teacher model and the student model.
[0133] To enable the student model to learn the output distribution of the teacher model, the knowledge distillation loss is defined as:
[0134]
[0135] in, Let KL divergence be the KL divergence. and Let represent the predicted probabilities of class c.
[0136] The local training objective for edge device i is formed by adding distillation constraints to the original classification loss, resulting in a joint local objective:
[0137]
[0138] in, For classification cross-entropy loss, The distillation tradeoff coefficient is minimized. The device-local model aligns with the global model output while fitting local labels, thereby improving the robustness and generalization ability of the global model under heterogeneous device data distribution.
[0139] Step 5: Reconstruct the heterogeneous time-series data of the distributed energy devices collected in real time into a multidimensional tensor and input it into the trained lightweight working condition recognition model to obtain the working condition recognition result.
[0140] Step 6: Generate corresponding control commands based on real-time operating condition identification results to achieve intelligent control of the equipment, specifically:
[0141] Step 6.1: Based on the predicted operating condition identification results, the distributed energy system will generate corresponding control commands according to the preset state-action mapping table.
[0142] Step 6.2: When the prediction result indicates normal operation, the system will proceed according to the preset scheduling strategy. Adjust the load or activate other energy devices; if and ,but , For load adjustment commands.
[0143] in, This indicates the amount of voltage fluctuation in the power grid. This indicates the maximum permissible voltage fluctuation threshold. This represents the current power generation capacity. For grid load.
[0144] Step 6.3: All operating condition identification results and control commands will be fed back to the system management platform in real time, forming an event-driven control closed loop. The system will automatically adjust the control strategy according to changes in equipment status to ensure that the equipment is always in a safe and efficient operating state.
[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the ideas of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent identification of the operating status of distributed energy devices based on lightweight federated learning, characterized in that, include: Step 1: Align and local standardize the heterogeneous time-series data of distributed energy devices, and then reconstruct it into a multidimensional tensor through a sliding time window; Step 2: Deploy a lightweight chemical condition recognition model for local inference and training on each distributed energy device; Step 3: Based on the hardware characteristics, optimize the network path of the lightweight chemical condition identification model using Gumbel-Softmax technology and multi-objective optimization loss function; Step 4: Design a federated learning framework, utilizing an adaptive weighted aggregation mechanism based on distribution divergence and cross-domain bidirectional knowledge distillation technology to achieve multi-device collaborative training; Step 5: Reconstruct the heterogeneous time-series data of the distributed energy devices collected in real time into a multidimensional tensor and input it into the trained lightweight working condition recognition model to obtain the working condition recognition result. Step 6: Generate corresponding control commands based on real-time operating condition identification results to achieve intelligent control of the equipment.
2. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 1, characterized in that, Step 1 specifically involves: Step 1.1: At the distributed energy station, use high-frequency data timestamps Using a baseline index, linear interpolation is performed on low-frequency environmental data to align it and construct a unified time axis; the aligned environmental feature components The calculation formula is: in, For the a-th sampling time of the low-frequency environmental data, This refers to the (a+1)th sampling time of the low-frequency environmental data. for Environmental data collected in real time for Real-time environmental data collection; merging originally discrete, heterogeneous data into spatiotemporally aligned feature vectors. This vector contains the current time. All electrical characteristic components and aligned environmental characteristic components: in, For the g-th electrical characteristic component, This represents the h-th aligned environmental feature component. Step 1.2: For each time step in Step 1.1 Constructed input feature vector Rewritten as For vectors For each feature component in the matrix, perform a dimension-by-dimensional independent standard; for the b-th feature component... Calculate its mean and standard deviation within the historical sliding window, and denot them as follows: and The standardized feature values are: in For the b-th standardized feature component, A preset small constant is used to avoid This introduces division-by-zero errors and enhances numerical stability; the standardized eigenvectors are obtained as follows: in, For at any time The standardized feature vector; Step 1.3: Due to the intermittency and volatility among distributed energy devices, the standardized feature vectors arranged along a unified time axis need to be reconstructed into multidimensional tensors with temporal structure as input to the training system; Different times The standardized feature vectors form a sequence. , convert the sequence Divide the time into multiple time windows, and set the time window length to L. If the sampling period is... If the time interval is 1 second and the window covers the past t minutes, then both conditions are met. The standardized feature vectors from L consecutive time steps are stacked in chronological order to obtain the window input: Among them, square brackets This indicates that the frames are assembled in chronological order, and the first window... Each time step corresponds to: B window samples are drawn from different time points at the end of the window to form a batch, resulting in the training input tensor: in, by The input sample is constructed for a single window at the end of the window, where B is the batch size and E is the number of channels.
3. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 1, characterized in that, The lightweight chemical condition identification model in step 2 uses an improved lightweight one-dimensional convolutional neural network as its backbone network, with the reconstructed input tensor obtained in step 1 as the core network. As input, the probability vector of equipment operating condition status As output; The improved lightweight one-dimensional convolutional neural network includes: an input layer, several one-dimensional convolutional feature extraction modules, a downsampling / pooling module, and a classification output module; wherein, the one-dimensional convolutional feature extraction module is used to process the input tensor along the time dimension. Local pattern extraction is performed on the sequence information. Multiple one-dimensional convolutional feature extraction modules are stacked hierarchically to obtain multi-scale temporal features. Then, the working condition category results are output through global pooling and fully connected layers. Specifically, the lightweight one-dimensional convolutional neural network is improved as follows: Step 2.1: Instead of storing convolutional kernels of different scales in the same convolutional layer independently, only a maximum-scale reused convolutional kernel is stored, and convolutional kernels of each scale are generated from this reused convolutional kernel, thereby reducing redundant parameters; Let the maximum scale of the convolutional kernel of this convolutional layer be... Its convolution kernel length is ,against candidate kernel length The m-th candidate scale convolution kernel is composed of Obtained through center clipping: in, Indicates from The length of the cut-off at the center position is Sub-kernels; due to the convolution kernels of each candidate scale All are generated by the same multiplexed convolution kernel Therefore, distributed energy devices only need to store and update data. This means that parameter reuse can be achieved across different scales while significantly reducing memory consumption; Step 2.2: For the z-th convolutional layer in the network, define its candidate set of one-dimensional convolutional operations as follows: Candidate one-dimensional convolution operations are represented as: Even using candidate convolution kernels Input features along the time dimension Perform one-dimensional convolution operations; To parameterize the set of candidate one-dimensional convolutional operations and enable subsequent steps to select and optimize them, an architecture parameter vector corresponding to the set of candidate one-dimensional convolutional operations is introduced for the z-th convolutional layer: in, With candidate operations Correspondingly, this characterizes the relative priority and tendency of the candidate operation within that layer, and subsequent steps will be based on... Select and optimize candidate operations from the set; The lightweight chemical condition identification model constructed through the above steps is a network architecture that includes multiple candidate operations.
4. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 3, characterized in that, The network path in step 3 corresponds to a specific network structure configuration: for each convolutional layer z, from the candidate set... Select an operation By combining the selected operations of each convolutional layer in the order of network connections, a network path is obtained: Let the set of candidate paths be . Based on architecture parameters The candidate operations for each convolutional layer are selected and optimized to finally determine an optimal structural path. The specific steps are as follows: Step 3.1: For the z-th convolutional layer in the network, for any candidate operation Its hardware inference latency is defined as Memory usage is ,Right now: Among them, inference delay Used to characterize a candidate operation performed on the target edge device. Time required; memory usage Used to characterize the execution of the candidate operation Storage overhead required for time parameters and intermediate features; and The results were obtained by conducting offline benchmark tests on candidate operations on the target distributed energy device. For each candidate operation... The process was repeated several times with a fixed input size, and the average running time was taken as the result. And record the peak memory usage during the process as This forms a hardware consumption lookup table for candidate operations, which can then be used for subsequent network path selection. Let the selected operation index of the z-th convolutional layer be... Then the candidate path The total inference delay is obtained by summing the delays of the operations selected in each convolutional layer: The candidate path Memory usage is characterized by the peak memory required in the path: Step 3.2: After obtaining the hardware inference latency and memory usage of each candidate path in Step 3.1, based on the device operating state probability vector... Scoring is performed on the candidate network paths, and the k-th candidate path is... The path score is defined as: in, Used to represent the probability under the current operating condition. Select Path The degree of tendency; and These are learnable parameters; Introduce Gumbel noise into each candidate path The path selection coefficient is obtained using Gumbel-Softmax: in, Gumbel noise is used to introduce random exploration; it is obtained from uniformly distributed sampling. Temperature coefficient Used to control the sharpness of the Gumbel-Softmax output distribution. When the value is larger, the path selection coefficient is smoother and the weights of each candidate path are closer; When the value is smaller, path selection focuses more on candidate paths with higher scores, and... As the size is gradually reduced, it approaches a single path selection, which makes it easier to finally determine a deployable structural path; Step 3.3: To reduce the deployment overhead of edge devices while ensuring the performance of classification under working conditions, a multi-objective joint loss function combining classification loss and hardware cost is constructed. By minimizing this loss, network parameters and structure selection-related parameters are updated simultaneously, thereby obtaining the final network structure that satisfies hardware constraints. During the training phase, the input will be... The working condition probability output is obtained through forward computation of the network constructed in step 2. , This represents the probability of the operating condition, compared to the true label. Calculate the classification loss; the classification cross-entropy loss is defined as: Based on the hardware evaluation results of each candidate structural path in step 3.1, the candidate path set is... The inference latency and memory usage of the k-th candidate path are denoted as follows: and And in step 3.2, the path selection coefficient is obtained through Gumbel-Softmax. The expected hardware cost is defined as: in, This represents the expected inference delay under the current network path selection distribution. This indicates the expected memory usage under the current network path selection distribution; Based on this, the multi-objective joint loss function is constructed as follows: in, , This is an exponential hyperparameter used to adjust the penalty intensity of the hardware cost term; The coefficient for the delay penalty term is the trade-off factor. This is a tradeoff factor for the memory penalty. The normalization constant for the delay, The normalization constant for the delay; by minimizing Backpropagation is used to update the learnable parameters of the network and the parameters related to path selection in step 3.2, so that the model gradually tends to choose low-latency and low-memory structural paths while improving classification accuracy, and finally converges to obtain the network structure of a deployable lightweight chemical condition recognition model.
5. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 1, characterized in that, The federated learning framework in step 4 includes a global server and multiple distributed energy devices, i.e., edge devices. The global server deploys a global model with the same network structure as the lightweight chemical condition recognition model of each distributed energy device. The global server is used to maintain global model parameters and perform aggregation updates. Each edge device deploys local model parameters that are isomorphic to the global model and saves the training dataset locally. In each round of training, the global server sends global model parameters to each edge device as initialization. Each edge device performs local training based on local data to obtain updated local model parameters or the update amount of local model parameters, and uploads them to the global server. The global server aggregates the updates from each device to obtain new global model parameters, and then sends them to the next round of training until the model converges.
6. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 5, characterized in that, The multi-device collaborative training specifically refers to: Step 4.1: In the federated collaborative training phase, the global server maintains global model parameters. Each edge device i in the local dataset The local lightweight chemical condition recognition model parameters are trained and the parameter update is uploaded to the global server for aggregation; the network structure deployed on each edge device is isomorphic and consistent with the global model, that is, the same fixed network structure, and only the model parameters are updated locally. For distributed energy device i, global parameters are distributed and used for local initialization: Distributed energy device i performs several steps of gradient descent updates on the lightweight chemical condition identification model based on local samples, and the model output probability is: in, Let i be the forward inference function, and let i be the local training objective of minimizing the classification loss. Where the number of samples for device i is The true label of the nth sample is , Let y be the number of operating condition categories, and y be the one-hot encoded label. This is the predicted probability vector; During local training, the s-th update is represented as: in, The learning rate is used to obtain updated local parameters after local training is completed. And calculate the model parameter update amount: in, These are the global model parameters maintained by the global server during the t-th round of federated training. The global server and edge devices adopt a homogeneous network structure, and the parameters are only obtained by aggregation updates. Step 4.2: Each device will update its data. Uploaded to the global server, in order to reduce the impact of abnormal devices or devices with large distribution differences on the stability of the global model, device updates are adaptively weighted and aggregated based on "update direction consistency"; First, a reference update direction is constructed based on the update volume uploaded by each device, i.e., a weighted average update: in, The number of devices participating in this round of training; Let be the number of samples for device j; Then, calculate the cosine similarity between the update amount of device i and the reference update direction: in, This is used to measure the degree of consistency between the update direction of device i and the "common update direction of most devices". The larger the value, the more consistent and reliable the updates. Convert similarity into device aggregation weights: in, This is a smoothing coefficient used to control the degree of concentration in the weight distribution. satisfy ; Finally, the global server aggregates the update amounts from each device according to their weights to obtain new global model parameters: Step 4.3: To improve the generalization ability of the global model under different device data distributions, a cross-device knowledge distillation mechanism is introduced, which enables the local model on the edge device to further align with the output distribution of the global model while using local data for training, thereby reducing the impact of data distribution differences between devices. In the (t+1)th round, the input sample for device i is denoted as The global model, i.e., the teacher model, has the following output probability distribution for this input: The output probability distribution of the local model of device i, i.e., the student model, for the same input is: in, This represents the forward inference function of the model. and This represents the predicted probability vectors for each work condition category by the teacher model and the student model. To enable the student model to learn the output distribution of the teacher model, the knowledge distillation loss is defined as: in, Let KL divergence be the KL divergence. and Let represent the predicted probabilities of class c, respectively; The local training objective for edge device i is formed by adding distillation constraints to the original classification loss, resulting in a joint local objective: in, For classification cross-entropy loss, The distillation tradeoff coefficient is minimized. The device-local model aligns with the global model output while fitting local labels, thereby improving the robustness and generalization ability of the global model under heterogeneous device data distribution.
7. The intelligent identification method for the operating status of distributed energy equipment based on lightweight federated learning according to claim 1, characterized in that, Step 6 specifically involves: Step 6.1: Based on the predicted operating condition identification results, the distributed energy system will generate corresponding control commands according to the preset state-action mapping table; Step 6.2: When the prediction result indicates normal operation, the system will proceed according to the preset scheduling strategy. Adjust the load or activate other energy devices; if and ,but , For load adjustment instructions; in, This indicates the amount of voltage fluctuation in the power grid. This indicates the maximum permissible voltage fluctuation threshold. This represents the current power generation capacity. For grid load; Step 6.3: All operating condition identification results and control commands will be fed back to the system management platform in real time, forming an event-driven control closed loop. The system will automatically adjust the control strategy according to changes in equipment status to ensure that the equipment is always in a safe and efficient operating state.