A method for anomaly detection of photovoltaic power generation equipment based on time-series state diagrams

By constructing an anomaly detection method for photovoltaic power generation equipment based on time-series state diagrams, the problems of reliance on expert knowledge and poor interpretability of RNNs in existing technologies are solved. This method enables accurate modeling and anomaly detection of the operating status of photovoltaic equipment, improving the accuracy and interpretability of detection.

CN120512097BActive Publication Date: 2026-05-26HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
Filing Date
2025-04-25
Publication Date
2026-05-26

Smart Images

  • Figure CN120512097B_ABST
    Figure CN120512097B_ABST
Patent Text Reader

Abstract

This invention provides an anomaly detection method for photovoltaic (PV) power generation equipment based on a time-series state graph. The method includes: imputing default values, aligning sampling frequencies, and standardizing historical data of PV power generation equipment to generate standardized multidimensional time-series data; encoding the standardized multidimensional time-series data into PV power generation equipment data and time covariates, and generating low-dimensional time-series feature vectors through a fusion encoder; segmenting the low-dimensional time-series feature vectors using a sliding window, and generating weighted time-series state sequences through a K-means clustering algorithm; establishing a time-series state graph based on the state transition relationships in the time-series state sequences; performing local information aggregation of a graph neural network on the time-series state graph, combining LSTM time-series modeling and XGBoost classifier for end-to-end training to generate an anomaly detection model; and performing real-time anomaly detection of PV power generation equipment using the anomaly detection model. This invention improves the accuracy of anomaly detection and the interpretability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic power generation, specifically a method for detecting anomalies in photovoltaic power generation equipment based on time-series state diagrams. Background Technology

[0002] The development of clean energy has become an important pillar of my country's energy industry. Solar energy plays a crucial role in my country's energy structure transformation. Solar energy boasts advantages such as abundant resources, cleanliness, and renewability, making it one of the ideal energy sources for achieving sustainable development. With breakthroughs in photovoltaic (PV) power generation technology in my country, the installed capacity of PV power generation has continued to grow. Due to the large scale and extensive land occupation of PV equipment, malfunctions can lead to a reduction in power generation capacity. Therefore, malfunction detection of PV equipment is key to mitigating the impact of equipment failures on power generation capacity. Existing methods for malfunction detection in PV equipment mainly include:

[0003] (1) Anomaly detection method based on expert rules. This method relies on the experience and knowledge of domain experts to establish a series of rules to determine whether photovoltaic equipment has anomalies. For example, based on the normal range and variation patterns of parameters such as current, voltage, and temperature of photovoltaic modules, corresponding rules are formulated. When the actual monitored parameters exceed the threshold set by the rules, an anomaly is determined to have occurred. However, this method relies on expert knowledge and is difficult to cover complex situations. When the environment or equipment changes, the rules need to be updated.

[0004] (2) Anomaly detection methods based on Recurrent Neural Networks (RNNs) and their variants. RNNs are artificial neural networks capable of processing sequential data. By capturing the temporal correlations in time-series data, they learn normal data patterns. RNNs can analyze the patterns of changes in the operating parameters of photovoltaic equipment over time, identifying data that significantly deviates from the normal pattern as anomalies. However, this method suffers from poor model interpretability, hindering in-depth research into the causes of anomalies in photovoltaic power generation systems.

[0005] Photovoltaic power generation systems typically consist of a large number of photovoltaic panels. Timely and accurate detection of photovoltaic panel anomalies provides fundamental support for the maintenance of photovoltaic power generation systems. However, expert rule-based methods require the establishment of effective rules and are prone to missing anomalies; RNN-based methods lack interpretability. Summary of the Invention

[0006] In view of this, the present invention provides a method for anomaly detection of photovoltaic power generation equipment based on time-series state diagrams, which can construct time-series state diagrams according to the operating status of photovoltaic equipment and perform anomaly detection of photovoltaic power generation equipment according to state transition characteristics, thereby improving the accuracy of anomaly detection and the interpretability of the model.

[0007] A method for anomaly detection of photovoltaic power generation equipment based on time-series state diagrams includes the following steps:

[0008] S1. Data preprocessing: The historical data of photovoltaic power generation equipment is filled with default values, the sampling frequency is aligned and standardized to generate standardized multidimensional time series data with spatiotemporal attributes;

[0009] S2. Temporal Feature Embedding: The standardized multidimensional time-series data is encoded with photovoltaic power generation equipment data and time covariate encoding, and a low-dimensional time-series feature vector is generated by a fusion encoder.

[0010] S3. Identify the temporal state: The low-dimensional temporal feature vector is cut using a sliding window, and a weighted temporal state sequence is generated by K-means clustering algorithm;

[0011] S4. Construction of the temporal state graph: Based on the state transition relationship in the temporal state sequence, a temporal state graph with the state transition probability as the edge weight is established.

[0012] S5. Anomaly detection model training: Graph neural network local information aggregation is performed on the time-series state graph. End-to-end training is performed by combining LSTM time series modeling and XGBoost classifier to generate an anomaly detection model.

[0013] S6. Real-time anomaly detection of photovoltaic power generation equipment: After processing the online collected data through S1-S4, a real-time time-series status diagram is generated. The deviation of the diagram structure is calculated through the anomaly detection model. When the deviation exceeds the preset threshold, an anomaly alarm is triggered.

[0014] Furthermore, step S1 specifically includes:

[0015] S1-1: Use the interval mean to fill missing values. Take the average value of the same field data for the same device within the missing time interval to fill the missing values.

[0016] S1-2: Resample heterogeneous device data according to the mainstream sampling frequency, summate power data and average environmental parameter data;

[0017] S1-3: Perform maximum-minimum standardization on continuous data and one-hot encoding on categorical data.

[0018] Furthermore, step S2 specifically includes:

[0019] S2-1: Encode the photovoltaic power generation equipment data. The encoded photovoltaic power generation equipment data is represented as follows: Where L represents the number of observations and D represents the dimension of the observations;

[0020] S2-2: Time covariate encoding, which encodes the time information of time series data. Feature encoding is performed to obtain time covariates.

[0021] S2-3: Fusion coding, which integrates the coded photovoltaic power generation equipment data. and time covariates Encoding is performed using a fusion encoder to obtain low-dimensional temporal feature vectors. Where dim is the dimension of the low-dimensional temporal feature vector.

[0022] Furthermore, step S3 specifically includes:

[0023] S3-1: Time series segmentation, using a set state length to segment low-dimensional time series feature vectors, formally expressed as using a fixed length w to embed the time series... Divide the time series into fixed-length segments S = {s} 1 ,s 2 ,…,s n},in

[0024] S3-2: Identify the state of time series segments and use K-means clustering to divide the n time series segments obtained in step S3-1 into... Subset Minimize the variance of the Euclidean distance within the cluster Where θ v It is clustering Ω v The center is determined, and a weight score is assigned to each time series segment using the following formula:

[0025] dis(s,θ v )=||s-θ v || 2

[0026]

[0027] Where, dis(s,θ) v ) represents the time series segment s and the cluster Ω v center θ v The square of the Euclidean distance is used to determine the cluster to which the time series segment belongs as its state.

[0028] Furthermore, step S4 specifically includes:

[0029] Using a series of weighted directed graphs {G} 1 ,…,G T To model the state transitions of photovoltaic power generation equipment, each graph is formally defined as follows: Each vertex v represents a state, and each edge... This represents the transition relationship from state v to state v', and the edges have weights. The weights are calculated using the following formula:

[0030]

[0031] P(θ v |s t-1 ) represents the time series segment s t-1 The weights identified as state v, P(θ) v′ |s t ) represents the time series segment s t The weights identified as state v' are weighted in a weighted directed graph that is a temporal state graph with state transition probabilities as edge weights.

[0032] Furthermore, step S5 specifically includes:

[0033] S5-1: Local information aggregation, using the values ​​of the cluster centers to which the time series segments identified in step S3-2 belong. As a state representation, in the time-series state diagram G t The above performs local information aggregation, which can be formally represented as:

[0034]

[0035] in It aggregates the representations of the neighboring nodes of state v, where This represents a message passing function. Representing the timing state diagram G t-1 The hidden state of state v' Representing the timing state diagram G t The transition relationship from state v to state v', W MP The weight matrix, b, represents the message passing function. MP This represents the bias vector of the message passing function. Representing the timing state diagram G t The edge weights from state v to state v';

[0036] S5-2: Aggregation of temporal local information and temporal graph information, using a multilayer perceptron to fuse the local information of the current moment and the graph information of past moments, represented as follows: Among them W α It is a fusion matrix; LSTM is used to aggregate historical local information and graph information to obtain temporal local information. And time graph information U t ;

[0037]

[0038] Among them, W F W I W C W O This represents the weight matrix of the forget gate, input gate, memory unit, and output gate, b. F b I b C b O The bias vectors for the forget gate, input gate, memory unit, and output gate are represented by tanh(), which represents the hyperbolic tangent activation function. t I t O t It is the hidden state of LSTM, C t These are the memory cell states of the LSTM;

[0039] S5-3: Predicting whether an anomaly will occur, based on local temporal information. And time graph information U t The XGBoost classifier is used to predict anomaly occurrences.

[0040]

[0041] S5-4: End-to-end training of the anomaly detection model. The following loss function is used to train the temporal state graph neural network to generate the anomaly detection model:

[0042]

[0043] Furthermore, step S6 specifically includes:

[0044] S6-1: Data embedding and encoding, time series segmentation and state recognition. The photovoltaic power generation equipment operation data is embedded and encoded according to the embedding encoder trained in step S2; the relative time series is segmented and the time series state is identified according to step S3.

[0045] S6-2: Construct the time series state diagram structure. Based on the time series state identified in step S6-1, construct the time series state diagram according to step S4.

[0046] S6-3: Use the anomaly detection model to detect anomalies in the equipment operation. Use the anomaly detection model trained in step S5 to detect anomalies in the time-series state diagram constructed in step S6-2.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] (1) Modeling the operating status of photovoltaic power generation equipment: This invention can model the operating status of photovoltaic power generation equipment based on historical operating data of photovoltaic power generation equipment;

[0049] (2) Modeling the dynamic changes in the state of photovoltaic power generation equipment. This invention is able to model the dynamic process of state changes in photovoltaic power generation equipment.

[0050] (3) Abnormal detection of photovoltaic power generation equipment: The present invention can monitor the abnormal state of photovoltaic power generation equipment according to the state characteristics and track the dynamic change process of the abnormal state. Attached Figure Description

[0051] Figure 1 This is a flowchart of an anomaly detection method for photovoltaic power generation equipment based on a time-series state diagram according to an embodiment of the present invention;

[0052] Figure 2 This is a schematic diagram of the feature embedding encoder according to an embodiment of the present invention;

[0053] Figure 3 This is an example of a timing state diagram according to an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of partial information aggregation in an embodiment of the present invention;

[0055] Figure 5 This is a schematic diagram illustrating the aggregation of time information in an embodiment of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] Please see Figure 1 This invention provides a method for detecting anomalies in photovoltaic power generation equipment based on a time-series state diagram. The method includes the following steps:

[0058] S1: Data Preprocessing. Historical data from photovoltaic power generation equipment is filled with default values, sample frequency aligned, and standardized to generate standardized multidimensional time-series data with spatiotemporal attributes.

[0059] S2: Temporal Feature Embedding. The standardized multidimensional time-series data is encoded using photovoltaic power generation equipment data encoding and time covariate encoding, and a low-dimensional temporal feature vector is generated through a fusion encoder.

[0060] S3: Identify temporal states. The low-dimensional temporal feature vector is segmented using a sliding window, and a weighted temporal state sequence is generated using the K-means clustering algorithm.

[0061] S4: Construction of the temporal state graph. Based on the state transition relationships in the temporal state sequence, a temporal state graph is constructed with state transition probabilities as edge weights.

[0062] S5: Anomaly Detection Model Training. A graph neural network is used to aggregate local information on the time-series state graph. This is combined with LSTM time-series modeling and an XGBoost classifier for end-to-end training to generate an anomaly detection model.

[0063] S6: Real-time anomaly detection of photovoltaic power generation equipment. After processing the online collected data through S1-S4, a real-time time-series status diagram is generated. The deviation of the diagram structure is calculated through the anomaly detection model. When the deviation exceeds a preset threshold, an anomaly alarm is triggered.

[0064] Furthermore, the data preprocessing in step S1 specifically includes the following steps:

[0065] S1-1: Use the interval mean to fill missing values. For the same device, take the average value of the same field data within the missing time interval to fill missing values.

[0066] S1-2: Resample heterogeneous device data according to the mainstream sampling frequency, summate power data, and average environmental parameter data.

[0067] S1-3: Data Standardization. To eliminate differences in units and numerical ranges between different features and improve the convergence speed and predictive performance of the model, the original data is standardized. Maximum-minimum standardization is performed on continuous data, and one-hot encoding is performed on categorical data.

[0068] Furthermore, the embedding encoder structure used in step S2, temporal feature embedding, is as follows: Figure 2 As shown, the specific steps include:

[0069] S2-1: Photovoltaic power generation equipment data coding. Various data points from photovoltaic power generation equipment represent a specific characteristic of the equipment's operating status, and can be represented as... Where L represents the number of observations and D represents the dimension of the observations, these features are useful for modeling the operating status of the equipment. Table 1 lists the photovoltaic power generation equipment data used in this invention.

[0070] Table 1 Photovoltaic Power Generation Equipment Data

[0071]

[0072] S2-2: Time covariate encoding, time series data The time characteristics have a certain impact on the operating status of photovoltaic power generation equipment, which is particularly evident in daily, monthly, seasonal, and weather cycle changes. To fully explore the impact of time characteristics on anomaly detection, time information is encoded as a feature to enhance the model's ability to perceive time information, which helps the model identify time-related anomalies. Table 2 lists the time covariates used in this invention.

[0073] Table 2. Feature fields of time covariates

[0074] Data field name Field meaning Typical value moh Minutes per hour [0,59] (corresponding to scores from 0 to 59) hod Hours per day [0,23] (corresponds to 0:00 to 23:00) dom Number of days in a month [1,31] (corresponding to numbers 1 to 31) dow Number of days in a week [0,6] (corresponds to Monday through Sunday) doy Number of days in a year [1,365] (corresponding to days 1 to 365) moy Number of months in a year [1,12] (corresponding to January to December) woy Weeks in a year [0,51] (corresponding to weeks 1 to 52)

[0075] S2-3: Fusion Coding. This involves encoding the photovoltaic power generation equipment data. and time covariates Encoding using a fusion encoder can yield low-dimensional temporal feature vectors. Where dim is the dimension of the low-dimensional temporal feature vector.

[0076] Furthermore, step S3, identifying the timing state, specifically includes the following steps:

[0077] S3-1: Time series segmentation. Low-dimensional time series feature vectors are segmented using a predetermined state length, which can be formally expressed as embedding the time series using a fixed length w. Divide the time series into fixed-length segments S = {s} 1 ,s 2 ,…,s n},in

[0078] S3-2: Identify the state of time series segments. Use K-means clustering to divide the n time series segments obtained in S3-1 into... Subset Minimize the variance of the Euclidean distance within the cluster Where θ v It is clustering Ω v The center is determined, and a weight score is assigned to each time series segment using the following formula:

[0079] dis(s,θ v )=||s-θ v || 2

[0080]

[0081] Where, dis(s,θ) v ) represents the time series segment s and the cluster Ω v center θ vThe square of the Euclidean distance is used to determine the cluster to which the time series segment belongs as its state.

[0082] Furthermore, the construction of the timing state diagram in step S4 specifically involves:

[0083] This invention uses a series of weighted directed graphs {G} 1 ,…,G T This is used to model the state transitions of photovoltaic power generation equipment. Each graph can be formally defined as... Each vertex v represents a state, and each edge... This represents the transition relationship from state v to state v', and the edges have weights. The weights can be calculated using the following formula:

[0084]

[0085] P(θ v |s t-1 ) represents the time series segment s t-1 The weights identified as state v, P(θ) v′ |s t ) represents the time series segment s t The weights identified as state v'. For example... Figure 3 The image shown is an example of a timing state diagram.

[0086] Furthermore, the specific steps for training the anomaly detection model in step S5 are as follows:

[0087] S5-1: Local Information Aggregation. The values ​​of the cluster centers to which the time series segments identified in S3-2 belong. As a state representation, in the time-series state diagram G t Perform local information aggregation, such as Figure 4 As shown. It can be formally represented as

[0088]

[0089] in It aggregates the representations of the neighboring nodes of state v, where This represents a message passing function. Representing the timing state diagram G t-1 The hidden state of state v' Representing the timing state diagram G t The transition relationship from state v to state v', W MP The weight matrix, b, represents the message passing function. MP This represents the bias vector of the message passing function. Representing the timing state diagram G t The edge weights from state v to state v'.

[0090] S5-2: Aggregation of local temporal information and temporal graph information. Since different state transition paths represent different photovoltaic device operating conditions, changes in the graph structure over time also affect the representation of the current state. Using a multilayer perceptron to fuse the local information of the current moment and the graph information of past moments can be represented as follows: Among them W α It is a fusion matrix. Temporal local information is obtained by aggregating historical local and graph information using LSTM. And time graph information U t Its model structure is as follows Figure 5 As shown.

[0091]

[0092] Among them, W F W I W C W O This represents the weight matrix of the forget gate, input gate, memory unit, and output gate, b. F b I b C b O Let F represent the bias vectors for the forget gate, input gate, memory unit, and output gate, and let tanh() represent the hyperbolic tangent activation function. t I t O t It is the hidden state of LSTM, C t This refers to the memory cell state of the LSTM.

[0093] S5-3: Predict whether an anomaly will occur. Based on local temporal information. And time graph information U t A classifier is used to predict the occurrence of anomalies. This invention employs XGBoost as a classifier to classify the operating status of photovoltaic equipment.

[0094]

[0095] S5-4: End-to-end training of the anomaly detection model. The temporal state graph neural network is trained using the following loss function:

[0096]

[0097] Furthermore, step S6, real-time anomaly detection of photovoltaic power generation equipment, specifically includes the following steps:

[0098] S6-1: Data embedding and encoding, time series segmentation, and state identification. The photovoltaic power generation equipment operation data is embedded and encoded using the embedding encoder trained in step S2; the time series is segmented and the time series state is identified using the same steps as in step S3.

[0099] S6-2: Construct the time series state diagram structure. Based on the time series states identified in step S6-1, construct the time series state diagram according to step S4.

[0100] S6-3: Use an anomaly detection model to detect anomalies in the equipment's operation. Use the anomaly detection model trained in step S5 to detect anomalies in the time-series state diagram constructed in step S6-2.

[0101] The embodiments of this invention were validated on a domestic photovoltaic power generation equipment status dataset. We compared the results with traditional Seasonal and Trend decomposition Bayesian (ST-Bayesian) and Local Outlier Factor (LOF) algorithms. The photovoltaic power generation equipment anomaly detection method based on time-series state graphs proposed in this invention significantly outperforms traditional algorithms, as shown in Table 3. The precision R and recall P in the table are calculated using the following formulas:

[0102]

[0103]

[0104] Where P T For a real example, P F As a false positive, N F This is a false counterexample.

[0105] Table 3 Performance Comparison of Anomaly Detection Algorithms for Photovoltaic Power Generation Equipment

[0106] algorithm Method of the present invention ST-Bayesian LOF accuracy 97.8% 96.6% 73.3% Recall rate 94.9% 93.5% 78.6%

[0107] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for anomaly detection of photovoltaic power generation equipment based on time-series state diagrams, characterized in that, Includes the following steps: S1. Data Preprocessing: Missing value imputation, sampling frequency alignment, and standardization processing are performed on historical data of photovoltaic power generation equipment to generate standardized multidimensional time-series data with spatiotemporal attributes; S2. Temporal Feature Embedding: The standardized multidimensional time-series data is encoded with photovoltaic power generation equipment data and time covariate encoding, and a low-dimensional time-series feature vector is generated by a fusion encoder. S3. Identify the temporal state: The low-dimensional temporal feature vector is cut using a sliding window, and a weighted temporal state sequence is generated by K-means clustering algorithm; S4. Construction of the temporal state graph: Based on the state transition relationship in the temporal state sequence, a temporal state graph with the state transition probability as the edge weight is established. S5. Anomaly detection model training: Graph neural network local information aggregation is performed on the time-series state graph. End-to-end training is performed by combining LSTM time series modeling and XGBoost classifier to generate an anomaly detection model. S6. Real-time anomaly detection of photovoltaic power generation equipment: After processing the online collected data through S1-S4, a real-time time sequence status diagram is generated. The deviation of the diagram structure is calculated through the anomaly detection model. When the deviation exceeds the preset threshold, an anomaly alarm is triggered. Step S4 specifically includes: Using a series of weighted directed graphs To model the state transitions of photovoltaic power generation equipment, each graph is formally defined as follows: , where each vertex Representing a state, each edge Indicates from state to state The transition relationship, and the edges have weights. The weights are calculated using the following formula: ; Represents time series segments Recognized as a state The weight, Represents time series segments Recognized as a state The weighted directed graph is a time-series state graph with state transition probabilities as edge weights. .

2. The photovoltaic power generation equipment anomaly detection method based on time-series state diagram as described in claim 1, characterized in that: Step S1 specifically includes: S1-1: Use the interval mean to fill missing values. Take the average value of the same field data for the same device within the missing time interval to fill the missing values. S1-2: Resample heterogeneous device data according to the mainstream sampling frequency, summate power data and average environmental parameter data; S1-3: Perform maximum-minimum standardization on continuous data and one-hot encoding on categorical data.

3. The photovoltaic power generation equipment anomaly detection method based on time-series state diagram as described in claim 1, characterized in that: Step S2 specifically includes: S2-1: Encode the photovoltaic power generation equipment data. The encoded photovoltaic power generation equipment data is represented as follows: , where L represents the number of observations and D represents the dimension of the observations; S2-2: Time covariate encoding, which encodes the time information of time series data. Feature encoding is performed to obtain time covariates. ; S2-3: Fusion coding, which integrates the coded photovoltaic power generation equipment data. and time covariates Encoding is performed using a fusion encoder to obtain low-dimensional temporal feature vectors. ,in It is the dimension of the low-dimensional temporal feature vector.

4. The photovoltaic power generation equipment anomaly detection method based on time-series state diagram as described in claim 1, characterized in that: Step S3 specifically includes: S3-1: Time series segmentation, using a set state length to segment low-dimensional time series feature vectors, formally expressed as using a fixed length Embedded time series Divide into fixed-length time series segments ,in ; S3-2: Identify the state of time series segments and use K-means clustering to divide the n time series segments obtained in step S3-1 into... Subset To minimize the variance of the Euclidean distance within the cluster. ,in It is clustering The center is determined, and a weight score is assigned to each time series segment using the following formula: ; in, Represents time series segments Clustering center The square of the Euclidean distance is used to determine the cluster to which the time series segment belongs as its state.

5. The photovoltaic power generation equipment anomaly detection method based on time-series state diagram as described in claim 4, characterized in that: Step S5 specifically includes: S5-1: Local information aggregation, using the values ​​of the cluster centers to which the time series segments identified in step S3-2 belong. As a state representation, in the time-series state diagram The above performs local information aggregation, which can be formally represented as: ; in Aggregated states The representation of the neighboring nodes, where This represents a message passing function. Representing the timing state diagram medium state The hidden state, Representing the timing state diagram medium state to state The transitional relationship, The weight matrix represents the message passing function. This represents the bias vector of the message passing function. Representing the timing state diagram medium state to state Edge weights; S5-2: Aggregation of temporal local information and temporal graph information, using a multilayer perceptron to fuse the local information of the current moment and the graph information of past moments, represented as follows: ,in It is a fusion matrix; LSTM is used to aggregate historical local information and graph information to obtain temporal local information. and timeline information ; ; ; in, , , , The weight matrix represents the forget gate, input gate, memory unit, and output gate. , , , The bias vectors represent the forget gate, input gate, memory unit, and output gate. This represents the hyperbolic tangent activation function. , , These are the hidden states of the LSTM. These are the memory cell states of the LSTM; S5-3: Predicting whether an anomaly will occur, based on local temporal information. and timeline information The XGBoost classifier is used to predict anomaly occurrences. ; S5-4: End-to-end training of the anomaly detection model. The following loss function is used to train the temporal state graph neural network to generate the anomaly detection model: 。 6. The photovoltaic power generation equipment anomaly detection method based on time-series state diagram as described in claim 1, characterized in that: Step S6 specifically includes: S6-1: Data embedding and encoding, time series segmentation and state recognition. The photovoltaic power generation equipment operation data is embedded and encoded according to the embedding encoder trained in step S2; the time series is segmented and the time series state is identified according to the same method as in step S3. S6-2: Construct the time series state diagram structure. Based on the time series state identified in step S6-1, construct the time series state diagram according to step S4. S6-3: Use the anomaly detection model to detect anomalies in the equipment operation. Use the anomaly detection model trained in step S5 to detect anomalies in the time-series state diagram constructed in step S6-2.