Fault diagnosis method and device of photovoltaic system, electronic equipment and medium

By establishing a heterogeneous graph of the photovoltaic system and using graph neural networks for root cause reasoning of faults, the problem of low accuracy in fault diagnosis of photovoltaic power station equipment in existing technologies has been solved, and efficient and accurate fault diagnosis results have been achieved.

CN121787552APending Publication Date: 2026-04-03SIGENERGY TECHNOLOGY (JIANGSU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing fault diagnosis methods for photovoltaic power plant equipment are unable to capture the complex relationships between devices, resulting in low diagnostic accuracy.

Method used

By establishing a heterogeneous graph of the photovoltaic system, a graph neural network is used to perform root cause inference on the target equipment. Combined with the target subgraph and historical operation and maintenance events, diagnostic results of fault types and probability distributions are generated.

Benefits of technology

It improves the accuracy and efficiency of photovoltaic system fault diagnosis, and can deeply explore the multi-dimensional and high-level relationships between equipment and environmental factors, operation and maintenance records, etc., to generate detailed fault diagnosis conclusions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787552A_ABST
    Figure CN121787552A_ABST
Patent Text Reader

Abstract

The invention discloses a fault diagnosis method and device for a photovoltaic system, electronic equipment and a medium, and belongs to the technical field of photovoltaic system operation and maintenance. The method comprises the following steps: analyzing a target problem input by a user to obtain target equipment pointed by the target problem; extracting a target sub-graph associated with the target equipment from a pre-established photovoltaic system heterogeneous graph based on the target equipment; inputting the target sub-graph into a target graph neural network for fault root cause reasoning to obtain a reasoning result; the reasoning result comprises a fault type and probability distribution of the fault type; and generating a fault diagnosis result according to the reasoning result. According to the method, the fault association rule can be mined from the complex relationship contained in the target sub-graph, the inference result containing the fault type and the fault type probability distribution is output, and compared with a simple judgment mode of triggering alarm through a threshold value, the accuracy of the fault diagnosis result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of photovoltaic system operation and maintenance technology, and in particular relates to a method, device, electronic equipment and medium for fault diagnosis of photovoltaic systems. Background Technology

[0002] With the large-scale development of photovoltaic power plants, their operational stability and power generation efficiency are directly related to energy supply security and return on investment. Therefore, accurately diagnosing equipment faults in photovoltaic power plants is of great significance for ensuring their stable operation.

[0003] In the field of photovoltaic power plant equipment fault diagnosis, related technologies mainly rely on single-variable thresholds or rules for diagnosis. This involves setting specific thresholds to monitor a key parameter of the equipment; when the parameter exceeds the threshold, a fault alarm is triggered. However, the relationships between photovoltaic power plant equipment are complex. Not only are there interactions between components, but also higher-order relationships between components and environmental factors, and between components and maintenance records. Methods based on single-variable thresholds or rules struggle to capture these complex relationships and accurately reflect the actual operating status of the equipment, resulting in low accuracy in photovoltaic power plant equipment fault diagnosis. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a fault diagnosis method, apparatus, electronic device, and medium for photovoltaic systems to improve the accuracy of fault diagnosis.

[0005] Firstly, this application provides a fault diagnosis method for a photovoltaic system, including: The target question input by the user is parsed to obtain the target device to which the target question points; Based on the target device, a target subgraph associated with the target device is extracted from a pre-established heterogeneous photovoltaic system graph. The heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes. The multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events. The edges represent the relationships between the nodes. The target subgraph is input into a target graph neural network for fault root cause inference to obtain inference results; the inference results include fault types and probability distributions of the fault types. A fault diagnosis result is generated based on the reasoning result.

[0006] According to the fault diagnosis method for photovoltaic systems proposed in this application, by pre-establishing a heterogeneous graph of the photovoltaic system containing entity nodes representing objects and elements related to photovoltaic system operation and maintenance, event nodes representing historical operation and maintenance events, and edges reflecting the relationships between nodes, it realizes the modeling and integration of multi-dimensional and high-order relationships between devices, between devices and environmental factors, and between devices and operation and maintenance records in the photovoltaic system. Based on the target device, the target subgraph is extracted from the heterogeneous graph, which can focus on information related to fault diagnosis. By utilizing the powerful processing and learning capabilities of graph neural networks for graph structure data, it can mine fault correlation patterns from the complex relationships contained in the target subgraph, and then output inference results containing fault types and the probability distribution of those fault types. Compared with the simple judgment method of triggering alarms by thresholds, this method improves the accuracy of fault diagnosis results.

[0007] According to one embodiment of this application, the step of extracting a target sub-graph associated with the target device from a pre-established photovoltaic system heterogeneity graph based on the target device includes: Determine the target node corresponding to the target device in the photovoltaic system heterogeneity diagram; The local graph within a preset neighborhood centered on the target node is retrieved as the target subgraph.

[0008] In this embodiment, by using a retrieval method that presets a neighborhood range centered on the target node, relevant nodes and corresponding edges that are directly or indirectly associated with the target device can be filtered out. This allows the target subgraph to include the associated information required to support fault diagnosis, reduces redundant nodes and data unrelated to fault diagnosis in the heterogeneous graph, and improves the efficiency and accuracy of the graph neural network inference process.

[0009] According to one embodiment of this application, the target subgraph includes a first subgraph within the hop neighborhood of the target node K1 corresponding to the target device and a second subgraph hop of the target node K2; wherein, K1 is greater than K2; The step of inputting the target subgraph into the target graph neural network for fault root cause reasoning to obtain the reasoning result includes: Feature extraction is performed on each node and each edge in the first subgraph to obtain node features and edge feature vectors for each node and each edge; the node features include statistical features and historical failure rate within the target time; the edge feature vectors include edge attributes and weights that decay over time. The state vector of each node is initialized based on the node characteristics of each node; the state vector is an intermediate vector that is dynamically updated for each node during the inference process of the target graph neural network. Based on the edge feature vector and the state vector of each node in the first subgraph, a message vector is generated for each node to transmit to its corresponding neighbor node. Aggregate the message vectors transmitted from each node to its corresponding neighbor nodes, update the state vectors of each node in the second subgraph based on the aggregation results, and output the inference results.

[0010] In this embodiment, the target subgraph is divided into a first subgraph within the K1-hop neighborhood of the target node corresponding to the target device and a second subgraph within the K2-hop neighborhood, where K1 is greater than K2. This allows for in-depth analysis of fault diagnosis within different levels of neighborhood, considering both direct correlation factors and indirect influencing factors of the target device. During the root cause reasoning process, features are first extracted from each node and edge in the first subgraph to obtain node features containing statistical features and historical failure rates within the target time period, and edge feature vectors containing edge attributes and weights that decay over time. This fully considers the key factors and dynamic changes in the photovoltaic system's operation and maintenance process, making the features more consistent with... The actual influencing factors of photovoltaic system equipment failures are analyzed. The state vectors of each node are initialized based on their node characteristics, and message vectors transmitted from each node to its corresponding neighboring nodes are generated based on edge feature vectors and the state vectors of each node. This simulates information transmission between nodes and realizes the dynamic propagation and interaction of fault information in the subgraph. By aggregating the message vectors transmitted from each node to its corresponding neighboring nodes and updating the state vectors of each node in the second subgraph, the global correlation information of the first subgraph is transmitted to the core analysis scope of the second subgraph. This fully utilizes the dynamic update mechanism of graph neural networks, enabling in-depth mining of complex relationships between nodes and fault propagation paths, thus improving the accuracy of fault diagnosis.

[0011] According to one embodiment of this application, the reasoning result further includes an explanation path for fault propagation; The method further includes: During the message vector transmission process of the target graph neural network, edges and corresponding nodes whose weights satisfy a preset threshold are selected to form the explanation path for the fault propagation.

[0012] In this embodiment, by filtering edges and corresponding nodes whose weights meet a preset threshold, an explanation path for the fault propagation is formed. This can identify nodes and edges that have a key impact on fault propagation based on the weight attributes of message passing during graph neural network inference, thereby improving the accuracy of generating the explanation path for fault propagation. Furthermore, by generating the explanation path for fault propagation, maintenance personnel can not only understand the fault type and probability of the target device, but also determine the propagation link of the fault between related nodes, thereby improving the efficiency of fault maintenance.

[0013] According to one embodiment of this application, generating message vectors from each node to its corresponding neighbor nodes based on the edge feature vectors and the state vectors of each node in the first subgraph includes: The edge feature vector and the node state vector are concatenated to obtain the concatenated vector; The concatenated vector is linearly transformed using the weight matrix of the target graph neural network to obtain the message vector of the corresponding neighbor node.

[0014] In this embodiment, by concatenating the edge feature vector with the node state vector, a deep fusion of the node's own state information and the relationship information between nodes can be achieved. By using the weight matrix of the target graph neural network to perform a linear transformation on the concatenated vector, the fault association rules learned by the weight matrix during model training can be utilized to adaptively allocate weights and optimize features for various types of information in the concatenated vector. This strengthens key information that has an important impact on fault reasoning and weakens irrelevant interference information, so that the generated message vector includes fault-related information, thereby improving the accuracy of the message vector in representing fault association relationships.

[0015] According to one embodiment of this application, the method further includes: Preprocess the basic knowledge and product documents of the photovoltaic system; Extract entities and relationships between entities from the preprocessed basic knowledge and product documents; the entities include at least one of the following in the photovoltaic system: equipment, components, parameters, parameter limits, failure modes, operation and maintenance steps, and alarm codes; the relationships between entities include at least one of the following: component affiliation, failure and symptom association, parameter and parameter limit correspondence, and operation and maintenance steps and equipment relationship. Based on the entities and the relationships between entities, construct entity nodes representing the operation and maintenance related objects and elements of the photovoltaic system and the edges connecting the entity nodes to obtain the basic graph; The historical operation and maintenance events are added as event nodes to the basic graph to obtain the heterogeneous graph of the photovoltaic system; wherein, the edges connecting the event nodes have weights that decay with the occurrence time of the historical operation and maintenance events.

[0016] In this embodiment, preprocessing of basic knowledge and product documentation reduces redundancy and noise in the data, standardizes data format and expression, and extracts entities and relationships from multi-dimensional operation and maintenance elements of the photovoltaic system. This comprehensively depicts the inherent connections between photovoltaic system operation and maintenance-related objects and elements, giving the constructed basic graph rich information dimensions and clear relational logic. Historical operation and maintenance events are then added to the basic graph as event nodes, and time-decaying weights are set for the edges connecting these nodes. This achieves the fusion of static basic information and dynamic operation and maintenance data, ensuring the heterogeneous graph includes both inherent system attributes and actual operation and maintenance experience. By setting time-decaying weights, the timeliness of the impact of historical operation and maintenance events on current fault diagnosis can be reflected, making the heterogeneous graph more aligned with the actual needs of fault diagnosis. The photovoltaic system heterogeneous graph established in this way preserves the true topology and spatiotemporal dependencies of the photovoltaic power station, enabling subsequent graph neural networks to naturally capture high-order interactions and accurately reveal the propagation path of complex faults.

[0017] According to one embodiment of this application, generating a fault diagnosis result based on the reasoning result includes: Based on the target problem, at least one target historical operation and maintenance event with the highest similarity to the target problem is matched from the target vector library; wherein, the target vector library stores the embedding vectors of multiple historical operation and maintenance events; The scores representing the probability of occurrence of each fault type are obtained by weighted fusion based on the fault type corresponding to at least one of the target historical operation and maintenance events and the reasoning results. The at least one fault type with the highest score is determined as the diagnostic conclusion; The diagnostic conclusions are converted into structured fault diagnosis results; the fault diagnosis results include at least the diagnostic conclusions.

[0018] In this embodiment, by matching the similarity between the target problem and the embedded vectors of historical operation and maintenance events in the target vector library, the reuse of historical operation and maintenance experience data is realized. This allows the diagnostic process to draw on historical processing patterns of similar problems. Moreover, compared with traditional text matching, the embedded vector matching method can better capture the deep semantic relationship between the target problem and historical events, resulting in a higher relevance between the matched target historical operation and maintenance events and the target problem. The fault type corresponding to the target historical operation and maintenance event is weighted and fused with the inference results to generate a probability score. This combines real-time data inference with historical experience, and the weighting mechanism achieves complementary advantages of multi-dimensional information, further improving the accuracy of fault diagnosis. The fault type with the highest score is determined as the diagnostic conclusion and converted into a structured form, enabling operation and maintenance personnel to quickly obtain diagnostic information and formulate operation and maintenance strategies, thereby improving operation and maintenance efficiency.

[0019] According to one embodiment of this application, the method further includes: Obtain the operation and maintenance events generated after maintaining the photovoltaic system based on the fault diagnosis results; The heterogeneous diagram of the photovoltaic system is updated based on the aforementioned maintenance events.

[0020] In this embodiment, by acquiring the maintenance events generated after maintenance, the closed-loop data of the entire fault diagnosis process is applied to the dynamic update of the photovoltaic system heterogeneous diagram. Compared with the traditional static diagram, it can not only verify and correct the original information in the photovoltaic system heterogeneous diagram, but also enrich the event node types and correlation dimensions of the photovoltaic system heterogeneous diagram. This allows subsequent fault diagnosis to be based on new maintenance experience and adapt to changes in the operating characteristics of the photovoltaic system caused by equipment aging, environmental changes, etc., thereby improving the accuracy of subsequent fault diagnosis.

[0021] According to one embodiment of this application, the method further includes: Extract multiple sample target sub-graphs associated with different sample devices from the photovoltaic system heterogeneity graph; Obtain labels corresponding to multiple sample target sub-maps; the labels represent the fault types of sample devices associated with the sample target sub-maps; The target graph neural network is obtained by training a preset initial graph neural network with multiple sample target sub-graphs and their corresponding labels as a training dataset.

[0022] In this embodiment, by extracting sample target subgraphs from the constructed heterogeneous graph of the photovoltaic system, and the sample subgraphs corresponding to different sample devices, the training data can include the association information and fault characteristics of multiple types of devices in the photovoltaic system, enriching the diversity of the training data and improving the model's generalization reasoning ability for faults of multiple types of devices; by using the fault type corresponding to the sample device as the label of the sample target subgraph, the model can learn the graph structure features corresponding to different fault types during training, thereby improving the accuracy of target graph neural network reasoning.

[0023] Secondly, this application provides a fault diagnosis device for a photovoltaic system, comprising: The parsing module is used to parse the target question input by the user to obtain the target device pointed to by the target question; The extraction module is used to extract a target subgraph associated with the target device from a pre-established heterogeneous photovoltaic system graph based on the target device; the heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes, the multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events, and the edges represent the relationships between the nodes; The inference module is used to input the target subgraph into the target graph neural network to perform fault root cause inference and obtain inference results; the inference results include fault types and probability distributions of the fault types. The generation module is used to generate fault diagnosis results based on the reasoning results.

[0024] According to the photovoltaic system fault diagnosis device of this application, by pre-establishing a photovoltaic system heterogeneous graph containing entity nodes representing photovoltaic system operation and maintenance related objects and elements, event nodes representing historical operation and maintenance events, and edges reflecting the relationships between nodes, it realizes the modeling and integration of multi-dimensional and high-order relationships between devices, between devices and environmental factors, and between devices and operation and maintenance records in the photovoltaic system. Based on the target device, the target subgraph is extracted from the heterogeneous graph, which can focus on information related to fault diagnosis. By utilizing the powerful processing and learning capabilities of graph neural networks for graph structure data, it can mine fault correlation patterns from the complex relationships contained in the target subgraph, and then output inference results containing fault types and the probability distribution of such fault types. Compared with the simple judgment method of triggering alarms by thresholds, the accuracy of fault diagnosis results is improved.

[0025] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the fault diagnosis method for the photovoltaic system as described in the first aspect above.

[0026] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fault diagnosis method for a photovoltaic system as described in the first aspect above.

[0027] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the fault diagnosis method for photovoltaic systems as described in the first aspect above.

[0028] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the fault diagnosis method for a photovoltaic system as described in the first aspect above.

[0029] The above-described one or more technical solutions in the embodiments of this application have at least the following technical effects: According to the fault diagnosis method for photovoltaic systems proposed in this application, by pre-establishing a heterogeneous graph of the photovoltaic system containing entity nodes representing objects and elements related to photovoltaic system operation and maintenance, event nodes representing historical operation and maintenance events, and edges reflecting the relationships between nodes, it realizes the modeling and integration of multi-dimensional and high-order relationships between devices, between devices and environmental factors, and between devices and operation and maintenance records in the photovoltaic system. Based on the target device, the target subgraph is extracted from the heterogeneous graph, which can focus on information related to fault diagnosis. By utilizing the powerful processing and learning capabilities of graph neural networks for graph structure data, it can mine fault correlation patterns from the complex relationships contained in the target subgraph, and then output inference results containing fault types and the probability distribution of those fault types. Compared with the simple judgment method of triggering alarms by thresholds, this method improves the accuracy of fault diagnosis results.

[0030] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic flowchart of a fault diagnosis method for a photovoltaic system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the fault diagnosis device for a photovoltaic system provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0034] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0035] The following description, in conjunction with the accompanying drawings, details the fault diagnosis method, apparatus, electronic equipment, and medium for photovoltaic systems provided in this application through specific embodiments and application scenarios.

[0036] Among them, the fault diagnosis method of photovoltaic system can be applied to the terminal, and can be executed by the hardware or software in the terminal.

[0037] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0038] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.

[0039] The fault diagnosis method for photovoltaic systems provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the fault diagnosis method for photovoltaic systems. The electronic devices mentioned in this application embodiment include photovoltaic systems, servers, etc. The fault diagnosis method for photovoltaic systems provided in this application embodiment is described below using an electronic device as the execution subject.

[0040] like Figure 1 As shown, the fault diagnosis method for the photovoltaic system includes steps 110, 120, 130 and 140.

[0041] Step 110: Analyze the target question input by the user to obtain the target device to which the target question points.

[0042] A photovoltaic (PV) system is an energy supply system that uses the photovoltaic effect to convert solar energy into electrical energy. The architecture of a PV system typically includes core equipment such as PV arrays, inverters, combiner boxes, energy storage devices, monitoring devices, and transmission lines. These devices work together as a cohesive whole through electrical connections and data interaction.

[0043] During the long-term operation of photovoltaic systems, various types of equipment are prone to different types of failures due to environmental factors (such as high temperature, high humidity, sandstorms, lightning strikes, etc.), equipment aging, improper installation and maintenance, and grid fluctuations, leading to decreased power generation efficiency or even shutdown. Inverters, as high-power conversion devices, are prone to heat accumulation due to energy loss during operation. Failures in the cooling system, aging of internal components, or excessive load can all cause overheating faults. The monitoring device of the photovoltaic system collects temperature parameters in real time. If the temperature exceeds a preset threshold, an alarm mechanism will be triggered, generating an alarm message such as "Inverter INV-03 overheating." At this time, maintenance personnel need to identify the cause of the fault to develop a targeted repair plan. For example, maintenance personnel can input the target problem into the fault diagnosis system, such as: "Inverter INV-03 is always overheating, what is the cause?" The target problem points to the specific fault phenomenon of the equipment.

[0044] In this embodiment of the application, the target question input by the user can be parsed. For example, natural language processing techniques, such as entity recognition, keyword extraction, and semantic understanding, can be used to extract structured information from the unstructured target question, thereby determining the target device to which the target question refers. Taking the user-input target question "Inverter INV-03 is always overheating, what is the reason?" as an example, the parsing process may include: First, text preprocessing is performed to remove redundant information from the target question, such as interjections like "please ask" and "what is the reason," retaining the core semantic part "Inverter INV-03 is always overheating." The text is then segmented into words, yielding results such as "inverter," "INV-03," "always," and "overheating." Based on a photovoltaic system domain knowledge base, entity matching and classification are performed on the segmented results. This knowledge base can include knowledge of preset entity types such as equipment type, equipment number, fault symptoms, and time range. "Inverter" corresponds to the equipment type entity in a photovoltaic system, and "INV-03" is the specific equipment number under this equipment type, used to uniquely identify a particular device. "Overheating" corresponds to the fault symptom entity. "Always" can be semantically understood and converted into time range information, which, combined with the conventional time dimension definition of photovoltaic system operation and maintenance scenarios, can be mapped to "the last 24 hours," or adjusted according to preset system time rules, such as "the last 12 hours" or "the last 48 hours." Next, structured information integration is performed, organizing the identified entities according to a preset data format to form a structured information dictionary. For example, to address the above problem, the integrated structured information can be represented as: { "stationId": "ST-001" (station number) "deviceId": "INV-03" (Unique device identifier) "deviceType": "Inverter" (device type) "symptom": "overheating" (fault symptom) "timeRange": "The duration of the fault over the past 24 hours" } Based on structured information, the target device can be identified by combining "deviceType" and "deviceId". The target device referred to by the target problem is "the inverter with the number INV-03".

[0045] Step 120: Extract the target subgraph associated with the target device from the pre-established heterogeneous photovoltaic system graph based on the target device; the heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes. The multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events. The edges represent the relationships between the nodes.

[0046] In this embodiment, the photovoltaic system heterogeneous graph is a structured network constructed using a heterogeneous graph data model based on the full lifecycle operation and maintenance data of the photovoltaic system. The core function of the photovoltaic system heterogeneous graph is to integrate the scattered operation and maintenance related information in the photovoltaic system, and to uniformly map heterogeneous data from different systems such as inverters, energy storage, meters, weather stations and historical operation and maintenance events into a cross-level heterogeneous graph. Through the association relationship between nodes and edges, it intuitively presents the connection between equipment, elements and historical events, and preserves the real topology and spatiotemporal dependence of the photovoltaic power station, so that the subsequent graph neural network can naturally capture high-order interactions, thereby accurately revealing the propagation link of complex faults.

[0047] The structure of a heterogeneous graph of a photovoltaic system consists of two core elements: nodes and edges. Nodes are divided into entity nodes and event nodes, while edges are used to define the relationships between different nodes.

[0048] Entity nodes are primarily used to represent objects and elements related to the operation and maintenance of a photovoltaic (PV) system. These can include equipment entity nodes, environmental element nodes, operation and maintenance resource nodes, and parameter indicator nodes. Equipment entity nodes correspond to various types of equipment in the PV system, such as PV arrays (which can be further subdivided into PV module strings, PV brackets, etc.), inverters (including inverter bodies, heat dissipation modules, filter modules, etc.), combiner boxes, energy storage devices, and monitoring devices. Environmental element nodes characterize external environmental factors affecting the operation of the PV system, such as temperature, humidity, light intensity, wind speed, and dust concentration. Node data is collected and updated in real time by environmental sensors deployed at the power plant site. Operation and maintenance resource nodes include resources related to operation and maintenance work, such as maintenance personnel, repair tools, spare parts inventory, and maintenance work orders. Node information can include personnel qualifications, tool types, spare parts models, and inventory quantities. Parameter indicator nodes correspond to the operating parameters of various equipment, such as the input voltage, output current, operating temperature, and conversion efficiency of inverters, and the output power and open-circuit voltage of PV arrays. Node data is linked to equipment entity nodes in real time and dynamically updated according to the equipment's operating status.

[0049] Event nodes are used to represent historical operation and maintenance events of the photovoltaic system, and can include operation and maintenance work order event nodes and alarm event nodes. Operation and maintenance work order event nodes record past fault information of the equipment, such as key fields such as fault occurrence time, fault equipment number, fault type, fault description, fault handling result and recovery time, as well as the equipment's regular maintenance and irregular inspection records, such as maintenance time, maintenance equipment, maintenance content, maintenance personnel and maintenance effect evaluation information; alarm event nodes correspond to various alarm information triggered by the system in history, including alarm occurrence time, alarm equipment, alarm type (such as over-temperature alarm, over-current alarm, voltage abnormality alarm, etc.), alarm level and alarm clearance time, etc.

[0050] Edges are used to represent the relationships between different nodes. For example, a device entity node and a parameter index node are connected by an edge that "has operating parameters" to represent the attribution relationship between a device and a real-time monitoring parameter; a device entity node and a fault event node are connected by an edge that "has experienced a fault" to record the device's past fault experiences; an environmental element node and a device entity node are connected by an edge that "affects operating status" to reflect the effect of environmental factors on the device's operation.

[0051] In this embodiment of the application, nodes and corresponding edges that are directly or indirectly related to the target device can be screened from the heterogeneous graph of the photovoltaic system by using preset subgraph extraction rules and association retrieval algorithms, forming a local association network with the target device as the core, that is, the target subgraph associated with the target device.

[0052] Specifically, based on the target device's structured information, such as "deviceType = inverter" and "deviceId = INV-03", a matching search can be performed on the set of device entity nodes in the heterogeneous photovoltaic system graph to determine the unique node corresponding to the target device. Then, the first-level nodes and corresponding edges directly associated with the target device are filtered. If necessary, the second-level nodes and corresponding edges indirectly associated with the target device can be expanded. The selected nodes and corresponding edges form the target subgraph associated with the target device.

[0053] Step 130: Input the target subgraph into the target graph neural network to perform fault root cause reasoning and obtain the reasoning results; the reasoning results include the fault type and the probability distribution of the fault type.

[0054] In this embodiment, the target graph neural network is a graph neural network model customized for photovoltaic system fault diagnosis scenarios. The target graph neural network can perform structured data learning and semantic association analysis on the extracted target subgraph. By simulating the logical reasoning process of human fault diagnosis, it can mine the fault association rules hidden in the nodes and edges of the target subgraph and output the fault type and corresponding probability distribution of the target device.

[0055] Based on the heterogeneous characteristics of the target subgraph of the photovoltaic system, the target graph neural network can select heterogeneous graph neural network architectures such as Relational Graph Convolutional Network (R-GCN), Heterogeneous Graph Transformer (HGT), or Temporal Graph Attention Network (TGAT).

[0056] The target subgraph can be input into a target graph neural network for root cause inference. The target graph neural network encodes the nodes and edges in the target subgraph, constructing a graph representation of the target subgraph by learning the feature representations of nodes and the relational representations of edges. For example, in R-GCN, the network aggregates and updates the features of nodes based on the edge type, capturing information in the target subgraph, including relationships between devices and associations between devices and events, and then performs classification prediction to determine the fault type and probability distribution. For example, in a fully connected layer, the feature vector is linearly transformed into a vector with the same dimension as the fault type set. Then, the vector is converted into probability values ​​using the Softmax activation function, ensuring that each probability value is in the range of 0-1, and the sum of the probabilities of all fault types is 1. For example, a probability distribution of [T1: 0.42, T2: 0.28, T3: 0.20, T4: 0.10] is obtained. Finally, the inference result is formed, such as: {"Fault Type": [T1, T2, T3, T4], "Probability Distribution": [0.42, 0.28, 0.20, 0.10]}. Here, T1 represents a blocked heat dissipation module, T2 represents a faulty cooling fan, T3 represents an excessively high ambient temperature, and T4 represents an overload.

[0057] Step 150: Generate fault diagnosis results based on the reasoning results.

[0058] In this embodiment, the fault diagnosis results can provide maintenance personnel with detailed information about the fault, enabling them to take appropriate repair and maintenance measures. The fault diagnosis results may include one or more of the following: faulty device identification, fault type, probability distribution of fault occurrence, cause analysis, and suggested maintenance measures. The faulty device identification identifies the specific device experiencing the fault; the fault type describes the specific manifestation of the fault, such as over-temperature or overload; the probability distribution of fault occurrence represents the confidence level of different fault types; the cause analysis, based on the fault type and related historical maintenance events, provides clues to the root cause of the fault; and the suggested maintenance measures provide maintenance personnel with specific action guidelines for quickly resolving the fault.

[0059] In some embodiments, fault types and probability distributions can be extracted from the inference results to determine one or more most likely fault types. For example, if the inference result indicates a probability of 0.8 for inverter cooling fan failure, while other fault types have lower probabilities, cooling fan failure can be identified as the most likely fault type. By combining historical maintenance events and related equipment information in the photovoltaic system heterogeneous diagram, possible causes can be analyzed. By analyzing event nodes associated with the target equipment, historical events that may have led to the fault can be identified, such as previous maintenance records and equipment aging conditions. This information can be integrated into the fault diagnosis results, providing maintenance personnel with clues about the causes of the fault. Suggested maintenance measures can also be generated based on the fault type and possible causes.

[0060] According to the fault diagnosis method for photovoltaic systems in this application, the target device is obtained by parsing the target problem input by the user; based on the target device, a target subgraph associated with the target device is extracted from a pre-established heterogeneous photovoltaic system graph; the heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes, the multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events, and the edges represent the relationships between the nodes; the target subgraph is input into a target graph neural network for fault root cause reasoning to obtain the reasoning result; the reasoning result includes the fault type and the probability distribution of the fault type; and a fault diagnosis result is generated based on the reasoning result. This application embodiment achieves the modeling and integration of multi-dimensional, high-order relationships in the photovoltaic system by pre-establishing a heterogeneous graph of the photovoltaic system, which includes entity nodes representing objects and elements related to photovoltaic system operation and maintenance, event nodes representing historical operation and maintenance events, and edges reflecting the relationships between nodes. Based on the target device, the target subgraph is extracted from the heterogeneous graph, which can focus on information related to fault diagnosis. By utilizing the powerful processing and learning capabilities of graph neural networks for graph structure data, fault correlation patterns can be mined from the complex relationships contained in the target subgraph, and then the inference results containing the fault type and the probability distribution of the fault type are output. Compared with the simple judgment method of triggering alarms by threshold, the accuracy of fault diagnosis results is improved.

[0061] In some embodiments, extracting a target subgraph associated with the target device from a pre-established heterogeneous photovoltaic system graph based on the target device includes: Identify the target node corresponding to the target device in the heterogeneous photovoltaic system diagram; The local graph within a preset neighborhood centered on the target node is retrieved as the target subgraph.

[0062] In this embodiment, each node in the photovoltaic system heterogeneous diagram can correspond to a unique identifier. The unique identification information of each device in the photovoltaic system, such as the device number, corresponds to the identifier of the corresponding node in the photovoltaic system heterogeneous diagram. Therefore, the corresponding node in the heterogeneous diagram can be located based on the unique identification information of the target device, such as the device number. For example, by matching the number of the target device with the identifier of the node in the heterogeneous diagram, the target node corresponding to the target device can be accurately found.

[0063] The neighborhood range can be set according to the actual application scenario and fault diagnosis requirements. For example, it can be set to nodes and edges directly connected to the target node, or it can be set to nodes and edges within a certain number of hops. The target subgraph is obtained by searching the local graph within the neighborhood range of the target node. For example, starting from the target node, traversing the nodes and edges adjacent to the target node until the set neighborhood range is reached, and using the local graph within this range as the target subgraph.

[0064] The target subgraph includes the target device and its associated devices, events, and the relationships between them. For example, if the target device is an inverter, the target subgraph may include the photovoltaic modules directly connected to the inverter, the components contained in the inverter, and the fault events and maintenance records related to these devices, which can help to more accurately infer the root causes of faults.

[0065] In this embodiment, by using a retrieval method that presets a neighborhood range centered on the target node, relevant nodes and corresponding edges that are directly or indirectly associated with the target device can be filtered out. This allows the target subgraph to include the associated information required to support fault diagnosis, reduces redundant nodes and data unrelated to fault diagnosis in the heterogeneous graph, and improves the efficiency and accuracy of the graph neural network inference process.

[0066] In some embodiments, the target subgraph includes a first subgraph within the hop neighborhood of the target node K1 corresponding to the target device and a second subgraph within the hop neighborhood of the target node K2; wherein, K1 is greater than K2; The target subgraph is input into the target graph neural network for fault root cause inference, and the inference results are obtained, including: Feature extraction is performed on each node and edge in the first subgraph to obtain the node features and edge feature vectors of each node; the node features include statistical features and historical failure rate within the target time; the edge feature vectors include the attributes of the edges and their weights that decay over time. The state vector of each node is initialized based on the node characteristics of each node; the state vector is an intermediate vector that is dynamically updated for each node during the inference process of the target graph neural network. Generate message vectors from each node to its corresponding neighbor nodes based on the edge feature vectors and the state vectors of each node in the first subgraph. Aggregate the message vectors transmitted from each node to its corresponding neighbor nodes, update the state vectors of each node in the second subgraph based on the aggregation results, and output the inference results.

[0067] In this embodiment, the target subgraph includes the first subgraph of the K1-hop neighborhood and the second subgraph of the K2-hop neighborhood of the target node corresponding to the target device, wherein K1 is greater than K2. For example, K1 can be 2, 3, etc., and K2 can be 1. Of course, K1 and K2 can also be other values, which are not limited in this embodiment.

[0068] Feature extraction can be performed on each node and edge in the first subgraph to obtain node features and edge feature vectors for each node. For example, for equipment nodes, the extracted node features include statistical features of operating parameters within the target time period (such as the average temperature and voltage fluctuation variance over the past 24 hours), historical failure rates (such as the frequency of failures and the distribution of failure types in the past six months), and equipment attribute features (such as model, commissioning time, and maintenance records). For parameter nodes (such as temperature parameter nodes), the extracted features can include time-series statistical features of parameters within the target time period, such as maximum, minimum, rate of change, mean, and extreme values ​​of temperature. For event nodes, the extracted features can include the time of failure occurrence and the result of failure handling. The features of each node are fused into a high-dimensional vector through an embedding layer to obtain the node features of each node.

[0069] Edge attributes can include relation type (such as "has running parameters" or "has experienced a failure"), association strength, etc., which can be converted into numerical vectors through one-hot encoding and normalization. The time decay weight is used to reflect the impact of the timeliness of the event associated with the edge on the current inference. For example, the time decay weight of the edge between the historical failure event node and the target node can be calculated using the following formula: w = exp(-Δt / τ) Where w represents the time decay weight, Δt represents the time difference between the current time and the time the event occurred, and τ represents the time decay coefficient.

[0070] By integrating edge attributes and event decay weights, we obtain the edge feature vector. =[w, edge attribute vector, Δt], where... This represents the edge feature vector of the edge (u,v) connecting node u and node v.

[0071] In this embodiment, the state vector is an intermediate vector that is dynamically updated for each node during the inference process of the target graph neural network. The initial value of the state vector is associated with the node features to ensure the accuracy of the initial information for inference.

[0072] Each node in the first subgraph can be assigned a state vector with the same dimension as its features. The initial value of the state vector is directly determined by the node features. For example, a linear transformation layer can be used to map the node feature vectors to state vectors, thus completing the initialization of the state vectors.

[0073] During the reasoning process, message vectors that each node transmits to its corresponding neighboring nodes can be generated based on the edge feature vectors and the state vectors of each node in the first subgraph, so as to realize the transmission of fault association information between nodes.

[0074] Specifically, when generating the message vector, for any node pair with the edge (u,v) in the first graph, the current state vector of the sending node u needs to be fused with the edge feature vector of the edge (u,v) to generate the message vector from u to v. For example, a linear transformation can be used to fuse the current state vector of the sending node u with the edge feature vector of the edge (u,v) to generate the message vector from u to v. It should be noted that for any node pair with the edge (u,v), node u is a neighbor of node v, and node v is also a neighbor of node u. The message vector can propagate towards the target node.

[0075] In some embodiments, generating message vectors from each node to its corresponding neighbor nodes based on edge feature vectors and state vectors of each node in the first subgraph includes: The edge feature vector and the node state vector are concatenated to obtain the concatenated vector; The concatenated vector is linearly transformed by the weight matrix of the target graph neural network to obtain the message vector of the corresponding neighbor node.

[0076] Specifically, the message vectors of the corresponding neighbor nodes can be generated according to the following formula:

[0077] in, The first character of the target graph neural network is... l The message vector transmitted from node u to node v in the layer. Represents the weight matrix. Indicates the first l The current state vector of node u in the layer. This represents the edge feature vector of the edge (u,v) connecting node u and node v.

[0078] Taking the sending of a message from a fan jamming node to an over-temperature alarm node as an example, the state vector of the fan jamming node includes features such as historical fault frequency and recent operating parameters. The edge feature vector includes the relationship type encoding of the faults that have occurred and the time decay weight. The generated message vector represents the correlation information that the recent fan fault (w=0.9) may lead to the current over-temperature.

[0079] In this embodiment, by concatenating the edge feature vector with the node state vector, a deep fusion of the node's own state information and the relationship information between nodes can be achieved. By using the weight matrix of the target graph neural network to perform a linear transformation on the concatenated vector, the fault association rules learned by the weight matrix during model training can be utilized to adaptively allocate weights and optimize features for various types of information in the concatenated vector. This strengthens key information that has an important impact on fault reasoning and weakens irrelevant interference information, so that the generated message vector includes fault-related information, thereby improving the accuracy of the message vector in representing fault association relationships.

[0080] In this embodiment, the message vectors transmitted from each node in the first subgraph to its corresponding neighbor nodes can be aggregated to update the state vectors of each node in the second subgraph and output the inference results. It should be noted that since the first subgraph is larger than the second subgraph and includes the second subgraph, the node features, edge feature vectors, and state vectors in the second subgraph are the same as the corresponding nodes and edges in the first subgraph. Therefore, the content of the first subgraph can be used to update the second subgraph.

[0081] Specifically, attention mechanisms or mean aggregation can be used to aggregate all incoming edge message vectors of each node to obtain an aggregated message vector. Then, the node's state vector can be updated based on the aggregated message vector. For example, the aggregated message vector and the node's state vector can be fused through a linear transformation to complete the update of the state vector.

[0082] After updating the state vectors of each node, the state vectors of the target node and core associated nodes in the second subgraph can be classified and mapped to output the inference results. For example, the final state vector of the target inverter node is input into the fully connected layer and the Softmax function to obtain the probability distribution of the fault type, such as {"Fault Type": [Cooling module blockage, Cooling fan failure, ...], "Probability Distribution": [0.45, 0.30, ...]}.

[0083] In this embodiment, the target subgraph is divided into a first subgraph within the K1-hop neighborhood of the target node corresponding to the target device and a second subgraph within the K2-hop neighborhood, where K1 is greater than K2. This allows for in-depth analysis of fault diagnosis within different levels of neighborhood, considering both direct correlation factors and indirect influencing factors of the target device. During the root cause reasoning process, features are first extracted from each node and edge in the first subgraph to obtain node features containing statistical features and historical failure rates within the target time period, and edge feature vectors containing edge attributes and weights that decay over time. This fully considers the key factors and dynamic changes in the photovoltaic system's operation and maintenance process, making the features more consistent with... The actual influencing factors of photovoltaic system equipment failures are analyzed. The state vectors of each node are initialized based on their node characteristics, and message vectors transmitted from each node to its corresponding neighboring nodes are generated based on edge feature vectors and the state vectors of each node. This simulates information transmission between nodes and realizes the dynamic propagation and interaction of fault information in the subgraph. By aggregating the message vectors transmitted from each node to its corresponding neighboring nodes and updating the state vectors of each node in the second subgraph, the global correlation information of the first subgraph is transmitted to the core analysis scope of the second subgraph. This fully utilizes the dynamic update mechanism of graph neural networks, enabling in-depth mining of complex relationships between nodes and fault propagation paths, thus improving the accuracy of fault diagnosis.

[0084] In some embodiments, the inference result may also include an explanation path for the fault propagation; The method also includes: During the message vector transmission process in the target graph neural network, edges and corresponding nodes whose weights meet a preset threshold are selected to form an explanation path for fault propagation.

[0085] In this embodiment, the inference result, in addition to including the fault type and probability distribution, may further include an explanation path for fault propagation. This explanation path is used to visually present the propagation logic of the root cause of the fault from the associated nodes to the target device, assisting maintenance personnel in understanding the inference process and verifying the rationality of the conclusions.

[0086] During the message vector transmission process of the target graph neural network, edges and corresponding nodes whose weights meet a preset threshold can be selected to generate an explanation path for fault propagation.

[0087] Specifically, during message vector transmission in the target graph neural network, each edge is assigned a weight based on its feature vector and the node's state vector. This weight reflects the edge's importance in information transmission and fault propagation, and can be calculated by combining the edge's time decay weight and attention mechanism. For example, in the scenario where a "fan jamming node sends a message to an over-temperature alarm node," the edge's weight can be obtained by multiplying the time decay weight (e.g., 0.9) and the attention weight (e.g., 0.8), meaning the edge's weight in message transmission is 0.72.

[0088] The preset threshold can be set based on experience and requirements for photovoltaic system fault diagnosis. For example, setting the threshold to 0.5 ensures that the selected edges contribute significantly to fault propagation. The edge weights recorded during message transmission in the target graph neural network are traversed, edges with weights greater than or equal to the preset threshold are selected, and the two nodes corresponding to these edges are determined.

[0089] After filtering out the edges and corresponding nodes, the explanation path of fault propagation can be obtained. For example, taking inverter overheating as an example, the explanation path of fault propagation is: Path 1: Bearing wear → Fan jamming → Inverter overheating (edge ​​weight: 0.55, 0.72); Path 2: Heat dissipation module blockage → Inverter overheating (edge ​​weight: 0.65).

[0090] In this embodiment, by filtering edges and corresponding nodes whose weights meet a preset threshold, an explanation path for fault propagation is formed. This can identify nodes and edges that have a key impact on fault propagation based on the weight attributes of message passing during graph neural network inference, thereby improving the accuracy of generating explanation paths for fault propagation. Furthermore, by generating explanation paths for fault propagation, maintenance personnel can not only understand the fault type and probability of the target device, but also determine the propagation link of the fault between related nodes, thereby improving the efficiency of fault maintenance.

[0091] In some embodiments, the method further includes: Preprocessing of basic knowledge and product documentation related to photovoltaic systems; Extract entities and relationships between entities from the preprocessed basic knowledge and product documents; entities include at least one of the following in the photovoltaic system: equipment, components, parameters, parameter limits, failure modes, operation and maintenance steps, and alarm codes; relationships between entities include at least one of the following: component affiliation, fault and symptom association, parameter and parameter limit correspondence, and operation and maintenance steps and equipment relationship. Based on the entities and the relationships between entities, we construct entity nodes representing the operation and maintenance-related objects and elements of the photovoltaic system and the edges connecting the entity nodes to obtain the basic graph. By adding historical operation and maintenance events as event nodes to the basic graph, a heterogeneous graph of the photovoltaic system is obtained; the edges connecting the event nodes have weights that decay over time as the historical operation and maintenance events occur.

[0092] In this embodiment, the basic knowledge of photovoltaic systems may include equipment principles, operation and maintenance specifications, etc., and product documents may include equipment manuals, troubleshooting guides, etc.

[0093] Preprocessing of basic knowledge and product documentation for photovoltaic systems can include: Data parsing and segmentation: Utilizing optical character recognition (OCR) technology and document structure parsing algorithms, unstructured document content (such as heading levels, paragraphs, table structures, attention / warning paragraphs, and illustrations) is identified and segmented, transforming it into machine-processable structured text units. For example, for product documents containing equipment parameter tables, the table's row and column structure needs to be parsed to extract information such as "equipment number," "parameter name," and "parameter threshold." For paragraphs containing fault handling steps, elements such as step numbers, operation content, and tool requirements are segmented.

[0094] Equipment number alignment: Based on a preset equipment numbering benchmark, the equipment identifiers in different expressions in the document are uniformly aligned. For example, different expressions such as "inverter INV-03" and "INV-03 type inverter" in the document are uniformly mapped to the unique equipment number "INV-03".

[0095] Terminology standardization: Establish a terminology dictionary for the photovoltaic system field and standardize the replacement of synonyms in documents. For example, standardize "wind turbine" and "fan" to "cooling fan", and standardize "overheating" and "excessive temperature" to "overheating fault".

[0096] Extract entities and relationships between entities from preprocessed basic knowledge and product documents. For example, named entity recognition technology can be used, combined with pre-trained models and rule templates in the photovoltaic field, to extract the following entities: Device (equipment, such as inverter, meter), Part (component, such as cooling fan, capacitor), Parameter (parameter, such as inverter input voltage, temperature), Limit (parameter limit, such as operating temperature less than 80℃), Fault Pattern (fault mode, such as fan failure, capacitor breakdown), Procedure Step (operation and maintenance steps, such as maintenance process, testing standards), Alarm Code (alarm code, such as high temperature alarm code xxxx), etc.

[0097] Relation extraction techniques, combined with semantic analysis and rule matching, can be used to identify semantic relationships between entity pairs and extract the relationships between entities, such as: Part-of: This indicates that a part belongs to a certain device, such as: Part-:PART OF->:Device ("Cooling Fan" belongs to "Inverter INV-03"); Fault and Symptom Correlation (Causes): Indicates the causal relationship between fault mode and alarm symptoms, such as: FaultPattern-:CAUSES->:Symptom ("Fan jamming fault" leads to "overheating symptoms"); Parameter-to-parameter-limit correspondence (Allowed_Range): This indicates the correspondence between parameters and thresholds, such as: Parameter-:ALLOWED RANGE->:Limit ("Inverter operating temperature" corresponds to the limit of "operating temperature less than 80℃"); Maintenance steps and device relationship (Applies_To): indicates that the maintenance steps apply to a certain device, such as: ProcedureStep-:APPLIES TO->:Device ("Inverter heat dissipation module cleaning steps" apply to "Inverter INV-03").

[0098] In this embodiment, each type of entity can be mapped to nodes in the basic graph, each node is assigned a unique identifier, and the entity's attribute information is stored. The relationships between each type of entity are mapped to edges connecting the nodes, and each edge is labeled with a relationship type (such as PART_OF, CAUSES, etc.). A unique key is defined for each node type (such as the device number for a Device node) to ensure the uniqueness of the nodes. The smallest set of relationships strongly related to fault diagnosis is selected (such as excluding document associations unrelated to operation and maintenance), and an index and unique constraints are established for each edge.

[0099] In this embodiment, a graph database query language, such as Cypher, can be used to perform graph writing operations. Entities and relationships are persisted to the graph database through "finding / creating nodes" and "finding / creating relationships." For example, executing the Cypher statement `MERGE (d:Device {id: 'INV-03'}) MERGE (p:Part {id: 'FAN-003'})MERGE (d)-[:PART_OF]->(p)` creates Device and Part nodes and writes the component affiliation relationships.

[0100] In this embodiment, historical operation and maintenance events of the photovoltaic system, such as historical maintenance work orders and alarm events, can also be integrated into the basic graph as event nodes, and the edges connecting the event nodes can be assigned weights that decay over time, thereby forming a heterogeneous graph of the photovoltaic system that includes entities and events.

[0101] Specifically, historical maintenance events can be transformed into event nodes, such as WorkOrder nodes, and the relationships between event nodes and other entity nodes can be defined. For example, the relationship between an event node and a Device node is: WorkOrder-[:AFFECTS]->:Device (the event affects the device), and the relationship with a FaultPattern node is: WorkOrder-[:HAS_FAULT]->:FaultPattern (the event contains a fault), etc.

[0102] In this embodiment, a weight w can also be defined for the edges connecting event nodes, which decays over time as historical maintenance events occur. Here, w = exp(-Δt / τ), where w represents the weight, Δt represents the time difference between the current time and the event occurrence time, and τ represents the time decay coefficient. For example, the weight of edges for recently occurring events is close to 1, while the weight of edges for older events gradually decreases, allowing the graph to reflect the impact of the timeliness of events on fault reasoning.

[0103] Event nodes and edges with time decay weights can be merged with the basic graph. The uniqueness of nodes and edges can be ensured by the MERGE operation of the graph database, forming a heterogeneous graph of the photovoltaic system that includes entity nodes, event nodes, and heterogeneous edge relationships.

[0104] In this embodiment, preprocessing of basic knowledge and product documentation reduces redundancy and noise in the data, standardizes data format and expression, and extracts entities and relationships from multi-dimensional operation and maintenance elements of the photovoltaic system. This comprehensively depicts the inherent connections between photovoltaic system operation and maintenance-related objects and elements, giving the constructed basic graph rich information dimensions and clear relational logic. Historical operation and maintenance events are then added to the basic graph as event nodes, and time-decaying weights are set for the edges connecting these nodes. This achieves the fusion of static basic information and dynamic operation and maintenance data, ensuring the heterogeneous graph includes both inherent system attributes and actual operation and maintenance experience. By setting time-decaying weights, the timeliness of the impact of historical operation and maintenance events on current fault diagnosis can be reflected, making the heterogeneous graph more aligned with the actual needs of fault diagnosis. The photovoltaic system heterogeneous graph established in this way preserves the true topology and spatiotemporal dependencies of the photovoltaic power station, enabling subsequent graph neural networks to naturally capture high-order interactions and accurately reveal the propagation path of complex faults.

[0105] In some embodiments, generating fault diagnosis results based on the reasoning results includes: Based on the target problem, at least one historical operation and maintenance event with the highest similarity to the target problem is matched from the target vector library; wherein, the target vector library stores the embedding vectors of multiple historical operation and maintenance events; The scores representing the probability of occurrence of each fault type are obtained by weighted fusion of the fault type and inference results corresponding to at least one target historical operation and maintenance event. The diagnosis conclusion is determined by identifying at least one fault type with the highest score. The diagnostic conclusions are converted into structured fault diagnosis results; the fault diagnosis results include at least the diagnostic conclusions.

[0106] In this embodiment, the target vector library pre-stores the embedding vectors of multiple historical operation and maintenance events. Each historical operation and maintenance event, such as work order WO-101, WO-102, etc., is processed by text encoding and converted into vector form and stored in the target vector library. For example, information of historical operation and maintenance events, such as fault equipment codes, fault symptom descriptions, fault types, processing results, and associated document chapters, can be converted into fixed-dimensional embedding vectors through pre-trained language models, such as BERT (Bidirectional Encoder Representations from Transformers) and RoBERTa. It can also associate the fault type and verification results corresponding to the event, such as "normal after replacing the fan".

[0107] After obtaining the target problem, the target problem can be vectorized. For example, the same pre-trained language model used to build the target vector library can be used to convert the target problem into an embedding vector. Then, a similarity retrieval can be performed from the target vector library to calculate the cosine similarity between the problem vector and the embedding vectors of all historical operation and maintenance events. The top N (e.g., N=3) historical operation and maintenance events with the highest similarity values ​​can be selected and these N historical operation and maintenance events can be identified as the target historical operation and maintenance events.

[0108] In this embodiment, the fault type evidence corresponding to the target historical operation and maintenance event can be weighted and fused with the inference result output by the target graph neural network to obtain a score representing the probability of occurrence of each fault type. Of course, it can also be fused with information from other dimensions, such as document matching degree and device prior probability.

[0109] For example, in the inference results, the probability value corresponding to the fault type F, such as the probability value of "fan jamming" P_gnn(F)=0.45, takes the value range of [0,1].

[0110] For fault type F, calculate the similarity value of events with fault type F in the target historical operation and maintenance events. For example, the similarity of the fault type "fan jamming" of the target historical operation and maintenance event WO-101 is sim_topWO(F)=0.92, and the value range is [0,1].

[0111] The target problem is semantically matched with the photovoltaic system's product documentation, such as equipment manuals, to obtain the matching score of the fault type F in the document. For example, the matching score of "fan jamming" in section 3.4.2 "fan failure leading to overheating" in the manual is rag_doc(F)=0.88, with a value range of [0,1].

[0112] Prior probability of the device: Based on the historical operation and maintenance data of the target device (INV-03, model GW1500), the frequency of occurrence of fault type F is statistically analyzed and used as the prior weight. For example, the "fan jamming" fault of the INV-03 model inverter accounts for 30%, that is, the prior probability of the device prior(model,F)=0.30, and the value range is [0,1].

[0113] In this embodiment, the comprehensive score (F) of fault type F can be calculated using a linear weighted formula, as follows: score(F) = w1×P_gnn(F) + w2×sim_topWO(F) + w3×rag_doc(F) + w4×prior(model,F) Among them, w1, w2, w3, and w4 are weight coefficients, and they satisfy w1+w2+w3+w4=1.

[0114] In this embodiment, a comprehensive score for each fault type can be calculated, and one or more fault types with the highest scores can be selected as diagnostic conclusions. For example, the comprehensive scores of the fault types can be sorted in descending order, and the three fault types with the highest comprehensive scores can be selected as diagnostic conclusions, with the corresponding confidence levels recorded. These confidence levels can be the normalized values ​​of the comprehensive scores. Taking the selection of the fault type with the highest comprehensive score as a diagnostic conclusion as an example, the diagnostic conclusion could be: fan jamming (confidence level 82%), supporting evidence: work order WO-101, manual section 3.4.2.

[0115] In this embodiment, the diagnostic conclusion can also be transformed into a structured fault diagnosis result that conforms to the engineering operation and maintenance scenario. The fault diagnosis result includes at least the diagnostic conclusion, and may also include executable information such as troubleshooting steps, spare parts and working hours, and next steps suggestions. After determining the diagnostic conclusion, it can be transformed into a structured fault diagnosis result according to a preset structured template. In one example, the structured fault diagnosis result is as follows: Diagnostic conclusion: Equipment: Inverter (deviceId: INV-03) Most likely failure type: Fan jamming (82% confidence level) Note: The target graph neural network inference (probability 45%) is consistent with the historical work order WO-101 (similarity 92%), and matches section 3.4.2 of the manual; the fault association feature is "actual fan speed 750rpm < threshold 800rpm".

[0116] Investigation steps: Measure the fan power supply voltage: Check the voltage at the fan power interface; the threshold should be ≥12V. Check the physical condition of the fan: Disassemble the inverter heatsink panel and observe whether the fan blades are stuck or dusty; Verify fan function: Manually trigger the fan to run and check if the speed reaches the rated value of 800 rpm. If the speed does not meet the standard, replace the fan assembly FAN-03.

[0117] Spare parts and labor hours: Spare parts list: Fan assembly, model FAN-03). Estimated working time: 3 hours, including disassembly, inspection, replacement, and re-testing; Impact of shutdown: The INV-03 single-channel output power loss is 2%, which does not affect the operation of other inverters.

[0118] Next steps recommended: If the over-temperature alarm still occurs after replacing the fan assembly, collect the waveform data of the inverter duct temperature sensor, submit the waveform data to the operation and maintenance platform, trigger the re-inspection process, and re-match the fault type.

[0119] In this embodiment, by matching the similarity between the target problem and the embedded vectors of historical operation and maintenance events in the target vector library, the reuse of historical operation and maintenance experience data is realized. This allows the diagnostic process to draw on historical processing patterns of similar problems. Moreover, compared with traditional text matching, the embedded vector matching method can better capture the deep semantic relationship between the target problem and historical events, resulting in a higher relevance between the matched target historical operation and maintenance events and the target problem. The fault type corresponding to the target historical operation and maintenance event is weighted and fused with the inference results to generate a probability score. This combines real-time data inference with historical experience, and the weighting mechanism achieves complementary advantages of multi-dimensional information, further improving the accuracy of fault diagnosis. The fault type with the highest score is determined as the diagnostic conclusion and converted into a structured form, enabling operation and maintenance personnel to quickly obtain diagnostic information and formulate operation and maintenance strategies, thereby improving operation and maintenance efficiency.

[0120] In some embodiments, the method further includes: Obtain operation and maintenance events generated after maintaining the photovoltaic system based on fault diagnosis results; The heterogeneous diagram of the photovoltaic system is updated based on operation and maintenance events.

[0121] In this embodiment, maintenance events recorded by the system or manually after maintenance personnel perform maintenance operations based on fault diagnosis results can be collected. These maintenance events may include specific information about the maintenance activities, such as fault type, maintenance time, maintenance personnel, spare parts used, steps performed, and maintenance results. The maintenance events can be standardized by converting unstructured text fields into a structured format to facilitate updating the heterogeneous photovoltaic system diagram based on these events.

[0122] Specifically, maintenance events can be integrated into the heterogeneous graph of the photovoltaic system as new event nodes, and the attributes of associated nodes and the weights of edges can be updated so that the heterogeneous graph of the photovoltaic system can reflect the latest maintenance status and fault relationships of the equipment in real time.

[0123] In some embodiments, operation and maintenance events can also be converted into embedded vectors by a pre-trained language model and stored in the target vector library to update the target vector library.

[0124] In this embodiment, by acquiring the maintenance events generated after maintenance, the closed-loop data of the entire fault diagnosis process is applied to the dynamic update of the photovoltaic system heterogeneous diagram. Compared with the traditional static diagram, it can not only verify and correct the original information in the photovoltaic system heterogeneous diagram, but also enrich the event node types and correlation dimensions of the photovoltaic system heterogeneous diagram. This allows subsequent fault diagnosis to be based on new maintenance experience and adapt to changes in the operating characteristics of the photovoltaic system caused by equipment aging, environmental changes, etc., thereby improving the accuracy of subsequent fault diagnosis.

[0125] In some embodiments, the method further includes: Extract multiple sample target sub-graphs associated with different sample devices from the heterogeneous graph of photovoltaic systems; Obtain the labels corresponding to multiple sample target sub-maps; the labels indicate the fault type of the sample device associated with the sample target sub-map; The target graph neural network is trained by using multiple sample target sub-graphs and their corresponding labels as the training dataset.

[0126] In this embodiment, from the constructed heterogeneous photovoltaic system graph, corresponding sample target subgraphs can be extracted for different sample devices, such as inverters and combiner boxes, according to the rules for extracting target subgraphs described above. A label can be created for each sample subgraph, indicating the fault type corresponding to the sample device associated with the sample target subgraph.

[0127] The dataset, consisting of sample target sub-images and labels, can be divided into training, validation, and test sets according to a preset ratio (e.g., 7:2:1). The training set is used for iterative updates of model parameters, the validation set is used to monitor overfitting during model training and adjust hyperparameters, and the test set is used to evaluate model performance. The training objective of the model is set as minimizing the difference between the model's predicted fault type probability distribution and the true labels. The cross-entropy loss function can be used as the basis for calculating the loss during model training.

[0128] During training, the parameters of the initial graph neural network are first initialized, such as the convolutional weight matrix, attention weights, and fully connected layer parameters. The target subgraphs from the training set are then input into the initial graph neural network, and the loss value for the current batch of samples is calculated based on the loss function. Based on the calculated loss value, the gradients of the parameters of each layer are calculated using the backpropagation algorithm. The Adam optimizer is then used to update the parameters according to a preset learning rate, gradually reducing the loss value. When the model has reached a preset training limit or the validation set performance meets the requirements, the test set is input into the model to evaluate its performance. If the performance meets the target, training stops, and the current model is the target graph neural network with the ability to infer root causes of failures.

[0129] In this embodiment, by extracting sample target subgraphs from the constructed heterogeneous graph of the photovoltaic system, and the sample subgraphs corresponding to different sample devices, the training data can include the association information and fault characteristics of multiple types of devices in the photovoltaic system, enriching the diversity of the training data and improving the model's generalization reasoning ability for faults of multiple types of devices; by using the fault type corresponding to the sample device as the label of the sample target subgraph, the model can learn the graph structure features corresponding to different fault types during training, thereby improving the accuracy of target graph neural network reasoning.

[0130] The photovoltaic system fault diagnosis method provided in this application can be executed by a photovoltaic system fault diagnosis device. This application uses the photovoltaic system fault diagnosis device executing the photovoltaic system fault diagnosis method as an example to illustrate the photovoltaic system fault diagnosis device provided in this application.

[0131] This application also provides a fault diagnosis device for a photovoltaic system.

[0132] like Figure 2 As shown, the fault diagnosis device for this photovoltaic system includes: The parsing module 210 is used to parse the target question input by the user to obtain the target device pointed to by the target question; The extraction module 220 is used to extract the target subgraph associated with the target device from the pre-established heterogeneous photovoltaic system graph based on the target device. The heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes. The multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events. The edges represent the relationships between the nodes. The reasoning module 230 is used to input the target subgraph into the target graph neural network to perform fault root cause reasoning and obtain the reasoning result; the reasoning result includes the fault type and the probability distribution of the fault type. The generation module 240 is used to generate fault diagnosis results based on the reasoning results.

[0133] According to the photovoltaic system fault diagnosis device of this application, by pre-establishing a photovoltaic system heterogeneous graph containing entity nodes representing photovoltaic system operation and maintenance related objects and elements, event nodes representing historical operation and maintenance events, and edges reflecting the relationships between nodes, it realizes the modeling and integration of multi-dimensional and high-order relationships between devices, between devices and environmental factors, and between devices and operation and maintenance records in the photovoltaic system. Based on the target device, the target subgraph is extracted from the heterogeneous graph, which can focus on information related to fault diagnosis. By utilizing the powerful processing and learning capabilities of graph neural networks for graph structure data, it can mine fault correlation patterns from the complex relationships contained in the target subgraph, and then output inference results containing fault types and the probability distribution of such fault types. Compared with the simple judgment method of triggering alarms by thresholds, the accuracy of fault diagnosis results is improved.

[0134] In some embodiments, the extraction module 220 is further configured to: Identify the target node corresponding to the target device in the heterogeneous photovoltaic system diagram; The local graph within a preset neighborhood centered on the target node is retrieved as the target subgraph.

[0135] In some embodiments, the inference module 230 is further configured to: Feature extraction is performed on each node and edge in the first subgraph to obtain the node features and edge feature vectors of each node; the node features include statistical features and historical failure rate within the target time; the edge feature vectors include the attributes of the edges and their weights that decay over time. The state vector of each node is initialized based on the node characteristics of each node; the state vector is an intermediate vector that is dynamically updated for each node during the inference process of the target graph neural network. Generate message vectors from each node to its corresponding neighbor nodes based on the edge feature vectors and the state vectors of each node in the first subgraph. Aggregate the message vectors transmitted from each node to its corresponding neighbor nodes, update the state vectors of each node in the second subgraph based on the aggregation results, and output the inference results.

[0136] In some embodiments, the inference module 230 is further configured to: During the message vector transmission process in the target graph neural network, edges and corresponding nodes whose weights meet a preset threshold are selected to form an explanation path for fault propagation.

[0137] In some embodiments, the inference module 230 is further configured to: The edge feature vector and the node state vector are concatenated to obtain the concatenated vector; The concatenated vector is linearly transformed by the weight matrix of the target graph neural network to obtain the message vector of the corresponding neighbor node.

[0138] In some embodiments, the fault diagnosis device for the photovoltaic system further includes: The graph construction module is used to preprocess the basic knowledge and product documents of photovoltaic systems; extract entities and relationships between entities from the preprocessed basic knowledge and product documents; entities include at least one of the following: equipment, components, parameters, parameter limits, failure modes, operation and maintenance steps, and alarm codes of photovoltaic systems; relationships between entities include at least one of the following: component affiliation, fault and symptom association, parameter and parameter limit correspondence, and operation and maintenance steps and equipment relationship; construct entity nodes representing operation and maintenance related objects and elements of photovoltaic systems and edges connecting entity nodes based on entities and relationships between entities to obtain a basic graph; add historical operation and maintenance events as event nodes to the basic graph to obtain a heterogeneous graph of photovoltaic systems; wherein the edges connecting event nodes have weights that decay with the occurrence time of historical operation and maintenance events.

[0139] In some embodiments, the generation module 240 is further configured to: Based on the target problem, at least one historical operation and maintenance event with the highest similarity to the target problem is matched from the target vector library; wherein, the target vector library stores the embedding vectors of multiple historical operation and maintenance events; The scores representing the probability of occurrence of each fault type are obtained by weighted fusion of the fault type and inference results corresponding to at least one target historical operation and maintenance event. The diagnosis conclusion is determined by identifying at least one fault type with the highest score. The diagnostic conclusions are converted into structured fault diagnosis results; the fault diagnosis results include at least the diagnostic conclusions.

[0140] In some embodiments, the fault diagnosis device for the photovoltaic system further includes: The update module is used to obtain the operation and maintenance events generated after maintaining the photovoltaic system based on the fault diagnosis results; and to update the heterogeneous diagram of the photovoltaic system based on the operation and maintenance events.

[0141] In some embodiments, the fault diagnosis device for the photovoltaic system further includes: The training module is used to extract multiple sample target subgraphs associated with different sample devices from the heterogeneous graph of the photovoltaic system; obtain the labels corresponding to the multiple sample target subgraphs; the labels represent the fault types of the sample devices associated with the sample target subgraphs; and use the multiple sample target subgraphs and the labels corresponding to the multiple sample target subgraphs as training datasets to train a preset initial graph neural network to obtain the target graph neural network.

[0142] The fault diagnosis device for the photovoltaic system in this application embodiment can be an electronic device or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific devices.

[0143] The fault diagnosis device for the photovoltaic system in this application embodiment can be a device with an operating system. This operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems, such as embedded operating systems. This application embodiment does not specifically limit the specific operating system used.

[0144] In some embodiments, such as Figure 3 As shown, this application embodiment also provides an electronic device 300, including a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, it implements the various processes of the above-described photovoltaic system fault diagnosis method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0145] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0146] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described photovoltaic system fault diagnosis method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0147] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0148] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described fault diagnosis method for a photovoltaic system.

[0149] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0150] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described photovoltaic system fault diagnosis method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0151] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0152] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0153] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0154] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0155] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0156] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A fault diagnosis method for a photovoltaic system, characterized in that, include: The target question input by the user is parsed to obtain the target device to which the target question points; Based on the target device, a target subgraph associated with the target device is extracted from a pre-established heterogeneous photovoltaic system graph. The heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes. The multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events. The edges represent the relationships between the nodes. The target subgraph is input into a target graph neural network for fault root cause inference to obtain inference results; the inference results include fault types and probability distributions of the fault types. A fault diagnosis result is generated based on the reasoning result.

2. The method according to claim 1, characterized in that, The step of extracting the target sub-graph associated with the target device from a pre-established heterogeneous photovoltaic system graph based on the target device includes: Determine the target node corresponding to the target device in the photovoltaic system heterogeneity diagram; The local graph within a preset neighborhood centered on the target node is retrieved as the target subgraph.

3. The method according to claim 1, characterized in that, The target subgraph includes a first subgraph within the hop neighborhood of the target node K1 corresponding to the target device and a second subgraph within the hop neighborhood of the target node K2; wherein, K1 is greater than K2; The step of inputting the target subgraph into the target graph neural network for fault root cause reasoning to obtain the reasoning result includes: Feature extraction is performed on each node and each edge in the first subgraph to obtain node features and edge feature vectors for each node and each edge; the node features include statistical features and historical failure rate within the target time; the edge feature vectors include edge attributes and weights that decay over time. The state vector of each node is initialized based on the node characteristics of each node; the state vector is an intermediate vector that is dynamically updated for each node during the inference process of the target graph neural network. Based on the edge feature vector and the state vector of each node in the first subgraph, a message vector is generated for each node to transmit to its corresponding neighbor node. Aggregate the message vectors transmitted from each node to its corresponding neighbor nodes, update the state vectors of each node in the second subgraph based on the aggregation results, and output the inference results.

4. The method according to claim 3, characterized in that, The reasoning results also include the explanation path of fault propagation; The method further includes: During the message vector transmission process of the target graph neural network, edges and corresponding nodes whose weights satisfy a preset threshold are selected to form the explanation path for the fault propagation.

5. The method according to claim 3, characterized in that, The step of generating message vectors from each node to its corresponding neighbor nodes based on the edge feature vectors and the state vectors of each node in the first subgraph includes: The edge feature vector and the node state vector are concatenated to obtain the concatenated vector; The concatenated vector is linearly transformed using the weight matrix of the target graph neural network to obtain the message vector of the corresponding neighbor node.

6. The method according to claim 1, characterized in that, The method further includes: Preprocess the basic knowledge and product documents of the photovoltaic system; Extract entities and relationships between entities from the preprocessed basic knowledge and product documents; the entities include at least one of the following in the photovoltaic system: equipment, components, parameters, parameter limits, failure modes, operation and maintenance steps, and alarm codes; the relationships between entities include at least one of the following: component affiliation, failure and symptom association, parameter and parameter limit correspondence, and operation and maintenance steps and equipment relationship. Based on the entities and the relationships between entities, construct entity nodes representing the operation and maintenance related objects and elements of the photovoltaic system and the edges connecting the entity nodes to obtain the basic graph; The historical operation and maintenance events are added as event nodes to the basic graph to obtain the heterogeneous graph of the photovoltaic system; wherein, the edges connecting the event nodes have weights that decay with the occurrence time of the historical operation and maintenance events.

7. The method according to claim 1, characterized in that, The step of generating a fault diagnosis result based on the reasoning result includes: Based on the target problem, at least one target historical operation and maintenance event with the highest similarity to the target problem is matched from the target vector library; wherein, the target vector library stores the embedding vectors of multiple historical operation and maintenance events; The scores representing the probability of occurrence of each fault type are obtained by weighted fusion based on the fault type corresponding to at least one of the target historical operation and maintenance events and the reasoning results. The at least one fault type with the highest score is determined as the diagnostic conclusion; The diagnostic conclusions are converted into structured fault diagnosis results; the fault diagnosis results include at least the diagnostic conclusions.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Obtain the operation and maintenance events generated after maintaining the photovoltaic system based on the fault diagnosis results; The heterogeneous diagram of the photovoltaic system is updated based on the aforementioned maintenance events.

9. The method according to any one of claims 1-7, characterized in that, The method further includes: Extract multiple sample target sub-graphs associated with different sample devices from the photovoltaic system heterogeneity graph; Obtain labels corresponding to multiple sample target sub-maps; the labels represent the fault types of sample devices associated with the sample target sub-maps; The target graph neural network is obtained by training a preset initial graph neural network with multiple sample target sub-graphs and their corresponding labels as a training dataset.

10. A fault diagnosis device for a photovoltaic system, characterized in that, include: The parsing module is used to parse the target question input by the user to obtain the target device pointed to by the target question; The extraction module is used to extract a target subgraph associated with the target device from a pre-established heterogeneous photovoltaic system graph based on the target device; the heterogeneous photovoltaic system graph includes multiple nodes and edges connecting the nodes, the multiple nodes include entity nodes representing operation and maintenance related objects and elements of the photovoltaic system, and event nodes representing historical operation and maintenance events, and the edges represent the relationships between the nodes; The inference module is used to input the target subgraph into the target graph neural network to perform fault root cause inference and obtain inference results; the inference results include fault types and probability distributions of the fault types. The generation module is used to generate fault diagnosis results based on the reasoning results.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.