Energy storage system fault diagnosis method and device, storage medium and program product
By constructing the first and second knowledge graphs of the energy storage system, using entity extraction models and large language models to process multi-type documents, and combining question-answering intelligent agents for fault diagnosis, the problem of low efficiency in energy storage system fault diagnosis in the existing technology is solved, and efficient and professional fault diagnosis and knowledge information acquisition are achieved.
Patent Information
- Application Number
- CN202510979795.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-16
AI Technical Summary
Existing energy storage system fault diagnosis methods are inefficient, lack professionalism and accuracy, and are unable to effectively handle a variety of energy storage system documents, resulting in inaccurate fault diagnosis.
By constructing the first and second knowledge graphs based on energy storage system documents, using entity extraction models and large language models to extract entity and relationship information from text, and combining question-answering agents for fault diagnosis and knowledge information acquisition, the collaborative utilization and structured processing of multiple types of documents can be achieved.
It improves the efficiency and accuracy of energy storage system fault diagnosis, enhances the professionalism and comprehensiveness of knowledge and information acquisition, and improves the accuracy of response results and user experience.
Smart Images

Figure CN120492597B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy storage technology, and in particular to a fault diagnosis method, device, storage medium, and computer program product for an energy storage system. Background Art
[0002] An energy storage system is a system that stores, converts, and releases energy. An energy storage system includes a variety of devices, and the stable operation of the energy storage system depends on the coordination of multiple devices. During the operation of the energy storage system, various failures may occur in the equipment, posing a threat to the safety and stability of the energy storage system. For example, the energy storage system includes valve cooling equipment, which is a key thermal management component in the energy storage system. If the valve cooling equipment fails, it will directly affect the safety and stability of the entire energy storage system. Existing fault diagnosis methods for energy storage systems mainly require relevant personnel to query relevant documents on the energy storage system for fault diagnosis. However, due to the large number, variety, and diverse sources of relevant documents on the energy storage system, existing fault diagnosis methods have problems such as low fault diagnosis efficiency, low professionalism, and low accuracy. Summary of the Invention
[0003] In view of the above problems, the present application provides a fault diagnosis method, device, storage medium and computer program product for an energy storage system to improve the professionalism and accuracy of fault diagnosis and knowledge information acquisition.
[0004] According to a first aspect of the present disclosure, a fault diagnosis method for an energy storage system is provided, comprising: obtaining text based on a document of the energy storage system; wherein the document of the energy storage system comprises: a first document and a second document; the text comprises: a first text corresponding to the first document and a second text corresponding to the second document; constructing a first knowledge graph based on the first text, and constructing a second knowledge graph based on the second text; using the first knowledge graph, obtaining fault diagnosis information corresponding to problem information, and / or using the second knowledge graph, obtaining knowledge information corresponding to the problem information; wherein the knowledge information is knowledge content generated for the problem information and related to the problem information; obtaining a reply result corresponding to the problem information based on the fault diagnosis information and / or the knowledge information.
[0005] In this embodiment, a first text and a second text are generated based on the document of the energy storage system, and corresponding first knowledge graphs and second knowledge graphs are constructed. Dual knowledge graphs can be constructed based on documents of multiple types and sources. Fault diagnosis information is obtained by using the first knowledge graph, and knowledge information is obtained by using the second knowledge graph. This realizes the hierarchical utilization and collaborative complementarity of knowledge related to the energy storage system, and can take into account the depth and breadth of the response. Text information is integrated through the knowledge graph, so that scattered document content can be converted into structured knowledge, which facilitates the rapid retrieval of fault diagnosis information and knowledge information that matches the problem information, thereby improving the efficiency of energy storage system fault diagnosis and knowledge information acquisition, improving the professionalism and accuracy of fault diagnosis and knowledge information acquisition, and improving the comprehensiveness and accuracy of the response results.
[0006] In some embodiments, constructing the first knowledge graph based on the first text includes: using an entity extraction model to extract the first entity, the first relationship information and the first tail entity from the first text; generating a first triple based on the first entity, the first relationship information and the first tail entity; and constructing the first knowledge graph based on the first triple.
[0007] In this embodiment, entities and relationship information are extracted from the first text through an entity extraction model, a first triple is generated, and a first knowledge graph is constructed. This can improve the efficiency and accuracy of extracting entities and relationships from the first text, improve the structuring and professionalism of the first knowledge graph, reduce fault diagnosis deviations, improve the efficiency of energy storage system fault diagnosis, and improve the professionalism and accuracy of fault diagnosis.
[0008] In some embodiments, constructing a second knowledge graph based on the second text includes: inputting the first task prompt word and the second text into a first large language model to obtain the second first entity, second relationship information and second last entity output by the first large language model; generating a second triple based on the second first entity, the second relationship information and the second last entity; and constructing the second knowledge graph based on the second triple.
[0009] In this embodiment, entity and relationship information are extracted from the second text through a large language model combined with task prompt words, a second triple is generated and a second knowledge graph is constructed. The large language model's ability to understand complex texts can be utilized to improve the efficiency and accuracy of extracting entities and relationships from the second text, improve the structuring and professionalism of the second knowledge graph, enhance the efficiency of obtaining knowledge information, and improve the professionalism and accuracy of knowledge information.
[0010] In some embodiments, a question-answering agent is used to obtain reply call information based on the question information; the question-answering agent is used to obtain the fault diagnosis information based on the reply call information using the first knowledge graph, and / or the knowledge information is obtained using the second knowledge graph.
[0011] In this embodiment, the question-answering agent is used to obtain reply call information to determine whether to use the first knowledge graph and / or the second knowledge graph. This can effectively understand the question information, and intelligently and accurately select and call the first and second knowledge graphs based on the question information, avoiding redundant retrieval of the knowledge graphs and improving the accuracy of fault diagnosis and knowledge information acquisition.
[0012] In some embodiments, using a question-answering agent and obtaining reply call information based on the question information includes: using the question-answering agent to send the second task prompt word and the question information to a second largest language model; using the question-answering agent to obtain the reply call information output by the second largest language model.
[0013] In this embodiment, the reply call information is determined based on the task prompt words and question information through the large language model. The large language model's ability to understand natural language questions can be utilized to effectively understand the question information, improve the accuracy of the reply call information, and enhance the accuracy of fault diagnosis and knowledge information acquisition.
[0014] In some embodiments, the reply call information includes: first indication information for indicating the use of the first knowledge graph, and a first question entity corresponding to the question information; the first knowledge graph includes: a first triple consisting of a first head entity, a first relationship information and a first tail entity; using the first knowledge graph to obtain the fault diagnosis information includes: when obtaining the first indication information, converting the first question entity into a first question entity vector; obtaining a first entity vector corresponding to the first head entity and the first tail entity; and obtaining the fault diagnosis information based on the first question entity vector and the first entity vector.
[0015] In this embodiment, fault diagnosis information is obtained through the first question entity vector corresponding to the first question entity and the first entity vectors corresponding to the first head entity and the first tail entity. This enables fast matching of the first knowledge graph based on the vectors, thereby improving the efficiency and accuracy of energy storage system fault diagnosis.
[0016] In some embodiments, obtaining the fault diagnosis information based on the first problem entity vector and the first entity vector includes: determining a first distance between the first problem entity vector and the first entity vector; determining a first entity vector that matches the first problem entity vector based on the first distance as a first matching entity vector; taking the first first entity and / or the first last entity corresponding to the first matching entity vector as a starting point, and performing a path search within the first knowledge graph using a preset traversal algorithm and retrieval depth; and determining a first triple within the first knowledge graph based on the path retrieval result as the fault diagnosis information.
[0017] In this embodiment, the first matching entity vector is determined by the first distance between the first problem entity vector and the first entity vector, and the first matching entity vector is used as the starting point to perform a path search within the first knowledge graph. Fault diagnosis information is obtained based on the path search result, and information indirectly related to the problem entity can be mined, thereby improving the relevance of the fault diagnosis information, improving the efficiency of energy storage system fault diagnosis, and improving the professionalism and accuracy of fault diagnosis information acquisition.
[0018] In some embodiments, the reply call information includes: second indication information for indicating the use of the second knowledge graph, a second question entity and entity relationship corresponding to the question information; the second knowledge graph includes: a second triple consisting of a second first entity, second relationship information and a second last entity; using the second knowledge graph to obtain the knowledge information includes: upon receiving the second indication information, converting the second question entity into a second question entity vector and converting the entity relationship into a question relationship vector; obtaining a second entity vector corresponding to the second first entity and an entity relationship vector corresponding to the second relationship information; determining a first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector; determining a second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector; and obtaining the knowledge information based on the first candidate triple and the second candidate triple.
[0019] In this embodiment, the first candidate triple is determined based on the second question entity vector and the second entity vector, the second candidate triple is determined based on the question relationship vector and the entity relationship vector, and knowledge information is obtained based on the first candidate triple and the second candidate triple. Double matching can be performed in combination with the entity vector and the relationship vector, and the semantic similarity of the entities and the relevance of the relationships can be taken into account at the same time, thereby improving the efficiency, accuracy and comprehensiveness of knowledge information acquisition.
[0020] In some embodiments, determining the first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector includes: determining a second distance between the second question entity vector and the second entity vector; determining the second entity vector that matches the second question entity vector based on the second distance as a second matching entity vector; determining the second first entity corresponding to the second matching entity vector as a candidate first entity; and determining the second triple of the candidate first entity as the first candidate triple in the second knowledge graph.
[0021] In this embodiment, the second matching entity vector and the candidate first entity are determined based on the second distance between the second question entity vector and the second entity vector, and the first candidate triple is determined in the second knowledge graph. Triples related to the question entity can be screened out from the second knowledge graph, thereby improving the efficiency, professionalism and accuracy of knowledge information acquisition.
[0022] In some embodiments, determining a second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector includes: determining a third distance between the question relationship vector and the entity relationship vector; determining an entity relationship vector that matches the question relationship vector based on the third distance as a matching relationship vector; determining second relationship information corresponding to the matching relationship vector as candidate relationship information; and determining the second relationship information as a second triple of the candidate relationship information in the second knowledge graph as a second candidate triple.
[0023] In this embodiment, the matching relationship vector and candidate relationship information are determined based on the third distance between the question relationship vector and the entity relationship vector, and the second candidate triple is determined in the second knowledge graph. Triples related to entity relationships can be screened out from the second knowledge graph, thereby improving the efficiency, professionalism and accuracy of knowledge information acquisition.
[0024] In some embodiments, obtaining a response result corresponding to the question information based on the fault diagnosis information and / or the knowledge information includes: using the question-answering agent to input the third task prompt word, the question information, and the fault diagnosis information and / or the knowledge information into the second largest language model; using the question-answering agent to obtain a response result output by the second largest language model.
[0025] In this embodiment, a response result is generated based on fault diagnosis information and / or knowledge information through a second large language model, which can utilize the natural language generation capability of the large language model, thereby improving the efficiency of generating the response result and improving the professionalism and accuracy of the response result.
[0026] In some embodiments, the question information sent by the client through the Fetch API is obtained by using the question-answering agent; and the answer result and question prompt information are sent to the client through the RESTful interface by using the question-answering agent.
[0027] In this embodiment, end-to-end automation can be achieved, which can improve user experience and enhance the reliability and scalability of the system.
[0028] In some embodiments, obtaining text based on the document of the energy storage system includes: parsing the document to generate a target format document, wherein the document content of the target format document includes: text information and pictures; processing the pictures using a visual language model to obtain description information corresponding to the pictures; and generating the text based on the text information and the description information.
[0029] In this embodiment, by parsing documents related to the energy storage system, generating a target format document and obtaining descriptive information corresponding to the pictures in the target format document, the pictures can be recognized, the integrity of the information extracted from the documents can be improved, and information can be avoided from being omitted or misinterpreted. Complete data can be provided for the construction of the knowledge graph, thereby improving the integrity and accuracy of the construction of the knowledge graph, and further improving the accuracy of fault diagnosis and acquisition of knowledge information.
[0030] In some embodiments, the first document includes: equipment manuals and operation and maintenance documents of the energy storage system; the second document includes: books, papers, and dictionaries related to the field of the energy storage system.
[0031] In this embodiment, the first document can be used for fault diagnosis, and the second document can be used to obtain knowledge information, so that the division of labor between the first and second knowledge graphs is clear, the professionalism and accuracy of fault diagnosis and knowledge information acquisition are improved, and the comprehensiveness and accuracy of the response results are improved.
[0032] In some embodiments, according to the second aspect of the present disclosure, a fault diagnosis device for an energy storage system is provided, comprising: a document processing module for obtaining text based on the document of the energy storage system; wherein the document of the energy storage system comprises: a first document and a second document; the text comprises: a first text corresponding to the first document and a second text corresponding to the second document; a graph construction module for constructing a first knowledge graph based on the first text, and a second knowledge graph based on the second text; a question-answering processing module comprising: a call information acquisition module for obtaining reply call information based on question information using a question-answering agent; an information acquisition module for obtaining fault diagnosis information corresponding to the question information using the first knowledge graph and / or obtaining knowledge information corresponding to the question information using the second knowledge graph using the question-answering agent and the reply call information; wherein the knowledge information is knowledge content generated for the question information and related to the question information; a reply acquisition module, Used to obtain a reply result corresponding to the question information based on the fault diagnosis information and / or the knowledge information; wherein the reply call information includes: second indication information for indicating the use of the second knowledge graph, a second question entity and entity relationship corresponding to the question information; the second knowledge graph includes: a second triple consisting of a second first entity, second relationship information and a second last entity; the information acquisition module is used to, upon receiving the second indication information, convert the second question entity into a second question entity vector and the entity relationship into a question relationship vector; obtain the second entity vector corresponding to the second first entity and the entity relationship vector corresponding to the second relationship information; determine a first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector; determine a second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector; obtain the knowledge information based on the first candidate triple and the second candidate triple.
[0033] In this embodiment, a first text and a second text are generated based on the document of the energy storage system, and corresponding first knowledge graphs and second knowledge graphs are constructed. Dual knowledge graphs can be constructed based on documents of multiple types and sources. Fault diagnosis information is obtained by using the first knowledge graph, and knowledge information is obtained by using the second knowledge graph. This realizes the hierarchical utilization and collaborative complementarity of knowledge related to the energy storage system, and can take into account the depth and breadth of the response. By integrating text information through the knowledge graph, the scattered document content can be converted into structured knowledge, which facilitates the rapid retrieval of fault diagnosis information and knowledge information that matches the problem information, improves the efficiency of energy storage system fault diagnosis and knowledge information acquisition, improves the professionalism and accuracy of fault diagnosis and knowledge information acquisition, improves the comprehensiveness and accuracy of the response results, and improves the user experience.
[0034] In some embodiments, according to a third aspect of the present disclosure, there is provided an electronic device, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the method described above based on instructions stored in the memory.
[0035] In some embodiments, according to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor as described above.
[0036] In some embodiments, according to a fifth aspect of the present disclosure, a computer program product is provided, wherein the computer program product stores computer instructions, and the instructions are executed by a processor to perform the method described above.
[0037] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the drawings without creative work.
[0039] Figure 1 Schematic diagram of the flow of some embodiments of the fault diagnosis method of the energy storage system disclosed in the present invention;
[0040] Figure 2 A schematic diagram of a process for document parsing in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0041] Figure 3 A schematic diagram of a process for constructing a first knowledge graph in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0042] Figure 4 A schematic diagram of a process for constructing a second knowledge graph in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0043] Figure 5 A schematic diagram of a process for obtaining response information in some embodiments of the method for diagnosing a fault of an energy storage system disclosed herein;
[0044] Figure 6 A schematic diagram of a process for obtaining reply call information in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0045] Figure 7 A schematic diagram of a process for obtaining fault diagnosis information in some embodiments of the method for fault diagnosis of an energy storage system disclosed herein;
[0046] Figure 8 A schematic diagram of a process for searching a first knowledge graph in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0047] Figure 9 A schematic diagram of a process for obtaining knowledge information in some embodiments of the method for diagnosing a fault of an energy storage system disclosed herein;
[0048] Figure 10 A schematic diagram of a process for generating a response result in some embodiments of the method for diagnosing a fault of an energy storage system disclosed herein;
[0049] Figure 11 Schematic diagram of communication between a client and a question-answering agent in some embodiments of the energy storage system fault diagnosis method disclosed herein;
[0050] Figure 12 Schematic diagram of modules of some embodiments of the fault diagnosis device for the energy storage system disclosed in the present invention;
[0051] Figure 13 Schematic diagrams of modules of other embodiments of the fault diagnosis device for the energy storage system disclosed herein;
[0052] Figure 14 Schematic diagram of a question-and-answer processing module in some embodiments of the fault diagnosis device for an energy storage system disclosed herein;
[0053] Figure 15 Schematic diagram of modules of some embodiments of the electronic device disclosed herein. DETAILED DESCRIPTION
[0054] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0056] In the description of the embodiments of this application, the technical terms "first," "second," etc. are used only to distinguish different objects and should not be understood to indicate or imply relative importance or to implicitly indicate the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise specifically defined.
[0057] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least some embodiments of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0058] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0059] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0060] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0061] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.
[0062] Figure 1 FIG. 1 is a flow chart of some embodiments of the method for diagnosing a fault of an energy storage system disclosed in the present invention, such as Figure 1 As shown, the fault diagnosis method of the energy storage system includes steps S101 to S104:
[0063] Step S101 , obtaining text according to documents of the energy storage system; wherein the documents of the energy storage system include: a first document and a second document; and the text includes: a first text corresponding to the first document and a second text corresponding to the second document.
[0064] Energy storage system documentation can include various documents related to the energy storage system, such as equipment manuals and papers. The energy storage system documentation can be divided into primary and secondary documents. Primary documents include equipment manuals and operation and maintenance documents for the energy storage system. Equipment manuals for the energy storage system can include equipment manuals for various equipment, such as valve cooling equipment. Operation and maintenance documents for the energy storage system include monitoring reports, historical maintenance records, lab reports, maintenance guides, fault diagnosis reports, and other documents. Primary documents can serve as specialized knowledge documents for the energy storage system.
[0065] Energy storage systems cover a variety of general fields, including electricity, energy storage, water cooling, and fire protection. The second document includes books, papers, and dictionaries related to energy storage systems. The second document can serve as a general knowledge document for energy storage systems. Various methods can be used to obtain the second document. For example, keywords corresponding to the fields covered by energy storage systems can be identified. Keywords can be "electricity," "energy storage," and "water cooling" in general fields such as electricity, energy storage, water cooling, and fire protection. Based on these keywords, relevant books and papers can be downloaded from the internet to serve as the second document. Alternatively, a dictionary of terms related to general fields such as electricity, energy storage, water cooling, and fire protection can be obtained as the second document.
[0066] Step S102: construct a first knowledge graph based on the first text, and construct a second knowledge graph based on the second text.
[0067] A knowledge graph is a structured semantic network with entities as nodes and relationships as edges, which is used to intuitively represent and store the relationships between entities in the real world. A knowledge graph includes triples, which are the basic units that make up a knowledge graph and are used to express the relationships between entities. The structure is "entity, relationship, entity", which can describe the relationship between two entities or the attribute characteristics of an entity.
[0068] The first text can be used as a text related to the specialized knowledge of the energy storage system, and the first knowledge graph constructed based on the first text can be used as the specialized knowledge graph of the energy storage system; the second text can be used as a text related to the general knowledge of the energy storage system, and the second knowledge graph constructed based on the second text can be used as the general knowledge graph of the energy storage system.
[0069] Step S103: Use the first knowledge graph to obtain fault diagnosis information corresponding to the problem information, and / or use the second knowledge graph to obtain knowledge information corresponding to the problem information.
[0070] The problem information may be problem information input by the user through the client, etc. The problem information may include fault questions, knowledge questions and other information; based on the problem information input by the user, the first knowledge graph may be used to obtain fault diagnosis information, or the second knowledge graph may be used to obtain knowledge information; or based on the problem information input by the user, the first knowledge graph may be used to obtain fault diagnosis information, and the second knowledge graph may be used to obtain knowledge information.
[0071] Fault diagnosis information may include one or more information such as the cause of the fault, fault handling suggestions, maintenance plan, etc. corresponding to the problem information input by the user; the knowledge information corresponding to the problem information may be knowledge content related to the problem information extracted or generated based on the problem information input by the user. The knowledge information may include knowledge information in the fields of electricity, water cooling, energy storage, etc. related to the energy storage system, and may be general knowledge question and answer information corresponding to the problem information.
[0072] Step S104: Generate a response corresponding to the question information based on the fault diagnosis information and / or knowledge information. The response can be generated based on the fault diagnosis information or the knowledge information, or based on both the fault diagnosis information and the knowledge information, and return the response to the user.
[0073] The fault diagnosis method for an energy storage system disclosed in the present invention generates a first text and a second text based on documents of the energy storage system, and constructs corresponding first and second knowledge graphs, and can construct dual knowledge graphs based on documents of multiple types and sources; by using the first knowledge graph to obtain fault diagnosis information and using the second knowledge graph to obtain knowledge information, hierarchical utilization and collaborative complementarity of knowledge related to the energy storage system are achieved, and a knowledge system with clear hierarchies and collaborative complementarity can be formed, which can take into account the depth and breadth of knowledge; by integrating text information through the knowledge graph, scattered document content can be converted into structured knowledge, which facilitates the rapid retrieval of fault diagnosis information, knowledge information, etc. that matches the problem information, thereby improving the efficiency of energy storage system fault diagnosis and acquisition of knowledge information, improving the professionalism and accuracy of fault diagnosis and knowledge information acquisition, and improving the comprehensiveness and accuracy of response results.
[0074] There are several ways to parse the energy storage system documentation. Figure 2 This is a flowchart of document parsing in some embodiments of the energy storage system fault diagnosis method disclosed herein, such as Figure 2 As shown:
[0075] Step S201 : parsing the document of the energy storage system to generate a target format document, wherein the document content of the target format document includes text information and pictures.
[0076] The documents of the energy storage system include a first document, a second document, etc.; the first document and the second document can be various documents such as PDF, Word, Excel, PPT, web page text, etc.; the first document and the second document can be parsed and processed separately to generate corresponding target format documents.
[0077] A variety of document parsing tools can be used to perform multimodal processing such as OCR recognition, table extraction, formula parsing, and image semantic understanding on the first document, the second document, etc., to effectively extract text, charts, formulas, pictures and other content from the first document, the second document, etc., and generate documents in the target format; charts, formulas, etc. can be directly converted into text, and the target format can be various formats such as Markdown.
[0078] Step S202: Process the image using a visual language model to obtain description information corresponding to the image.
[0079] The visual language model can be a variety of models such as a trained neural network model; the visual language model can be used to interpret and process images in a target format document to obtain description information corresponding to the image, and the description information can be text or table description information.
[0080] Step S203: Generate text based on the text information and description information.
[0081] The text includes a first text corresponding to a first document, a second text corresponding to a second document, and so on. Various methods can be used to generate text based on the text information and description information. For example, in a target format document, the description information can be embedded in the context of a corresponding image to generate text.
[0082] By parsing documents related to the energy storage system, generating target format documents, and obtaining descriptive information corresponding to the images of the target format documents, and recognizing the images, the integrity of the information extracted from the documents can be improved, avoiding the omission or misinterpretation of key information, providing complete data for the construction of the knowledge graph, improving the integrity and accuracy of the knowledge graph construction, and thus improving the accuracy of fault diagnosis and the acquisition of knowledge information.
[0083] Various methods can be used to construct the first knowledge graph based on the first text. Figure 3 This is a flow chart of constructing a first knowledge graph in some embodiments of the energy storage system fault diagnosis method disclosed herein, such as Figure 3 As shown:
[0084] Step S301: Using an entity extraction model, extract the first entity, the first relationship information, and the first tail entity from the first text.
[0085] The entity extraction model can be a variety of models such as a trained convolutional neural network model, and can be trained using a variety of training methods. For example, based on expert knowledge of energy storage systems, the hierarchical architecture, common equipment, common instruments, etc. of the energy storage system can be determined to generate a relationship chart of the first knowledge graph. The generated relationship chart of the first knowledge graph is shown in Table 1 below:
[0086]
[0087] Table 1 - Relationship chart of the first knowledge graph
[0088] As shown in Table 1, the relationships in the first knowledge graph include: a triple structure such as "valve cooling subsystem, belongs to, valve cooling system," where "valve cooling subsystem" is the type of the first entity, "belongs to" is the type of the first relationship information, and "valve cooling system" is the type of the first entity. Some documents in the first document can be selected as training samples; these training samples are annotated according to the relationship diagram of the first knowledge graph in Table 1 to label multiple triple relationships.
[0089] A variety of annotation methods can be used. For example, text matching can be performed on training samples based on Table 1, either manually or through other means. Content with triple relationships can be marked or colored, and entities and relationships can be extracted and annotated from the training samples. These marks or colors can be manually or through other means to generate annotated training samples. A variety of training methods can be used to train the entity extraction model using the annotated training samples. After the entity extraction model is trained, it can be used to extract the first entity, first relationship information, and first last entity from the first text.
[0090] Step S302: Generate a first triple according to the first head entity, the first relationship information and the first tail entity.
[0091] There are various methods for generating the first triple. For example, the first text can be input into an entity extraction model. The entity extraction model extracts the first entity "main pump overload", the first relation information "occurred in", and the first tail entity "A01 main pump". Based on the first entity, the first relation information, and the first tail entity, the entity extraction model can output the generated first triple "main pump overload, occurred in, A01 main pump".
[0092] Step S303: construct a first knowledge graph based on the first triple.
[0093] Various methods can be used to construct the first knowledge graph. For example, multiple first triples can be mapped to nodes and relationships and stored in a graph database. Multimodal data can be integrated and relationships can be completed through rule-based reasoning to form a structured and scalable first knowledge graph. The graph database can be various databases such as Neo4j.
[0094] The first and last entities can be vectorized and stored. For example, various embedding models can be used to vectorize the first and last entities of the first triplet and convert them into vector representations. For example, the first entity "main pump overload" and the first last entity "A01 main pump" can be input into the embedding model to obtain corresponding multidimensional digital vectors, which are stored in the first vector library.
[0095] By constructing the first knowledge graph, the transformation from the first text to the structured knowledge graph is realized, and the unstructured text is converted into a structured knowledge representation to form a knowledge graph; information is stored in triples, and queries can be directly retrieved based on the relationship between entities, which improves the accuracy of information matching; it can handle complex relationship queries such as multi-hop and nested queries, and deep information can be mined through path associations between entities, multi-level associated knowledge can be mined, and the efficiency and depth of information acquisition can be enhanced.
[0096] By extracting entity and relationship information from the first text through the entity extraction model, generating the first triple and constructing the first knowledge graph, the efficiency and accuracy of extracting entities and relationships from the first text can be improved, the structuring and professionalism of the first knowledge graph can be improved, the fault diagnosis deviation can be reduced, the efficiency of energy storage system fault diagnosis can be improved, and the professionalism and accuracy of fault diagnosis can be improved.
[0097] There are many ways to build the second knowledge graph. Figure 4 This is a flow chart of constructing a second knowledge graph in some embodiments of the method for diagnosing a fault in an energy storage system disclosed herein, such as Figure 4 As shown:
[0098] Step S401: input the first task prompt word and the second text into the first large language model to obtain the second first entity, second relationship information and second last entity output by the first large language model.
[0099] A Large Language Model (LLM) is a deep learning model trained on massive amounts of text data. Task prompts define the tasks of the LLM and guide its output. The first LLM can be any of a variety of pre-trained LLMs. A first task prompt can be written to indicate that the LLM's task is to extract entities, relationships, and other information from a given text.
[0100] For example, the tasks defined by the first task prompt include: identifying several second-first entities and second-last entities from the second text, providing relevant descriptions of the second-first entities and second-last entities based on contextual information; and determining and providing detailed descriptions of the relationship types between the second-first entities and second-last entities based on the context. The first task prompt and the second text are input into the trained first language model. Based on the first task prompt and the second text, the first language model determines and outputs information such as the second-first entity, the second relationship information, and the second-last entity.
[0101] For noun dictionaries, other methods can also be used to extract the second first entity, second relationship information, and second last entity. For example, a regular expression can be written, and after the text in the noun dictionary is recognized, automatic extraction processing is performed based on the regular expression to determine the second first entity, second relationship information, and second last entity.
[0102] Step S402: Generate a second triple according to the second first entity, the second relationship information, and the second last entity.
[0103] Various methods can be used to generate the second triple. For example, the first task prompt and the second text are input into the first large language model, and the first large language model outputs the second first entity "positive electrode material", the second relationship information "function", and the second last entity "accept electrons to complete the reduction reaction". Based on the second first entity, the second relationship information, and the second last entity, the first large language model generates and outputs the second triple "positive electrode material, function, accept electrons to complete the reduction reaction".
[0104] Step S404: construct a second knowledge graph based on the second triple.
[0105] There are many ways to build a second knowledge graph. For example, multiple second triples can be mapped to nodes and relationships and stored in a graph database. Multimodal data can be integrated and relationships can be completed through rule-based reasoning to form a structured and scalable second knowledge graph. Graph databases can be various databases such as Neo4j.
[0106] The second first entity and the second last entity may be vectorized and stored. For example, multiple embedding models may be used to vectorize the second first entity and the second relationship information of the second triple, convert them into vector representations, and store them in the second vector library and the third vector library, respectively.
[0107] By combining the large language model with task prompt words to extract entity and relationship information from the second text, generate second triples and construct a second knowledge graph, we can utilize the large language model's ability to understand complex texts to improve the efficiency and accuracy of extracting entities and relationships from the second text, improve the structuring and professionalism of the second knowledge graph, improve the efficiency of obtaining knowledge information, and improve the professionalism and accuracy of knowledge information acquisition.
[0108] A question-answering agent (QA) is an artificial intelligence system that receives natural language questions from users and automatically generates answers through information retrieval, knowledge reasoning, and data analysis. A variety of methods can be used to construct QA agents, which can confirm the user's question intent and provide a response.
[0109] Figure 5 FIG. 1 is a flow chart of obtaining response information in some embodiments of the method for diagnosing a fault of an energy storage system disclosed in the present invention, such as Figure 5 As shown:
[0110] Step S501: Utilize the question-answering agent and obtain reply call information based on the question information.
[0111] Step S502: Utilize the question-answering agent and, based on the reply call information, use the first knowledge graph to obtain fault diagnosis information, and / or use the second knowledge graph to obtain knowledge information.
[0112] By using the question-answering intelligent agent to call information based on the answer, using the first knowledge graph and / or the second knowledge graph, it is possible to effectively understand the question information, and intelligently and accurately select and call the first and second knowledge graphs based on the question information, avoiding redundant retrieval of the knowledge graphs, and improving the accuracy of fault diagnosis and knowledge information acquisition.
[0113] There are several ways to get the reply call information. Figure 6 FIG. 1 is a flow chart of obtaining reply call information in some embodiments of the method for diagnosing a fault of an energy storage system disclosed in the present invention, such as Figure 6 As shown:
[0114] Step S601: Using the question-answering agent, the second task prompt word and question information are sent to the second largest language model. The first largest language model and the second largest language model can be the same model or different models.
[0115] Step S602: Utilize the question-answering agent to receive the reply call information output by the second largest language model.
[0116] For the question-answering agent, functional functions can be encapsulated, and the question-answering function can be encapsulated into two functions, namely the fault diagnosis function and the general question-answering function; the description information of the fault diagnosis function is: based on the fault phenomena of the subsystems, equipment, instruments, etc. provided by the user, analyze the possible causes of the fault, and give corresponding treatment measures and subsequent maintenance suggestions; the description information of the general question-answering function is: the user asks questions about the system's operating mechanism and general knowledge, and please give answers based on the relevant general knowledge.
[0117] A second task prompt is generated, indicating that the current task is to implement question routing based on the given user question content. If the question-answering agent determines that the user-provided information meets the requirements of the subsequent function, it calls the second language model to generate a response call information. Otherwise, it instructs the second language model to return a prompt information, prompting the user to provide more information. The response call information output by the second language model can be received by the question-answering agent.
[0118] By using a large language model to determine the reply call information based on the task prompt words and question information, the large language model's ability to understand natural language questions can be utilized to improve the accuracy of the reply call information and enhance the accuracy of fault diagnosis and knowledge information acquisition.
[0119] In some embodiments, the reply call information may include various types of information. For example, the reply call information may include first instruction information for instructing the use of the first knowledge graph, a first question entity corresponding to the question information, etc. The first instruction information for instructing the use of the first knowledge graph may be the name of a fault diagnosis function, etc. The reply call information may also include summary information of the question information.
[0120] Figure 7 FIG. 1 is a flow chart of obtaining fault diagnosis information in some embodiments of the fault diagnosis method for the energy storage system disclosed in the present invention, such as Figure 7 As shown:
[0121] Step S701: When first indication information is obtained, convert the first question entity into a first question entity vector.
[0122] Step S702: Obtain a first entity vector corresponding to the first head entity and the first tail entity.
[0123] A variety of embedding models can be used to convert the first question entity into a first question entity vector. The first and last entities in the first knowledge graph can be pre-vectorized and stored in a first vector library; the first entity vectors corresponding to the first and last entities can be obtained from the first vector library.
[0124] Step S703: Obtain fault diagnosis information according to the first problem entity vector and the first entity vector.
[0125] For example, the question information input by the user through the client is "What is the relationship between the failure of the battery pack and the charger?" The question-answering agent sends the second task prompt word and the question information "What is the relationship between the failure of the battery pack and the charger" to the second largest language model, and obtains the reply call information output by the second largest language model.
[0126] The reply call information includes: first indication information for indicating the use of the first knowledge graph, the first question entity corresponding to the question information "What is the relationship between the failure of the battery pack and the charger", etc.; wherein, the first indication information for indicating the use of the first knowledge graph is the function name of the fault diagnosis function, and the first question entity includes "battery pack" and "charger".
[0127] Use the embedding model to convert the first problem entities "battery pack" and "charger" into first problem entity vectors respectively, obtain the first entity vectors corresponding to the first entity and the first tail entity in the first knowledge graph from the first vector database, and obtain fault diagnosis information based on the first problem entity vector and the first entity vector.
[0128] Fault diagnosis information is obtained through the first question entity vector corresponding to the first question entity and the first entity vectors corresponding to the first head entity and the first tail entity. The first knowledge graph can be retrieved based on vector matching to achieve rapid matching of the first knowledge graph, thereby improving the efficiency and accuracy of energy storage system fault diagnosis.
[0129] Figure 8 This is a flow chart of searching the first knowledge graph in some embodiments of the energy storage system fault diagnosis method disclosed herein, such as Figure 8 As shown:
[0130] Step S801: Determine a first distance between a first question entity vector and a first entity vector.
[0131] Step S802: Determine, based on the first distance, a first entity vector that matches the first question entity vector as a first matching entity vector.
[0132] The first distance can be a variety of distances, such as a cosine distance, and a variety of methods can be used to determine the first matching entity vector. For example, a first cosine distance threshold can be set, and the cosine distance between the first question entity vector and the first entity vector can be calculated. If the cosine distance is less than the first cosine distance threshold, the first entity vector is determined to be the first matching entity vector. By performing a cosine similarity search, one or more first matching entity vectors that best match can be determined.
[0133] Step S803: Taking the first entity and / or the first last entity corresponding to the first matching entity vector as a starting point, a path search is performed in the first knowledge graph using a preset traversal algorithm and search depth.
[0134] The correspondence between the first entity, the first last entity and the first entity vector can be pre-stored in the first vector library, and the first entity and / or the first last entity corresponding to the first matching entity vector can be obtained based on the first vector library. The traversal algorithm can be a variety of algorithms such as the breadth-first traversal algorithm, and the depth can be set. Breadth-First Search (BFS) is a path retrieval algorithm that expands layer by layer. It first visits all neighbors of the current node and then visits the neighbors of the neighbors; it can start from the starting point and efficiently retrieve all reachable paths within a limited depth. In the first knowledge graph, the first entity and / or the first last entity corresponding to the first matching entity vector is used as the starting point, and the path retrieval is performed using the breadth-first traversal method. The traversal method includes the following steps:
[0135] 1. Assuming that the two first entities and / or the first last entity matched are e1 and e2, initialize the search array to L=[e1, e2]; initialize the historical search array to H=[ ], the candidate triple list T=[ ], the search result list R=[ ], and initialize the search depth count d=0.
[0136] 2. For all elements of the current search array, i.e., e1 and e2, respectively, search for their first related triples in the first knowledge graph and put them into the candidate triple list T.
[0137] 3. The second largest language model can be called to combine the content of the candidate triple list T with the current question information, filter out triples that are not related to the current question information, and keep the remaining relevant triples in T.
[0138] 4. Check whether the associated entities in candidate triple T exist in the historical search array H. If so, remove the triple. Place all processed triples in the search result list R. Place all elements of the search array into the historical search array H. Clear the search array L and place all remaining associated entities therein. Increase the search depth counter d by 1.
[0139] 5. Determine whether the number of elements in the search array L is 0, or whether the search depth count d is 2. If either condition is met, end the search and return the search result list R; otherwise, skip to step 2.
[0140] Step S804: Determine a first triple in the first knowledge graph based on the path retrieval result as fault diagnosis information.
[0141] The first triplet determined based on the path search results can be used as fault diagnosis information. For example, the first knowledge graph includes six first triplet groups: first triplet 1 (battery pack, fault, abnormal voltage), first triplet 2 (battery pack, associated components, BMS), first triplet 3 (charger, fault, unstable output current), first triplet 4 (charger, associated components, charging port), first triplet 5 (abnormal voltage, resulting in charger overload), and first triplet 6 (BMS, control, charger start and stop).
[0142] The response call information obtained by the question-answering agent includes: first instruction information for instructing the use of the first knowledge graph; and the first question entities corresponding to the question "What is the relationship between battery pack and charger failure?" are "battery pack" and "charger." The embedding model is used to convert the first question entities "battery pack" and "charger" into first question entity vectors, respectively. The first entity vectors corresponding to the first and last entities in the first knowledge graph are obtained from the first vector database.
[0143] Set the first cosine distance threshold, and calculate the cosine distance between the first problem entity vector corresponding to "battery pack" and "charger" and each first entity vector respectively. If the cosine distance is less than the first cosine distance threshold, then determine this first entity vector as the first matching entity vector, and determine that the first entities corresponding to the two most matching first matching entity vectors are "battery pack" and "charger".
[0144] Perform path retrieval in the first knowledge graph:
[0145] Set e1 = "battery pack", e2 = "charger" as the search starting point), initialize the search array L = [battery pack, charger], the historical search array H = [], the candidate triple list T = [], the search result list R = [], and the search depth d = 0.
[0146] Perform the first round of search (d=0):
[0147] Find the related triples of entities in L and put them into T. The triples related to the battery pack are: first triplet 1 and first triplet 2; the triples related to the charger are: first triplet 3 and first triplet 4. Then T = [first triplet 1, first triplet 2, first triplet 3, first triplet 4].
[0148] The second largest language model is used to filter the first triplet related to the question "What is the correlation between the battery pack and charger failure?" and remove the irrelevant first triplet 4 (charger, related components, charging interface). This means that the charging interface is not related to the failure, and T = [first triplet 1, first triplet 2, first triplet 3] is retained.
[0149] Check if the associated entities in T are in H (empty). Since none of them are in H, keep them all.
[0150] The associated entity of the first triplet 1 is: voltage abnormality; the associated entity of the first triplet 2 is: BMS; the associated entity of the first triplet 3 is: unstable output current; R = [first triplet 1, first triplet 2, first triplet 3]; H is updated to [battery pack, charger]; L is cleared and a new associated entity is added: L = [voltage abnormality, BMS, unstable output current]; d = 0 + 1 = 1; L is not empty and d ≠ 2, continue searching.
[0151] Perform the second round of search (d=1):
[0152] In the first knowledge graph, search for the first triplet related to the entity in L and add it to T, where T = [first triplet 5, first triplet 6]. Use the second language model to filter the first triplet related to the question, "What is the relationship between battery pack and charger failure?" Since both first triplet 5 and first triplet 6 are relevant to the question, retain T = [first triplet 5, first triplet 6].
[0153] Check whether the associated entities in T are in H. Since none of them are in H, retain them all; R = [first triplet 1, first triplet 2, first triplet 3, first triplet 5, first triplet 6]; H is updated to [battery pack, charger, voltage abnormality, BMS, output current unstable]; L is cleared and a new associated entity is added: L = [charger overload, charger start / stop]; d = 1 + 1 = 2; since d = 2, the termination condition is met and the search ends.
[0154] According to the path retrieval result in the first knowledge graph, the first triplet is determined to be R = [first triplet 1, first triplet 2, first triplet 3, first triplet 5, first triplet 6] in the first knowledge graph, and R is used as fault diagnosis information.
[0155] The first matching entity vector is determined by the first distance between the first problem entity vector and the first entity vector, and the first matching entity vector is used as the starting point to perform path retrieval in the first knowledge graph. Fault diagnosis information is obtained based on the path retrieval results, which can mine information indirectly related to the problem entity, improve the relevance of fault diagnosis information, improve the efficiency of energy storage system fault diagnosis, and improve the professionalism and accuracy of fault diagnosis information acquisition.
[0156] In some embodiments, the reply call information includes: second indication information for indicating the use of the second knowledge graph, second question entities and entity relationships corresponding to the question information, etc.; wherein, the second indication information for indicating the use of the second knowledge graph can be the function name of a general question-answering function, etc., and the reply call information can also include summary information for the question information.
[0157] Figure 9 FIG. 1 is a flow chart of obtaining knowledge information in some embodiments of the method for diagnosing a fault of an energy storage system disclosed in the present invention, such as Figure 9 As shown:
[0158] Step S901: upon receiving the second indication information, convert the second question entity into a second question entity vector, and convert the entity relationship into a question relationship vector.
[0159] Step S902: Obtain a second entity vector corresponding to the second first entity and an entity relationship vector corresponding to the second relationship information.
[0160] A variety of embedding models can be used to convert the second question entity into a second question entity vector, and the entity relationship into a question relationship vector. The second first entity and second relationship information in the second knowledge graph can be pre-vectorized and stored in a second vector library and a third vector library. The second entity vector corresponding to the second first entity and the entity relationship vector corresponding to the second relationship information can be obtained from the second vector library and the third vector library, respectively.
[0161] Step S903: Determine a first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector.
[0162] Various methods may be used to determine the first candidate triple in the second knowledge graph. For example, a second distance between the second question entity vector and the second entity vector may be determined, and based on the second distance, a second entity vector matching the second question entity vector may be determined as the second matching entity vector.
[0163] The second distance can be a variety of distances, such as a cosine distance, and a variety of methods can be used to determine the second matching entity vector. For example, a second cosine distance threshold can be set, and the cosine distance between the second question entity vector and the second entity vector can be calculated. If the cosine distance is less than the second cosine distance threshold, the second entity vector is determined to be the second matching entity vector. By performing a cosine similarity search, one or more second matching entity vectors that best match can be determined.
[0164] Based on the correspondence between the vectors and entities stored in the second vector library, the second first entity corresponding to the second matching entity vector can be determined as a candidate first entity; and the second triple of the second first entity as a candidate first entity is determined in the second knowledge graph as the first candidate triple.
[0165] Step S904: Determine a second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector.
[0166] Various methods can be used to determine the second candidate triple in the second knowledge graph. For example, a third distance between the question relation vector and the entity relation vector can be determined; based on the third distance, an entity relation vector that matches the question relation vector can be determined as the matching relation vector.
[0167] The third distance can be a variety of distances, such as the cosine distance, and a variety of methods can be used to determine matching relationship vectors. For example, a third cosine distance threshold can be set, and the cosine distance between the question relationship vector and the entity relationship vector can be calculated. If the cosine distance is less than the third cosine distance threshold, the entity relationship vector is determined to be a matching relationship vector. By performing a cosine similarity search, one or more matching relationship vectors that best match can be determined.
[0168] Based on the correspondence between the vectors stored in the third vector library and the relationship information, the second relationship information corresponding to the matching relationship vector can be determined as candidate relationship information; and the second relationship information is determined in the second knowledge graph as a second triple of candidate relationship information as a second candidate triple.
[0169] Step S905: Obtain knowledge information based on the first candidate triple and the second candidate triple. The union of the first candidate triple and the second candidate triple can be used as the knowledge information.
[0170] The knowledge information obtained through the second knowledge graph can be general knowledge information, covering knowledge in related fields involved in storage systems such as equipment working principles, basic physics knowledge, power systems, etc., which can effectively improve the knowledge support for user questions; the first candidate triple is determined based on the second question entity vector and the second entity vector, and the second candidate triple is determined based on the question relationship vector and the entity relationship vector. The knowledge information is obtained based on the first candidate triple and the second candidate triple, and can be combined with the entity vector and the relationship vector for double matching, which can take into account the semantic similarity of entities and the relevance of relationships at the same time, thereby improving the efficiency, accuracy and comprehensiveness of knowledge information acquisition.
[0171] For example, the second knowledge graph includes six second triples: second triplet 1 (energy storage battery, core principle, electrochemical redox reaction), second triplet 2 (electrochemical redox reaction, charging process, the positive electrode undergoes reduction reaction to store electrical energy), second triplet 3 (electrochemical redox reaction, discharge process, the negative electrode undergoes oxidation reaction to release electrical energy), second triplet 4 (energy storage battery, components, positive electrode material), second triplet 5 (energy storage battery, components, negative electrode material), second triplet 6 (positive electrode material, function, accepting electrons to complete reduction reaction).
[0172] Multiple models can be used to embed models to vectorize the second entity and second relationship information in the second knowledge graph, and store the second entity vector and its corresponding relationship with the second entity in the second vector library, and store the entity relationship vector and its corresponding relationship with the third entity in the third vector library.
[0173] The question information input by the user through the client is "What is the charging and discharging principle of the energy storage battery?". Using the question-answering intelligent agent, the second task prompt word and the question information "What is the charging and discharging principle of the energy storage battery" are sent to the second largest language model to obtain the reply call information output by the second largest language model.
[0174] The reply call information includes: second indication information for indicating the use of the second knowledge graph, the second question entity and entity relationship corresponding to the question information "What is the charging and discharging principle of the energy storage battery", etc.; among them, the second indication information for indicating the use of the second knowledge graph is the function name of the general answer function, the second question entity includes "energy storage battery", and the entity relationship includes "charging and discharging principle".
[0175] Use the embedding model to convert the second problem entity "energy storage battery" into a second problem entity vector, and convert the entity relationship "charging and discharging principle" into a problem relationship vector; obtain the second entity vector corresponding to the second entity in the second knowledge graph from the second vector database; set the second cosine distance threshold, and calculate the cosine distance between the second problem entity vector of "energy storage battery" and each second entity vector respectively. If the cosine distance is less than the second cosine distance threshold, then determine this second entity vector as the second matching entity vector; by performing a cosine similarity search, determine the second entity "energy storage battery" corresponding to the most matching second matching entity vector as the candidate first entity; determine the second triple of the second entity as the candidate first entity in the second knowledge graph as the first candidate triple, and the first candidate triple includes: second triple 1 (energy storage battery, core principle, electrochemical redox reaction), second triple 4 (energy storage battery, component, positive electrode material), and second triple 5 (energy storage battery, component, negative electrode material).
[0176] It is also possible to obtain in the second knowledge graph other second triples with the second first entity and the second last entity of the first candidate triple as the second last entity and the second first entity respectively (i.e. other second triples associated with the second last entity and the second first entity of the first candidate triple) as context information of the first candidate triple.
[0177] Obtain the entity relationship vector corresponding to the second relationship information in the second knowledge graph from the third vector database. Set a third cosine distance threshold and calculate the cosine distance between the question relationship vector for "Charging and Discharging Principle" and each entity relationship vector. If the cosine distance is less than the third cosine distance threshold, the entity relationship vector is determined to be a matching relationship vector. A cosine similarity search is performed to determine the second relationship information corresponding to the most matching matching relationship vector, "Core Principle," "Charging Process," and "Discharging Process," as candidate relationship information.
[0178] The second relationship information is determined in the second knowledge graph as a second triple of candidate relationship information. As the second candidate triple, the second candidate triple includes: second triple 1 (energy storage battery, core principle, electrochemical redox reaction), second triple 2 (electrochemical redox reaction, charging process, reduction reaction occurs at the positive electrode to store electrical energy), and second triple 3 (electrochemical redox reaction, discharge process, oxidation reaction occurs at the negative electrode to release electrical energy).
[0179] It is also possible to obtain in the second knowledge graph other second triples with the second first entity and the second last entity of the second candidate triple as the second last entity and the second first entity respectively (i.e. other second triples associated with the second last entity and the second first entity of the second candidate triple) as context information of the second candidate triple.
[0180] The union of the first candidate triple and the second candidate triple can be used as knowledge information; the union of the first candidate triple, the context information of the first candidate triple, the second candidate triple, and the context information of the second candidate triple can also be used as knowledge information.
[0181] According to the second distance between the second question entity vector and the second entity vector, the second matching entity vector and the candidate first entity are determined, and the first candidate triple is determined in the second knowledge graph, so that triplets related to the question entity can be screened out from the second knowledge graph; according to the third distance between the question relationship vector and the entity relationship vector, the matching relationship vector and candidate relationship information are determined, and the second candidate triple is determined in the second knowledge graph, so that triplets related to the entity relationship can be screened out from the second knowledge graph, thereby improving the efficiency, professionalism and accuracy of knowledge information acquisition.
[0182] Figure 10 This is a flow chart of generating a response result in some embodiments of the fault diagnosis method for the energy storage system disclosed in the present invention, such as Figure 10 As shown:
[0183] Step S1001: Using a question-answering agent, the third task prompt word, question information, and fault diagnosis information and / or knowledge information are input into the second language model.
[0184] Step S1002: Utilize the question-answering agent to obtain the response result output by the second largest language model.
[0185] The question-answering agent is used to generate a third task prompt word, indicating that the current task is to generate a reply result based on the given user question content, fault diagnosis information and / or knowledge information; the trained second language model generates a reply result based on the third task prompt word, question information, fault diagnosis information and / or knowledge information, and returns it to the question-answering agent.
[0186] By using the second largest language model to generate response results based on fault diagnosis information and / or knowledge information, the natural language generation capability of the large language model can be utilized, thereby improving the efficiency of generating response results and improving the professionalism and accuracy of the response results.
[0187] In some embodiments, as Figure 10 As shown, client 110 communicates data with backend device 111. As a front-end, client 110 can employ various architectures to build a user interface, providing an entry point for users to input question information. Client 110 can employ a modular design and implement a hybrid rendering mode using the Next.js framework, combining SSR (server-side rendering) with static page generation.
[0188] For example, the client 110 can be equipped with modules such as a user interaction module, a data communication module, a state management module, and a style control module, and each module works together. User interaction module: integrates multiple component libraries to provide accessible UI controls, collects user setting information and question content; data communication module: encapsulates the Fetch API to implement asynchronous communication with the RESTful interface of the back-end device 111, and transmits the collected user question information to the back-end device 111. The Fetch API is a JavaScript interface provided by the browser for initiating network requests (such as HTTP requests). It provides a concise, flexible, and Promise-based syntax to facilitate the processing of asynchronous data interactions. The RESTful interface (Representational State Transfer) is an architectural style for designing network interfaces based on the HTTP protocol. It aims to achieve efficient and stateless interaction between clients and servers through unified specifications.
[0189] State Management Module: Maintains user session status and Q&A history data, and enables cross-component state sharing through Zustand, a lightweight React state management library. Style Control Module: Dynamically generates atomic styles based on a multi-CSS tool-class priority strategy to avoid redundant CSS code.
[0190] Backend device 111 is configured with a question-answering agent 1111, a first knowledge graph 1112, and a second knowledge graph 1113. Backend device 111 can utilize a variety of frameworks. For example, backend device 111 utilizes the Flask framework to build lightweight RESTful services and handle business logic. Flask is a lightweight and flexible Python web framework.
[0191] The question-answering agent 1111 can be used to receive question information sent by the client 110 via the Fetch API. The question-answering agent 1111 can also send responses and question prompts to the client 110 via the RESTful interface. The second language model 112 can generate question prompts based on the user's historical question information. The question-answering agent 1111 receives the question prompts output by the second language model 112 and sends them to the client 110 for display, thereby optimizing the user's multi-round question-answering experience. Using the question-answering agent to communicate with the client via the Fetch API and RESTful interface enables end-to-end automation, improving the user experience, reducing operation and maintenance costs, and increasing system reliability and scalability.
[0192] In some embodiments, as Figure 12As shown, the present disclosure provides a fault diagnosis device for an energy storage system, comprising: a document processing module 1201, a graph construction module 1202, a question-and-answer processing module 1203, and a response acquisition module 1204. The document processing module 1201 obtains text based on documents of the energy storage system; the documents of the energy storage system include a first document, a second document, etc.; and the text includes a first text corresponding to the first document, a second text corresponding to the second document, etc.
[0193] The graph construction module 1202 constructs a first knowledge graph based on the first text, and constructs a second knowledge graph based on the second text; the question and answer processing module 1203 uses the first knowledge graph to obtain fault diagnosis information corresponding to the question information, and / or uses the second knowledge graph to obtain knowledge information corresponding to the question information; the reply acquisition module 1204 obtains a reply result corresponding to the question information based on the fault diagnosis information and / or knowledge information.
[0194] In some embodiments, the document processing module 1201 parses the document to generate a target format document, wherein the document content of the target format document includes text information and pictures, etc.; the document processing module 1201 uses a visual language model to process the picture to obtain description information corresponding to the picture; the document processing module 1201 generates text based on the text information and description information.
[0195] The graph construction module 1202 uses the entity extraction model to extract the first entity, the first relationship information and the first tail entity from the first text; the graph construction module 1202 generates a first triple based on the first entity, the first relationship information and the first tail entity; the graph construction module 1202 constructs a first knowledge graph based on the first triple.
[0196] The graph construction module 1202 inputs the first task prompt word and the second text into the first language model to obtain the second first entity, second relationship information and second last entity output by the first language model; the graph construction module 1202 generates a second triple according to the second first entity, second relationship information and second last entity; the graph construction module 1202 constructs a second knowledge graph based on the second triple.
[0197] The answer acquisition module 1204 uses the question-answering agent to input the third task prompt word, question information, fault diagnosis information and / or knowledge information into the second largest language model; the answer acquisition module 1204 uses the question-answering agent to obtain the answer result output by the second largest language model.
[0198] like Figure 13As shown, the fault diagnosis device of the energy storage system also includes: an information interaction module 1205; the information interaction module 1205 uses the question-answering agent to obtain the question information sent by the client through the Fetch API; the information interaction module 1205 uses the question-answering agent to send the reply result and question prompt information to the client through the RESTful interface.
[0199] like Figure 14 As shown, the question-answering processing module includes: a call information acquisition module 12031 and an information acquisition module 12032. The call information acquisition module 12031 uses the question-answering agent and obtains answer call information based on the question information; the information acquisition module 12032 uses the question-answering agent and obtains fault diagnosis information based on the answer call information using the first knowledge graph and / or obtains knowledge information using the second knowledge graph.
[0200] In some embodiments, the call information acquisition module 12031 uses the question-answering agent to send the second task prompt word and question information to the second largest language model; the call information acquisition module 12031 uses the question-answering agent to obtain the reply call information output by the second largest language model.
[0201] When obtaining the first indication information, the information acquisition module 12032 converts the first problem entity into a first problem entity vector; the information acquisition module 12032 obtains the first entity vector corresponding to the first head entity and the first tail entity; the information acquisition module 12032 obtains fault diagnosis information based on the first problem entity vector and the first entity vector.
[0202] For example, the information acquisition module 12032 determines the first distance between the first problem entity vector and the first entity vector; the information acquisition module 12032 determines the first entity vector that matches the first problem entity vector based on the first distance, as the first matching entity vector; the information acquisition module 12032 uses the first first entity and / or the first last entity corresponding to the first matching entity vector as the starting point, and uses the preset traversal algorithm and retrieval depth to perform path retrieval within the first knowledge graph; the information acquisition module 12032 determines the first triple in the first knowledge graph as fault diagnosis information based on the path retrieval results.
[0203] When obtaining the second indication information, the information acquisition module 12032 converts the second question entity into a second question entity vector and converts the entity relationship into a question relationship vector; the information acquisition module 12032 obtains the second entity vector corresponding to the second first entity and the entity relationship vector corresponding to the second relationship information; the information acquisition module 12032 determines the first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector; the information acquisition module 12032 determines the second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector; the information acquisition module 12032 obtains knowledge information based on the first candidate triple and the second candidate triple.
[0204] For example, the information acquisition module 12032 determines the second distance between the second question entity vector and the second entity vector; the information acquisition module 12032 determines the second entity vector that matches the second question entity vector based on the second distance as the second matching entity vector; the information acquisition module 12032 determines the second first entity corresponding to the second matching entity vector as the candidate first entity; the information acquisition module 12032 determines the second triple of the second first entity as the candidate first entity in the second knowledge graph as the first candidate triple.
[0205] The information acquisition module 12032 determines the third distance between the question relationship vector and the entity relationship vector; the information acquisition module 12032 determines the entity relationship vector that matches the question relationship vector based on the third distance as the matching relationship vector; the information acquisition module 12032 determines the second relationship information corresponding to the matching relationship vector as the candidate relationship information; the information acquisition module 12032 determines the second relationship information as the second triple of candidate relationship information in the second knowledge graph as the second candidate triple.
[0206] Figure 15 Schematic diagram of modules of some embodiments of electronic devices according to the present disclosure. Figure 15 As shown, the electronic device may include a memory 1501, a processor 1502, a communication interface 1503, and a bus 1504. The memory 1501 is used to store instructions, and the processor 1502 is coupled to the memory 1501. The processor 1502 is configured to execute the above-mentioned energy storage system fault diagnosis method based on the instructions stored in the memory 1501.
[0207] Memory 1501 can be high-speed RAM, non-volatile memory, or the like. Memory 801 can also be a memory array. Memory 1501 can also be divided into blocks, and the blocks can be combined into virtual volumes according to certain rules. Processor 1502 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the energy storage system fault diagnosis method disclosed herein.
[0208] In some embodiments, the present disclosure provides a computer-readable storage medium storing computer instructions, and the instructions are executed by a processor to perform the method for diagnosing a fault of an energy storage system in any of the above embodiments.
[0209] Computer-readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples (non-exhaustive) of readable storage media can include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0210] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0211] The embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the fault diagnosis method for the energy storage system according to various embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0212] The steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Thus, the present disclosure also covers recording media storing programs for executing the method according to the present disclosure.
[0213] Although the present application has been described with reference to preferred embodiments, various modifications may be made thereto and components may be substituted with equivalents without departing from the scope of the present application. In particular, the various technical features described in the various embodiments may be combined in any manner as long as there are no structural conflicts. The present application is not limited to the specific embodiments disclosed herein, but encompasses all technical solutions within the scope of the claims.
Claims
1. A fault diagnosis method for an energy storage system, characterized in that: include: Obtaining text according to the document of the energy storage system; wherein the document of the energy storage system includes: a first document and a second document; and the text includes: a first text corresponding to the first document and a second text corresponding to the second document; Constructing a first knowledge graph based on the first text, and constructing a second knowledge graph based on the second text; Using the question-answering agent and based on the question information, obtain the answer call information; Utilizing the question-answering agent and based on the reply call information, using the first knowledge graph to obtain fault diagnosis information corresponding to the question information, and using the second knowledge graph to obtain knowledge information corresponding to the question information; wherein the knowledge information is knowledge content generated for the question information and related to the question information, and the knowledge information includes: equipment operating principles, basic physics knowledge, and knowledge of energy storage systems; Obtaining a response result corresponding to the problem information based on the fault diagnosis information and the knowledge information; Wherein, using the question-answering agent and obtaining the answer call information according to the question information includes: Using the question-answering agent, sending the second task prompt word and the question information to the second language model; Using the question-answering agent, obtaining the reply call information output by the second largest language model; The reply call information includes: second instruction information for indicating the use of the second knowledge graph, a second question entity corresponding to the question information, and an entity relationship; the second knowledge graph includes: a second triple consisting of a second first entity, second relationship information, and a second last entity; and obtaining the knowledge information using the second knowledge graph includes: Upon receiving the second indication information, converting the second question entity into a second question entity vector, and converting the entity relationship into a question relationship vector; Obtaining a second entity vector corresponding to the second first entity and an entity relationship vector corresponding to the second relationship information; Determining a first candidate triple in the second knowledge graph according to the second question entity vector and the second entity vector; Determining a second candidate triple in the second knowledge graph according to the question relationship vector and the entity relationship vector; The knowledge information is obtained according to the first candidate triple and the second candidate triple.
2. The method according to claim 1, wherein The constructing a first knowledge graph according to the first text includes: Using an entity extraction model, extracting a first entity, a first relationship information, and a first tail entity from the first text; generating a first triplet according to the first head entity, the first relationship information, and the first tail entity; Based on the first triple, construct the first knowledge graph.
3. The method according to claim 1, wherein The constructing a second knowledge graph according to the second text includes: Inputting the first task prompt word and the second text into a first language model, obtaining a second first entity, second relationship information, and a second last entity output by the first language model; generating a second triplet according to the second first entity, the second relationship information, and the second last entity; Based on the second triple, construct the second knowledge graph.
4. The method according to claim 1, wherein The reply call information includes: first instruction information for indicating the use of the first knowledge graph, and a first question entity corresponding to the question information; the first knowledge graph includes: a first triple consisting of a first head entity, first relationship information, and a first tail entity; and obtaining the fault diagnosis information using the first knowledge graph includes: When the first indication information is obtained, converting the first question entity into a first question entity vector; Obtaining a first entity vector corresponding to the first first entity and the first last entity; The fault diagnosis information is obtained according to the first problem entity vector and the first entity vector.
5. The method according to claim 4, wherein Obtaining the fault diagnosis information according to the first problem entity vector and the first entity vector includes: determining a first distance between the first question entity vector and the first entity vector; Determining, based on the first distance, a first entity vector that matches the first question entity vector as a first matching entity vector; Taking the first entity and / or the first entity corresponding to the first matching entity vector as a starting point, and using a preset traversal algorithm and search depth, perform a path search within the first knowledge graph; According to the path retrieval result, a first triple is determined in the first knowledge graph as the fault diagnosis information.
6. The method according to claim 1, wherein Determining a first candidate triple in the second knowledge graph according to the second question entity vector and the second entity vector includes: determining a second distance between the second question entity vector and the second entity vector; Determining, according to the second distance, the second entity vector that matches the second question entity vector as a second matching entity vector; determining the second first entity corresponding to the second matching entity vector as a candidate first entity; Determine in the second knowledge graph that the second first entity is a second triple of the candidate first entity as the first candidate triple.
7. The method according to claim 1, wherein Determining a second candidate triple in the second knowledge graph according to the question relationship vector and the entity relationship vector includes: determining a third distance between the question relationship vector and the entity relationship vector; determining, according to the third distance, an entity relationship vector that matches the question relationship vector as a matching relationship vector; determining second relationship information corresponding to the matching relationship vector as candidate relationship information; Determine in the second knowledge graph that the second relationship information is a second triple of the candidate relationship information as a second candidate triple.
8. The method according to claim 4, wherein Obtaining a response result corresponding to the question information according to the fault diagnosis information and the knowledge information includes: Using the question-answering agent, inputting the third task prompt word, the question information, the fault diagnosis information, and the knowledge information into the second language model; Utilize the question-answering agent to obtain the answer result output by the second largest language model.
9. The method according to claim 1, wherein include: Using the question-answering agent, obtain the question information sent by the client through the Fetch API; The question-answering agent is used to send the answer result and question prompt information to the client through a RESTful interface.
10. The method according to claim 1, wherein According to the documentation of the energy storage system, the obtained text includes: Parsing the document to generate a target format document, wherein the target format document includes text information and pictures; Processing the image using a visual language model to obtain description information corresponding to the image; The text is generated according to the text information and the description information.
11. The method according to any one of claims 1 to 10, characterized in that The first document includes: equipment manual documents and operation and maintenance documents of the energy storage system; The second document includes: books, papers, and dictionaries related to the field of the energy storage system.
12. A fault diagnosis device for an energy storage system, characterized in that: include: A document processing module, configured to obtain text based on the energy storage system document; wherein the energy storage system document includes: a first document and a second document; and the text includes: a first text corresponding to the first document and a second text corresponding to the second document; a graph construction module, configured to construct a first knowledge graph based on the first text, and to construct a second knowledge graph based on the second text; Question and answer processing module, including: The call information acquisition module is used to obtain the reply call information based on the question information using the question-answering agent; an information acquisition module, configured to utilize the question-answering agent and, based on the reply call information, use the first knowledge graph to obtain fault diagnosis information corresponding to the question information, and use the second knowledge graph to obtain knowledge information corresponding to the question information; wherein the knowledge information is knowledge content generated for the question information and related to the question information, and the knowledge information includes: equipment operating principles, basic physics knowledge, and knowledge of energy storage systems; A reply obtaining module, configured to obtain a reply result corresponding to the question information based on the fault diagnosis information and the knowledge information; The call information obtaining module is configured to use the question-answering agent to send the second task prompt word and the question information to the second language model, and use the question-answering agent to obtain the reply call information output by the second language model; The reply call information includes: second instruction information for indicating the use of the second knowledge graph, a second question entity and entity relationship corresponding to the question information; the second knowledge graph includes: a second triple consisting of a second first entity, second relationship information, and a second last entity; The information acquisition module is used to, upon receiving the second indication information, convert the second question entity into a second question entity vector and convert the entity relationship into a question relationship vector; obtain the second entity vector corresponding to the second first entity and the entity relationship vector corresponding to the second relationship information; determine a first candidate triple in the second knowledge graph based on the second question entity vector and the second entity vector; determine a second candidate triple in the second knowledge graph based on the question relationship vector and the entity relationship vector; and obtain the knowledge information based on the first candidate triple and the second candidate triple.
13. An electronic device, characterized in that: include: Memory; and a processor coupled to the memory, wherein the processor is configured to execute the method according to any one of claims 1 to 11 based on instructions stored in the memory.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used by a processor to execute the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product stores computer instructions, and the computer instructions are used by a processor to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Intelligent reply method and device based on multiple knowledge graphs and computer equipment
CN112650854A
Multi-knowledge graph based intelligent reply method and apparatus, computer device and storage medium
WO2022134421A1