Photovoltaic operation abnormality detection method and system based on machine learning

Through the combination of K-MEANS clustering and Isolation Forest algorithm, anomaly detection of photovoltaic operation data is performed based on time characteristics, which solves the problems of high operation and maintenance cost of photovoltaic power generation system and poor abnormal data detection effect in the existing technology, and realizes the detection of abnormal data. Efficient and accurate anomaly detection of photovoltaic operating data.

CN116383743BActive Publication Date: 2024-10-01BEIJING HUADIAN TIANREN ELECTRIC POWER CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310124025.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2024-10-01
Estimated Expiration
2043-02-16

AI Technical Summary

Technical Problem

The operation and maintenance cost of existing photovoltaic power generation systems is high, and the existing technology is not ideal in abnormal data detection, especially the inability to effectively identify collective abnormal data.

Method used

The K-MEANS clustering algorithm is used to initially screen the photovoltaic operation data, and the more obvious single-point abnormal data is screened out. Then the Isolation Forest algorithm is used to build an anomaly detection model, double detection is performed on the data to be detected, and the data is divided based on time characteristics to improve Detection accuracy.

Benefits of technology

Efficient and accurate anomaly detection of photovoltaic operating data is achieved. It can not only identify obvious single-point abnormal data, but also discover less obvious collective abnormal data, reducing operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383743B_ABST
    Figure CN116383743B_ABST
Patent Text Reader

Abstract

A photovoltaic operation anomaly detection method and system based on machine learning, the method includes: collecting historical data, then performing data cleaning and formatting on the historical data, and dividing the cleaned data according to time characteristics, and then using the K-MEANS clustering algorithm to preliminarily screen out some more obvious abnormal data and normal data, and then using the isolation forest algorithm to construct a photovoltaic operation anomaly detection model for the normal data screened by the K-MEANS clustering algorithm, and perform further anomaly processing. Finally, the photovoltaic operation anomaly detection model is used to detect whether the data to be tested is abnormal. The present invention integrates the K-MEANS clustering algorithm and the isolation forest algorithm through the application of machine learning technology in photovoltaic power generation systems, and can efficiently and accurately establish a photovoltaic operation anomaly detection model to detect photovoltaic operation anomalies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of photovoltaic power generation business, and in particular to a photovoltaic operation anomaly detection method and system based on machine learning. Background Art

[0002] The total installed capacity of photovoltaic power has increased from 1.3GW in 2000 to 20,000MW in 2020, and the annual installed capacity of photovoltaic power has increased significantly. China's new installed capacity is 34.54GW, ranking first. Since 2011, the installed capacity of countries and regions such as the United States, China, and the Asia-Pacific region has exceeded the traditional European photovoltaic market. The cumulative installed capacity is expected to exceed 20,000MW, ranking first in the world. Looking forward to 2023, China's photovoltaic companies will further consolidate their global competitiveness, continuously improve their technical level, and further reduce product costs.

[0003] Reducing the operation and maintenance costs of photovoltaic power generation systems is of great significance to the promotion of photovoltaic power generation. To reduce the operation and maintenance costs of photovoltaic power generation systems, it is necessary to use Internet information technology to process data, and anomaly detection of photovoltaic system operation and maintenance data is particularly important.

[0004] Prior art document 1 (CN 106548270 A) discloses a method and device for identifying abnormal power data of a photovoltaic power station. Taking the active power data of a photovoltaic power station as the research object, the fuzzy clustering algorithm is used to cluster the power curve in combination with various influencing factors of the photovoltaic power station power data; the obvious abnormal data is identified according to the photovoltaic power station abnormal data identification criteria. The shortcoming of prior art document 1 is that the correlation of the daily power curve is first calculated, and then clustering is performed based on the correlation of the daily power curve, thereby obtaining the abnormal data identification preparation. Only relatively obvious single-point abnormal data can be obtained through clustering, and the clustering effect is not very ideal for collective abnormal data. The present invention takes into account that the data of the same measuring point at different times may be affected differently by the outside world, so the photovoltaic operation data is first divided according to the dimensions of different times of the day, and then the divided data is clustered by K-MEANS to screen out the more obvious single-point abnormal data, and the rest are normal data. Finally, the clustered normal data is run on the machine learning algorithm-Isolation Forest to establish a tree model, and a photovoltaic operation anomaly detection model is constructed. Finally, the data to be detected is first similarly calculated with the more obvious abnormal number data found by K-MEANS clustering, and a part of the abnormal data is screened out, and then the photovoltaic operation anomaly detection model is used for detection. Double detection, through the method of integrating the K-Means clustering algorithm and the isolation forest algorithm, can efficiently and accurately establish a photovoltaic operation anomaly detection model to perform anomaly detection on photovoltaic operation, which can find both more obvious single-point abnormal data and less obvious collective abnormal data.

[0005] Prior art document 2 (CN 115021679 A) discloses a photovoltaic equipment fault detection method based on multi-dimensional outlier detection, which performs clustering by using the FCM clustering algorithm with a threshold mechanism, and combines the isolation forest algorithm based on data dimension reduction and the statistical judgment algorithm based on the intra-quartile distance as the core to detect abnormal data. The difference between prior art document 2 and the present invention lies in the different processing methods of the data used for clustering. Prior art document 2 uses the FCM clustering algorithm based on the threshold mechanism to cluster all data, while the present invention takes into account that the data of the same measuring point at different times will be affected by the outside world differently, so the data is first divided based on time, and then K-MEANS is used to cluster the data based on the time division. Summary of the invention

[0006] In order to solve the deficiencies in the prior art, the present invention provides a photovoltaic operation anomaly detection method and system based on machine learning. Taking into account that the data of the same measuring point at different times may be affected differently by the outside world, the photovoltaic operation data is first divided according to the dimensions of different times of the day, and then the divided data is clustered by K-MEANS to screen out the more obvious single-point abnormal data, and the rest are normal data. Finally, the clustered normal data is run on the machine learning algorithm-Isolation Forest to establish a tree model, build a photovoltaic operation anomaly detection model, and finally treat the detection data.

[0007] The present invention adopts the following technical solution.

[0008] The photovoltaic operation abnormality detection method based on machine learning includes the following steps:

[0009] Step 1, collecting historical data of photovoltaic operation measurement points;

[0010] Step 2, adjusting the historical data of the photovoltaic operation measuring points into a unified format, and performing data cleaning processing on the historical data in the unified format to obtain the cleaned historical data of the photovoltaic operation measuring points;

[0011] Step 3, dividing the cleaned photovoltaic operation measurement point historical data according to time characteristics;

[0012] Step 4: The divided historical data of photovoltaic operation measurement points are used as training data sets, and the abnormal data M and normal data N are obtained by screening through the K-MEANS clustering method;

[0013] Step 5, the normal data N obtained in step 4 is modeled using an improved isolation forest method to construct a photovoltaic operation anomaly detection model;

[0014] Step 6: Input the data to be tested, and first compare the similarity with the abnormal data screened by K-MEANS in step 4. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is tested using the photovoltaic operation abnormality detection model.

[0015] Preferably, in step 1, historical data of photovoltaic operation measurement points are obtained from the real-time database at time intervals, and the historical data include: panel temperature, field temperature, light intensity, conversion efficiency, voltage and power.

[0016] Preferably, step 4 specifically includes:

[0017] Step 4.1, set the clustering parameter k and the clustering sample number threshold c;

[0018] Step 4.2, randomly select k points in the training data set as cluster centroids;

[0019] Step 4.3, calculate the sum of squared Euclidean distances between each point in the training data set and the centroid, and assign each point in the data set to the cluster corresponding to the centroid closest to it according to the nearest principle;

[0020] Step 4.4, update the centroid of the cluster, the centroid of each cluster is updated to the average value of all points in the cluster; Step 4.5, determine whether the k cluster centers no longer change, if so, the algorithm ends and outputs the clustering result; otherwise, go to step 4.3 and continue to execute until the algorithm end condition is reached, and the samples in the cluster with values ​​less than the threshold c are regarded as abnormal classes, the data in the abnormal class are regarded as abnormal data M, and the rest are normal data N.

[0021] Preferably, in step 4.3,

[0022] The calculation expression of the sum of squared Euclidean distance is:

[0023]

[0024] In the formula,

[0025] p represents a data object in the data set;

[0026] c i Represents a cluster center point;

[0027] dist(p,c i ) represents the Euclidean distance between point p and the cluster center;

[0028] E represents the sum of squares of all cumulative Euclidean distances.

[0029] Preferably, in step 4.4, the average value m of all points in each cluster is i (c i ) is calculated as:

[0030]

[0031] In the formula,

[0032] n represents the number of all points;

[0033] p j Represents the value of a point in a cluster.

[0034] Preferably,

[0035] Step 5 specifically includes:

[0036] Step 5.1, setting the size n of the sample data set, the number m of isolated trees and the limit height h of each isolated tree in the photovoltaic operation anomaly detection model;

[0037] Step 5.2, build an isolation tree, and randomly sample n data from the normal data N as features. First, calculate the importance of the n features, normalize the importance, and assign an importance probability to each feature. Put the processed feature data into the root node of the isolation tree as the sample data set of the isolation tree.

[0038] Step 5.3, select features according to the probability of importance, using a two-dimensional sequence (q1, q2), that is, the values ​​of two time-series connected measurement points; when growing, calculate the maximum and minimum values ​​of all feature data in the sample data set in the feature q1 dimension, and then calculate the maximum and minimum values ​​of the change diff = q2-q1. For q1 and diff, randomly select values ​​for division. The two subsets must have data. If there is no data, reselect values ​​for division;

[0039] Step 5.4, for q1 or diff, randomly select a data p between the maximum and minimum values ​​of q1 or diff as the partition threshold;

[0040] Step 5.5, put the feature data with eigenvalues ​​less than or equal to p into the left subtree of the isolated tree, and put the feature data with eigenvalues ​​greater than p into the right subtree of the isolated tree;

[0041] Step 5.6, repeat steps 5.3 to 5.5 for the left subtree and right subtree of the isolated tree respectively, until there is only one data in the child node of the isolated tree or the limit height h is reached, and the construction of the isolated tree iTree is completed.

[0042] Step 5.7, repeat steps 5.2 to 5.6 to generate m isolated trees.

[0043] In step 5.8, m isolated trees are combined into an isolation forest, which is a photovoltaic operation anomaly detection model.

[0044] Preferably, in step 5.2, the feature importance is calculated using the Tsfresh library.

[0045] Preferably, in step 6, the Euclidean distance between normal data in the sample and abnormal data in the cluster is calculated, wherein the minimum distance is defined as a threshold.

[0046] The photovoltaic operation anomaly detection system based on machine learning includes: a data acquisition unit, a data cleaning unit, a data division unit, a screening unit, a model building unit, and an anomaly detection unit, wherein:

[0047] The data acquisition unit is used to collect historical data of photovoltaic operation measurement points;

[0048] The data cleaning unit is used to adjust the historical data of the photovoltaic operation measuring points into a unified format, and perform data cleaning processing on the historical data in the unified format to obtain the cleaned historical data of the photovoltaic operation measuring points;

[0049] The data division unit is used to divide the cleaned photovoltaic operation measurement point historical data according to time characteristics;

[0050] The screening unit is used to use the divided photovoltaic operation measurement point historical data as a training data set, and screen them through the K-MEANS clustering method to obtain abnormal data M and normal data N;

[0051] The model building unit is used to model the obtained normal data N using an improved isolation forest method to build a photovoltaic operation anomaly detection model;

[0052] The anomaly detection unit is used to input the data to be tested, and the abnormal data screened by K-MEANS is used for similarity comparison. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is detected by the photovoltaic operation anomaly detection model.

[0053] A terminal includes a processor and a storage medium; wherein:

[0054] The storage medium is used to store instructions;

[0055] The processor is used to operate according to the instructions to execute the steps of the photovoltaic operation abnormality detection method based on machine learning.

[0056] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of a photovoltaic operation abnormality detection method based on machine learning are implemented.

[0057] The beneficial effect of the present invention is that, compared with the prior art, by applying machine learning technology to photovoltaic power generation systems,

[0058] The present invention takes into account that the data of the same measuring point at different times may be affected differently by the outside world, so the photovoltaic operation data is first divided according to the dimensions of different times of the day, and then the divided data is clustered by K-MEANS to screen out more obvious single-point abnormal data, and the rest are normal data. Finally, the clustered normal data is run on the machine learning algorithm-Isolation Forest to establish a tree model, and a photovoltaic operation anomaly detection model is constructed. Finally, the data to be detected is first similarly calculated with the more obvious abnormal number data found by K-MEANS clustering, and a part of the abnormal data is screened out, and then the photovoltaic operation anomaly detection model is used for detection. Double detection, through the method of integrating the K-Means clustering algorithm and the isolation forest algorithm, can efficiently and accurately establish a photovoltaic operation anomaly detection model to perform anomaly detection on photovoltaic operation, that is, it can find more obvious single-point abnormal data and less obvious collective abnormal data.

[0059] The present invention takes into account that the data of the same measuring point at different times may be affected differently by the outside world, so the data is first divided based on time, and then K-MEANS is used to cluster the data based on the time division, which is of great significance for adjusting the working conditions of the photovoltaic power generation system and further improving the detection of photovoltaic operation anomalies. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a flow chart of the photovoltaic operation anomaly detection method based on machine learning;

[0061] Figure 2 This is a schematic diagram of the clustering process using the K-Means clustering algorithm;

[0062] Figure 3 A flow chart for constructing a photovoltaic operation anomaly detection model using the isolation forest algorithm;

[0063] Figure 4 Schematic diagram of the photovoltaic operation anomaly detection system based on machine learning. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

[0065] Figure 1 This is a flow chart of the photovoltaic operation anomaly detection method based on machine learning;

[0066] like Figure 1 and Figure 2 As shown, this embodiment provides a photovoltaic operation abnormality detection method based on machine learning. Specifically, it includes the following steps:

[0067] Step 1: Collect historical data of photovoltaic operation measurement points.

[0068] Preferably, in this embodiment, historical data of photovoltaic operation measurement points are obtained from the real-time database at time intervals t, including panel temperature, field temperature, light intensity, conversion efficiency, voltage and power, and other data.

[0069] Step 2: adjust the historical data of the photovoltaic operation measurement points into a unified format, and perform data cleaning on the historical data in the unified format to obtain cleaned data.

[0070] Step 3: divide the cleaned historical data of the photovoltaic operation measurement points according to time characteristics and according to different time dimensions of each day.

[0071] Step 4: For the divided data, use the K-MEANS clustering method to find out some obvious abnormal data M, and the rest are normal data N;

[0072] like Figure 3 As shown, step 4.1 includes the following steps:

[0073] Step 4.1, set the clustering parameter k and the clustering sample number threshold c;

[0074] Step 4.2, randomly select k points in the training data set as cluster centroids;

[0075] Step 4.3, calculate the sum of squared Euclidean distances between each point in the training data set and the centroid, and assign each point in the data set to the cluster corresponding to the centroid closest to it according to the nearest principle;

[0076] In this embodiment, preferably, the calculation expression of the sum of squares of the Euclidean distance is:

[0077]

[0078] In the formula,

[0079] p represents a data object in the data set;

[0080] c i Represents a cluster center point;

[0081] dist(p,c i ) represents the Euclidean distance between point p and the cluster center;

[0082] E represents the sum of squares of all cumulative Euclidean distances.

[0083] Step 4.4, update the centroid of the cluster. The centroid of each cluster is updated to the average value of all points in the cluster;

[0084] In this embodiment, the average value m of all points in a cluster is preferably i (c i ) is calculated as:

[0085]

[0086] In the formula,

[0087] n represents the number of all points;

[0088] p j is the value of a point in a cluster.

[0089] Step 4.5, determine whether the k cluster centers no longer change. If so, the algorithm ends and outputs the clustering results; otherwise, go to step 4.3 and continue executing until the algorithm end condition is reached. The sample format in the cluster that is less than the threshold c is regarded as an abnormal class, the data in the abnormal class is regarded as abnormal data M, and the rest is normal data N.

[0090] Step 5: The normal data N obtained in step 4 is modeled using the improved isolation forest method to construct a photovoltaic operation anomaly detection model.

[0091] like Figure 3 As shown, step 5 includes the following steps:

[0092] Step 5.1, set the size n of the sample data set, the number m of isolated trees iTree and the limit height h of each isolated tree iTree in the photovoltaic operation anomaly detection model.

[0093] Step 5.2, build an isolated tree iTree, and randomly sample n data from the normal data N as features. First, calculate the importance of the n features, normalize the importance, and assign an importance probability to each feature. Finally, put the processed feature data into the root node of the isolated tree iTree as the sample data set of the isolated tree iTree.

[0094] In this embodiment, if the importance of a feature is too high, for randomness considerations, we will set a maximum importance probability K (such as 50%), and evenly distribute the extra features to other features. For example, if a total of 6 features are selected, and the importance of one feature reaches 80%, then it will basically be selected when building the tree, which is contrary to random selection, so an upper limit must be set so that other features can also be selected, then the importance of the feature will be changed from 80% to 50%, and the remaining 30% of the importance will be evenly divided among the remaining 5 features.

[0095] In this embodiment, preferably, the Tsfresh library is used to calculate the feature importance.

[0096] Step 5.3, select features according to importance probability, using a two-dimensional sequence (q1, q2), that is, the values ​​of two time-series connected measurement points; when growing, calculate the maximum and minimum values ​​of all feature data in the sample data set in the feature q1 dimension, and then calculate the maximum and minimum values ​​of the change diff = q2-q1. For q1 and diff, randomly select values ​​for division. In order to ensure the normal growth of the tree, the two divided subsets must have data. If there is no data, reselect values ​​for division.

[0097] Step 5.4, randomly select a data p between the calculated maximum and minimum values ​​as the partition threshold.

[0098] Step 5.5, put the feature data with eigenvalues ​​less than or equal to p into the left subtree of the isolated tree iTree, and put the feature data with eigenvalues ​​greater than p into the right subtree of the isolated tree iTree.

[0099] Step 5.6, repeat steps 5.3 to 5.5 for the left subtree and right subtree of the isolated tree iTree respectively, until only one data in the child nodes of the isolated tree iTree reaches the limit height h, and the construction of the isolated tree iTree is completed.

[0100] Step 5.7, repeat steps 5.2 to 5.6 to generate m isolated trees iTree.

[0101] In step 5.8, m isolated trees iTree are combined into an isolated forest iForest, which is a photovoltaic operation anomaly detection model.

[0102] Step 6: For the data to be tested x, firstly make a similarity comparison with the abnormal data found by K-MEANS in step 4. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is tested by the photovoltaic operation abnormality detection model.

[0103] In this embodiment, preferably, the threshold represents the distance between the normal data and the abnormal data in the cluster, wherein the minimum distance is the adopted threshold.

[0104] When the Isolation Forest Algorithm is used for anomaly detection, the following conditions must be met:

[0105] (1) The tree height cannot exceed the limit height set in step 5.1;

[0106] (2) The data are divided separately;

[0107] (3) The data features of all nodes in the isolated forest are the same;

[0108] When calling the Isolation Forest algorithm, you need to configure the following two parameters:

[0109] max_samples: the number of isolated trees. In this embodiment, the parameter is set to 100 trees.

[0110] random_state: The number of samples to be drawn when training a single iTree. Experiments show that when the number of samples is 256, good results can be achieved in most cases.

[0111] Example 2.

[0112] like Figure 4 As shown, Embodiment 2 also provides a photovoltaic operation abnormality detection system based on machine learning, including: a data acquisition unit, a data cleaning unit, a data division unit, a screening unit, a model building unit, and an abnormality detection unit, wherein:

[0113] The data acquisition unit is used to collect historical data of photovoltaic operation measurement points;

[0114] The data cleaning unit is used to adjust the historical data of the photovoltaic operation measuring points into a unified format, and perform data cleaning processing on the historical data in the unified format to obtain the cleaned historical data of the photovoltaic operation measuring points;

[0115] The data division unit is used to divide the cleaned photovoltaic operation measurement point historical data according to time characteristics;

[0116] The screening unit is used to use the divided photovoltaic operation measurement point historical data as a training data set, and screen them through the K-MEANS clustering method to obtain abnormal data M and normal data N;

[0117] The model building unit is used to model the obtained normal data N using an improved isolation forest method to build a photovoltaic operation anomaly detection model;

[0118] The anomaly detection unit is used to input the data to be tested, and the abnormal data screened by K-MEANS is used for similarity comparison. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is detected by the photovoltaic operation anomaly detection model.

[0119] Example 3.

[0120] Embodiment 3 of the present invention provides a computer-readable storage medium.

[0121] A computer-readable storage medium stores a program, which, when executed by a processor, implements the steps of the photovoltaic operation abnormality detection method based on machine learning as described in Embodiment 1 of the present invention.

[0122] The detailed steps are the same as the photovoltaic operation abnormality detection method based on machine learning provided in Example 1, and will not be repeated here.

[0123] Example 4.

[0124] Embodiment 4 of the present invention provides an electronic device.

[0125] An electronic device comprises a memory, a processor and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the photovoltaic operation abnormality detection method based on machine learning as described in Example 1 of the present invention are implemented.

[0126] The detailed steps are the same as the photovoltaic operation abnormality detection method based on machine learning provided in Example 1, and will not be repeated here.

[0127] The beneficial effect of the present invention is that, compared with the prior art,

[0128] The present invention takes into account that the data of the same measuring point at different times may be affected differently by the outside world, so the photovoltaic operation data is first divided according to the dimensions of different times of the day, and then the divided data is clustered by K-MEANS to screen out more obvious single-point abnormal data, and the rest are normal data. Finally, the clustered normal data is run on the machine learning algorithm-IsolationForest to establish a tree model, and a photovoltaic operation anomaly detection model is constructed. Finally, the data to be detected is first similarly calculated with the more obvious abnormal number data found by K-MEANS clustering, and a part of the abnormal data is screened out, and then the photovoltaic operation anomaly detection model is used for detection. Double detection, through the method of integrating the K-Means clustering algorithm and the isolation forest algorithm, can efficiently and accurately establish a photovoltaic operation anomaly detection model to perform anomaly detection on photovoltaic operation, that is, it can find more obvious single-point abnormal data and less obvious collective abnormal data.

[0129] The present invention takes into account that the data of the same measuring point at different times may be affected differently by the outside world, so the data is first divided based on time, and then K-MEANS is used to cluster the data based on the time division, which is of great significance for adjusting the working conditions of the photovoltaic power generation system and further improving the detection of photovoltaic operation anomalies.

[0130] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0131] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0132] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0133] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A photovoltaic operation abnormality detection method based on machine learning, characterized in that: The following steps are involved: Step 1, collecting historical data of photovoltaic operation measurement points; Step 2, adjusting the historical data of the photovoltaic operation measuring points into a unified format, and performing data cleaning processing on the historical data in the unified format to obtain the cleaned historical data of the photovoltaic operation measuring points; Step 3, dividing the cleaned photovoltaic operation measurement point historical data according to time characteristics; Step 4: The divided historical data of photovoltaic operation measurement points are used as training data sets, and the abnormal data M and normal data N are obtained by screening through the K-MEANS clustering method; Step 5, the normal data N obtained in step 4 is modeled using an improved isolation forest method to construct a photovoltaic operation anomaly detection model; Step 5.1, setting the size n of the sample data set, the number m of isolated trees and the limit height h of each isolated tree in the photovoltaic operation anomaly detection model; Step 5.2, build an isolation tree, and randomly sample n data from the normal data N as features. First, calculate the importance of the n features, normalize the importance, and assign an importance probability to each feature. Put the processed feature data into the root node of the isolation tree as the sample data set of the isolation tree. Step 5.3, select features according to the probability of importance, using a two-dimensional sequence (q1, q2), that is, the values ​​of two time-series connected measurement points; when growing, calculate the maximum and minimum values ​​of all feature data in the sample data set in the feature q1 dimension, and then calculate the maximum and minimum values ​​of the change diff = q2-q1. For q1 and diff, randomly select values ​​for division. The two subsets must have data. If there is no data, reselect values ​​for division; Step 5.4, for q1 or diff, randomly select a data p between the maximum and minimum values ​​of q1 or diff as the partition threshold; Step 5.5, put the feature data with eigenvalues ​​less than or equal to p into the left subtree of the isolated tree, and put the feature data with eigenvalues ​​greater than p into the right subtree of the isolated tree; Step 5.6, repeat steps 5.3 to 5.5 for the left subtree and right subtree of the isolated tree respectively, until there is only one data in the child node of the isolated tree or the limit height h is reached, and the construction of the isolated tree iTree is completed; Step 5.7, repeat steps 5.2 to 5.6 to generate m isolated trees; Step 5.8, m isolated trees are combined into an isolated forest, which is a photovoltaic operation anomaly detection model; Step 6: Input the data to be tested, and first compare the similarity with the abnormal data screened by K-MEANS in step 4. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is tested using the photovoltaic operation abnormality detection model.

2. The photovoltaic operation abnormality detection method based on machine learning according to claim 1 is characterized in that: In step 1, historical data of photovoltaic operation measurement points are obtained from the real-time database at time intervals. The historical data include: panel temperature, field temperature, light intensity, conversion efficiency, and voltage power.

3. The photovoltaic operation abnormality detection method based on machine learning according to claim 1 is characterized in that: Step 4 specifically includes: Step 4.1, set the clustering parameter k and the clustering sample number threshold c; Step 4.2, randomly select k points in the training data set as cluster centroids; Step 4.3, calculate the sum of squared Euclidean distances between each point in the training data set and the centroid, and assign each point in the data set to the cluster corresponding to the centroid closest to it according to the nearest principle; Step 4.4, update the centroid of the cluster, the centroid of each cluster is updated to the average value of all points in the cluster; Step 4.5, determine whether the k cluster centers no longer change, if so, the algorithm ends and outputs the clustering result; otherwise, go to step 4.3 and continue to execute until the algorithm end condition is reached, and the samples in the cluster with values ​​less than the threshold c are regarded as abnormal classes, the data in the abnormal class are regarded as abnormal data M, and the rest are normal data N.

4. The photovoltaic operation abnormality detection method based on machine learning according to claim 3 is characterized in that: In step 4.3, the calculation expression of the sum of squared Euclidean distance is: In the formula, p represents a data object in the data set; c i Represents a cluster center point; dist(p,c i ) represents the Euclidean distance between point p and the cluster center; E represents the sum of squares of all cumulative Euclidean distances.

5. The photovoltaic operation abnormality detection method based on machine learning according to claim 4 is characterized in that: In step 4.4, the average value m of all points in each cluster i (c i ) is calculated as: In the formula, n represents the number of all points; p j Represents the value of a point in a cluster.

6. The photovoltaic operation abnormality detection method based on machine learning according to claim 5 is characterized in that: In step 5.2, the feature importance is calculated using the Tsfresh library.

7. The photovoltaic operation abnormality detection method based on machine learning according to claim 1 is characterized in that: In step 6, the Euclidean distance between the normal data in the sample and the abnormal data in the cluster is calculated, where the minimum distance is defined as the threshold.

8. A photovoltaic operation abnormality detection system based on machine learning using the method according to any one of claims 1 to 7, comprising: The data collection unit, the data cleaning unit, the data partitioning unit, the screening unit, the model building unit and the anomaly detection unit are characterized by: The data acquisition unit is used to collect historical data of photovoltaic operation measurement points; The data cleaning unit is used to adjust the historical data of the photovoltaic operation measuring points into a unified format, and perform data cleaning processing on the historical data in the unified format to obtain the cleaned historical data of the photovoltaic operation measuring points; The data division unit is used to divide the cleaned photovoltaic operation measurement point historical data according to time characteristics; The screening unit is used to use the divided photovoltaic operation measurement point historical data as a training data set, and screen them through the K-MEANS clustering method to obtain abnormal data M and normal data N; The model building unit is used to model the obtained normal data N using an improved isolation forest method to build a photovoltaic operation anomaly detection model; The anomaly detection unit is used to input the data to be tested, and the abnormal data screened by K-MEANS is used for similarity comparison. The data exceeding the threshold is abnormal data, and the data not exceeding the threshold is detected by the photovoltaic operation anomaly detection model.

9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the photovoltaic operation abnormality detection method based on machine learning according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the photovoltaic operation abnormality detection method based on machine learning described in any one of claims 1 to 7 are implemented.