A photovoltaic sensing data processing method and system for edge computing
By constructing a digital twin of the photovoltaic array and a lightweight Transformer-CNN hybrid prediction model, the latency and model adaptability problems of the photovoltaic power plant data processing system were solved, realizing real-time fault response and high-precision prediction of the photovoltaic system, and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 国网安徽省电力有限公司营销服务中心
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-09
AI Technical Summary
Existing photovoltaic power plant data processing systems suffer from high latency, insufficient model generalization ability, poor adaptability, limited edge computing capabilities, and coarse data transmission strategies, making it difficult to achieve real-time fault response and high-precision prediction for photovoltaic systems.
We adopt a photovoltaic sensing data processing method oriented towards edge computing. By constructing a digital twin of the photovoltaic array, we generate simulation data of rare operating conditions. This data is then mixed with real data to build an enhanced training dataset. A Transformer-CNN hybrid prediction model is used, and a lightweight model is generated through a three-stage progressive compression strategy. This model is then deployed to edge nodes for real-time inference and combined with a lifelong learning mechanism and a data classification and transmission strategy.
It achieves millisecond-level low-latency processing of photovoltaic sensing data, low power prediction error, and high fault identification accuracy, thereby reducing operation and maintenance costs and improving the model's adaptability and data resource utilization efficiency.
Smart Images

Figure CN121901669B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic data processing technology, and relates to a photovoltaic sensing data processing method and system for edge computing. Background Technology
[0002] With the expansion of photovoltaic (PV) system scale, the multimodal sensing data generated during PV power plant operation, including component electrical parameters (voltage, current, power), operating status (temperature, thermal imaging), environmental information (illuminance, temperature and humidity, wind speed), and images and videos, is growing exponentially. This places extremely high demands on the real-time performance, accuracy, and adaptability of data processing. The multimodal data in PV power generation is characterized by its massive volume, real-time nature, and heterogeneity, posing unprecedented challenges to the real-time performance, accuracy, and reliability of data processing. To overcome these challenges, the industry has successively proposed solutions combining edge computing, digital twins, and artificial intelligence technologies.
[0003] Currently, intelligent operation and maintenance and fault diagnosis of photovoltaic power plants mainly rely on data-driven analysis models. Traditional data processing architectures mostly involve uploading raw data collected by various sensors to a remote cloud server via communication networks, where it is stored, processed, and analyzed. Control commands or early warning information are then sent back to the local machine. While this model facilitates centralized management and model optimization, it has gradually revealed the following prominent problems in practical applications:
[0004] (1) High data processing latency makes it difficult to meet real-time control requirements: The operating status of photovoltaic systems changes rapidly, especially when faults occur (such as hot spots, arcs, short circuits, etc.), which often deteriorate within milliseconds to seconds, requiring the data processing system to have extremely low end-to-end latency. Traditional cloud-based centralized architectures need to upload massive amounts of raw data to remote cloud processing. In a 100MW photovoltaic power plant, the amount of data generated per second can reach 10GB, and the transmission and processing latency generally exceeds 200ms, which cannot meet the millisecond-level fault response requirements of photovoltaic systems.
[0005] (2) Limited sample size for extreme operating conditions and rare faults, resulting in insufficient model generalization ability: Photovoltaic systems may encounter various extreme operating conditions and rare faults during long-term operation, such as local fires, hail damage, hot spot effects, sudden changes in shading, microcracks in modules, and failure of bypass diodes. These events have a low probability of occurrence, and it is difficult to collect a sufficient number of effective samples in real operating environments. This leads to a serious sample imbalance problem in fault diagnosis models trained based on historical data, resulting in low accuracy in identifying unknown or rare scenarios and a false alarm rate as high as 15%-20%.
[0006] (3) Poor model adaptability, making it difficult to adapt to dynamic changes in environment and equipment status: Existing data processing methods mostly use traditional algorithms with fixed parameters or shallow machine learning models, which cannot adapt to changes in the operating conditions of photovoltaic systems (such as seasonal changes, equipment aging, and environmental evolution). Once deployed, the model parameters are no longer updated, and the accuracy of the model continues to decline after deployment, resulting in the gradual degradation of model performance over time. Frequent manual intervention, data re-collection and training are required, resulting in high maintenance costs and delayed response.
[0007] (4) Difficulty in deploying deep learning models at the edge and limited edge computing capabilities: To reduce latency, edge computing has been introduced into photovoltaic data processing systems, moving some computing tasks from the cloud to edge nodes (such as gateways and local servers) closer to the data source. However, current high-performance deep learning models (such as Transformer and large-scale convolutional neural networks) typically have a huge number of parameters (ranging from hundreds of millions to billions), high computational and storage requirements, and cannot be directly deployed on edge devices with limited computing power and memory. If simplified models are used, prediction accuracy is often sacrificed, making it difficult to meet the dual requirements of "low latency" and "high accuracy".
[0008] (5) The data transmission strategy is crude and the network and storage resources are not utilized efficiently: Existing systems usually adopt an indiscriminate transmission and storage strategy for all collected data, failing to distinguish the importance, timeliness and value density of the data. This results in key fault warning data competing with a large amount of routine monitoring data for the same network channel, causing delays or even loss of key information transmission when the network is congested. At the same time, low-value, highly redundant data continues to occupy cloud storage space, resulting in a waste of bandwidth and storage resources.
[0009] Existing technologies, such as the invention patent with application publication number CN120258257B, disclose a photovoltaic power generation prediction method. This method applies knowledge distillation technology to the photovoltaic field and proposes a teacher-student model architecture. It trains the student model through multivariate loss functions such as distillation loss and soft label loss to reduce the domain difference between predicted weather data and real weather data and improve prediction robustness. However, its distillation process is only used to improve the performance of the model on a specific data domain. It fails to systematically compress the number of parameters, computational cost and storage of large-scale deep learning models, and it does not solve the problem of deploying the compressed model on edge devices with limited computing power.
[0010] Therefore, there is an urgent need for a novel photovoltaic data processing solution that combines cutting-edge technology to achieve millisecond-level low-latency processing of photovoltaic sensing data and continuous adaptive evolution of models while ensuring ultra-high processing accuracy. This would break through the technical bottlenecks of traditional methods and truly promote the transformation of photovoltaic power plant operation and maintenance towards intelligence and predictability. Summary of the Invention
[0011] The technical problem to be solved by this invention is how to improve the processing accuracy of photovoltaic sensing data and reduce processing latency.
[0012] The present invention solves the above-mentioned technical problems through the following technical solutions:
[0013] A photovoltaic sensing data processing method for edge computing includes the following steps:
[0014] S1 collects photovoltaic system operating parameters and uploads them to the edge node in real time;
[0015] S2 constructs a digital twin of a photovoltaic array based on a physical simulation engine, generates simulation data for various rare working conditions, performs domain-adaptive processing on the simulation data and collected data, mixes the data, and constructs an enhanced training dataset.
[0016] S3, train the Transformer-CNN hybrid prediction model using the augmented training dataset, and generate a lightweight Transformer-CNN hybrid prediction model based on a three-stage progressive compression strategy. The three-stage progressive compression strategy includes a first-stage architecture distillation, a second-stage soft-label distillation, and a third-stage structured pruning and quantization. The architecture distillation is supervised by layer-by-layer feature alignment loss and compresses the Transformer branch of the initial Transformer-CNN hybrid prediction model.
[0017] S4 deploys a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time edge inference, outputting the probability of fault type, power prediction value, and corresponding confidence level for future time periods.
[0018] Furthermore, the operating parameters mentioned in S1 include the output voltage, current, surface temperature, ambient light intensity, wind speed, infrared thermal imaging data, and visible light images of the photovoltaic module.
[0019] Furthermore, S2 includes the following:
[0020] S21, a digital twin of a photovoltaic array is constructed based on multiphysics simulation software, including electrical subsystem, thermal subsystem and optical subsystem;
[0021] S22, a coupled solution is performed on the electrical subsystem, thermal subsystem and optical subsystem;
[0022] S23, based on the Bayesian optimization algorithm, uses historical operating data as real data to calibrate the simulation data output by the digital twin of the photovoltaic array;
[0023] S24, based on the Monte Carlo sampling method, randomly samples each rare working condition scenario in the parameter space, and each sampling triggers physical simulation to generate corresponding electrical timing data;
[0024] S25, Construct a domain adversarial neural network, including a feature extractor, a task predictor, and a domain classifier; train the feature extractor so that its output features cannot be distinguished by the domain classifier from real data or simulated data;
[0025] S26. Mix simulation data and real data in a predetermined ratio to construct an enhanced training dataset for model training.
[0026] Furthermore, the Transformer-CNN hybrid prediction model described in S3 includes a Transformer module, a CNN module, a multimodal feature fusion layer, and an output layer. The Transformer module includes multiple stacked Transformer encoders, each of which includes a multi-head self-attention sub-layer, a feedforward network sub-layer, and a layer normalization sub-layer. The CNN module includes convolutional layers, batch normalization sub-layers, and activation function layers. The multimodal feature fusion layer includes attention mechanism units and gated fusion units. The output layer includes a three-layer fully connected network that outputs predicted power values, fault types, and confidence regression values. The fault types are classified according to rare working conditions.
[0027] Using the initial Transformer-CNN hybrid prediction model as the teacher model, a three-stage progressive compression strategy is used to compress the teacher model into a student model with lower model parameter count and lower inference latency.
[0028] Furthermore, the three-stage progressive compression strategy described in S3 includes the following:
[0029] The first stage of architecture distillation: Based on the uniform mapping strategy, the outputs of each layer of the Transformer encoder of the student model are aligned with the corresponding outputs of the Transformer encoder of the teacher model, and training is carried out with the goal of minimizing the layer-by-layer distillation loss;
[0030] The second stage is soft label distillation: the output distribution of the teacher model is softened using the Softmax function with a preset temperature coefficient as soft labels, and a joint distillation loss function is constructed for training. The joint distillation loss function includes soft label distillation loss, feature map matching loss and hard label loss.
[0031] The third stage is structured pruning and quantization: structured pruning is performed, the importance score of each convolutional channel in the model is calculated, the importance scores are sorted from high to low, the convolutional channels corresponding to low importance scores are removed and then fine-tuned; quantization-aware training is used to quantize the model weights.
[0032] Furthermore, the edge-side real-time inference described in S4 includes the following:
[0033] Data preprocessing stage: Normalization is performed by dynamically selecting the sliding window length based on the volatility index of the input data;
[0034] Feature encoding stage: Extract time-series features of electrical parameters, time-series features of environmental parameters, and image features respectively, encode them, and concatenate them into a multimodal embedding vector;
[0035] Attention calculation phase: Dynamically adjust the number of heads in the model's attention mechanism based on the quality of sensor data;
[0036] In the output decoding stage, uncertainty estimation is performed on the prediction results using the random dropout method, and the confidence level of the prediction results is calculated.
[0037] Furthermore, the method also includes:
[0038] S5, Lifelong Learning and Model Self-Evolution: Edge nodes continuously monitor the performance of the lightweight Transformer-CNN hybrid prediction model. When a new working condition is detected, local incremental learning based on the improved elastic weight consolidation algorithm is triggered. The model parameters are fine-tuned using recent data, and the parameter increments are uploaded to the cloud. The cloud uses a weighted federated average algorithm to aggregate the parameter increments of multiple edge nodes, optimize the global model, and periodically update and distribute it to the edge nodes.
[0039] Furthermore, the local incremental learning based on the improved elastic weight consolidation algorithm described in S5 specifically refers to:
[0040] Calculate the cosine similarity between the new working condition and the known working condition, and dynamically determine the number of neural network layers that need to be fine-tuned. When the cosine similarity is greater than the first preset similarity threshold, only the last layer of the model is fine-tuned; when the cosine similarity is not higher than the first preset similarity threshold but is greater than the second preset similarity threshold, the last three layers of the model are fine-tuned; when the cosine similarity is not higher than the second preset similarity threshold, the last five layers of the model are fine-tuned.
[0041] Incremental training is performed using recent data, and a regularization term based on the Fisher information matrix is introduced into the loss function.
[0042] Furthermore, the method also includes:
[0043] S6, based on model prediction confidence and data value, classifies the collected data and adopts different transmission and storage strategies, specifically:
[0044] For Level 1 critical data, the transmission strategy adopts the highest priority queue and dual-path redundant transmission from edge to cloud and from edge to local controller. The storage strategy is to permanently store it at the edge node and back it up in the cloud, with no limit on the retention period.
[0045] For Level 2 critical data, the transmission strategy adopts QoS Level 2 single-path priority transmission, and the storage strategy is short-term storage at the edge node and long-term storage in the cloud.
[0046] For Level 3 ordinary data, the transmission strategy is to cache at the edge node and then upload in batches, and the storage strategy is to compress and store it at the edge node for a short period of time and store it in the cloud for a long period of time.
[0047] For Level 4 low-value data, the transmission strategy is to not actively upload and only respond to queries, and the storage strategy is to compress and store it on edge nodes for a short period of time and then discard it.
[0048] The present invention also provides a photovoltaic sensing data processing system for edge computing, comprising:
[0049] The intelligent sensing terminal layer collects the operating parameters of the photovoltaic system and uploads them to the edge nodes in real time.
[0050] The digital twin platform constructs a digital twin of a photovoltaic array based on a physical simulation engine, generates simulation data for various rare working conditions, performs domain-adaptive processing on the simulation data and collected data, and mixes the data to build an enhanced training dataset.
[0051] The cloud-based intelligent layer is used to train a Transformer-CNN hybrid prediction model using an augmented training dataset. It generates a lightweight Transformer-CNN hybrid prediction model based on a three-stage progressive compression strategy, which includes a first-stage architecture distillation, a second-stage soft-label distillation, and a third-stage structured pruning and quantization. The architecture distillation is supervised by layer-by-layer feature alignment loss and compresses the Transformer branches of the initial Transformer-CNN hybrid prediction model.
[0052] The edge computing layer is used to deploy a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time inference at the edge, outputting the probability of fault type, power prediction value and corresponding confidence level for future time periods.
[0053] The advantages of this invention are:
[0054] This invention collects photovoltaic system operating parameters and image data by deploying intelligent sensing terminals at the photovoltaic equipment end, constructs a digital twin of the photovoltaic array and generates extreme working condition simulation data, and mixes it with real data to construct an enhanced training dataset, thus solving the problem of data scarcity in extreme scenarios.
[0055] This invention employs a three-stage progressive compression strategy. First, it compresses the cloud-based teacher model (Transformer-CNN hybrid prediction model) into a student model suitable for deployment on edge nodes through architectural distillation. Then, it utilizes soft-label distillation to transfer knowledge. Finally, it performs structured pruning and INT8 quantization to compress the large cloud model into a lightweight model that can be deployed on the edge, achieving millisecond-level prediction of power and faults. While reducing the inference latency of the student model deployed on edge nodes, it ensures that the prediction accuracy of the student model is close to that of the cloud-based teacher model.
[0056] This invention is based on a lifelong learning mechanism that integrates edge nodes and the cloud. When an edge node detects a new working condition, it autonomously fine-tunes the model and uploads incremental parameters to the cloud for aggregation and optimization. The cloud aggregates the parameter increments of multiple edge nodes through a weighted federated average algorithm, optimizes the global model, and periodically updates and distributes it to the edge nodes, continuously monitoring the model performance on the edge nodes.
[0057] This invention classifies collected data based on model prediction confidence and data value density and adopts different transmission and storage strategies, so that key data is processed and transmitted first, while low-value data is compressed and stored at the edge, thereby reducing bandwidth consumption while ensuring the real-time nature of key information.
[0058] This invention deeply integrates deep learning and edge computing in the field of photovoltaic sensing data processing, achieving intelligent photovoltaic sensing data processing with low latency (≤15ms), low power prediction error (MAPE≤3.2%), and high fault identification accuracy (≥99.5%). It provides a complete technical solution for the intelligent upgrading of the photovoltaic industry and has significant technological advancement and application value. Attached Figure Description
[0059] Figure 1 This is a flowchart illustrating the photovoltaic sensing data processing method for edge computing according to Embodiment 1 of the present invention.
[0060] Figure 2 This is a schematic diagram of the structure of the photovoltaic sensing data processing system for edge computing according to Embodiment 1 of the present invention;
[0061] Figure 3 This is a schematic diagram of step S2 of Embodiment 1 of the present invention, which involves constructing a cloud-based digital twin and enhancing the training dataset.
[0062] Figure 4 This is a schematic diagram of the lightweight Transformer-CNN hybrid prediction model in step S3 of embodiment one of the present invention;
[0063] Figure 5This is a schematic diagram of the edge-side and cloud-side model update in step S5 of embodiment one of the present invention;
[0064] Figure 6 This is a schematic diagram of the data hierarchical transmission strategy of Embodiment 1 of the present invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0066] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments:
[0067] Example 1
[0068] like Figure 1 Specifically, a photovoltaic sensing data processing method for edge computing is disclosed, including the following steps:
[0069] S1, intelligent sensing terminal deployment and data acquisition, specifically: intelligent sensing terminals deployed at the photovoltaic equipment end collect photovoltaic system operating parameters, including photovoltaic module output voltage, current, surface temperature, ambient light intensity, wind speed, infrared thermal imaging data and visible light images, and upload the raw operating parameters to the edge node in real time.
[0070] In this embodiment, the photovoltaic equipment terminal includes a collection of all power generation physical entities such as photovoltaic modules, photovoltaic strings, and photovoltaic arrays, as well as their associated data acquisition devices; the intelligent sensing terminal includes sensor devices such as electrical parameter sensors, environmental sensors, thermal imaging cameras, and visible light cameras.
[0071] In this embodiment, photovoltaic modules are used as the smallest power generation unit, and several photovoltaic modules are used to form a photovoltaic string. A smart sensing terminal is deployed at the combiner box of each photovoltaic string, and a high-precision voltage sensor, current sensor and temperature sensor are configured. Several photovoltaic strings are arranged in space to form a photovoltaic array, and several environmental monitoring stations are deployed in each photovoltaic array, and a light sensor, a wind speed and direction sensor and an ambient temperature and humidity sensor are configured. A thermal imaging camera and a visible light high-definition camera are deployed at the inverter location.
[0072] In a preferred embodiment, taking a photovoltaic string composed of 20 photovoltaic modules and an environmental monitoring station deployed for every 25 photovoltaic strings in each photovoltaic array as an example, the hardware parameters of the intelligent sensing terminal are configured as follows: voltage sensor range 0-1000V, accuracy ±0.05%; current sensor range 0-500A, accuracy ±0.05%; temperature sensor can be a PT100 temperature sensor, range -40-120℃, accuracy ±0.1℃; light sensor range 0-1500W / m², accuracy ±3W / m²; wind speed and direction sensor range 0-30m / s, accuracy ±0.05m / s; thermal imaging camera can be a FLIR A320 model, resolution 320×240, thermal sensitivity ≤0.05℃, and a visible light high-definition camera with 2 megapixels and 1920×1080 resolution, used to capture visual anomalies such as hot spots and cracks.
[0073] In this embodiment, the sampling frequency of all sensors included in the intelligent sensing terminal is uniformly set to 100Hz, the data format is JSON, and the improved MQTT-SN transmission protocol is used to upload data to the edge node via LoRa gateway or industrial WiFi. The improved MQTT-SN transmission protocol is a version of the MQTT protocol optimized for sensor networks (low bandwidth, unstable network) and supports the highest quality of service level (QoS 2).
[0074] This embodiment uses a 50MW distributed photovoltaic power station as the application scenario, deploying 2000 intelligent sensing terminals and 5 edge nodes. Each edge node is configured with an NVIDIA Jetson AGX Orin development kit, with a computing power of 275 TOPS, 64GB of memory, and 512GB of NVMe SSD storage.
[0075] S2, cloud-based digital twin construction and simulation data generation, specifically involves: constructing a high-fidelity digital twin of a photovoltaic array in the cloud based on a physical simulation engine; generating simulation data for various rare operating scenarios; performing domain-adaptive processing on the simulation data and collected data to reduce their distribution differences in the feature space; and mixing them according to a predetermined ratio to construct an enhanced training dataset for model training. Specifically, such as... Figure 3 As shown, S2 includes the following:
[0076] S21, Physical Modeling Stage: Construct a digital twin of the photovoltaic array based on multiphysics simulation software, including electrical subsystem, thermal subsystem and optical subsystem.
[0077] In this embodiment, the physical simulation engine is based on a joint simulation using COMSOL Multiphysics and MATLAB / Simulink. Specifically, a multiphysics digital twin model of the photovoltaic array is constructed using the multiphysics simulation software COMSOL Multiphysics 6.0. The electrical subsystem establishes an equivalent circuit for the photovoltaic module based on a dual-diode model. The equivalent circuit parameters include photocurrent, saturation current, series resistance, and parallel resistance, configured according to the module datasheet. The thermal subsystem is based on a three-dimensional heat transfer model of the photovoltaic module. This model includes three heat transfer modes: convection, radiation, and conduction. The parameters of the three-dimensional heat transfer model include solar radiation, environmental convection, ground reflection, inter-module shading, and heat capacity parameters. The optical subsystem uses a ray tracing algorithm to simulate parameters such as the solar incidence angle, shadow occlusion ratio, and dust occlusion rate at different times.
[0078] Furthermore, based on the photovoltaic module's IV characteristic curve, an equivalent circuit of the photovoltaic module is established, and the equivalent circuit model equation is expressed using the following logic:
[0079]
[0080] in, For photocurrent, For saturation current, Indicates exponentiation. As an ideal factor, Thermoelectric voltage, For series resistance, For parallel resistors, To output current for photovoltaic modules, The output voltage of the photovoltaic module is configured with equivalent circuit parameters based on the parameters of the Jinko Tiger Pro 585W module.
[0081] Furthermore, a three-dimensional heat transfer model of the photovoltaic module is established based on the heat transfer equation, using the following logical representation:
[0082]
[0083] in, The rate of change of photovoltaic module temperature over time. Where is the thermal diffusivity, For the Laplace operator, For the temperature of photovoltaic modules, As a heat source item, in this embodiment, the heat source item is... It includes heat absorbed by solar radiation, heat transfer from environmental convection, heat reflected from the ground, and local temperature differences caused by shading between components; in addition, the heat capacity parameters of the three-dimensional heat transfer model can be set according to the physical properties of silicon materials.
[0084] In this embodiment, the optical subsystem can use any ray tracing algorithm, such as Monte Carlo Ray Tracing, Path Tracing, or Forward Ray Tracing, for optical simulation, which will not be elaborated here.
[0085] S22, Multiphysics Coupling Solution Stage: Coupled solution of electrical subsystem, thermal subsystem and optical subsystem.
[0086] In a preferred embodiment, the finite element discretization method is used to solve the digital twin of the photovoltaic array, with the time step after discretization set to 0.1s and the mesh density to 256 nodes per square meter.
[0087] S23, Simulation Parameter Calibration Stage: Based on the Bayesian optimization algorithm, the simulation data output by the photovoltaic array digital twin is calibrated using historical operating data as a benchmark.
[0088] In this embodiment, historical operating data is used as real data. A Bayesian optimization algorithm is employed, with simulation parameters as optimization variables and the root mean square error (RMSE) between the simulation data and historical operating data as the objective function. A Gaussian process is used to model the objective function, and an acquisition function iteratively selects the next set of candidate parameters. After 200 iterations, the parameter combination that minimizes the RMSE is selected as the optimal simulation parameters, ultimately achieving a simulation accuracy of ≤3%. Specifically, the simulation parameters are the configuration parameters in the photovoltaic array digital twin model of S21, including the photocurrent coefficient, series resistance, parallel resistance, and thermal conductivity coefficient; while the simulation data are the simulation results output by the photovoltaic array digital twin model.
[0089] In a preferred embodiment, based on the historical operating data of the power station collected in step S1 for 6 months as real data, 140,000 valid samples are collected, and the collected real data is preprocessed, including missing value handling, outlier detection and normalization.
[0090] S24, Operating condition data generation stage: Based on the Monte Carlo sampling method, random sampling is performed in the parameter space for each rare operating condition scenario. Each sampling triggers physical simulation to generate corresponding electrical timing data.
[0091] In a preferred embodiment, the rare operating conditions include a total of 12 different extreme operating conditions or rare fault scenarios, including normal operation, shading, dust contamination, component aging, hot spot effect, microcrack fault, bypass diode failure, partial short circuit, open circuit fault, inverter abnormality, grid fluctuation, and extreme weather. The conditions corresponding to different operating conditions are shown in Table 1 below.
[0092] Table 1. Comparison of Rare Operating Conditions and Corresponding Requirements
[0093]
[0094] In a preferred embodiment, the parameter space is configured as illumination 0-1200W / m², temperature -20-60℃, and shadow 0-80%. Monte Carlo sampling is used to randomly sample the parameter space, sampling 5000 times for each type of working condition. Each sampling generates corresponding electrical timing data, generating a total of 60,000 simulation data for 12 different working conditions. A single simulation performs parallel calculation of 32 sets of parameters, with a simulation refresh rate of 1Hz. A single simulation can generate 1000 sample data. After GPU acceleration, the duration of a single simulation is ≤30 seconds (approximately 25 seconds).
[0095] S25, Domain Adaptive Processing Stage: Construct a domain adversarial neural network, including a feature extractor, a task predictor, a domain classifier, and a gradient inversion layer; train the feature extractor through the gradient inversion layer so that its output features cannot be distinguished by the domain classifier from real data or simulated data.
[0096] In this embodiment, based on the 6 months of historical operating data (i.e., real data) collected by S23, a total of 140,000 valid samples of the power plant were used. A Domain-Adversarial Neural Network (DANN) was employed to reduce the distributional discrepancy between the simulated data and the real data. Specifically, the DANN includes a feature extractor. Predictor Domain classifier and a gradient inversion layer, the gradient inversion layer being set in the feature extractor With domain classifier Between; among which, feature extractor Used to map input data to domain-invariant features, predictor Task prediction based on domain-invariant features, domain classifier The invariant features of the decision domain are derived from real data or simulation data.
[0097] During training, a gradient reversal layer (GRL) is used to... Learning domain-invariant features, specifically, during backpropagation, involves modifying the domain classifier. The gradient is multiplied by -1 and then passed to the feature extractor, so that... The learned features can fool the domain classifier. The total loss function can be expressed using the following logic. :
[0098]
[0099] in, To predict mission losses, Let d be the domain adversarial loss, and d be the domain label (0 for real data and 1 for simulated data). The input data sample can be real data or simulated data; For task labels, such as fault type, power prediction target value, etc.; The balancing coefficient is used to adjust the weights between the prediction task loss and the domain adversarial loss. It can be set to a value suitable for training. The value is 0.5. Statistical features of the simulated and real data are extracted separately, including mean, variance, skewness, kurtosis, etc., and the KL divergence is calculated as a measure of the distribution difference between the simulated and real data. In this embodiment, domain invariance learning is achieved through a gradient inversion layer, enabling the feature extractor to learn domain invariant features, which can reduce the KL divergence between the simulated and real data in the feature space to below 0.08, specifically from 0.23 to 0.07.
[0100] Furthermore, noise perturbation can be applied to the simulation data of the input domain adversarial neural network, such as Gaussian noise with σ set to 0.02 and a random parameter offset of ±3%, to simulate real sensor errors.
[0101] In this embodiment, step S23 first uses Bayesian optimization to calibrate the physical parameters of the photovoltaic array digital twin, so that the subsequently generated simulation data is closer to the characteristics of the real power plant; in step S25, the domain adversarial neural network is used to further reduce the distribution difference between the simulation data and the real data at the feature level. The two respectively achieve parameter-level calibration and feature-level alignment, forming a two-stage calibration mechanism.
[0102] S26, Data Mixing Stage: Mix simulation data and real data in a predetermined ratio to construct an enhanced training dataset for model training.
[0103] In this embodiment, simulated and real data are mixed in a 3:7 ratio to construct an augmented training dataset of 200,000 samples, which is then divided into 160,000 training data, 20,000 validation data, and 20,000 test data.
[0104] S3, in the cloud, uses an augmented training dataset to train a Transformer-CNN hybrid prediction model, and generates a lightweight Transformer-CNN hybrid prediction model based on a three-stage progressive compression strategy, which includes a first-stage architecture distillation, a second-stage soft-label distillation, and a third-stage structured pruning and quantization.
[0105] In this embodiment, an initial Transformer-CNN hybrid prediction model is trained in the cloud using the S2 augmented training dataset as the teacher model. This teacher model is then compressed into a student model with lower parameter count and lower inference latency through knowledge distillation, network pruning, and INT8 quantization techniques, enabling deployment on edge devices. The knowledge distillation technique includes architecture distillation and soft label distillation. Architecture distillation is supervised by layer-by-layer feature alignment loss to compress the Transformer branch of the teacher model. Soft label distillation uses temperature-scaled teacher model outputs as soft labels and optimizes the CNN branch of the teacher model by combining soft label distillation loss, feature map matching loss, and hard label loss. Structured pruning removes redundant convolutional channels by combining channel importance scores of weight magnitude and gradient, and then uses quantization-aware training to quantize the model weights to INT8 precision. Ultimately, this compresses a large-scale Transformer-CNN hybrid prediction model in the cloud into a student model with ≤1MB of parameters and ≤5ms inference latency, deployable on edge devices.
[0106] The Transformer-CNN hybrid prediction model includes a Transformer module, a CNN module, a multimodal feature fusion layer, and an output layer. The Transformer module includes multiple stacked Transformer encoders, each of which includes a multi-head self-attention sub-layer (MHA), a feedforward network sub-layer (FFN), and a layer normalization sub-layer (LayerNorm). The CNN module includes convolutional layers, batch normalization sub-layers, and activation function layers (ReLU).
[0107] Furthermore, the difference between the teacher model and the student model in the CNN module is that the teacher model uses a ResNet-50 backbone network for its convolutional layers, while the student model uses a lightweight depthwise separable convolution MobileNetV3-Small.
[0108] The multimodal feature fusion layer includes an attention mechanism unit and a gated fusion unit; the output layer includes a three-layer fully connected network, which outputs a power prediction value, a fault type 12 classification, and a confidence regression value; wherein the fault types are classified according to rare operating conditions, and in this embodiment, the operating conditions are classified into 12 categories according to step S24.
[0109] In this embodiment, the Transformer module of the teacher model includes 12 stacked Transformer encoders. Each Transformer encoder uses 16 independent attention heads in parallel. The hidden layer dimension of each Transformer encoder is 1024, meaning that each feature is represented as a vector of length 1024 during processing at each layer. The feedforward sublayer has a dimension of 4096, indicating that the feature dimension is expanded from 1024 to 4096 and then mapped back to 1024. The random deactivation Dropout is set to 0.1. The convolutional layer of the teacher model uses a ResNet-50 backbone network, and the output feature dimension after global average pooling (GAP) is 2048. The multimodal feature fusion layer of the teacher model includes a cross-modal attention mechanism unit and a gated fusion unit. First, the semantic association weights between different modal features are calculated through the cross-modal attention mechanism. Then, the gated fusion unit dynamically weights and fuses the modal features according to real-time data quality indicators, outputting a 512-dimensional fused feature vector.
[0110] In a preferred embodiment, a multimodal feature vector, including 128-dimensional electrical parameter temporal features, environmental parameter temporal features, and image features, is input to the multimodal feature fusion layer. Semantic associations between different modalities are calculated using a cross-modal attention mechanism, resulting in an enhanced feature vector and the calculation of attention weights. ,in , All are modal embedding vectors. The learningable weight matrix is then used; subsequently, the gated fusion unit adaptively allocates the weights for each modality and calculates the gate value. ,in The learnable weight matrix for the gated unit. For the bias term of the gating unit, For data quality indicators, This indicates the operation of concatenating modality embedding vectors with data quality metrics. For the Sigmoid function, in this embodiment This is the reciprocal of the sensor error. If the error of a certain sensor is large, then its... Small value, gate value The values will also decrease accordingly; finally, all gate values are normalized to obtain the normalized weights. Calculate fusion features Output a 512-dimensional fused feature vector.
[0111] like Figure 4 As shown, in this embodiment, the Transformer module of the student model includes four stacked Transformer encoders, each using eight independent attention heads in parallel, and the hidden layer dimension of each Transformer encoder is 256. The convolutional layers in the CNN module of the student model employ depthwise separable convolution MobileNetV3-Small, and after global average pooling (GAP), the output feature dimension is 512. The multimodal feature fusion layer of the student model includes a single-layer attention mechanism unit and a gated fusion unit, outputting a 512-dimensional fused feature vector.
[0112] In a preferred embodiment, a large-scale Transformer-CNN hybrid prediction model is trained on a cloud GPU cluster configured with 8×NVIDIA A100 40GB GPUs. The training parameters of the Transformer-CNN hybrid prediction model are configured with the AdamW optimizer, a learning rate of 1e-4, and a weight decay of 0.01. The loss function is a weighted sum (weights 3:5:2) of the power prediction loss Huber Loss, the fault classification loss Focal Loss (α=0.25, γ=2), and the confidence loss MSE Loss. The class weight α of the Focal Loss is 0.25, the sample adjustment factor γ is 2, and the weight distribution ratio of the three loss functions is 3:5:2. The batch size is configured with 256, the training epochs are 100, the learning rate decay strategy of Cosine Annealing is adopted, the training time is 48 hours, and the final mean absolute percentage error (MAPE) on the test set is 2.8%, and the fault classification accuracy is 99.7%.
[0113] In this embodiment, the three-stage progressive compression strategy includes the following specific aspects:
[0114] S31, First-stage architecture distillation: First, freeze the teacher model parameters, align the outputs of each layer of the student model's Transformer encoder with the corresponding outputs of the teacher model's Transformer encoder. Since the student model has fewer Transformer encoder layers than the teacher model, this embodiment uses a uniform mapping strategy to align the output of the i-th layer of the student model's Transformer encoder to the output of the 3i-th layer of the teacher model's Transformer encoder. Training is then performed with the goal of minimizing the layer-by-layer distillation loss. The layer-by-layer distillation loss is calculated using the following logic:
[0115]
[0116] in, and Let be the i-th hidden state of the student model and the teacher model, respectively. , , It is a learnable linear projection matrix. B is the batch size, and T is the sequence length. For the real number space, This indicates that the tensor belongs to a real number space with batch size B, sequence length T, and feature dimension 256; the overall architecture distillation loss is expressed as: ,in For the student model, the number of Transformer encoder layers. Let be the distillation loss of the i-th layer.
[0117] In a preferred embodiment, the compression strategy based on S31 is trained for 10 rounds, and the student model after 10 rounds of training is able to reproduce about 85% of the intermediate representation capability of the teacher model.
[0118] S32, Second stage soft-label distillation: The output distribution of the teacher model is softened using a Softmax function with a preset temperature coefficient as soft labels, and a joint distillation loss function is constructed for training. The joint distillation loss function includes the soft-label distillation loss. Feature map matching loss and hard label loss .
[0119] In this embodiment, the temperature-scaling Softmax function is used to soften the hard output of the teacher model into a probability distribution, and the softening formula is expressed by the following logic:
[0120]
[0121] in, This represents the probability value of category i after softening with a temperature coefficient. For temperature coefficient, This is the raw logit output of the teacher model for category i. For the teacher model's original logit output for category j, the temperature coefficient τ=4 makes the probability distribution smoother, thus containing more information about inter-class relationships.
[0122] In this embodiment, the soft label distillation loss ,in , Let be the output probability distributions of the teacher model and the student model, respectively, and KL be the KL divergence. This is the temperature squared compensation factor;
[0123] The feature map matching loss ,in , These are the feature maps of the intermediate convolutional layers of the CNN modules for the teacher and student models, respectively, where C is the number of channels, and H and W are the height and width of the feature map; the hard-labeled loss... , For accurate labeling, such as fault type and actual power value, For cross-entropy, to ensure the accuracy of the student model on the real labels; in a preferred embodiment, the output of the third residual block of the ResNet-50 backbone network of the CNN module in the teacher model is matched with the output of the sixth layer of the MobileNetV3-Small student model.
[0124] In this embodiment, the weight ratios of the joint distillation loss function to the aforementioned loss function are configured as 0.4:0.3:0.3, respectively, using the following logical representation:
[0125]
[0126] in, This represents the loss function of combined distillation.
[0127] In a preferred embodiment, the compression strategy based on S32 is trained for 20 rounds, with the optimizer configured as AdamW, the learning rate as 5e-5, and the batch size as 128.
[0128] S33, Third Stage Structured Pruning and Quantification:
[0129] First, structured pruning is performed, and the importance score of each convolutional channel in the model is calculated. ,in Let c be the weight of the channel. The gradient of the loss with respect to the weights is used; a higher score indicates a more important channel. For the weight parameter index in the c-th channel, sum and iterate through all weight parameters of that channel, sort them by importance score from high to low, remove the convolutional channels corresponding to low importance scores, specifically 80% of the convolutional channels after sorting, and retain the key 20% of channels; in this embodiment, after structured pruning, use 10% of the training set data for 5 rounds of fine-tuning to restore accuracy.
[0130] Then, Quantization-Aware Training (QAT) is used for INT8 quantization. During training, pseudo-quantization nodes are inserted to simulate the INT8 quantization effect. The weight quantization formula is expressed as follows: The activation value quantization formula is expressed as follows: ,in , This is the quantization scaling factor for the weight and activation values.
[0131] In a preferred embodiment, the optimal quantization parameters are determined by statistical weighting and activation value distribution from 500 batches of calibration data. , After 10 rounds of training with quantization perception, the final model was generated using TensorRT's INT8 inference engine through post-quantization (PTQ). The model size was reduced from 480MB to 0.96MB, the MAPE on the test set increased from 2.8% to 3.1%, and the accuracy loss was kept within 1.2%.
[0132] S4 deploys a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time edge inference, outputting the probability of fault type, power prediction value, and corresponding confidence level for future time periods.
[0133] In this embodiment, the distilled student model is converted into the TensorRT engine format and deployed to the edge node. TensorRT is used for graph optimization, including layer fusion, constant folding, and accuracy calibration to enable FP16 mixed-precision inference. The edge node receives sensor data and caches it in a circular queue for real-time inference at the edge.
[0134] In a preferred embodiment, the edge node is configured as an NVIDIA Jetson AGX Orin edge AI computing unit with a computing power of 32 TOPS, 16GB of memory, and 512GB of NVMe SSD storage. It adopts the TensorRT acceleration framework, supports FP16 / INT8 mixed precision inference, has a batch size that can be dynamically adjusted from 1 to 32, a model inference latency of ≤5ms, a throughput of ≥200 samples / second, and a sensor data reception capacity of 1000 records. In this embodiment, the measured inference latency is 4.2ms, the batch size is set to 8, and the throughput reaches 230 samples / second.
[0135] This embodiment adopts an adaptive precision strategy to balance data precision and latency. In step S4, the real-time inference on the edge side includes four stages: data preprocessing, feature encoding, attention calculation, and output decoding.
[0136] In the data preprocessing stage, the sliding window length is dynamically selected for normalization based on the volatility index of the input data. The volatility index ν = σ / μ, where σ is the standard deviation and μ is the mean. When the volatility index ν is greater than a preset volatility threshold, it indicates drastic data fluctuations, and short-window normalization is used to quickly adapt to changes in operating conditions. When the volatility index ν is not higher than the preset volatility threshold, it indicates stable data, and long-window normalization is used to obtain more stable statistics. In this embodiment, the total window length is 288 steps = 24 hours. A short window is defined as 30 steps corresponding to 2.5 hours, and a long window is defined as 60 steps corresponding to 5 hours. The preset volatility threshold is 0.3.
[0137] In the feature encoding stage, time-series features of electrical parameters, time-series features of environmental parameters, and image features are extracted and then concatenated into a multimodal embedding vector after encoding.
[0138] In a preferred embodiment, electrical parameter timing characteristics The parameters are represented as 8-dimensional electrical parameters over 288 time steps, including voltage, current, and power. Local mutation patterns are extracted using a 1D convolutional network with three layers (kernel size 3, stride 1, and channel numbers 64, 128, and 256 respectively), followed by global average pooling to output a 256-dimensional vector. ;
[0139] Temporal characteristics of environmental parameters The environmental parameters, including illumination, temperature, and wind speed, are represented as 5-dimensional parameters over 288 time steps. Long-term dependencies are modeled using a two-layer bidirectional LSTM (64-dimensional hidden layers), and the final time step outputs a 128-dimensional vector. ;
[0140] Image features After extracting spatial features through the MobileNetV3-Small network, a 128-dimensional vector is output using global average pooling. ;
[0141] The three feature vectors mentioned above are concatenated to form a 512-dimensional multimodal embedding vector. As input to subsequent Transformer layers.
[0142] In this embodiment, the 1D convolutional network, bidirectional LSTM, and MobileNetV3-Small network are used as preprocessing encoders, which are relatively independent of the main architecture of the Transformer-CNN hybrid prediction model. The 1D convolutional network is used for extracting local mutation patterns of electrical parameters, the bidirectional LSTM is used for modeling long-term dependencies of environmental parameters, and MobileNetV3-Small is used for image feature extraction. The preprocessing encoders convert the original multimodal data into multimodal embedding vectors of a unified dimension.
[0143] During the attention calculation phase, the number of heads in the model's attention mechanism is dynamically adjusted based on the sensor data quality; specifically, when all sensor errors... When the error is below a preset sensor error threshold, the student model uses full 8-head attention to achieve optimal accuracy; when any sensor error exists... When the error is not lower than a preset sensor error threshold, the student model degenerates into a 4-head attention model to reduce noise impact and computational load; in this embodiment, the preset sensor error threshold is 2%, and the above logic is expressed as follows: .
[0144] In the output decoding stage, uncertainty estimation is performed on the prediction results using a random dropout method. In this embodiment, the random dropout method adopts Monte Carlo Dropout (MCDropout) uncertainty estimation. Specifically, during inference, the Dropout layer is kept active and multiple forward propagations are performed, and the mean of each prediction value is calculated as the point prediction. Standard deviation as a form of uncertainty Calculate the confidence level of the predicted value The output includes the fault type probability, power prediction value, and corresponding confidence level. In this embodiment, the prediction result is specifically the power prediction value and the fault type probability. The output decoding stage is set to 10 forward propagations, and the power prediction value is output as the power curve for the next 15 minutes.
[0145] Furthermore, S4 also includes real-time feedback of the output results based on confidence level. Specifically, output results with a confidence level below 60% are marked as "uncertain," and the prediction results are published to the control terminal in real time via MQTT. Through the deployment strategy of S4, while ensuring that the power prediction MAPE ≤ 3.2%, the average inference latency is reduced from a fixed configuration of 5.1ms to 4.2ms, the inference latency is ≤ 5ms, and the end-to-end latency is ≤ 15ms. This avoids prediction anomalies caused by noisy data in sensor failure scenarios.
[0146] S5, Lifelong Learning and Model Self-Evolution: Edge nodes continuously monitor the performance of the lightweight Transformer-CNN hybrid prediction model. When a new scenario is detected, local incremental learning based on an improved elastic weight consolidation algorithm is triggered. Model parameters are fine-tuned using recent data, and the parameter increments are uploaded to the cloud. The cloud uses a weighted federated averaging algorithm to aggregate parameter increments from multiple edge nodes, optimizes the global model, and periodically updates and distributes it to the edge nodes. Figure 5 As shown.
[0147] S51, New Scenario Detection: The performance of the lightweight Transformer-CNN hybrid prediction model is continuously monitored at edge nodes, with an evaluation performed hourly; a dual detection mechanism is employed for new scenario detection, including the following:
[0148] The first layer is distribution drift detection, specifically calculating the current data window. Compared to historical benchmark windows Wasserstein distance , represented as ;in, for and The set of all joint distributions, For the current data window The nth sample in Historical benchmark window The m-th sample in the dataset, for Explanation, It is a joint distribution, that is, simultaneously drawing from... and The probability distribution of sample pairs, In joint distribution Sample pairs obtained by subsampling Expectations Represents the set of all possible joint distributions Taking the infimum (minimum) from the middle, the physical meaning of this formula is to... Optimal distribution transmission to Minimum average cost required for the distribution; for Wasserstein distance The actual calculation uses the Sinkhorn algorithm from the POT library for approximate solution. Distribution drift is determined to occur when the value exceeds a preset distribution drift threshold. In this embodiment, the preset distribution drift threshold is set to 0.15.
[0149] The second step is performance degradation detection, which involves calculating the predicted MAPE within a sliding window. When the MAPE of consecutive batches exceeds a preset performance degradation threshold, it is determined that model performance degradation has occurred. In this embodiment, the preset performance degradation threshold is set to 5%, and the predicted MAPE is calculated within the sliding window for 20 consecutive batches.
[0150] In this embodiment, when distribution drift and / or model performance degradation are detected, S52 is triggered to perform local incremental learning. After a new working condition is detected, the K-means clustering algorithm is used to calculate the Euclidean distance between the center of the new data sample and the centers of each known working condition. If the minimum distance is greater than the Euclidean distance threshold, it indicates that the working condition is significantly different from all known working conditions, and a new working condition category needs to be created. If the minimum distance is not greater than the Euclidean distance threshold, it indicates that the working condition can be classified into the nearest known working condition category, and a new category does not need to be created. In this embodiment, the number of clusters K in the K-means clustering algorithm is 12, corresponding to 12 known working conditions, and the Euclidean distance threshold is 0.3.
[0151] S52, Improved Incremental Training: Local incremental learning is performed based on an improved Elastic Weight Consolidation (EWC) algorithm, specifically:
[0152] First, after the pre-trained model is completed, the validation set data is used to calculate the parameters of each model. Fisher information matrix elements Where D is the data distribution, and P(y|x,θ) is the probability that the model predicts the true label y given the complete parameter set θ. The larger the value, the more likely it is to be the first. Model parameters The more important it is for the model performance; for Sort them, fix the top 50% important parameters, usually the parameters of the first 2 layers of the Transformer module and the CNN module.
[0153] Next, calculate the cosine similarity s between the new working condition and the known working conditions, and dynamically determine the number of neural network layers that need to be fine-tuned. When the cosine similarity s is greater than the first preset similarity threshold, only fine-tune the last 1 layer of the model; when the cosine similarity s is not higher than the first preset similarity threshold and greater than the second preset similarity threshold, fine-tune the last 3 layers of the model; when the cosine similarity s is not higher than the second preset similarity threshold, fine-tune the last 5 layers of the model; where the cosine similarity , where 、 Are the average feature vectors of the new working condition and the known working conditions respectively.
[0154] In a preferred embodiment, the first preset similarity threshold and the second preset similarity threshold are defined as 0.8 and 0.5 respectively. When s > 0.8, only fine-tune the last 1 layer (a fully connected layer) of the model, which contains 180 parameters; when 0.5 < s ≤ 0.8, fine-tune the last 3 layers of the model, which contains about 5000 parameters; when s ≤ 0.5, fine-tune the last 5 layers of the model, which contains about 12000 parameters.
[0155] Then, use recent data for incremental training, and introduce a consolidation strength coefficient λ into the loss function L, expressed as , where Is the pre-trained parameter, Is the task loss of the new data, Is the consolidation strength coefficient, , Is the regularization coefficient, epoch is the current training round, Is the total number of training rounds (in this embodiment = 50), indicating that the consolidation strength coefficient increases linearly with the training progress. By introducing the Fisher information matrix into the regularization term Of the loss function, more attention is paid to the retention of old knowledge in the later stage of training; the learning rate adopts the cosine annealing strategy , where 、 Are the maximum and minimum learning rates respectively.
[0156] In a preferred embodiment, use about 25000 samples of data in the recent 72 hours for incremental training, Take 1000, Take 1e-6, Using 1e-5, training for 50 rounds, with a total duration of approximately 8 minutes, the CPU utilization on the edge node device Jetson AGXOrin is ≤60%, and the memory usage is ≤2GB.
[0157] S53, Cloud Aggregation: Periodically package and upload the incremental parameters of the edge nodes after incremental training to the cloud. The cloud uses the weighted federated average (FedAvg) algorithm to aggregate the parameters of multiple edge nodes. If the performance of the new Transformer-CNN hybrid prediction model (teacher model) after aggregation is better than the original model, the three-stage progressive compression strategy is re-executed to generate a new lightweight Transformer-CNN hybrid prediction model (student model) and distributed to each edge node.
[0158] In this embodiment, the edge nodes increment the parameters daily. Package and upload to the cloud, with incremental parameters. Specifically, it refers to the parameter difference after S52 fine-tuning. , among which are , These represent the model parameters before and after incremental training, respectively. The cloud-based system uses a weighted federated average algorithm to aggregate the parameters of N edge nodes. The aggregated global model is represented by the following logic. ,in As the baseline model parameters, For nodes The aggregate weights are calculated as follows: , , They are nodes ,node The incremental training data volume , They are nodes ,node The performance improvement after fine-tuning Using the mean absolute percentage error of the model before and after incremental training , Solve, expressed as And satisfying the weight normalization condition, expressed as The aggregated global model The validation set data is used for evaluation in the cloud. If the performance of the aggregated new teacher model is better than the original teacher model, the knowledge distillation strategy is re-executed to compress and generate a new lightweight student model and distribute it to each edge node to ensure that the global model absorbs the new patterns discovered by all nodes and continues to optimize.
[0159] In a preferred embodiment, the edge nodes upload approximately 200KB of data daily, with an aggregation cycle of 24 hours, executed daily at midnight, ensuring that the global model absorbs new patterns discovered by all nodes and continuously optimizes them.
[0160] S54, Model Validation: Perform offline validation and online testing on recent data for the new Transformer-CNN hybrid prediction model and the original model, respectively. If the validation requirements of offline validation and online testing are met, the new lightweight student model can be deployed to edge nodes; otherwise, roll back to the original version.
[0161] In a preferred embodiment, when the mean absolute percentage error improvement of the new Transformer-CNN hybrid prediction model is not less than 0.5% and the F1 score for fault classification shows no downward trend, it meets the requirements for offline verification. The new Transformer-CNN hybrid prediction model and the original model are subjected to online A / B testing, with gray-scale deployment to 10% traffic and continuous monitoring for 1 hour. If there is no abnormal output and the average latency is lower than the preset latency threshold, it meets the requirements for online testing and verification. The model version management retains the 5 most recent versions and supports one-click rollback, selecting the most stable version from the most recent versions for rollback.
[0162] Step S6, Adaptive data hierarchical transmission decision: Based on model prediction confidence and data value, the collected data is classified and different transmission and storage strategies are adopted.
[0163] like Figure 6 As shown, in this embodiment, the collected data is divided into four levels based on the confidence level of the model's output predicted values and data characteristics. The grading criteria are as follows:
[0164] The first-level key data is specifically fault warning data with a confidence level higher than 95%; the transmission strategy adopts the highest priority queue and dual-path redundant transmission from the edge to the cloud and from the edge to the local controller, with ≤3 times of packet loss retransmission and ≤10ms transmission delay; the storage strategy is to permanently store at the edge node and back up in the cloud, with no limit on the retention period; the fault warning data includes fault warning signals, power change events, and equipment abnormal alarms.
[0165] Level 2 critical data specifically refers to important operational status data with a confidence level between 80% and 95%; the transmission strategy adopts QoS level 2 single-path priority transmission with a transmission latency of ≤20ms; the storage strategy is to store at the edge node for 168 hours (7 days) and in the cloud for long-term storage; among which, the important operational status data includes real-time power curves, current and voltage waveforms, and abnormal areas in thermal imaging.
[0166] Level 3 general data specifically refers to routine monitoring data with a confidence level between 60% and 80%. The transmission strategy is to cache the data at the edge nodes and upload it in batches once per hour. The storage strategy is to compress and store the data at the edge nodes for 72 hours and store it in the cloud for 1 year. The routine monitoring data includes routine monitoring parameters and environmental data.
[0167] Level 4 low-value data refers to redundant sampled data or uncertain data with a confidence level of less than 60%. The transmission strategy is to not actively upload data and only respond to queries. The storage strategy is to compress the data at the edge node and discard it after 24 hours.
[0168] Based on the above analysis of data types and transmission and storage strategies, critical fault warning data can be 100% delivered even with 30% network congestion, with an average latency of 8.5ms; overall bandwidth usage has decreased from a peak of 120Mbps to 48Mbps, a reduction of 60%; cloud storage costs have decreased from 50TB / month to 27TB / month, a saving of 46%; and edge storage space utilization has increased from 65% to 92%.
[0169] like Figure 2 As shown, specifically, the present invention also discloses a system applying the above-mentioned photovoltaic sensing data processing method for edge computing, comprising:
[0170] The intelligent sensing terminal layer is used to collect photovoltaic system operating parameters and upload them to edge nodes in real time.
[0171] The digital twin platform constructs a digital twin of a photovoltaic array based on a physical simulation engine, generates simulation data for various rare working conditions, performs domain-adaptive processing on the simulation data and collected data, and mixes the data to build an enhanced training dataset.
[0172] The cloud-based intelligent layer is used to train a Transformer-CNN hybrid prediction model using an augmented training dataset. It generates a lightweight Transformer-CNN hybrid prediction model based on a three-stage progressive compression strategy, which includes a first-stage architecture distillation, a second-stage soft-label distillation, and a third-stage structured pruning and quantization. The architecture distillation is supervised by layer-by-layer feature alignment loss and compresses the Transformer branches of the initial Transformer-CNN hybrid prediction model.
[0173] The edge computing layer is used to deploy a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time inference at the edge, outputting the probability of fault type, power prediction value and corresponding confidence level for future time periods.
[0174] Example 2
[0175] This embodiment uses a 50MW distributed photovoltaic power station as the application scenario and compares the performance of the photovoltaic sensing data processing method provided in Embodiment 1 with the traditional method based on data from 6 months of continuous operation of the photovoltaic power station.
[0176] Compared with Method 1, a cloud-based LSTM model is used in combination with the standard MQTT protocol. The cloud-based LSTM model has a 3-layer bidirectional LSTM architecture, a 512-dimensional hidden layer, and approximately 8 million parameters. It is deployed on a cloud server, and data transmission uses the standard MQTT protocol with QoS=1.
[0177] Method 2 is a combination of edge fixed-parameter Kalman filtering and support vector machine, where the Kalman filtering algorithm is fixed-parameter Kalman filtering, the prediction model is support vector regression (RBF kernel), and the deployment location is the edge node. Table 2 below shows the performance comparison of different methods for photovoltaic sensing data processing.
[0178] Table 2. Comparison of performance of different methods for photovoltaic sensing data processing
[0179]
[0180] Comparison of test results under key operating conditions:
[0181] Under sudden change in illumination (cloud cover causing illumination to drop abruptly from 1000W / m² to 200W / m² for 5 minutes), the photovoltaic sensing data processing method in this embodiment can provide an early warning 45 seconds in advance with a prediction error of ±3.2% and accurate fault location. In contrast, method 1 requires a delay of 65ms to detect the anomaly with a prediction error of ±12.5%; and method 2 requires a delay of 28ms to detect the anomaly with a prediction error of ±18.3%.
[0182] Under hot spot fault conditions (the local temperature of the module exceeds 50°C), the fault identification accuracy of the photovoltaic sensing data processing method in this embodiment is 100%, and the positioning accuracy is down to a single module, taking 0.8 seconds; while the fault identification accuracy of the control method 1 is 78%, and the positioning can only be down to the inverter, taking 5.2 seconds; the fault identification accuracy of the control method 2 is 65%, and it cannot be accurately located.
[0183] Based on the photovoltaic sensing data processing method for edge computing disclosed in Embodiment 1, this 50MW power plant achieves an increase in annual power generation by 2.3% through precise power prediction and optimized scheduling, resulting in an additional revenue of approximately RMB 4.6 million per year; early warning reduces fault losses, shortening fault handling time by 82% and reducing annual power generation losses by approximately RMB 1.8 million; predictive maintenance replaces regular inspections, reducing operation and maintenance costs by 35% and saving labor costs of approximately RMB 850,000 per year; precise control reduces equipment overload, extends inverter lifespan by 15%, resulting in an annual benefit of approximately RMB 1.2 million, for a total annual economic benefit of approximately RMB 8.45 million and an investment payback period of 1.8 years.
[0184] Example 3
[0185] This embodiment provides a digital twin platform application case for step S2 in Embodiment 1.
[0186] Scenario 1: Performance Pre-Launch Simulation of New Equipment at a Power Plant: A power plant plans to introduce new N-type TOPCon modules to replace some of the old modules. Before actual installation, a performance simulation is conducted in the cloud using a digital twin platform. Specifically, based on the IV curve data provided by the manufacturer, a physical model of the new modules is built in the digital twin platform. A hybrid array scenario consisting of 30% new modules and 70% old modules is configured, simulating 8760 hours of annual operating data to evaluate power generation, module compatibility, and inverter adaptability.
[0187] The forecast showed an annual power generation increase of 4.2%, but a 3.5% power mismatch existed under low-light conditions. By adjusting the scheme and connecting the new and old modules to different MPPT channels, the power mismatch was reduced to 0.8% after resimulation. After actual installation, the measured power generation increased by 4.1%, with an error of only 2.4% compared to the simulation. Compared to direct installation and testing, the digital twin simulation saved approximately 150,000 yuan in testing costs, and the scheme optimization time was shortened from 2 months to 3 days.
[0188] Scenario 2, Extreme Weather Risk Assessment: Taking typhoons as an example, before the typhoon season, a digital twin platform is used to assess the impact of a Category 15 typhoon on the power station. Extreme operating parameters are configured, including wind speed of 35 m / s, gusts of 45 m / s, heavy rain of 100 mm / h, and a duration of 6 hours. The stress on components, deformation of supports, and changes in electrical performance are simulated.
[0189] The assessment predicted that 3% of the modules might have microcracks, 5% of the modules would be at risk of water ingress into the junction boxes, and 2 inverters might be overloaded. Preventative measures included reinforcing the supports, sealing the junction boxes, and adjusting the inverter parameters. However, after the typhoon, inspection revealed only 1% of the modules suffered minor damage, and 0 inverters failed, reducing losses by 85%.
[0190] Scenario 3, Virtual Verification of Operation and Maintenance Strategies: Test the impact of different cleaning cycles on power generation, considering factors such as rainfall, wind, and industrial pollution, and use a digital twin platform to simulate a dust accumulation model, comparing cleaning cycles including 1 week, 2 weeks, 1 month, and 2 months.
[0191] Simulation results show that cleaning for one week generates the most electricity, but considering the overall cleaning cost, cleaning for two weeks yields the best return (ROI improvement of 12%). Based on the simulation results, the actual cleaning cycle was adjusted from one month to two weeks, increasing annual revenue by approximately 600,000 yuan.
[0192] This invention collects photovoltaic system operating parameters and image data through intelligent sensing terminals deployed at photovoltaic equipment, constructs a digital twin of the photovoltaic array, and generates extreme condition simulation data. This data is then mixed with real data to build an enhanced training dataset, solving the problem of data scarcity in extreme scenarios. The digital twin-driven fusion of virtual and real data increases the sample size of rare faults by 20 times. The recognition accuracy for 12 types of extreme conditions, including hail damage, localized fires, and hot spot effects, is improved from 75% to over 99.5% compared to traditional methods, while the false alarm rate is reduced to below 0.3%. Furthermore, the digital twin platform not only provides training data but can also be used for performance simulations before new equipment goes live, virtual verification of operation and maintenance strategies, and risk assessment in extreme weather. A single simulation lasts only 30 seconds, reducing costs by 85% compared to real testing, and achieving a risk assessment accuracy of 96%.
[0193] This invention employs a three-stage progressive compression strategy. First, it compresses the cloud-based teacher model (Transformer-CNN hybrid prediction model) into a student model suitable for edge node deployment through architectural distillation. Then, it utilizes soft-label distillation to transfer knowledge. Finally, it performs structured pruning and INT8 quantization to compress the large cloud model into a lightweight model deployable at the edge, achieving millisecond-level prediction of power and faults. This reduces the inference latency of the student model deployed on edge nodes while ensuring that the student model's prediction accuracy approaches that of the cloud-based teacher model. The lightweight Transformer-CNN hybrid prediction model has an inference latency of only 5ms at the edge, and combined with the edge computing architecture, reduces the end-to-end data processing latency to less than 15ms, a 92% reduction compared to the cloud processing mode. This supports millisecond-level rapid control and fault isolation of photovoltaic systems. Furthermore, the long-term dependency modeling capability of the Transformer branches reduces the MAPE of 15-minute power prediction from 5.8% of traditional time series methods to 3.2%, and the MAPE of 24-hour prediction to 6.5%, with prediction accuracy 35% higher than traditional methods under sudden changes in illumination.
[0194] This invention is based on a lifelong learning mechanism that integrates edge nodes and the cloud. When an edge node detects a new operating condition, it autonomously fine-tunes the model and uploads incremental parameters to the cloud for aggregation and optimization. The cloud aggregates the parameter increments from multiple edge nodes using a weighted federated average algorithm, optimizes the global model, and periodically updates and distributes it to the edge nodes, continuously monitoring the model performance on the edge nodes. This lifelong learning mechanism, which integrates edge and cloud, enables the model to continuously adapt to evolving operating conditions. In long-term changing scenarios such as equipment aging and environmental changes, the model's accuracy decay rate is only 1 / 8 that of a traditional fixed model, and it still maintains more than 95% of its initial accuracy after 6 months.
[0195] This invention classifies collected data based on model prediction confidence and data value density and adopts different transmission and storage strategies. The four-level classification transmission strategy based on data value density reduces the transmission delay of critical fault early warning data to less than 10ms. Even under 30% network congestion, it can still ensure 100% accessibility of critical data, reduce overall bandwidth usage by 60%, and save 45% on cloud storage costs.
[0196] This invention compresses a cloud-based model with 120 million parameters into an edge model with 1 million parameters through knowledge distillation. The model size is reduced from 480MB to 0.96MB, and the inference computing power requirement is reduced from 32 TFLOPS to 1.2 TFLOPS. It can run smoothly on industrial-grade edge AI chips (such as NVIDIA Jetson), reducing edge device costs by 70%. This invention deeply integrates deep learning and edge computing in the field of photovoltaic sensing data processing, achieving intelligent photovoltaic sensing data processing with low latency (≤15ms), low power prediction error (MAPE≤3.2%), and high fault identification accuracy (≥99.5%). It provides a complete technical solution for the intelligent upgrading of the photovoltaic industry, demonstrating significant technological advancement and application value.
[0197] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A photovoltaic sensing data processing method for edge computing, characterized in that, Includes the following steps: S1 collects photovoltaic system operating parameters and uploads them to the edge node in real time; S2 constructs a digital twin of a photovoltaic array based on a physical simulation engine, generates simulation data for various rare working conditions, performs domain-adaptive processing on the simulation data and collected data, mixes the data, and constructs an enhanced training dataset. S3, train a Transformer-CNN hybrid prediction model using an enhanced training dataset. The initial Transformer-CNN hybrid prediction model serves as the teacher model, and a lightweight Transformer-CNN hybrid prediction model is generated based on a three-stage progressive compression strategy as the student model. The three-stage progressive compression strategy includes: The first stage of architecture distillation: Based on the uniform mapping strategy, the outputs of each layer of the Transformer encoder in the student model are aligned with the corresponding outputs of the Transformer encoder in the teacher model, and training is carried out with the goal of minimizing the layer-by-layer distillation loss; the architecture distillation is supervised by the layer-by-layer feature alignment loss and the Transformer branch of the initial Transformer-CNN hybrid prediction model is compressed. The second stage is soft label distillation: the output distribution of the teacher model is softened using the Softmax function with a preset temperature coefficient as soft labels, a joint distillation loss function is constructed for training, and the CNN branch of the teacher model is compressed. The joint distillation loss function includes soft label distillation loss, feature map matching loss and hard label loss. The third stage is structured pruning and quantization: structured pruning is performed, the importance score of each convolutional channel in the model is calculated, the importance scores are sorted from high to low, the convolutional channels corresponding to low importance scores are removed and then fine-tuned; quantization-aware training is used to quantize the model weights. S4 deploys a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time edge inference, outputting the probability of fault type, power prediction value, and corresponding confidence level for future time periods.
2. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, The operating parameters mentioned in S1 include the output voltage, current, surface temperature, ambient light intensity, wind speed, infrared thermal imaging data, and visible light images of the photovoltaic module.
3. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, S2 includes the following: S21, a digital twin of a photovoltaic array is constructed based on multiphysics simulation software, including electrical subsystem, thermal subsystem and optical subsystem; S22, a coupled solution is performed on the electrical subsystem, thermal subsystem and optical subsystem; S23, based on the Bayesian optimization algorithm, uses historical operating data as real data to calibrate the simulation data output by the digital twin of the photovoltaic array; S24, based on the Monte Carlo sampling method, randomly samples each rare working condition scenario in the parameter space, and each sampling triggers physical simulation to generate corresponding electrical timing data; S25, Construct a domain adversarial neural network, including a feature extractor, a task predictor, and a domain classifier; The feature extractor is trained to produce features that cannot be distinguished by the domain classifier from real or simulated data. S26. Mix simulation data and real data in a predetermined ratio to construct an enhanced training dataset for model training.
4. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, The Transformer-CNN hybrid prediction model described in S3 includes a Transformer module, a CNN module, a multimodal feature fusion layer, and an output layer. The Transformer module includes multiple stacked Transformer encoders, each of which includes a multi-head self-attention sub-layer, a feedforward network sub-layer, and a layer normalization sub-layer. The CNN module includes convolutional layers, batch normalization sub-layers, and activation function layers. The multimodal feature fusion layer includes attention mechanism units and gated fusion units. The output layer includes a three-layer fully connected network that outputs predicted power values, fault types, and confidence regression values. The fault types are classified according to rare operating conditions. Using the initial Transformer-CNN hybrid prediction model as the teacher model, a three-stage progressive compression strategy is used to compress the teacher model into a student model with lower model parameter count and lower inference latency.
5. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, The edge-side real-time inference described in S4 includes the following: Data preprocessing stage: Normalization is performed by dynamically selecting the sliding window length based on the volatility index of the input data; Feature encoding stage: Extract time-series features of electrical parameters, time-series features of environmental parameters, and image features respectively, encode them, and concatenate them into a multimodal embedding vector; Attention calculation phase: Dynamically adjust the number of heads in the model's attention mechanism based on the quality of sensor data; In the output decoding stage, uncertainty estimation is performed on the prediction results using the random dropout method, and the confidence level of the prediction results is calculated.
6. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, The method further includes: S5 continuously monitors the performance of the lightweight Transformer-CNN hybrid prediction model at the edge nodes. When a new working condition is detected, it triggers local incremental learning based on the improved elastic weight consolidation algorithm, fine-tunes the model parameters using recent data, and uploads the parameter increments to the cloud. The cloud uses a weighted federated average algorithm to aggregate the parameter increments from multiple edge nodes, optimizes the global model, and periodically updates and distributes it to the edge nodes.
7. The photovoltaic sensing data processing method for edge computing according to claim 6, characterized in that, The local incremental learning based on the improved elastic weight consolidation algorithm described in S5 is specifically as follows: Calculate the cosine similarity between the new working condition and the known working condition, and dynamically determine the number of neural network layers that need to be fine-tuned. When the cosine similarity is greater than the first preset similarity threshold, only the last layer of the model is fine-tuned; when the cosine similarity is not higher than the first preset similarity threshold but is greater than the second preset similarity threshold, the last three layers of the model are fine-tuned; when the cosine similarity is not higher than the second preset similarity threshold, the last five layers of the model are fine-tuned. Incremental training is performed using recent data, and a regularization term based on the Fisher information matrix is introduced into the loss function.
8. The photovoltaic sensing data processing method for edge computing according to claim 1, characterized in that, The method further includes: S6, based on model prediction confidence and data value, classifies the collected data and adopts different transmission and storage strategies, specifically: For Level 1 critical data, the transmission strategy adopts the highest priority queue and dual-path redundant transmission from edge to cloud and from edge to local controller. The storage strategy is to permanently store it at the edge node and back it up in the cloud, with no limit on the retention period. For Level 2 critical data, the transmission strategy adopts QoS Level 2 single-path priority transmission, and the storage strategy is short-term storage at the edge node and long-term storage in the cloud. For Level 3 ordinary data, the transmission strategy is to cache at the edge node and then upload in batches, and the storage strategy is to compress and store it at the edge node for a short period of time and store it in the cloud for a long period of time. For Level 4 low-value data, the transmission strategy is to not actively upload and only respond to queries, and the storage strategy is to compress and store it on edge nodes for a short period of time and then discard it.
9. A photovoltaic sensing data processing system for edge computing, characterized in that, include: The intelligent sensing terminal layer is used to collect photovoltaic system operating parameters and upload them to edge nodes in real time. The digital twin platform constructs a digital twin of a photovoltaic array based on a physical simulation engine, generates simulation data for various rare working conditions, performs domain-adaptive processing on the simulation data and collected data, and mixes the data to build an enhanced training dataset. S3, train a Transformer-CNN hybrid prediction model using an enhanced training dataset. The initial Transformer-CNN hybrid prediction model serves as the teacher model, and a lightweight Transformer-CNN hybrid prediction model is generated based on a three-stage progressive compression strategy as the student model. The three-stage progressive compression strategy includes: The first stage of architecture distillation: Based on the uniform mapping strategy, the outputs of each layer of the Transformer encoder in the student model are aligned with the corresponding outputs of the Transformer encoder in the teacher model, and training is carried out with the goal of minimizing the layer-by-layer distillation loss; the architecture distillation is supervised by the layer-by-layer feature alignment loss and the Transformer branch of the initial Transformer-CNN hybrid prediction model is compressed. The second stage is soft label distillation: the output distribution of the teacher model is softened using the Softmax function with a preset temperature coefficient as soft labels, a joint distillation loss function is constructed for training, and the CNN branch of the teacher model is compressed. The joint distillation loss function includes soft label distillation loss, feature map matching loss and hard label loss. The third stage is structured pruning and quantization: structured pruning is performed, the importance score of each convolutional channel in the model is calculated, the importance scores are sorted from high to low, the convolutional channels corresponding to low importance scores are removed and then fine-tuned; quantization-aware training is used to quantize the model weights. The edge computing layer is used to deploy a lightweight Transformer-CNN hybrid prediction model to edge nodes for real-time inference at the edge, outputting the probability of fault type, power prediction value and corresponding confidence level for future time periods.