Photovoltaic cleaning management method and device based on improved Transform model

By improving the cross-head collaboration mechanism of the Transformer model to process the operation and environmental data of photovoltaic panels, the problems of low efficiency and high misjudgment rate of existing photovoltaic panel cleanliness detection are solved, and more efficient and accurate photovoltaic panel cleaning management is achieved.

CN120744455APending Publication Date: 2025-10-03ZHEJIANG RONGXINDA POWER TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510910595.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing photovoltaic panel cleanliness detection methods have problems such as low efficiency, high cost and high misjudgment rate. Especially when faced with interference factors such as sensor errors, environmental changes and cloud cover, it is difficult to accurately judge the cleanliness of photovoltaic panels.

Method used

An improved Transformer model is used to process the operation data and environmental data of photovoltaic panels through multiple attention head generation modules and attention stacking modules, realizing a cross-head collaboration mechanism, enhancing attention to key events and reducing misjudgments.

Benefits of technology

The accuracy and efficiency of photovoltaic panel cleanliness detection are improved, the misjudgment rate is reduced, and the cleaning time of photovoltaic panels can be located more accurately and accurate cleaning recommendations can be output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744455A_ABST
    Figure CN120744455A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic cleaning management method and device based on an improved Transform model, and the method comprises the steps: obtaining an input matrix through the input data of the improved Transform model; obtaining an attention score matrix obtained by each attention head generation module according to the input matrix according to at least two attention head generation modules; performing layer distribution processing on the at least two attention score matrixes to obtain an attention score multi-dimensional matrix, and performing dimension reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix; obtaining an output matrix according to the fused attention score matrix, taking the output matrix as an input matrix of the next processing unit, and by parity of reasoning, obtaining an output matrix output by the last processing unit; and determining and outputting a cleaning suggestion of the photovoltaic panel according to the output matrix output by the last processing unit by using an improved Transform model. The detection result of the improved Transform model is more accurate, so that the determined photovoltaic panel cleaning suggestion is more accurate, and misjudgment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of photovoltaic technology, and in particular to a photovoltaic cleaning management method and device based on an improved Transformer model. Background Art

[0002] The cleanliness of photovoltaic panels significantly impacts their power generation efficiency and lifespan. Dust, dirt, pollen, and other airborne particles deposited on the surface of photovoltaic panels can reduce power generation efficiency and even pose safety risks. Therefore, regular inspection and cleaning are essential.

[0003] Currently, conventional inspection methods include visual inspection, drone scanning, infrared thermal imaging, and photovoltaic cleanliness detection using photovoltaic time series data. Although these methods can assess the cleanliness and performance status of photovoltaic panels, they also have some shortcomings. For example, visual inspection methods are heavily dependent on manual labor and are inefficient, making them unsuitable for the current large-scale photovoltaic panel cleanliness inspection. Drone scanning and infrared thermal imaging detection methods are also costly. In practical applications, methods that use photovoltaic time series data to monitor photovoltaic cleanliness are susceptible to measurement errors and environmental influences, leading to inaccurate results. For example, if a photovoltaic panel is obscured by clouds, power generation may decrease. However, when the clouds disperse, power generation may increase. However, this detection method may mistakenly interpret this increase as a cleaning event, resulting in inaccurate results. Therefore, a more accurate detection method is needed to monitor photovoltaic cleanliness. Summary of the Invention

[0004] The present application provides a photovoltaic cleaning management method and device based on an improved Transformer model to solve the problem of inaccurate photovoltaic cleaning prediction.

[0005] In a first aspect, the present application provides a photovoltaic cleaning management method based on an improved Transformer model, wherein the improved Transformer model includes: a plurality of processing units, the plurality of processing units are arranged in sequence, each of the processing units includes: a plurality of attention head generation modules and an attention stacking module, and the method includes: Obtaining input data for the improved Transformer model, the input data including operating data and environmental data of the photovoltaic panels collected at multiple collection times; Inputting the input data into the improved Transformer model to obtain an input matrix; Inputting the input matrix into at least two of the attention head generation modules of the first processing unit, and obtaining an attention score matrix obtained by each of the attention head generation modules according to the input matrix; Inputting the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multi-dimensional matrix of attention scores, wherein in the multi-dimensional matrix of attention scores, projections of elements in the at least two attention score matrices overlap; Controlling the attention head stacking module to perform dimensionality reduction processing on the attention score multidimensional matrix to obtain a fused attention score matrix; Obtain an output matrix according to the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; The improved Transformer model is used to determine and output cleaning status information and / or cleaning instructions for the photovoltaic panel according to the output matrix output by the last processing unit.

[0006] Optionally, inputting the at least two attention score matrices into the attention head stacking module so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multidimensional matrix of attention scores includes: The at least two attention score matrices are input into the attention head stacking module, and the attention head stacking module is controlled to process the at least two attention score matrices by layer, and make the projections of the elements at the same position in the at least two attention score matrices overlap to obtain the attention score multidimensional matrix.

[0007] Optionally, controlling the attention head stacking module to perform dimensionality reduction processing on the attention score multidimensional matrix to obtain a fused attention score matrix includes: Performing a first convolution process on the attention score multidimensional matrix according to a first convolution function to obtain an intermediate attention fusion matrix; Activate the intermediate attention fusion matrix according to the activation function to obtain an activated attention fusion matrix; A second convolution process is performed on the activated attention fusion matrix according to a second convolution function to obtain the fused attention score matrix.

[0008] Optionally, the method further includes: Using the improved Transformer model, determining a value matrix according to the input matrix; The obtaining an output matrix according to the fused attention score matrix includes: The fused attention score matrix is ​​weighted according to the value matrix to obtain the output matrix.

[0009] Optionally, inputting the input data into the improved Transformer model to obtain an input matrix includes: Using the improved Transformer model, word embedding is performed on the input data to obtain a data input matrix; Using the improved Transformer model, position embedding is performed on the input data to obtain a position input matrix; The input matrix is ​​obtained according to the data input matrix and the position input matrix.

[0010] Optionally, inputting the input data into the improved Transformer model to obtain an input matrix includes: When a cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain an input matrix, where the cleaning trigger condition includes but is not limited to at least one of the following: the rainfall within a first preset time period is less than a preset rainfall amount, the inverter output power reduction rate is greater than a preset rate and the reduced power is still maintained after a second preset time period, and a flock of birds is detected circling the photovoltaic panel.

[0011] Optionally, the operating data includes: inverter output power, planar array irradiance, and the environmental data includes: temperature, humidity, wind speed, rainfall, climate type, longitude and latitude, altitude, terrain, and vegetation coverage within a preset range of the photovoltaic panel.

[0012] Optionally, the input data further includes time data, which includes the year, month, day, time information within a day, season, week, and holidays corresponding to the collection time.

[0013] In a second aspect, the present application provides a photovoltaic cleaning management device based on an improved Transformer model, wherein the improved Transformer model includes: a plurality of processing units, the plurality of processing units are arranged in sequence, each of the processing units includes: a plurality of attention head generation modules and an attention stacking module, and the device includes: A first acquisition module is used to acquire input data of the improved Transformer model, wherein the input data includes operation data and environmental data of the photovoltaic panels collected at multiple collection times; A model acquisition module, configured to input the input data into the improved Transformer model to obtain an input matrix, and input the input matrix into at least two attention head generation modules of the first processing unit, obtain an attention score matrix obtained by each attention head generation module according to the input matrix, and input the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain an attention score multi-dimensional matrix, wherein the projections of the elements in the at least two attention score matrices coincide, and control the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix, and obtain an output matrix based on the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; The output module is used to determine and output cleaning status information and / or cleaning instructions for the photovoltaic panel based on the output matrix output by the last processing unit using the improved Transformer model.

[0014] Optionally, the model acquisition module inputs the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multidimensional matrix of attention scores, specifically for: The at least two attention score matrices are input into the attention head stacking module, and the attention head stacking module is controlled to process the at least two attention score matrices by layer, and make the projections of the elements at the same position in the at least two attention score matrices overlap to obtain the attention score multidimensional matrix.

[0015] Optionally, the model acquisition module controls the attention head stacking module to perform dimensionality reduction processing on the attention score multidimensional matrix to obtain a fused attention score matrix, specifically for: Performing a first convolution process on the attention score multidimensional matrix according to a first convolution function to obtain an intermediate attention fusion matrix; Activate the intermediate attention fusion matrix according to the activation function to obtain an activated attention fusion matrix; A second convolution process is performed on the activated attention fusion matrix according to a second convolution function to obtain the fused attention score matrix.

[0016] Optionally, the model acquisition module 620 is further configured to: Using the improved Transformer model, determining a value matrix according to the input matrix; The model acquisition module obtains an output matrix according to the fused attention score matrix, specifically for: The fused attention score matrix is ​​weighted according to the value matrix to obtain the output matrix.

[0017] Optionally, the model acquisition module inputs the input data into the improved Transformer model to obtain an input matrix, specifically for: Using the improved Transformer model, word embedding is performed on the input data to obtain a data input matrix; Using the improved Transformer model, position embedding is performed on the input data to obtain a position input matrix; The input matrix is ​​obtained according to the data input matrix and the position input matrix.

[0018] Optionally, the model acquisition module inputs the input data into the improved Transformer model to obtain an input matrix, specifically for: When a cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain an input matrix, where the cleaning trigger condition includes but is not limited to at least one of the following: the rainfall within a first preset time period is less than a preset rainfall amount, the inverter output power reduction rate is greater than a preset rate and the reduced power is still maintained after a second preset time period, and a flock of birds is detected circling the photovoltaic panel.

[0019] Optionally, the operating data includes: inverter output power, planar array irradiance, and the environmental data includes: temperature, humidity, wind speed, rainfall, climate type, longitude and latitude, altitude, terrain, and vegetation coverage within a preset range of the photovoltaic panel.

[0020] Optionally, the input data further includes time data, which includes the year, month, day, time information within a day, season, week, and holidays corresponding to the collection time.

[0021] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory; Memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method as described in any one of the first aspects.

[0022] In a fourth aspect, an embodiment of the present application provides a readable storage medium, including a program or instruction. When the program or instruction runs on a computer, the method described in any one of the above-mentioned first aspects is executed.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method as described in any one of the first aspects.

[0024] The photovoltaic cleaning management method and device based on the improved Transformer model provided in the present application obtain input data of the improved Transformer model, input the input data into the improved Transformer model, and obtain an input matrix; input the input matrix into at least two attention head generation modules of the first processing unit, and obtain an attention score matrix obtained by each attention head generation module according to the input matrix; input at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain an attention score multi-dimensional matrix, and controls the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix; obtain an output matrix based on the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; using the improved Transformer model, according to the output matrix output by the last processing unit, determine and output the cleaning status information and / or cleaning instructions for the photovoltaic panel. In this application, since the fused attention score matrix is ​​obtained through the interaction and fusion of multiple attention score matrices, the fused attention score matrix pays more attention to key events and has stronger recognition, so that the actual cleaning time of the photovoltaic panels can be located more accurately, and the sensor signal error, the detection error caused by clouds blocking the sunlight, the power generation drop caused by floating and sinking photovoltaic panels, the error caused by short-term extreme weather such as sandstorms and typhoons, etc. can be identified and screened, thereby making the detection results of the improved Transformer model more accurate, and the photovoltaic panel cleaning recommendations given by the controller more accurate, reducing misjudgments. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1A schematic diagram of the structure of an improved Transformer model provided in one embodiment of the present application; Figure 2 A flowchart of a photovoltaic cleaning management method based on an improved Transformer model provided in one embodiment of the present application; Figure 3 Schematic diagram of the fusion of multiple attention matrices in the prior art; Figure 4 A schematic diagram of stacking multiple attention score matrices provided in one embodiment of the present application; Figure 5 A schematic diagram of stacking multiple attention score matrices provided in another embodiment of the present application; Figure 6 A schematic diagram of the structure of a photovoltaic cleaning management device based on an improved Transformer model provided in one embodiment of the present application; Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application are clearly and completely described below. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts also fall within the scope of protection of this application.

[0028] Explanation of professional terms: The Transformer model is a deep learning model based on the self-attention mechanism, designed for processing sequential data. It effectively captures long-term dependencies. Compared to traditional recurrent neural networks (RNNs) and long short-term memory (LSTM) networks, the Transformer model improves the efficiency and effectiveness of sequential data processing by assigning different weights to different time points by calculating attention scores.

[0029] Self-Attention Mechanism: A mechanism that calculates the correlation between each input element and other elements. When processing time series data, it dynamically adjusts the influence of input elements based on weights. This mechanism is the core of the Transformer model and effectively avoids the vanishing gradient problem that can occur when information is gradually transmitted over long sequences.

[0030] PV Cleaning Automated Detection: This technology uses sensors and intelligent algorithms to monitor the cleanliness of PV panels in real time, automatically determining whether the panels require cleaning or maintenance based on the detection results. By detecting contamination trends and cleaning events on the PV panel surface, the operational efficiency of the PV system can be improved.

[0031] Attention Score: In the Transformer model, this is a measure of the relative importance of each time point in the input sequence. By calculating the attention score, the model can assign higher weights to key time points, thereby focusing more on these key information and ignoring noise and irrelevant data.

[0032] Noise robustness refers to a model's ability to maintain stable performance and effectively filter out irrelevant interference information when processing noisy input data. In automated photovoltaic cleaning detection, noise can arise from environmental changes or sensor errors. Improving noise robustness helps improve system accuracy and reliability.

[0033] Time series data: Data arranged in chronological order, typically used to describe dynamically changing processes. In this application, time series data is used to represent the cleanliness status of photovoltaic panels, contamination trends, and the occurrence of cleaning events. Contamination trends are reflected through operational data and environmental data.

[0034] The cleanliness of photovoltaic panels significantly impacts their power generation efficiency and lifespan. Dust, dirt, pollen, and other airborne particles deposited on the surface of photovoltaic panels can reduce power generation efficiency and even pose safety risks. Therefore, regular inspection and cleaning are essential.

[0035] In the prior art, the traditional methods commonly used to clean and inspect photovoltaic panels are: visual inspection, drone scanning, and infrared thermal imaging. Although these methods can evaluate the cleanliness and performance status of photovoltaic panels, they also have problems such as low efficiency and high interference. For example, the sensor may experience occasional signal interference or temperature drift during use, which may cause signal errors. There may also be detection errors caused by clouds temporarily blocking sunlight, which may lead to false judgments that photovoltaic panels need to be cleaned. There may also be errors caused by floating and sinking photovoltaic panels, which may lead to a decrease in power generation. There may also be errors caused by short-term extreme weather such as sandstorms and typhoons, which may lead to false judgments that photovoltaic panels need to be cleaned, thereby issuing erroneous cleaning instructions. These occasional factors may result in a high misjudgment rate using traditional detection methods, or may lead to system complexity and high system construction costs.

[0036] With the development of artificial intelligence (AI) technology, automated photovoltaic cleaning detection and cleaning recommendations are now being implemented through AI. For example, the characteristics of photovoltaic panels require long-term cleaning monitoring and recommendations based on long-term series data. The Transformer model, a deep learning model based on a self-attention mechanism, is used to process sequence data. It effectively captures dependencies over long time spans, focusing on key information at any position in the input sequence. It then assigns different weights to different time points by calculating attention scores, assigning higher weights to key time points (those corresponding to key events), ignoring irrelevant noise, and enhancing the model's robustness to noise, thereby improving the efficiency and effectiveness of sequence data processing. Therefore, in the automated detection of photovoltaic panel cleaning, the use of the Transformer model can improve the efficiency and accuracy of panel cleaning management.

[0037] Among them, the traditional Transformer model obtains each attention score matrix and then obtains the corresponding attention matrix head according to the attention score matrix i , then according to MultiHead ( Q , K , V )= Concat (head1,…, head h ) W o For multiple attention matrices head i Perform multi-head fusion, that is, multiple attention matrix heads i After splicing, the linear matrix W O Perform linear transformation to achieve information fusion of multiple attention matrices, so that the multi-head fusion matrix can pay more attention to key information, improving the robustness and accuracy of the Transformer model.

[0038] However, in the Transformer model, the calculation of each attention score is independent between different attention heads. During training, in order to achieve the overall optimality, different attention heads may tend to complement each other, but the attention score of one attention head will not be directly changed by the scores calculated by other attention heads. i After that, it is the head of multiple attention matrices i Perform splicing, linear transformation, multiple attention matrix heads i There is no interaction between them. When a certain input data causes a certain attention matrix head due to detection error or interference, iWhen a large deviation occurs, the key information focused on by the multi-head fusion matrix will deviate from the real key events, thereby reducing the accuracy of the model and increasing the probability of misjudgment.

[0039] Furthermore, the input data obtained from photovoltaic panels, such as power generation, can fluctuate due to device measurement errors and environmental changes (such as cloud cover or temporary dust cover). These fluctuations can be mistaken for cleaning events, when in reality they are simply noise. For example, if cloud cover suddenly appears one day, power generation may drop. Then, when the clouds clear, power generation may rebound. Traditional algorithms may mistakenly interpret this rebound as a cleaning event, leading to false positives.

[0040] Furthermore, missing or outliers in photovoltaic panel input data can interfere with detection. For example, if a sensor suddenly fails, resulting in missing or anomaly data for a certain period, traditional algorithms may misjudge power generation changes during that period, affecting their judgment of cleaning events. Furthermore, long-term environmental influences, such as seasonal variations in sunlight duration, can make it difficult for traditional algorithms to distinguish between cleaning events and natural variations.

[0041] Therefore, under the influence of external factors, the judgment of the traditional Transformer model on the automatic detection of photovoltaic cleaning is further affected. Therefore, the present application proposes a photovoltaic cleaning management method and device based on an improved Transformer model, and implements a cross-head collaboration mechanism in the improved Transformer model, that is, after obtaining the attention score matrix, multiple attention score matrices are stacked, that is, multiple attention score matrices are distributed by layer to form an attention score multi-dimensional matrix, and then, through convolution processing and activation processing, the elements (i.e., attention scores) in each attention score matrix at any overlapping position of the projection in the attention score multi-dimensional matrix are interacted and fused, which is equivalent to establishing a communication channel between multiple attention heads. Each attention head not only pays attention to the results of its own calculation, but also refers to the judgment of other attention heads on the same time point, so that the finally obtained fused attention score matrix pays more attention to key events and reduces misjudgment.

[0042] Figure 1 This is a schematic diagram of the structure of the improved Transformer model provided in one embodiment of the present application. Figure 1 As shown, the improved Transformer model includes: multiple processing units 110, wherein the processing unit 110 can be an encoder or a decoder. For a Transformer model, it generally includes multiple encoders and multiple decoders, and the number of encoders and decoders is the same.

[0043] In addition, both the encoder and the decoder include: multiple attention head generation modules 111 and attention stacking modules 112.

[0044] Among them, in the Transformer model, multiple encoders are connected in sequence, multiple decoders are connected in sequence, and the last encoder is connected to the first decoder. Therefore, the input data is first encoded by multiple encoders and then decoded by multiple decoders to obtain the output data.

[0045] based on Figure 1 The improved Transformer model shown, the technical solution of this application refers to the following embodiments.

[0046] Figure 2 This is a flow chart of a photovoltaic cleaning management method based on an improved Transformer model provided in one embodiment of the present application. The execution subject of this embodiment may be, for example, a controller of a photovoltaic system. Figure 2 As shown, the method of this embodiment includes: S201 : Obtain input data of the improved Transformer model, where the input data includes operation data and environmental data of photovoltaic panels collected at multiple collection times.

[0047] In this step, the improved Transformer model can be integrated with the PV system controller during actual operation to form an intelligent detection and control process. The controller collects real-time operational and environmental data from the PV system and transmits it to the improved Transformer model for analysis. The improved Transformer model calculates attention scores to identify contamination or cleaning events at critical time points and feeds the detection results back to the controller. Based on the detection results, the controller determines and outputs cleaning status information and / or cleaning instructions for the PV panels.

[0048] The cleaning status information of the photovoltaic panel refers to the cleaning time and cleaning method of each photovoltaic panel.

[0049] The cleaning instruction may automatically trigger a cleaning device (such as a cleaning robot) to perform cleaning.

[0050] In addition, in addition to determining and outputting cleaning status information and / or cleaning instructions for the photovoltaic panels, maintenance suggestions can also be generated and output for reference by operation and maintenance personnel.

[0051] The controller may obtain the operation data and environmental data of the photovoltaic panels collected at multiple collection times. For example, the collection frequency may be once every 15 minutes or once a day.

[0052] The operating data may include but is not limited to at least one of the following: inverter output power, voltage, current, and planar array irradiance of the photovoltaic system.

[0053] The environmental data may include but is not limited to at least one of the following: temperature, humidity, wind speed, rainfall, climate type, latitude and longitude, altitude, terrain, and vegetation coverage within a preset range of the photovoltaic panel.

[0054] Optionally, the year, month, day, time of day information, season, etc. corresponding to the collection time also have an impact on the cleaning detection of photovoltaic panels. For example, at noon during the day, there is sufficient sunshine and the power generation is relatively higher than at other times. Then, when the power generation drops at night, it may be mistakenly judged that the photovoltaic panels need to be cleaned. Therefore, the time of day information corresponding to the collection time has an impact on the photovoltaic cleaning recommendations; for example, for photovoltaic fields in the northern hemisphere, the power generation in summer is higher than in other seasons. In this way, the number of cleanings of photovoltaic panels in summer may be less than in other seasons. Therefore, the season corresponding to the collection time has an impact on the photovoltaic cleaning recommendations.

[0055] It should be noted that the more data types are input, the more accurate the final PV cleaning recommendations will be. Therefore, if time is not a factor, the input data types should be as diverse as possible. However, if the model's computational complexity, efficiency, and time are not taken into account, the input data types that have a greater impact on PV panel cleaning should be selected. For example, the input data can include: PV inverter output power, voltage, current, temperature, planar array irradiance, rainfall, and daily performance index (PI) can also be input, where: The expected daily power generation is calculated based on the planar array irradiance and temperature. For details, please refer to the existing technology.

[0056] S202: Input the input data into the improved Transformer model to obtain an input matrix.

[0057] In this step, the specific implementation method is: S2021. Use the improved Transformer model to embed the input data into words and obtain the data input matrix.

[0058] Specifically, the following examples are given: Collect input data for 4 days. The time series length is T=4. The data is collected once a day. The data type collected each time is: •PI: Performance Index (between 0 and 1) • Light intensity (irradiance): unit W / m² (normalized to 0~1) •Temperature: Unit: ℃ (normalized to 0~1) • Rainfall: Unit: mm (normalized to 0~1) The specific normalization process will not be described here.

[0059] The input data obtained is: Each row represents the input data collected on one day, the first column represents the performance index PI, the second column represents the planar array irradiance, the third column represents the temperature, and the fourth column represents the rainfall.

[0060] Input the input data into the improved Transformer model. In the improved Transformer model, the features of each row (PI, irradiance, temperature, rainfall) are mapped to the feature space. Specifically: According to the formula X1=X· W embed + b embed , where the embedding weight matrix W embed and the bias vector b embed Obtained through model training, in this embodiment, the embedding weight matrix W obtained through training embed and the bias vector b embed for: The calculated data input matrix is: S2022. Use the improved Transformer model to perform position embedding on the input data to obtain a position input matrix.

[0061] Specifically, if the data input matrix is ​​directly fed into the improved Transformer model, the improved Transformer model will not understand word order. Therefore, it is necessary to add some information indicating word order (word position) so that the improved Transformer model can understand the meaning of the sentence. To do this, positional encoding is used to encode the position of each data point in the input data.

[0062] Among them, the position encoding formula is: in, t Indicates the location of the data, d represents the embedding dimension.

[0063] In position encoding, when the position of the data is an even number, the sine function is used; when the position of the data is an odd number, the cosine function is used.

[0064] The position encoding formula is used to embed the input data into positions and obtain the position input matrix.

[0065] S2023. Obtain an input matrix according to the data input matrix and the position input matrix.

[0066] Specifically, the data input matrix and the position input matrix are added element by element to obtain the input matrix X embed .

[0067] S203. Input the input matrix into at least two attention head generation modules of the first processing unit, and obtain the attention score matrix obtained by each attention head generation module according to the input matrix.

[0068] In this step, after obtaining the input matrix, the input matrix is ​​input into the first processing unit, that is, into the first encoder. This embodiment takes the input matrix into the three attention head generation modules in the encoder as an example for explanation, where each attention head generation module corresponds to one attention head.

[0069] For the first attention head generation module, the linear transformation matrix W is used Q 、W K 、W V The query matrix Q, key matrix K, and value matrix V are calculated. The specific calculation process refers to the existing technology and will not be repeated here: Among them, W Q To query the projection weight of the matrix Q, we obtain it through model training: Calculation yields: Among them, W K To query the projection weight of matrix K, we obtain it through model training: Calculation yields: Similarly, calculate the obtained value matrix: According to the formula: The calculated attention score matrix is: Similarly, the other two attention score matrices are obtained as follows: Among them, the meaning of each element in the attention score matrix is ​​the influence of the corresponding data on the output result of the final improved Transformer model, that is, the influence weight on the photovoltaic cleaning recommendation. For example, the element in the first row and first column represents the influence of the input data PI on the result of whether to clean the photovoltaic panel.

[0070] S204. Input at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multi-dimensional matrix of attention scores.

[0071] Among them, in the attention score multidimensional matrix, the projections of the elements in at least two attention score matrices overlap.

[0072] In this step, in the prior art, after obtaining the attention score matrix, the attention matrix is ​​obtained according to the attention score matrix and the corresponding value matrix V, so as to obtain the attention matrix according to the multiple attention matrices head i Perform multi-head fusion. The corresponding data processing form is as follows Figure 3 As shown, multiple attention matrices head i The concatenation is then performed through a linear matrix to obtain a fusion matrix.

[0073] In this step of the present embodiment, Figure 4 and Figure 5 As shown in the figure, in the attention head stacking module, the three attention score matrices are distributed layer by layer to form an attention score multidimensional matrix A. Among them, in the attention score multidimensional matrix, there is at least one element overlap in the projection of the three attention score matrices.

[0074] like Figure 4 As shown in the figure, when the three attention score matrices are distributed by layer, they do not need to be aligned, as long as there are elements with overlapping projections in the three attention score matrices. In this case, the attention score multidimensional matrix A takes the three attention score matrices corresponding to the overlapping positions and fills the elements in other positions with 0.

[0075] Optionally, a specific implementation method of S204 is: at least two attention score matrices are input into the attention head stacking module, the attention head stacking module is controlled to process the at least two attention score matrices by layer, and the projections of the elements at the same position in at least two attention score matrices overlap to obtain a multi-dimensional matrix of attention scores.

[0076] Specifically, such as Figure 5As shown in the figure, in the attention head stacking module, the three attention score matrices are processed layer by layer, that is, the projections of the elements at the same position in the three attention score matrices coincide, thereby obtaining the attention score multidimensional matrix A.

[0077] In this embodiment, the Figure 5 The multidimensional matrix A of attention scores is obtained in the manner shown. In this way, each element in the obtained fused attention score matrix is ​​the result of the interaction and fusion of the elements at the same position in the three attention score matrices, so that the fused attention score matrix pays more attention to the real key events. Among them, key events include but are not limited to: 1. Characteristics of pollution events: such as a sudden drop in power generation or an abnormal rise in temperature.

[0078] 2. Signs of a cleaning event: For example, power generation increases significantly after cleaning.

[0079] 3. Long-term trends: Over long periods of time, such as a month, a quarter, or a year, pollution gradually accumulates, leading to a slow decline in power generation efficiency.

[0080] S205: Control the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix.

[0081] In this step, since the attention score multidimensional matrix A is a multidimensional matrix, it is necessary to perform key processing on it so that the dimension of the fused attention score matrix is ​​consistent with that of the input matrix.

[0082] Optionally, a specific implementation of S205 is: S2051. Perform a first convolution process on the attention score multidimensional matrix according to the first convolution function to obtain an intermediate attention fusion matrix.

[0083] Specifically, the first convolution function is recorded as f 1, for example f 1 can be a 4*4*3 matrix, specifically represented by 4 rows and 4 columns, where each element position contains 3 data, and the 3 data are the weights of the elements at the corresponding positions of the 3 attention score matrices.

[0084] For example, f The element corresponding to the first row and first column in 1 is f 1[1 1]=[0.2 0.5 0.3], then the intermediate attention fusion matrix A 中间 The element corresponding to the first row and first column of is obtained by the following calculation: A 中间 [1 1]=0.2*0.31+0.5*0.35+0.3*0.24=0.309 The intermediate attention fusion matrix A is calculated in the same way 中间 The other elements in , get the intermediate attention fusion matrix A 中间 Among them, the intermediate attention fusion matrix A 中间 The dimensions of are the same as the input matrix.

[0085] S2052. Activate the intermediate attention fusion matrix according to the activation function to obtain the activated attention fusion matrix.

[0086] Specifically, in this embodiment, the activation function can use the ReLU activation function to convert the intermediate attention fusion matrix A 中间 Perform activation processing to obtain the activated attention fusion matrix.

[0087] The specific process can be referred to the prior art and will not be described here in detail. It is worth noting that the specific type of activation function can be selected according to the actual situation, including but not limited to the ReLU activation function, which is within the scope of protection of this application.

[0088] S2053. Perform a second convolution process on the activated attention fusion matrix according to the second convolution function to obtain a fused attention score matrix.

[0089] Specifically, the second convolution function is recorded as f 2, for example f 2 can be a 4*4 matrix with the same dimension as the input matrix. The activated attention fusion matrix is ​​convolved to obtain the fused attention score matrix A. coll : Among them, the fused attention score matrix A coll The meaning of the element at each position in is the influence weight of the data at the same position in the input matrix on the photovoltaic cleaning recommendation.

[0090] Therefore, through the first convolution function, the fusion communication between the three attention score matrices is realized, that is, the "cross-head collaboration mechanism" is realized, so that the intermediate attention fusion matrix A 中间 It can focus more on the information that needs to be focused; then, through the activation function, the intermediate attention fusion matrix A 中间 Nonlinear learning is performed so that the activated attention fusion matrix contains more information that needs to be focused on, while strengthening the information that needs to be focused on. Finally, the activated attention fusion matrix is ​​subjected to linear feature extraction through the second convolution function. Since the activated attention fusion matrix contains more information that needs to be focused on, and the information that needs to be focused on has a higher degree of attention, the fused attention score matrix A collThe focus on key events is higher, thus improving the model's anti-interference and accuracy.

[0091] S206. Obtain an output matrix based on the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix of the last processing unit.

[0092] In this step, after obtaining the fused attention score matrix A coll After that, the fused attention score matrix A coll Processing is performed, for example, using other modules in the existing encoder, such as Add&Norm, Feed Forward, Add&Norm, to obtain an output matrix.

[0093] The output matrix is ​​used as the next processing unit. If the current processing unit is an encoder, the next processing unit can be either an encoder or a decoder. If the current processing unit is a decoder, the next processing unit is a decoder. Repeat the above steps in the encoder or decoder to obtain the output matrix of the last processing unit, that is, the output matrix of the last decoder.

[0094] It should be noted that, in the decoder, a mask is also involved, and details can be referred to the prior art, which will not be described here.

[0095] Optionally, a specific implementation of S206 is: weighting the fused attention score matrix according to the value matrix to obtain an output matrix.

[0096] In the above steps, three value matrices V are obtained. In the prior art, after obtaining the value matrix, the attention matrix is ​​obtained according to the attention score matrix and the value matrix, and the attention matrix is ​​spliced ​​and fused. In this embodiment, after obtaining the fused attention score matrix A coll Then, weighting is performed by the value matrix V, wherein the value matrix V here can be the average value of the corresponding elements of the three value matrices V added together.

[0097] The fused attention score matrix A coll Multiply with the value matrix V, that is, according to the formula Z = A coll · V , and obtain the output matrix Z. Through this operation, the improved Transformer model's ability to focus on key time points is enhanced.

[0098] S207 , using the improved Transformer model, according to the output matrix output by the last processing unit, determine and output the cleaning status information and / or cleaning instructions for the photovoltaic panel.

[0099] In this step, after the input matrix is ​​input into the improved Transformer model, each processing unit processes the input matrix so that the output matrix output by the last processing unit can best reflect the influence weight of the elements in the input data on the photovoltaic cleaning recommendation. Therefore, the improved Transformer model outputs the detection result according to the output matrix, so that the controller determines and outputs the cleaning status information and / or cleaning instructions for the photovoltaic panel based on the detection result.

[0100] Specifically, the output matrix Z of the last processing unit, that is, the last decoder output is: The final output matrix Z is classified and regressed according to the following formula to obtain the detection result: Among them, σ is the Sigmoid function, W cls is the linear layer weight, b cls is the bias vector.

[0101] The calculated Y is: In the matrix Y, the first column represents the probability of needing cleaning, that is, the probability of a cleaning event occurring, the second column represents the estimated amount of power generation loss, and each row represents the probability of needing cleaning and the estimated amount of power generation loss corresponding to each day.

[0102] After obtaining the probability of needing cleaning for each day, the controller compares the probability of needing cleaning with the set threshold and outputs a cleaning suggestion. For example, when the probability of needing cleaning is greater than the set threshold, it is determined that the photovoltaic panel needs to be cleaned on that day.

[0103] Among them, the set threshold can be 0.8, then the first three rows of the first column in the matrix Y correspond to the first to third days of the four days, and the values ​​indicate whether the photovoltaic panels were cleaned every day from the first to the third day. For example, on the second day, the value is 0.14, and the output is that the photovoltaic panels were not cleaned on the second day; for the fourth day, if the day is real time, since the value is 0.91, the output is that the photovoltaic panels were cleaned on that day.

[0104] It should be noted that before using the improved Transformer model, the improved Transformer model needs to be trained. The training method and training process can refer to the existing technology and will not be repeated here.

[0105] Cleaning suggestions for photovoltaic panels can be, for example, recommendations for cleaning. More specifically, they can also determine the cleaning method and the location of the cleaning area. The specific recommendations can be adjusted through the output of the model during model training.

[0106] In this embodiment, input data of the improved Transformer model is obtained, and the input data is input into the improved Transformer model to obtain an input matrix; the input matrix is ​​input into at least two attention head generation modules of the first processing unit to obtain an attention score matrix obtained by each attention head generation module according to the input matrix; at least two attention score matrices are input into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain an attention score multi-dimensional matrix, and the attention head stacking module is controlled to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix; an output matrix is ​​obtained according to the fused attention score matrix, and the output matrix is ​​used as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; using the improved Transformer model, according to the output matrix output by the last processing unit, cleaning status information and / or cleaning instructions for the photovoltaic panel are determined and output. In this application, since the fused attention score matrix is ​​obtained through the interaction and fusion of multiple attention score matrices, the fused attention score matrix pays more attention to key events and has stronger recognition, so that the cleaning time of the photovoltaic panels can be located more accurately, and the signal errors of the sensors, the detection errors caused by clouds blocking the sunlight, the power generation drop caused by floating and sinking photovoltaic panels, the errors caused by short-term extreme weather such as sandstorms and typhoons, etc. can be identified and screened, thereby making the detection results of the improved Transformer model more accurate, and making the cleaning recommendations of the photovoltaic panels given by the controller more accurate, reducing misjudgments.

[0107] Optionally, a possible implementation of S202 is: When a cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain an input matrix. The cleaning trigger condition includes but is not limited to at least one of the following: the rainfall within the first preset time period is less than the preset rainfall amount, the inverter output power reduction rate is greater than the preset rate and the reduced power is still maintained after the second preset time period, and a flock of birds is detected circling over the photovoltaic panel.

[0108] Specifically, the controller can collect input data in real time and obtain cleaning suggestions based on the input data. In this way, the time point when the photovoltaic panels need to be cleaned can be confirmed in a timely manner. However, the photovoltaic panels do not need to be cleaned most of the time. If the controller collects input data in real time and outputs cleaning suggestions, in fact, many of them are suggestions that the photovoltaic panels do not need to be cleaned. In this way, a large amount of calculations occupy the memory of the controller, which will affect other calculations of the controller.

[0109] Therefore, in this embodiment, a cleaning trigger condition is set. The cleaning trigger condition is generally an event that has a significant impact on the photovoltaic panel cleaning recommendation based on historical experience. When the event occurs, the data in the input data will change, thereby affecting the photovoltaic panel cleaning recommendation. Therefore, when the cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain the photovoltaic panel cleaning recommendation based on the input data.

[0110] The cleaning trigger conditions include, but are not limited to, at least one of the following: rainfall less than a preset rainfall amount within a first preset duration, the inverter output power reduction rate exceeding a preset rate and maintaining the reduced power after a second preset duration, or detection of a flock of birds circling the photovoltaic panels. This allows for prompt detection of panel cleaning needs based on input data when the panel's cleanliness level is likely to change, reducing the controller's computational workload and achieving a balance between efficiency and computational complexity.

[0111] Figure 6 This is a schematic diagram of the structure of a photovoltaic cleaning management device based on an improved Transformer model provided in one embodiment of the present application. Figure 6 As shown, the photovoltaic cleaning management device based on the improved Transformer model includes: an acquisition module 610 , a model acquisition module 620 and an output module 630 .

[0112] A first acquisition module 610 is configured to acquire input data of the improved Transformer model, wherein the input data includes operation data and environmental data of the photovoltaic panels collected at multiple collection times; A model acquisition module 620 is configured to input the input data into the improved Transformer model to obtain an input matrix, input the input matrix into at least two attention head generation modules of the first processing unit, obtain an attention score matrix obtained by each attention head generation module based on the input matrix, and input the at least two attention score matrices into the attention head stacking module so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain an attention score multi-dimensional matrix, wherein the projections of the elements in the at least two attention score matrices overlap, and control the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix, and obtain an output matrix based on the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; The output module 630 is configured to utilize the improved Transformer model to determine and output cleaning status information and / or cleaning instructions for the photovoltaic panel according to the output matrix output by the last processing unit.

[0113] Optionally, the model acquisition module 620 inputs the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multi-dimensional matrix of attention scores, specifically for: The at least two attention score matrices are input into the attention head stacking module, and the attention head stacking module is controlled to process the at least two attention score matrices by layer, and make the projections of the elements at the same position in the at least two attention score matrices overlap to obtain the attention score multidimensional matrix.

[0114] Optionally, the model acquisition module 620 controls the attention head stacking module to perform dimensionality reduction processing on the attention score multidimensional matrix to obtain a fused attention score matrix, specifically for: Performing a first convolution process on the attention score multidimensional matrix according to a first convolution function to obtain an intermediate attention fusion matrix; Activate the intermediate attention fusion matrix according to the activation function to obtain an activated attention fusion matrix; A second convolution process is performed on the activated attention fusion matrix according to a second convolution function to obtain the fused attention score matrix.

[0115] Optionally, the model acquisition module 620 is further configured to: Using the improved Transformer model, determining a value matrix according to the input matrix; The model acquisition module 620 obtains an output matrix based on the fused attention score matrix, specifically for: The fused attention score matrix is ​​weighted according to the value matrix to obtain the output matrix.

[0116] Optionally, the model acquisition module 620 inputs the input data into the improved Transformer model to obtain an input matrix, which is specifically used to: Using the improved Transformer model, word embedding is performed on the input data to obtain a data input matrix; Using the improved Transformer model, position embedding is performed on the input data to obtain a position input matrix; The input matrix is ​​obtained according to the data input matrix and the position input matrix.

[0117] Optionally, the model acquisition module 620 inputs the input data into the improved Transformer model to obtain an input matrix, which is specifically used to: When a cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain an input matrix, where the cleaning trigger condition includes but is not limited to at least one of the following: the rainfall within a first preset time period is less than a preset rainfall amount, the inverter output power reduction rate is greater than a preset rate and the reduced power is still maintained after a second preset time period, and a flock of birds is detected circling the photovoltaic panel.

[0118] Optionally, the operating data includes: inverter output power, planar array irradiance, and the environmental data includes: temperature, humidity, wind speed, rainfall, climate type, longitude and latitude, altitude, terrain, and vegetation coverage within a preset range of the photovoltaic panel.

[0119] Optionally, the input data further includes time data, which includes the year, month, day, time information within a day, season, week, and holidays corresponding to the collection time.

[0120] The photovoltaic cleaning management device based on the improved Transformer model provided in the embodiment of the present application has a specific implementation process that can be referred to the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0121] Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. Figure 7 As shown, the electronic device includes: a processor 710 and a memory 720.

[0122] The memory 720 stores computer-executable instructions.

[0123] The processor 710 executes the computer-executable instructions stored in the memory 720 , so that the processor 710 performs the method described in any one of the above embodiments.

[0124] The specific implementation process of the electronic device provided in the embodiment of the present application can be found in the above-mentioned method embodiment. Its implementation principle and technical effects are similar, and will not be repeated here in this embodiment.

[0125] In the above Figure 7 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0126] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0127] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0128] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method shown in the above method embodiment is implemented.

[0129] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0130] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in a device as discrete components.

[0131] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A photovoltaic cleaning management method based on an improved Transformer model, characterized in that: The improved Transformer model includes: a plurality of processing units, the plurality of processing units are arranged in sequence, each of the processing units includes: a plurality of attention head generation modules and an attention stacking module, and the method includes: Obtaining input data for the improved Transformer model, the input data including operating data and environmental data of the photovoltaic panels collected at multiple collection times; Inputting the input data into the improved Transformer model to obtain an input matrix; Inputting the input matrix into at least two of the attention head generation modules of the first processing unit, and obtaining an attention score matrix obtained by each of the attention head generation modules according to the input matrix; Inputting the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module embeds the at least two attention score matrices into at least two layers in a preset multidimensional space for layer-by-layer distribution processing to obtain an attention score multidimensional matrix; Controlling the attention head stacking module to perform dimensionality reduction processing on the attention score multidimensional matrix to obtain a fused attention score matrix; Obtain an output matrix according to the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; The improved Transformer model is used to determine and output cleaning status information and / or cleaning instructions for the photovoltaic panel according to the output matrix output by the last processing unit.

2. The method according to claim 1, characterized in that Inputting the at least two attention score matrices into the attention head stacking module so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain a multi-dimensional matrix of attention scores, including: The at least two attention score matrices are input into the attention head stacking module, and the attention head stacking module is controlled to process the at least two attention score matrices by layer, and make the projections of the elements at the same position in the at least two attention score matrices overlap to obtain the attention score multidimensional matrix.

3. The method according to claim 1, characterized in that The controlling the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix includes: Performing a first convolution process on the attention score multidimensional matrix according to a first convolution function to obtain an intermediate attention fusion matrix; Activate the intermediate attention fusion matrix according to the activation function to obtain an activated attention fusion matrix; A second convolution process is performed on the activated attention fusion matrix according to a second convolution function to obtain the fused attention score matrix.

4. The method according to claim 1, wherein The method further comprises: Using the improved Transformer model, determining a value matrix according to the input matrix; The obtaining an output matrix according to the fused attention score matrix includes: The fused attention score matrix is ​​weighted according to the value matrix to obtain the output matrix.

5. The method according to claim 1, wherein Inputting the input data into the improved Transformer model to obtain an input matrix includes: Using the improved Transformer model, word embedding is performed on the input data to obtain a data input matrix; Using the improved Transformer model, position embedding is performed on the input data to obtain a position input matrix; The input matrix is ​​obtained according to the data input matrix and the position input matrix.

6. The method according to claim 1, characterized in that Inputting the input data into the improved Transformer model to obtain an input matrix includes: When a cleaning trigger condition is detected, the input data is input into the improved Transformer model to obtain an input matrix, where the cleaning trigger condition includes but is not limited to at least one of the following: the rainfall within a first preset time period is less than a preset rainfall amount, the inverter output power reduction rate is greater than a preset rate and the reduced power is still maintained after a second preset time period, and a flock of birds is detected circling the photovoltaic panel.

7. The method according to any one of claims 1 to 6, characterized in that The operating data includes: inverter output power, planar array irradiance, and the environmental data includes: temperature, humidity, wind speed, rainfall, climate type, longitude and latitude, altitude, terrain, and vegetation coverage within the preset range of the photovoltaic panel.

8. The method according to any one of claims 1 to 6, characterized in that The input data also includes time data, which includes the year, month, day, time information within a day, season, weekday, and holidays corresponding to the acquisition time.

9. A photovoltaic cleaning management device based on an improved Transformer model, characterized in that: The improved Transformer model includes: a plurality of processing units, the plurality of processing units are arranged in sequence, each of the processing units includes: a plurality of attention head generation modules and an attention stacking module, and the device includes: A first acquisition module is used to acquire input data of the improved Transformer model, wherein the input data includes operation data and environmental data of the photovoltaic panels collected at multiple collection times; A model acquisition module, configured to input the input data into the improved Transformer model to obtain an input matrix, and input the input matrix into at least two attention head generation modules of the first processing unit, obtain an attention score matrix obtained by each attention head generation module according to the input matrix, and input the at least two attention score matrices into the attention head stacking module, so that the attention head stacking module performs layer-by-layer distribution processing on the at least two attention score matrices to obtain an attention score multi-dimensional matrix, wherein the projections of the elements in the at least two attention score matrices coincide, and control the attention head stacking module to perform dimensionality reduction processing on the attention score multi-dimensional matrix to obtain a fused attention score matrix, and obtain an output matrix based on the fused attention score matrix, and use the output matrix as the input matrix of the next processing unit, and so on, to obtain the output matrix output by the last processing unit; The output module is used to determine and output cleaning status information and / or cleaning instructions for the photovoltaic panel based on the output matrix output by the last processing unit using the improved Transformer model.

10. An electronic device, characterized in that: It is characterized by comprising: a processor and a memory; Memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.