Method and processor for diagnosing equipment failure in gas pipeline station
By building a fault knowledge graph and diagnostic model, we can identify the location and causes of gas pipeline station equipment faults, solve the problem of low diagnostic efficiency and inaccuracy caused by relying on manual experience in the existing technology, and achieve more efficient and accurate fault handling. Ensure the safe operation of gas pipelines.
Patent Information
- Application Number
- CN202310920541.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-07-25
AI Technical Summary
The existing technology relies on manual experience in fault diagnosis of gas pipeline station equipment, resulting in low and inaccurate diagnosis efficiency, making it difficult to ensure timely maintenance of equipment and affecting the safe operation of gas pipelines.
By building a fault knowledge graph of the equipment, we obtain fault query instructions and perform preprocessing to determine the similarity between the fault phenomenon description and the standard phenomenon description. We combine the equipment information and historical fault data to build a fault diagnosis model to identify the fault location and cause. Provide targeted solutions.
It improves the timeliness and accuracy of fault diagnosis, reduces labor costs, ensures that equipment can be repaired in a short time, and ensures the safe operation of gas pipelines.
Smart Images

Figure CN117093722B
Abstract
Description
Technical Field
[0001] The present application relates to the field of fault diagnosis, and in particular to a method, storage medium, and processor for diagnosing equipment faults in a gas pipeline station. Background Art
[0002] As a crucial hub for energy transmission, the safe operation of gas pipeline stations is of strategic importance to national energy security and economic development. Gas pipelines transport flammable and explosive media such as natural gas, and they operate at high pressures. Over the long-term operation of gas pipelines, various equipment failures are inevitable, leading to serious safety incidents and severely impacting the safe operation of the pipelines.
[0003] Taking natural gas compressors at gas pipeline stations as an example, current fault diagnosis for natural gas compressors primarily focuses on the compressor's actual operating status. For example, the compressor's vibration monitoring system monitors and analyzes vibration parameters at various points on the compressor. Based on the results, the fault type and cause are determined, allowing targeted repair measures to be taken. However, this method of fault diagnosis requires personnel to draw on their work experience to identify abnormal compressor data and develop appropriate solutions. This approach can lead to low diagnostic efficiency and difficulty ensuring diagnostic accuracy due to insufficient on-site personnel experience. This can lead to missed opportunities for equipment repairs and hinder the normal operation of the gas pipeline. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, storage medium, and processor for diagnosing equipment failures in a gas pipeline station.
[0005] To achieve the above objectives, the present application provides, in a first aspect, a method for diagnosing equipment failures in a gas pipeline station, comprising:
[0006] For any equipment in a gas pipeline station, a fault diagnosis model is built based on the equipment's fault knowledge graph, which includes multiple pieces of equipment fault knowledge.
[0007] In the event of a device failure, a fault query instruction is obtained for the device, which carries a fault query statement and a fault query mode;
[0008] Preprocessing the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement;
[0009] Determine the first similarity between the fault phenomenon description of the target query sentence and the standard phenomenon description of each device fault knowledge in the fault knowledge graph;
[0010] When the fault query mode is the first mode, the standard phenomenon description of the equipment fault knowledge with the largest first similarity is input into the fault diagnosis model to obtain multiple first fault locations causing the equipment fault;
[0011] Inputting the device information description of the target query statement into the fault diagnosis model to obtain multiple second fault locations that cause the device fault;
[0012] A first identical location among the plurality of first fault locations and the plurality of second fault locations is determined as a target fault location causing the equipment fault.
[0013] In an embodiment of the present application, the equipment information description includes an equipment type description and a commissioning time description, and the method also includes: when there is no first identical part among multiple first fault parts and multiple second fault parts, eliminating the commissioning time description; inputting the equipment type description into the fault diagnosis model to obtain multiple new second fault parts; and determining the target fault part based on the multiple new second fault parts and the multiple first fault parts.
[0014] In an embodiment of the present application, determining the target fault location based on multiple new second fault locations and multiple first fault locations includes: when the target query statement does not include a preset location description, determining the multiple new second fault locations and the second identical location among the multiple first fault locations as the target fault location; when the target query statement includes a preset location description, inputting the preset location description into the fault diagnosis model to obtain multiple third fault locations; and determining the target fault location based on the multiple third fault locations and the second identical location.
[0015] In an embodiment of the present application, constructing a fault diagnosis model for a device based on a fault knowledge graph of the device includes: constructing a fault relationship ontology, wherein the fault relationship ontology includes a fault ontology and a device ontology, the fault ontology includes a fault phenomenon node, a fault cause node corresponding to the fault phenomenon node, and a solution node corresponding to the fault cause node, the device ontology includes at least a device information node and a corresponding fault location node, the device information node includes a device type node and a commissioning time node; obtaining multiple historical fault data of the device, and performing feature extraction on each historical fault data to obtain multiple pending fault knowledge based on the fault relationship ontology; fusing and processing the multiple pending fault knowledge to obtain multiple device fault knowledge after fusion; determining the fault knowledge graph of the device based on the fault relationship ontology and the multiple device fault knowledge after fusion; and constructing a fault diagnosis model for the device based on the fault knowledge graph.
[0016] In an embodiment of the present application, a plurality of pending fault knowledge are fused and processed to obtain a plurality of equipment fault knowledge after fusion processing, including: for each pending fault knowledge, determining a first text vector of the pending fault knowledge and a second text vector of the preset fault knowledge corresponding to the pending fault knowledge; determining a second similarity between each pending fault knowledge and the corresponding preset fault knowledge based on the first text vector and the second text vector; and fusing the pending fault knowledge whose second similarity is in the same preset interval to obtain a plurality of equipment fault knowledge after fusion processing.
[0017] In an embodiment of the present application, the method also includes: when the target fault location is determined, the target fault location and the fault phenomenon description are input into the fault diagnosis model to obtain the fault cause that causes the equipment failure; the fault cause and the target fault location are input into the fault diagnosis model to obtain a solution to the fault cause.
[0018] In an embodiment of the present application, preprocessing the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement includes: performing word segmentation processing on the fault query statement according to the fault query instruction to obtain keywords of the fault query statement; and performing word arrangement processing on the fault query statement according to the keywords to obtain a target query statement corresponding to the fault query statement.
[0019] In an embodiment of the present application, the method also includes: when the fault query mode is the second mode, determining the query type of the fault query statement based on the keyword; inputting the standard phenomenon description of the equipment fault knowledge with the largest first similarity into the fault diagnosis model to obtain a fault query result of the query type.
[0020] A second aspect of the present application provides a machine-readable storage medium having instructions stored thereon. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned method for diagnosing equipment failures in a gas pipeline station.
[0021] A third aspect of the present application provides a processor configured to execute the above-mentioned method for diagnosing equipment failures in a gas pipeline station.
[0022] Through the above technical solution, different fault diagnosis models can be established for different equipment in the gas pipeline station, and fault diagnosis can be performed in different fault diagnosis modes, making the equipment fault diagnosis more targeted, greatly reducing labor costs, improving the timeliness of fault diagnosis, and increasing the accuracy of fault diagnosis, so that equipment can be repaired in a shorter time and ensuring the safe operation of the gas pipeline.
[0023] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0025] Figure 1 The following schematically illustrates a flow chart of a method for diagnosing equipment failures in a gas pipeline station according to an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a fault relationship ontology according to an embodiment of the present application is schematically shown;
[0027] Figure 3 The following schematically shows the structure of the CasRel model according to an embodiment of the present application;
[0028] Figure 4 The following schematically shows a flow chart of fusion processing according to an embodiment of the present application;
[0029] Figure 5 The following schematically shows a flow chart of a method for diagnosing equipment failure in a gas pipeline station according to another embodiment of the present application;
[0030] Figure 6 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0031] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0032] Figure 1 The following schematically shows a flow chart of a method for diagnosing equipment failure in a gas pipeline station according to an embodiment of the present application. Figure 1 As shown, in one embodiment of the present application, a method for diagnosing equipment failures in a gas pipeline station is provided, comprising the following steps:
[0033] Step 101: For any equipment in a gas pipeline station, a fault diagnosis model of the equipment is constructed based on the equipment's fault knowledge graph, where the fault knowledge graph includes a plurality of equipment fault knowledge.
[0034] Step 102: When a device fails, a fault query instruction of the device is obtained. The fault query instruction carries a fault query statement and a fault query mode.
[0035] Step 103 : pre-processing the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement.
[0036] Step 104 : Determine a first similarity between the fault phenomenon description of the target query statement and the standard phenomenon description of each device fault knowledge in the fault knowledge graph.
[0037] Step 105 : when the fault query mode is the first mode, the standard phenomenon description of the equipment fault knowledge with the greatest first similarity is input into the fault diagnosis model to obtain a plurality of first fault locations causing the equipment fault.
[0038] Step 106: Input the device information description of the target query statement into the fault diagnosis model to obtain multiple second fault locations that cause the device fault.
[0039] Step 107 : Determine a first identical location among the plurality of first fault locations and the plurality of second fault locations as a target fault location causing the equipment fault.
[0040] Gas pipelines are used to store and transport energy. They are deployed across multiple stations, each of which can house a variety of equipment. For example, a compressor station might include compressors, filtration equipment, and separation equipment. A distribution station might also include separation equipment, metering equipment, and transportation equipment. To ensure the safe operation of energy within the pipeline, the processor can construct a fault diagnosis model for any device within the pipeline based on its fault knowledge graph. This fault knowledge graph includes knowledge about multiple device faults.
[0041] When a device within a gas pipeline station fails, the processor can obtain a fault query instruction for the device. The fault query instruction includes a fault query statement and a fault query mode. The fault query mode can include a first mode, which is a fault coupling diagnosis mode. The processor can preprocess the fault query statement based on the fault query instruction to obtain a target query statement corresponding to the fault query statement. The processor can determine a first similarity between the fault phenomenon description of the target query statement and the standard phenomenon description of each device fault knowledge item in the fault knowledge graph.
[0042] When the fault query mode is the first mode, the processor may input the standard phenomenon description of the equipment fault knowledge with the highest first similarity into the fault diagnosis model to obtain multiple first fault locations that cause the equipment fault. The processor may input the device information description of the target query statement into the fault diagnosis model to obtain multiple second fault locations that cause the equipment fault. The processor may then determine the first identical location among the multiple first fault locations and the multiple second fault locations as the target fault location that causes the equipment fault.
[0043] Through the above technical solution, different fault diagnosis models can be established for different equipment in the gas pipeline station, and fault diagnosis can be performed in different fault diagnosis modes, making the equipment fault diagnosis more targeted, greatly reducing labor costs, improving the timeliness of fault diagnosis, and increasing the accuracy of fault diagnosis, so that equipment can be repaired in a shorter time and ensuring the safe operation of the gas pipeline.
[0044] In one embodiment, constructing a fault diagnosis model for a device based on a fault knowledge graph of the device includes: constructing a fault relationship ontology, wherein the fault relationship ontology includes a fault ontology and a device ontology, the fault ontology includes a fault phenomenon node, a fault cause node corresponding to the fault phenomenon node, and a solution node corresponding to the fault cause node, the device ontology includes at least a device information node and a corresponding fault location node, the device information node includes a device type node and a commissioning time node; acquiring multiple historical fault data of the device, and performing feature extraction on each historical fault data to obtain multiple pending fault knowledge based on the fault relationship ontology; fusing and processing the multiple pending fault knowledge to obtain multiple fused device fault knowledge; determining the fault knowledge graph of the device based on the fault relationship ontology and the multiple fused device fault knowledge; and constructing a fault diagnosis model for the device based on the fault knowledge graph.
[0045] The processor can construct a fault relationship ontology. Among them, the ontology is a description of the existence form of the entity, which is used to determine the concept nodes and association relationships in the knowledge graph. It is a template of the knowledge structure. That is, the fault relationship ontology refers to a template based on the fault relationship. The fault relationship ontology includes a fault ontology and an equipment ontology. The fault ontology includes a fault phenomenon node, a fault cause node corresponding to the fault phenomenon node, and a solution node corresponding to the fault cause node. The equipment ontology includes at least an equipment information node and a corresponding fault location node. The equipment information node includes an equipment type node and a commissioning time node. By adding equipment information nodes, it can be considered that the fault characteristics of equipment at different stages of the life cycle may be different, avoiding errors when the fault data of a certain stage of the equipment is used to diagnose the fault of another stage, thereby improving the accuracy of subsequent fault diagnosis of the equipment.
[0046] For example, Figure 2 As shown, a schematic diagram of a fault relationship ontology is provided. This fault relationship ontology includes a fault ontology and a device ontology. The fault ontology includes fault phenomena, fault causes, and treatment methods. The fault cause belongs to the cause category, the fault phenomenon belongs to the fault category, and the fault phenomenon includes a description of the phenomenon and downtime. The fault cause can be associated with both the fault phenomenon and the treatment method. That is, the fault cause leads to the fault phenomenon, and the treatment method is adopted for the fault cause. Furthermore, the fault ontology is also associated with the device ontology. The device ontology includes the fault location, fault subunit, fault unit, and device information. The fault cause is located at the fault location, the treatment method targets the fault location, and there is an association between the specific location where the fault phenomenon occurs (occurrence location) and the location where the fault may occur (fault location). The fault subunit to which the fault location belongs, the fault unit to which the fault subunit belongs, the device information to which the fault unit belongs, and the association between the device information and the fault location. The device information includes the equipment type and commissioning time.
[0047] The processor can obtain multiple historical fault data of the device and perform feature extraction on each historical fault data to obtain multiple pending fault knowledge based on the fault relationship ontology. Furthermore, the processor can perform feature extraction on each historical fault data using the CasRel model. Figure 3 As shown, a structural diagram of a CasRel model is provided. The CasRel model consists of three layers. The first layer is a BERT encoding layer based on the BERT model, which is used to encode words into vectors after obtaining contextual semantic information. The BERT model is a pre-trained language model, which is pre-trained using a deep bidirectional Transformer model. Based on the self-attention mechanism, BERT can learn contextual information and encode words more accurately, so as to better understand the semantics and logic in the text, which is conducive to improving the performance of downstream tasks. The output of the BERT encoding layer passes through a fully connected layer with a sigmoid function as the activation function to obtain the probability that each code is the starting position code or the ending position code of the head entity. Specifically, the probability that the i-th code is the starting or ending position of the head entity is determined by the following formula:
[0048]
[0049] Where, and Respectively represent the probability of the i-th code being the starting and ending position of the head entity, σ represents the sigmoid activation function, and W start 、b start 、W end 、b end Represents the weight and bias of the fully connected layer for the start and end positions of the recognition head entity, x iRepresents the i-th output code of the BERT encoding layer.
[0050] The second layer is the head entity recognition layer, which is used to decode the encoding results of the BERT encoding layer and identify all possible head entities. Specifically, the input of the head entity recognition layer is the output of the BERT encoding layer. The head entity recognition layer uses a binary classification method to identify the starting position and ending position of the head entity. The head entity can be identified based on the probability corresponding to each code output by the BERT encoding layer. If the probability is greater than the set threshold, the code is the starting position or ending position of the head entity. After identifying the starting and ending positions of the head entity, the head entity recognition layer pairs the identified starting and ending positions based on the nearest match principle to obtain the set of all head entities.
[0051] The third layer is the joint recognition layer for relations and tail entities, which is used to identify the tail entity and the corresponding relationship for a certain head entity. The input of the joint recognition layer for relations and tail entities is the output of the BERT encoding layer, which also takes into account the characteristics of the head entity. The output of the BERT encoding layer and the encoding features of the identified head entity are added together and then passed through a fully connected layer with a sigmoid function as the activation function to obtain the probability of each code being the starting position code or the ending position code of the tail entity. Specifically, the probability of the i-th code being the starting or ending position of the tail entity is determined by the following formula:
[0052]
[0053] Where, and Respectively represent the probability that the i-th code is the starting and ending position of the tail entity, σ represents the sigmoid activation function, Represents the weight and bias of the fully connected layer for identifying the start and end positions of the tail entity, x i Represents the i-th output code of the BERT encoding layer. Represents the average of the start and end position codes of the kth head entity. If the probability is greater than the set threshold, the code is the start or end position of the tail entity.
[0054] In the joint recognition layer of relation and tail entity, the relation is determined by the output of tail entity recognition. Figure 3As shown in the figure, for the BERT encoding layer input "Xiao Ming was born in Beijing, the capital of China", the relation "place of work" does not apply to the detected head entity "Xiao Ming" and the candidate tail entity "Beijing". Therefore, the tail entity recognition for the relation "place of work" will not recognize "Beijing", that is, the output of the start and end positions of the tail entity are both 0. Conversely, the "place of birth" relation applies to "Xiao Ming" and "Beijing", so the corresponding tail entity recognition will recognize the candidate object "Beijing". It can be seen that the joint relation and tail entity recognition layer can simultaneously recognize the relation and tail entity of the head entity detected by the head entity recognition layer.
[0055] After obtaining multiple pieces of pending fault knowledge based on the fault relationship ontology, the preliminary knowledge obtained through knowledge extraction using deep learning methods inevitably contains errors. Therefore, the processor can fuse and process the multiple pieces of pending fault knowledge to obtain multiple pieces of fused device fault knowledge. The processor can then determine a device fault knowledge graph based on the fault relationship ontology and the multiple pieces of fused device fault knowledge. The processor can then construct a fault diagnosis model for the device based on the device fault knowledge graph. Specifically, a Neo4j graph database can be used as the storage medium for the fault relationship ontology, and the Python language's pandas library can be used to read the multiple pieces of fused device fault knowledge stored in an Excel spreadsheet column by column. The Py2neo library can then be used to connect to the Neo4j graph database to create nodes and relationships, specifically relationships between the fault relationship ontology and the multiple pieces of device fault knowledge, to complete the construction of the device fault knowledge graph.
[0056] In one embodiment, a plurality of pending fault knowledge are fused and processed to obtain a plurality of equipment fault knowledge after fusion, including: for each pending fault knowledge, determining a first text vector of the pending fault knowledge and a second text vector of the preset fault knowledge corresponding to the pending fault knowledge; determining a second similarity between each pending fault knowledge and the corresponding preset fault knowledge based on the first text vector and the second text vector; and fusing the pending fault knowledge whose second similarities are in the same preset interval to obtain a plurality of equipment fault knowledge after fusion.
[0057] For each pending fault knowledge, the processor may determine a first text vector of the pending fault knowledge and a second text vector of the preset fault knowledge corresponding to the pending fault knowledge. The processor may determine a second similarity between each pending fault knowledge and the corresponding preset fault knowledge based on the first text vector and the second text vector. Specifically, Determine the second similarity. Wherein, A and B represent two text vectors to be compared, namely, the first text vector of the pending fault knowledge and the second text vector of the corresponding preset fault knowledge, and cos(θ) represents the cosine similarity of the two text vectors to be compared, namely, the second similarity. Afterwards, the processor can fuse the pending fault knowledge whose second similarities are in the same preset interval to obtain multiple pieces of equipment fault knowledge after fusion. If the second similarity is closer to 1, it means that the two pieces of fault knowledge are more similar. If the second similarity is closer to 0, it means that the two pieces of fault knowledge are more dissimilar.
[0058] like Figure 4 As shown, a schematic diagram of the fusion processing process is provided. During the fusion processing, the standard entity and the entity to be compared can be separately segmented to convert the standard entity and the entity to be compared into corresponding vectors. Subsequently, the similarity between the standard entity and the entity to be compared can be determined based on the corresponding vectors. If the similarity is greater than a threshold, the entities can be merged. That is, only one of the entities with a similarity greater than the threshold can be retained, and the retained entity can be used to replace the other entities with similarities greater than the threshold. If the similarity is less than the threshold, the entity is not merged.
[0059] In one embodiment, the equipment information description includes an equipment type description and a production time description, and the method further includes: when there is no first identical part among multiple first fault parts and multiple second fault parts, eliminating the production time description; inputting the equipment type description into the fault diagnosis model to obtain multiple new second fault parts; and determining the target fault part based on the multiple new second fault parts and the multiple first fault parts.
[0060] The device information description includes a device type description and a commissioning time description. If the multiple first fault locations and multiple second fault locations do not contain the same first fault location, the processor may remove the commissioning time description. The processor may then input the device type description into the fault diagnosis model to obtain multiple new second fault locations. The processor may then determine the target fault location based on the multiple new second fault locations and the multiple first fault locations.
[0061] In one embodiment, determining the target fault location based on multiple new second fault locations and multiple first fault locations includes: when the target query statement does not include a preset location description, determining the multiple new second fault locations and the second identical location among the multiple first fault locations as the target fault location; when the target query statement includes a preset location description, inputting the preset location description into the fault diagnosis model to obtain multiple third fault locations; and determining the target fault location based on the multiple third fault locations and the second identical location.
[0062] If the target query statement does not include a preset location description, the processor may determine the multiple new second fault locations and the second identical locations among the multiple first fault locations as the target fault location. If the target query statement includes a preset location description, the processor may input the preset location description into the fault diagnosis model to obtain multiple third fault locations. The processor may then determine the target fault location based on the multiple third fault locations and the second identical locations.
[0063] In one embodiment, the method further includes: when the target fault location is determined, inputting the target fault location and the fault phenomenon description into a fault diagnosis model to obtain the fault cause that causes the equipment failure; inputting the fault cause and the target fault location into the fault diagnosis model to obtain a solution to the fault cause.
[0064] Once the target fault location is determined, the processor can input the target fault location and the fault phenomenon description into the fault diagnosis model to obtain the fault cause that caused the equipment fault. The processor can also input the fault cause and the target fault location into the fault diagnosis model to obtain a solution to the fault cause.
[0065] In one embodiment, preprocessing the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement includes: performing word segmentation processing on the fault query statement according to the fault query instruction to obtain keywords of the fault query statement; and performing word arrangement processing on the fault query statement according to the keywords to obtain the target query statement corresponding to the fault query statement.
[0066] The processor may perform word segmentation processing on the fault query statement based on the fault query instruction to obtain keywords of the fault query statement. Keywords may be words that can indicate the query type. The processor may then perform word permutation processing on the fault query statement based on the keywords to obtain a target query statement corresponding to the fault query statement.
[0067] In one embodiment, the method further includes: when the fault query mode is the second mode, determining the query type of the fault query statement based on the keyword; inputting the standard phenomenon description of the equipment fault knowledge with the largest first similarity into the fault diagnosis model to obtain a fault query result of the query type.
[0068] The second mode refers to a simple query mode based on fault phenomena. When the fault query mode is the second mode, the processor may determine the query type of the fault query statement based on keywords. Query types include location, cause, and solution. The processor may then input the standard phenomenon description of the equipment fault knowledge with the highest first similarity into the fault diagnosis model to obtain a fault query result of the query type. That is, if the query type is location, the fault query result will be the fault location. If the query type is cause, the fault query result will be the fault cause. If the query type is solution, the fault query result will be the solution.
[0069] In one embodiment, for any equipment in a gas pipeline station, a fault diagnosis model of the equipment is constructed based on the fault knowledge graph of the equipment, and the fault knowledge graph includes multiple equipment fault knowledge; in the event of a fault in the equipment, a fault query instruction of the equipment is obtained, and the fault query instruction carries a fault query statement and a fault query mode; the fault query statement is segmented according to the fault query instruction to obtain keywords of the fault query statement; the fault query statement is word-arranged according to the keywords to obtain a target query statement corresponding to the fault query statement; the first similarity between the fault phenomenon description of the target query statement and the standard phenomenon description of each equipment fault knowledge in the fault knowledge graph is determined; when the fault query mode is the first mode, the standard phenomenon description of the equipment fault knowledge with the largest first similarity is input into the fault diagnosis model to obtain multiple first similarities that cause the equipment fault. a fault location; inputting the device information description of the target query statement into the fault diagnosis model to obtain multiple second fault locations that cause the equipment fault; determining the first identical location among the multiple first fault locations and the multiple second fault locations as the target fault location that causes the equipment fault; in the case that the first identical location does not exist among the multiple first fault locations and the multiple second fault locations, eliminating the commissioning time description; inputting the device type description into the fault diagnosis model to obtain multiple new second fault locations; in the case that the target query statement does not include a preset location description, determining the multiple new second fault locations and the second identical location among the multiple first fault locations as the target fault location; in the case that the target query statement includes a preset location description, inputting the preset location description into the fault diagnosis model to obtain multiple third fault locations; determining the target fault location based on the multiple third fault locations and the second identical location.
[0070] For any equipment within a gas pipeline station, the processor can construct a fault diagnosis model for the equipment based on the equipment's fault knowledge graph, which includes multiple pieces of equipment fault knowledge. In the event of a device failure, the processor can obtain a fault query instruction for the equipment, which carries a fault query statement and a fault query mode. The fault query mode can include a first mode. The first mode refers to a fault coupling diagnosis mode. The processor can perform word segmentation processing on the fault query statement based on the fault query instruction to obtain keywords for the fault query statement. Keywords can refer to words that can indicate the query type. The processor can then perform word permutation processing on the fault query statement based on the keywords to obtain a target query statement corresponding to the fault query statement.
[0071] The processor can determine the first similarity between the fault phenomenon description of the target query statement and the standard phenomenon description of each device fault knowledge in the fault knowledge graph. When the fault query mode is the first mode, the processor can input the standard phenomenon description of the device fault knowledge with the greatest first similarity into the fault diagnosis model to obtain multiple first fault locations that cause the equipment fault. The processor can input the device information description of the target query statement into the fault diagnosis model to obtain multiple second fault locations that cause the equipment fault. The processor can determine the first identical location among the multiple first fault locations and the multiple second fault locations as the target fault location that causes the equipment fault. When the first identical location does not exist among the multiple first fault locations and the multiple second fault locations, the processor can eliminate the commissioning time description. Thereafter, the processor can input the device type description into the fault diagnosis model to obtain multiple new second fault locations.
[0072] Furthermore, the processor can determine a target fault location based on the multiple new second fault locations and the multiple first fault locations. Specifically, if the target query statement does not include a preset location description, the processor can determine the multiple new second fault locations and a second identical location among the multiple first fault locations as the target fault location. If the target query statement includes a preset location description, the processor can input the preset location description into the fault diagnosis model to obtain multiple third fault locations. The processor can then determine the target fault location based on the multiple third fault locations and the second identical location.
[0073] In one embodiment, another method for diagnosing equipment failures within a gas pipeline station is provided. This method can perform simple queries on equipment failures within a gas pipeline station. Specifically, the questions are first classified: the query input may be asking about the cause, location, or solution of the failure, so the questions need to be classified. First, the query input is segmented, and then the questions are classified according to the keywords in the input. There are three main categories: asking about the location, asking about the cause, and asking about the solution. For example, if the input contains "cause", it indicates that the user wants to query the cause of the failure, and if the input contains "what to do", it indicates that the user wants to query the solution to the failure.
[0074] Based on the fault phenomenon input, a database search for standard fault phenomena is performed: After word segmentation, the input is reassembled into a sentence after removing interfering elements such as modal particles. Similarity is then calculated with the standard fault phenomena in the database using the same method used for knowledge fusion processing. The standard fault phenomenon with the highest similarity is returned as the final query standard fault phenomenon. Next, a query is performed based on question classification and standard fault phenomena: the obtained standard fault phenomena are input into the model and the query is performed based on the question classification results. If the query is for the fault location, the possible fault locations are found based on the (fault phenomenon, occurrence location, fault location) relationship in the equipment fault knowledge graph, and the query results are returned. If the query is for the fault cause, the possible fault causes are returned based on the (fault cause, cause, fault phenomenon) relationship in the equipment fault knowledge graph. If the query is for a fault solution, the possible fault solutions are returned based on the (fault cause, cause, fault phenomenon) (fault cause, action, solution) relationship in the equipment fault knowledge graph.
[0075] For example, taking the query "Where is the specific fault location of the engine detonation?" as an example for a simple fault query, first, "Where is the fault location of the engine detonation fault shutdown?" is segmented into nine parts: "engine", "detonation", "of", "specific", "fault", "location", "in", "where", and "?". "Location" and "where" are two keywords. After removing the modal particles such as "location", "in", "where", "specific", "of", and "?" from the segmentation results, they are reassembled into the sentence "engine detonation fault". Since this is a simple fault query, the keywords "location" and "where" can be used to determine that the fault location is what is being queried. After that, the cosine similarity is calculated with the standard fault phenomenon in the database to obtain the most similar fault "engine detonation fault shutdown". The fault diagnosis model is input according to the fault standard phenomenon "engine detonation fault shutdown" to query the location of the fault. Specifically, the algorithm shown in Table 1 was executed using the Py2neo library. "Engine Detonation Failure Shutdown" was substituted into "desc" and queried in the Neo4j graph database. This revealed all possible fault locations: "Detonation Probe," "Wiring," "High-Voltage Rod," "Temperature Sensor," "Precombustion Chamber," "Wastegate," "Intake Valve," "Spark Plug," "Connecting Rod," "Crankcase," and "Cylinder," completing the query. The final model output was, "Based on the phenomenon you described, the fault may occur in the detonation probe, wiring, wastegate, cylinder, precombustion chamber, connecting rod, crankcase, temperature sensor, spark plug, high-voltage rod, and intake valve." This is consistent with the specific possible fault locations for "Engine Detonation Failure Shutdown" in real-world situations.
[0076] Table 1 Algorithm for querying fault location based on fault phenomenon
[0077]
[0078] In one embodiment, Figure 5 As shown, a flow chart of another method for diagnosing equipment failures in gas pipeline stations is provided. This method can perform coupled diagnosis on equipment failures in gas pipeline stations. Specifically, the similarity between the input fault description and the standard fault phenomena stored in the database is first calculated, and the fault phenomenon with the greatest similarity is returned for diagnosis. Based on the input equipment information, the node of the equipment is queried in the knowledge graph, and then the possible fault locations of the equipment are inferred through the relationships in the knowledge graph. If the equipment commissioning time is also entered, the number of equipment nodes is reduced according to the input commissioning time. Based on the returned fault phenomenon with the greatest similarity, the location where the fault phenomenon may occur is inferred through the relationships in the knowledge graph. The intersection of the two is taken as the final possible fault location. If the commissioning time is entered but the intersection of the two is empty, the input commissioning time is removed and the step is executed again.
[0079] If a fault location is entered, the system first determines whether the input is a faulty unit, subunit, or specific fault location. If the input is a faulty unit or subunit, the specific fault location is inferred based on the relationships in the graph. If the input is a specific fault location, the input is directly used as a possible specific fault location. Ultimately, all possible specific fault locations based on the input are obtained. The final fault location is obtained based on the intersection of the specific fault location obtained above and the fault location obtained above. If a fault location is not entered, the fault location obtained above is taken as the final fault location. Based on the final fault location and the standard fault phenomenon, the cause of the fault is inferred based on the relationships in the graph. The specific logic is that the fault cause causes the standard fault phenomenon to be located at the same fault location. The solution to the fault is then inferred based on the fault cause. The specific logic is that the fault cause adopts the solution and the fault location targeted by the solution. The diagnostic results are output in a structured manner to complete the fault diagnosis.
[0080] Taking the query "Is the spark plug the fault location for a fuel-driven reciprocating compressor experiencing engine detonation?" as an example, a fault coupling diagnosis query was performed. First, the query "Is the spark plug the fault location for a fuel-driven reciprocating compressor experiencing engine detonation?" was segmented into nine parts: "fuel-driven reciprocating," "compressor," "occurrence," "engine," "detonation," "of," "fault location," "for," "spark plug," "?," and "?". The fault description statement was "engine detonation fault." Cosine similarity was then calculated with the standard fault phenomena in the database, resulting in the most similar fault, "engine detonation fault shutdown." The standard fault phenomenon, "engine detonation fault shutdown," was then input into the fault diagnosis model to determine the fault location. Specifically, the algorithm was executed using the Py2neo library. "fuel-driven reciprocating" was substituted into "devicetype" and searched in the Neo4j graph database to identify all possible fault locations for the device. The standard fault phenomenon was "engine detonation fault shutdown," which was used to query all possible fault locations for the device.
[0081] Next, we can search for possible fault locations. As we know from the above, the faulty device information is "fuel-driven reciprocating compressor" and does not include a description of the commissioning time. We can input this device information into the fault diagnosis model to determine the fault location. Specifically, we can use the Py2neo library to execute the algorithm shown in Table 2, substituting "fuel-driven reciprocating" for "devicetype" and searching the Neo4j graph database for all possible fault locations for the device.
[0082] Table 2 Algorithm for finding fault location based on equipment information
[0083]
[0084] The standard fault phenomenon is "engine detonation shutdown." This standard fault phenomenon can be input into the fault diagnosis model to query all possible fault locations. Specifically, the algorithm shown in Table 3 is executed using the Py2neo library. Substituting "engine detonation shutdown" into "desc," the Neo4j graph database is used to search for all possible fault locations associated with this phenomenon. Finally, the intersection of all fault locations found based on the fault information and all fault locations found based on the fault phenomenon is taken to determine the possible fault locations as "high-voltage rod" and "spark plug."
[0085] Table 3 Algorithm for finding fault location based on fault phenomenon
[0086]
[0087] If the query includes a description of a possible fault location, the fault location could be a specific part of the fault, a faulty subunit, or a faulty unit. The algorithm shown in Table 4 can be executed separately using the Py2neo library. Substituting "spark plug" for "devicepart" in the Neo4j graph database, the specific fault locations obtained are "high-voltage rod," "coil," and "spark plug."
[0088] Table 4 Algorithm for finding fault location based on input
[0089]
[0090] Afterwards, the final fault location can be determined by taking the intersection of the possible fault locations "high-voltage rod" and "spark plug" and the specific fault locations "high-voltage rod," "coil," and "spark plug." This results in the final fault locations "high-voltage rod" and "spark plug." Furthermore, the cause and solution can be determined based on the final fault location and symptoms. Specifically, the algorithm shown in Table 5 can be executed using the Py2neo library. Substituting "high-voltage rod" and "spark plug" into "part" and "engine detonation shutdown" into "desc," the Neo4j graph database can be queried to determine the possible causes and solutions.
[0091] Table 5 Algorithm for finding fault causes and solutions based on fault phenomena and fault locations
[0092]
[0093] After obtaining the fault location, cause, and solution, the results can be formatted and output to complete the coupled fault diagnosis. The final diagnosis results are shown in Table 6.
[0094] Table 6 Fault diagnosis results
[0095]
[0096] In one embodiment, in order to verify the feasibility of the knowledge extraction method in the equipment fault knowledge graph constructed by the fault diagnosis model, a fault knowledge extraction experiment was conducted using the fault maintenance records of the compressor at the gas pipeline station as data. The dataset contains approximately 46,000 data in total, which are divided into training set, validation set, and test set with a ratio of 8:1:1. After the model is trained to convergence, it is evaluated on the validation set and test set. The evaluation is based on the precision, recall rate, and F1 parameter in the field of deep learning. The calculation formula is:
[0097]
[0098] Where TP represents the number of correct predictions, FP represents the number of incorrect predictions, FN represents the number of unpredicted results, and Precision, Recall, and F1 represent the precision, recall, and F1 parameter, respectively. The evaluation results of the trained model on the validation and test sets are shown in Table 7.
[0099] Table 7 Evaluation results of the model on the validation set and test set
[0100]
[0101] The evaluation results show that the model has high precision and recall on both the validation and test sets, with an F1 parameter greater than 0.8. Therefore, it can be concluded that the CasRel model used in this paper is feasible for extracting fault knowledge from key equipment in gas pipeline stations.
[0102] Figure 1 and Figure 5 FIG. 1 is a flow chart of a method for diagnosing equipment failure in a gas pipeline station according to an embodiment. Figure 1 and Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 and Figure 5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these sub-steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0103] In one embodiment, a storage medium is provided, on which a program is stored. When the program is executed by a processor, the method for diagnosing equipment failures in a gas pipeline station is implemented.
[0104] In one embodiment, a processor is provided, and the processor is used to run a program, wherein when the program is run, the method for diagnosing equipment failure in a gas pipeline station is executed.
[0105] In one embodiment, a device for diagnosing equipment failures in a gas pipeline station is provided, comprising the above-mentioned processor.
[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as the target fault location. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for diagnosing equipment failures in a gas pipeline station is implemented.
[0107] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0108] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, steps for diagnosing equipment failures within a gas pipeline station are implemented.
[0109] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the method steps for diagnosing equipment failures in a gas pipeline station.
[0110] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 steps in the process. 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.
[0112] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0114] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0117] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0118] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for diagnosing equipment failure in a gas pipeline station. It is characterized in that The method comprises: For any equipment in the gas transmission pipeline station, a fault diagnosis model of the equipment is constructed according to the fault knowledge graph of the equipment, wherein the fault knowledge graph includes a plurality of equipment fault knowledge; In the case where the device fails, obtaining a fault query instruction of the device, wherein the fault query instruction carries a fault query statement and a fault query mode; Preprocessing the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement; Determine a first similarity between the fault phenomenon description of the target query sentence and the standard phenomenon description of each device fault knowledge in the fault knowledge graph; In the case where the fault query mode is the first mode, the standard phenomenon description of the equipment fault knowledge with the first greatest similarity is input into the fault diagnosis model to obtain a plurality of first fault locations causing the equipment fault, and the first mode refers to a fault coupling diagnosis mode; Inputting the device information description of the target query statement into the fault diagnosis model to obtain a plurality of second fault locations causing the device fault; determining a first identical part among the plurality of first fault parts and the plurality of second fault parts as a target fault part causing the equipment fault; The constructing of the fault diagnosis model of the device according to the fault knowledge graph of the device comprises: Constructing a fault relationship ontology, wherein the fault relationship ontology includes a fault ontology and a device ontology, the fault ontology includes a fault phenomenon node, a fault cause node corresponding to the fault phenomenon node, and a solution node corresponding to the fault cause node, the device ontology includes at least a device information node and a corresponding fault location node, the device information node includes a device type node and a production time node; Acquire multiple historical fault data of the device, and perform feature extraction on each historical fault data to obtain multiple pending fault knowledge based on the fault relationship ontology; Performing fusion processing on the plurality of pending fault knowledge to obtain fusion processed plurality of equipment fault knowledge; Determine a fault knowledge graph of the device according to the fault relationship ontology and the fused and processed plurality of device fault knowledge; A fault diagnosis model for the device is constructed based on the fault knowledge graph.
2. The method for diagnosing equipment failure in a gas pipeline station according to claim 1, It is characterized in that The device information description includes a device type description and a production time description, and the method further includes: In the case that the first identical part does not exist in the plurality of first fault parts and the plurality of second fault parts, removing the description of the production time; Inputting the device type description into the fault diagnosis model to obtain a plurality of new second fault locations; The target fault location is determined according to the plurality of new second fault locations and the plurality of first fault locations.
3. The method for diagnosing equipment failure in a gas pipeline station according to claim 2, It is characterized in that The determining the target fault location according to the multiple new second fault locations and the multiple first fault locations comprises: In a case where the target query statement does not include a preset part description, determining the multiple new second fault parts and the second identical part among the multiple first fault parts as the target fault part; In the case where the target query sentence includes the preset part description, the preset part description is input into the fault diagnosis model to obtain a plurality of third fault parts; The target fault location is determined based on the plurality of third fault locations and the second identical location.
4. The method for diagnosing equipment failure in a gas pipeline station according to claim 1, It is characterized in that The fusing and processing the plurality of pending fault knowledge to obtain a plurality of equipment fault knowledge after fusing and processing includes: For each pending fault knowledge, determining a first text vector of the pending fault knowledge and a second text vector of preset fault knowledge corresponding to the pending fault knowledge; Determine a second similarity between each pending fault knowledge and corresponding preset fault knowledge according to the first text vector and the second text vector; The pending fault knowledge with the second similarity in the same preset interval is fused to obtain a plurality of equipment fault knowledge after fusion.
5. The method for diagnosing equipment failure in a gas pipeline station according to claim 1, It is characterized in that The method further comprises: When the target fault location is determined, the target fault location and the fault phenomenon description are input into the fault diagnosis model to obtain the fault cause causing the equipment fault; The fault cause and the target fault location are input into the fault diagnosis model to obtain a solution for the fault cause.
6. The method for diagnosing equipment failure in a gas pipeline station according to claim 1, It is characterized in that The preprocessing of the fault query statement according to the fault query instruction to obtain a target query statement corresponding to the fault query statement includes: Performing word segmentation processing on the fault query statement according to the fault query instruction to obtain keywords of the fault query statement; The fault query statement is processed by word arrangement according to the keywords to obtain a target query statement corresponding to the fault query statement.
7. The method for diagnosing equipment failure in a gas pipeline station according to claim 6, It is characterized in that The method further comprises: In the case where the fault query mode is the second mode, determining the query type of the fault query statement according to the keyword, the second mode being a simple query mode based on the fault phenomenon; The standard phenomenon description of the equipment fault knowledge with the first greatest similarity is input into the fault diagnosis model to obtain a fault query result of the query type.
8. A machine-readable storage medium having instructions stored thereon, It is characterized in that When the instruction is executed by a processor, the processor is configured to execute the method for diagnosing equipment failure within a gas pipeline station according to any one of claims 1 to 7.
9. A processor, It is characterized in that The method is configured to execute the method for diagnosing equipment failure within a gas pipeline station according to any one of claims 1 to 7.
