Intelligent recommendation method for urban gas emergency rescue scheme
By establishing a knowledge graph for emergency rescue of urban gas pipelines, using random walk strategies and word vector learning, and intelligently recommending emergency rescue plans, we solve the problems of low efficiency and lack of scientificity in emergency plan formulation in existing technologies, and achieve a fast and accurate emergency response.
Patent Information
- Application Number
- CN202510843873.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-23
AI Technical Summary
Existing technologies make it difficult to quickly formulate scientific and reasonable emergency rescue plans when gas accidents occur, and are unable to accurately judge the risk of secondary accidents. It is also difficult to find similar historical cases, resulting in inefficient emergency response.
Establish a knowledge graph for emergency rescue of urban gas pipelines, build a case library and rule library by obtaining historical gas accident emergency response plans and relevant standards and specifications, use random walk strategy and word vector learning to generate emergency rescue plans, and realize intelligent recommendation.
It improves the scientific nature and response speed of emergency rescue plans, reduces the influence of human subjective factors, ensures the scientific nature and accuracy of plans, and meets the needs of rapid response.
Smart Images

Figure CN120670672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of emergency decision-making, and in particular to an intelligent recommendation method for urban gas emergency rescue plans. Background Art
[0002] With the continuous expansion of urban scale and the continuous advancement of urbanization, urban gas pipeline networks are showing a rapid development trend. While gas pipeline networks provide convenience for urban residents' lives and industrial production, safety issues are becoming increasingly prominent, and the frequency and risk level of gas accidents are constantly rising.
[0003] To protect the lives and property of the people and the safety of urban operations, efficiently and scientifically handling gas accidents has become a top priority. When a gas accident occurs, the subjective limitations of manual analysis and the limited access speed of the gas accident case database make it difficult to quickly develop or select an effective gas emergency rescue plan that is applicable to the current gas accident. Different personnel, based on their own experience, may develop widely varying gas accident response plans for the same gas accident, making it difficult to ensure the scientific and rationality of the plans and to determine the risk of a secondary gas accident. Furthermore, due to the large number of historical gas accident cases, searching for similar cases and reaching a decision in an emergency is time-consuming, making it difficult to meet the requirements for rapid response in emergencies. Summary of the Invention
[0004] The present invention provides an intelligent recommendation method for urban gas emergency rescue plans. Based on historical cases of urban gas pipeline emergencies and their emergency response rules, an urban gas pipeline emergency rescue knowledge graph is established to achieve intelligent recommendation of gas emergency rescue plans, thereby solving the problems of strong subjectivity, slow response and inaccurate plan decision-making in the formulation of urban gas emergency rescue plans.
[0005] To achieve the above objectives, the present invention provides a method for intelligently recommending urban gas emergency rescue plans, comprising:
[0006] Obtain historical gas accident emergency response plans and gas accident-related standards and specifications for the town, extract gas accident factors from these gas accident emergency response plans and gas accident-related standards and specifications, and establish a case library and rule library based on gas accident factors;
[0007] Extracting semantic relationships between entity nodes from the case base and the rule base, and constructing triples of the case base and the rule base based on the semantic relationships between entity nodes;
[0008] Based on the triples of the case base and rule base, a knowledge graph of urban gas pipeline emergency rescue is constructed;
[0009] According to the knowledge graph of urban gas pipeline emergency rescue and the gas accidents to be handled, an emergency rescue plan for urban gas pipeline incidents is generated based on random walk strategy and word vector learning.
[0010] For sudden gas accidents, although the existing technology can store historical gas accident emergency response plans in the form of knowledge graphs, it mainly relies on the staff's response experience to match and recommend plans. The timeliness of plan formulation is poor, and it is difficult to quickly formulate a scientific and reasonable gas accident response plan. There are problems such as large differences in plans, inability to judge the risk of secondary accidents during the response process, difficulty in finding similar historical plans, and uncertainty about the applicability and effectiveness of the formulated plan for the current gas accident. The present invention proposes an intelligent recommendation method for urban gas emergency rescue plans, which can organize historical gas accident emergency response plans and gas accident-related standards and specifications into a case library and a rule library, and convert them into the form of triples, thereby realizing a structured representation of historical gas accident emergency response plans and gas accident-related standards and specifications, eliminating redundant information, facilitating the establishment of data indexes from multiple relational perspectives, and improving the efficiency and accuracy of searching for similar gas accidents. A knowledge graph for urban gas pipeline emergency rescue is constructed based on the triple form, focusing on gas accident types, failure The key factors such as mode, failure cause, repair method and precautions are taken into consideration. The entity relationship construction is closely combined with the actual situation of gas emergency rescue, emphasizing the semantic association between entities in emergency rescue, and constructing a knowledge graph that focuses on improving the emergency response speed and the scientific nature of the disposal plan, rather than the conventional knowledge graph used for knowledge management and retrieval. The urban gas pipeline emergency rescue knowledge graph can integrate various scattered historical gas accident emergency disposal plans and gas accident-related standards and specifications into a whole, enhance the understanding and analysis capabilities of gas accidents, and quickly obtain all information related to specific gas accidents through the knowledge graph; on the basis of the knowledge graph, through random walk strategy and word vector learning, compared with the conventional search method that relies on manual experience and simple database retrieval, the present invention can quickly generate embedded vectors and calculate similarities, and can quickly recommend solutions suitable for the current gas accident, shorten the search time, and solve the problem that conventional searches for historical gas cases are time-consuming, labor-intensive and inefficient, ensuring the rapid response and effectiveness of emergency rescue plans.
[0011] Furthermore, the acquisition of historical gas accident emergency response plans and gas accident-related standards and specifications for the town specifically includes:
[0012] Obtain historical gas accident emergency response plans and gas accident-related standards and specifications in towns and cities based on the alarm receiving stage, alarm dispatch stage, on-site confirmation stage, preliminary handling stage, maintenance and processing stage, and later recovery stage.
[0013] The present invention is based on a total of six stages, namely the alarm receiving stage, the alarm dispatching stage, the on-site confirmation stage, the early disposal stage, the maintenance and processing stage, and the later recovery stage, to obtain the historical gas accident emergency disposal plans and gas accident-related standards and specifications of the town, and can provide a clear, comprehensive and complete case framework for the construction of the case library and the rule library, solving the problem of lack of key basis for the formulation of emergency plans due to incomplete and non-standard extraction of gas accidents in the existing technology, so that the formulation of subsequent gas accident emergency rescue plans can be more accurately targeted at gas accidents of different types and causes, thereby improving the scientificity and effectiveness of emergency rescue plans.
[0014] Furthermore: the case library includes basic information of gas accidents, causes of gas accidents and emergency response processes;
[0015] The rule base includes emergency process standards, safety operation specifications, equipment standards, personnel qualification specifications and gas safety specifications.
[0016] By subdividing the contents of the case library and rule library, the data's organization and practicality are enhanced, the efficiency of subsequent searches and retrieval is improved, and the problems of unclear case and rule classification and mixed content in existing technologies are solved. When formulating emergency rescue plans, historical cases and rules can be retrieved and utilized more efficiently, thereby improving the scientific nature and pertinence of emergency plan formulation. At the same time, through the case library and rule library, historical cases and applicable rules similar to the current accident can be quickly located, thereby improving the efficiency and standardization of emergency response.
[0017] Furthermore, the method of generating an emergency rescue plan for urban gas pipeline incidents based on the knowledge graph of urban gas pipeline emergency rescue and the gas accidents to be handled, based on the random walk strategy and word vector learning, specifically includes:
[0018] Based on the urban gas pipeline emergency rescue knowledge graph, the random walk strategy and word vector learning are used to calculate the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph;
[0019] According to the gas accident to be handled, the embedding vector of the subgraph of the gas accident to be handled is calculated;
[0020] Calculate the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph, and obtain the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph;
[0021] From the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph, the subgraph corresponding to the largest similarity is selected as the target subgraph, and the gas accident emergency response plan corresponding to the target subgraph is used as the urban gas pipeline emergency rescue plan.
[0022] The present invention is based on the knowledge graph and is processed through a random walk strategy and word vector learning. The similarity of the embedding vectors of the subgraphs in the knowledge graph is calculated and compared with the similarity of the embedding vectors of the subgraphs of the current gas accident. The most similar gas accident emergency response plan is matched through the similarity comparison, and the corresponding response plan is used as the recommended plan, thereby realizing intelligent recommendation of gas accident emergency response plans and ensuring the scientific nature and accuracy of the recommended plans. The present invention solves the problems in the prior art of low efficiency and strong subjectivity in emergency plan formulation and difficulty in quickly finding historical plans similar to the current accident.
[0023] Furthermore, the embedding vectors of all subgraphs in the knowledge graph of urban gas pipeline emergency rescue are calculated using the random walk strategy and word vector learning based on the knowledge graph of urban gas pipeline emergency rescue, specifically including:
[0024] Random walk processing: Based on the current entity node and the previous entity node in the urban gas pipeline emergency rescue knowledge graph, multiple rounds of random walks are performed using a random walk strategy to obtain the previous and next node sequence set of the current entity node;
[0025] Word vector learning process: Based on the set of previous and next node sequences of the current entity node, the word embedding model is trained to obtain the embedding vector representation of the current entity node;
[0026] Obtaining the embedding vector of a single subgraph: Perform the aforementioned random walk and word vector learning processes on all entity nodes of a single subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector representation of all entity nodes. Average the embedding vector representations of all entity nodes to obtain the embedding vector of the single subgraph.
[0027] Embedding vector of each subgraph: The above-mentioned embedding vector of a single subgraph is obtained for each subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector of each subgraph in the urban gas pipeline emergency rescue knowledge graph.
[0028] Through random walk strategy and word vector learning, each subgraph in the urban gas pipeline emergency rescue knowledge graph is converted into a low-dimensional embedding vector, realizing semantic-level representation of gas accident cases and rules, solving the problem of the existing technology that it is difficult to efficiently and accurately process and match complex semantic information; it is convenient to quickly find the historical case most similar to the current accident through the similarity calculation of the embedding vector, improving the efficiency and accuracy of emergency rescue plan recommendations, and enhancing the system's processing capabilities for large-scale knowledge graphs.
[0029] Furthermore: the expression of the previous and next node sequence set of the current entity node is as follows:
[0030]
[0031] in, For the current entity node The set of before and after node sequences, is the current entity node, are the previous and next entity nodes of the current entity node obtained by the random walk strategy, For the current entity node The previous entity node, For the current entity node The post-entity node, is the number of previous and next entity nodes obtained by the random walk strategy function;
[0032] The expression of the random walk strategy is as follows:
[0033]
[0034]
[0035] in, From the current entity node Random walk to the next entity node The transition probability, is the random walk policy function, is the relationship edge weight, From the previous entity node and the next entity node The shortest path distance between To control the probability parameter of backtracking walk, is the probability parameter that controls the exploration walk.
[0036] The present invention defines the expression of the previous and next node sequence set and random walk strategy of the current entity node. Through computable numerical sequence expressions, it can capture the complex semantic relationship between entity nodes in the knowledge graph, solving the problem in the existing technology that the knowledge graph embedding vector calculation is difficult to accurately capture the semantic relationship between entities, improving the accuracy and semantic richness of the embedding vector representation, and providing a reliable data basis for subsequent similarity calculation and emergency plan recommendation.
[0037] Furthermore, the word embedding model is trained based on the set of preceding and following node sequences of the current entity node to obtain the embedding vector representation of the current entity node, specifically including:
[0038] According to the current entity node, maximize the probability of occurrence of the entity nodes before and after the current entity node, and learn the embedded vector representation of the current entity node;
[0039] The expression for maximizing the occurrence probability of the entity nodes before and after the current entity node is as follows:
[0040]
[0041] in, To maximize, is the current entity node, is the set of entity nodes in the knowledge graph, is a logarithmic function, For the current entity node The probability of occurrence of the entity nodes before and after , is the probability, For the current entity node The set of entity node sequences before and after , For the current entity node Embedded vector representation of .
[0042] The present invention optimizes the word embedding model training process by maximizing the objective function of the probability of occurrence of previous and next nodes. The obtained embedding vector representation of the entity node can better capture its surrounding context information, improve the accuracy and richness of the embedding vector representation in semantic expression, and solve the problems of inaccurate entity node embedding vector representation and insufficient semantic information in the prior art.
[0043] Furthermore: the maximization of the occurrence probability of the previous and next entity nodes of the current entity node complies with the conditional independence assumption and the feature space symmetry assumption;
[0044] The conditional independence assumption is that the probability of occurrence of the entity nodes before and after the current entity node is independent of the other entity nodes, and the expression is as follows:
[0045]
[0046] in, For the current entity node The probability of occurrence of the entity nodes before and after , is the product symbol, For the current entity node Neighbor nodes of For the current entity node The probability of occurrence of neighbor entity nodes;
[0047] The feature space symmetry assumption is that when a certain entity node is the current node or the neighboring node to be jumped to, it is represented by the same embedding vector, and the expression is as follows:
[0048]
[0049] in, is an exponential function, is the embedding vector representation of the entity node in the knowledge graph, For the summation symbol, is the embedding vector representation of the neighbor node to be jumped.
[0050] Through the conditional independence assumption, the independence between entity nodes and the consistency of feature representation are emphasized, and the joint probability of the occurrence of previous and subsequent nodes is decomposed into the product of independent conditional probabilities to simplify the computational complexity; through the feature space symmetry assumption, the feature representation of entity nodes in different contexts is ensured to be consistent, thereby improving semantic coherence; through the conditional independence assumption and the feature space symmetry assumption, the learning process of entity node embedding vectors is optimized, the quality of embedding vector representation is improved, and the problem that the embedding vector learning method in the existing technology cannot fully capture the complex semantic relationship between entity nodes is solved.
[0051] Furthermore: the expression of the embedding vector of the subgraph is as follows:
[0052]
[0053] in, is the embedding vector of the subgraph, For the summation symbol, is the entity node set of the subgraph, Entity nodes of the subgraph The embedding vector representation of is the absolute value symbol.
[0054] The present invention constructs the embedding vector of a subgraph by taking the average value of the embedding vectors of all entity nodes in the subgraph, which can effectively characterize the comprehensive characteristics of the subgraph, namely the low-dimensional characteristics of the gas emergency disposal plan, and can concisely and effectively represent the overall characteristics of the subgraph, thereby improving the efficiency and accuracy of subsequent similarity calculations between subgraphs and the matching speed of similar gas accident emergency rescue plans.
[0055] Furthermore, the similarity expression is as follows:
[0056] ;
[0057] in, is the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vector of the subgraph in the knowledge graph, is the embedding vector of the subgraph of the gas accident to be handled, is the embedding vector of the subgraph in the knowledge graph, is the norm of the embedding vector.
[0058] This operation quantifies the similarity between the gas accidents to be handled and the subgraphs in the knowledge graph through the cosine similarity formula, providing an objective and efficient similarity measurement method, solving the problem of accurate measurement of accident similarity in existing technologies, ensuring the accuracy and reliability of the recommended solutions, and providing strong data support for the intelligent recommendation of urban gas emergency rescue plans.
[0059] The present invention provides an intelligent recommendation method for urban gas emergency rescue plans, which has the following technical effects:
[0060] The present invention is based on six stages, namely the alarm receiving stage, the alarm dispatching stage, the on-site confirmation stage, the early disposal stage, the maintenance and processing stage, and the later recovery stage. It comprehensively collects gas accident emergency disposal plans and gas accident-related standards and specifications, and constructs a case library and a rule library by extracting key factors. It solves the problems of low efficiency, scientificity and reliability in emergency plan formulation caused by data dispersion and disordered storage of historical gas accident plan information. By using random walk strategies and word vector learning, it can quickly and accurately match historical gas accident emergency disposal plans and gas accident-related standards and specifications that are most similar to the current gas accident, and generate the urban gas emergency rescue plan that is most suitable for the current gas accident. The present invention improves the accident response speed, plan formulation efficiency and scientificity of the gas accident emergency rescue plan formulation, reduces the influence of human subjective factors on the formulation of gas accident emergency rescue plans, can standardize the gas accident handling process, and reduce the losses caused by gas accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation of the embodiments of the present invention;
[0062] Figure 1 This is a flow chart of an intelligent recommendation method for a town gas emergency rescue plan in the present invention;
[0063] Figure 2 The knowledge graph of the case library of the maintenance stage in Example 3;
[0064] Figure 3 The knowledge graph of the rule base for replacing leaking pipes during the maintenance phase in Example 3;
[0065] Figure 4 Detailed information about the gas accident to be handled in Example 3;
[0066] Figure 5 The similarity calculation result in Example 3;
[0067] Figure 6 The knowledge graph of the gas accident case database with the greatest similarity in Example 3;
[0068] Figure 7 This is the knowledge graph of the gas accident rule base with the greatest similarity in Example 3. DETAILED DESCRIPTION
[0069] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features therein can be combined with each other without conflict.
[0070] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0071] Example 1
[0072] like Figure 1 As shown, the present invention provides an intelligent recommendation method for urban gas emergency rescue plans, comprising:
[0073] Obtain historical gas accident emergency response plans and gas accident-related standards and specifications for the town, extract gas accident factors from these gas accident emergency response plans and gas accident-related standards and specifications, and establish a case library and rule library based on gas accident factors;
[0074] Extracting semantic relationships between entity nodes from the case base and the rule base, and constructing triples of the case base and the rule base based on the semantic relationships between entity nodes;
[0075] Based on the triples of the case base and rule base, a knowledge graph of urban gas pipeline emergency rescue is constructed;
[0076] According to the knowledge graph of urban gas pipeline emergency rescue and the gas accidents to be handled, an emergency rescue plan for urban gas pipeline incidents is generated based on random walk strategy and word vector learning.
[0077] In response to the problem that existing technologies make it difficult to quickly formulate scientific and reasonable gas accident handling plans for sudden gas accidents, the present invention provides an intelligent recommendation method for urban gas emergency rescue plans. By obtaining historical urban gas accident emergency response plans and relevant standards and specifications, extracting key factors to construct a case library and a rule library, it can provide comprehensive and structured data support for the formulation of gas accident emergency rescue plans; extracting entity nodes and their semantic relationships from the case library and the rule library to construct triples; constructing an urban gas pipeline emergency rescue knowledge graph based on the triples to intuitively display the relationship between each entity, improve the query speed of historical gas accident emergency response plans, and enhance the ability to understand and analyze gas accidents; based on the knowledge graph and the gas accident to be handled, a random walk strategy and word vector learning are used to generate an emergency rescue plan. The present invention can solve the problems in the existing technology that it is difficult to quickly formulate scientific and reasonable plans, plans have great differences, the risk of secondary accidents cannot be judged, historical similar plans are difficult to find, and the applicability and effectiveness of the plans for the current accidents cannot be determined. By generating a case library and a rule library, and then constructing a knowledge graph, it can provide comprehensive and structured data support, and then match gas accidents through random walk strategies and word vector learning to realize intelligent gas emergency rescue plan recommendations, improve the efficiency and scientificity of emergency rescue, reduce the impact of human factors, and meet the needs of rapid response to sudden gas accidents.
[0078] In an embodiment of the present invention, the historical gas accident emergency response plans and gas accident-related standards and specifications of the town are obtained around the entire process of urban gas emergency rescue. The collection includes but is not limited to the text information of accident handling records and case studies within the enterprise, and the technical standards, operating specifications, emergency plans and other documents related to the gas emergency response process issued by the state, industry and local governments. Among them, the collection of gas accident emergency response plans and gas accident-related standards and specifications is based on the alarm reception stage, alarm dispatch stage, on-site confirmation stage, preliminary handling stage, maintenance and treatment stage and post-recovery stage, a total of 6 stages. The focus of standard collection in each stage is:
[0079] Alarm reception stage: involves standard requirements and typical practices for receiving gas accident information, preliminary analysis and response decisions, including alarm reception time, alarm reception method, gas accident location and gas accident type;
[0080] Dispatch phase: procedures and examples of emergency response involving dispatching, command, and team assembly, including the number of dispatch personnel, equipment configuration, and arrival time;
[0081] On-site confirmation stage: involves preliminary investigation of the accident site, identification of hazard sources, and technical specifications and examples of safety assessment, including the nature of the incident, casualties, property losses, affected users, leakage location, pipe material, pressure rating system, nominal diameter of steel pipe, nominal outer diameter of PE pipe, laying environment, pipeline burial depth, regional classification, whether there are intersections, intersections, and adjacencies, whether there are confined spaces within 5 meters, and whether there are any important buildings or structures nearby;
[0082] Early response stage: involves rapid response requirements and examples such as emergency valve shutoff, leak control, and personnel evacuation, including leak detection and edge detection tools, valve shutoff and release tools, warning and evacuation tools, first aid and rescue tools, and gas outage duration;
[0083] Maintenance and treatment phase: involves standard operating procedures and historical experience in facility repair, troubleshooting, and emergency operations, including failure point identification, leak point location, failure mode identification, direct cause identification, indirect cause identification, replacement operations, maintenance methods, pipe and fitting consumption, required tools, number of personnel, weld quality inspection, steel pipeline anti-corrosion, anti-corrosion layer quality inspection, and civil engineering restoration;
[0084] Late recovery stage: technical specifications and case materials related to gas supply restoration, re-inspection, safety verification, summary and feedback, including gas supply restoration time, gas outage duration during peak hours, gas outage duration during off-peak hours, gas replacement, pipeline pressure boosting, pipeline leak detection, and notification to users.
[0085] Gas accident factors are extracted from gas accident emergency response plans and relevant standards and specifications, and a case library and rule library are established based on these factors. Gas accident factors include comprehensive key information such as gas accident type, failure mode, failure cause, emergency repair methods, and precautions. Gas accident types include gas leaks, explosions, and equipment damage. Failure modes include corrosion damage, operational errors, and third-party construction damage. Failure causes include material aging, design defects, and natural disasters. Emergency repair methods include plugging, pipe disconnection, and temporary bypass. Precautions include setting safety warning ranges, preventing secondary accidents, and personal protective equipment requirements. Extracting gas accident factors based on six stages can provide a clear, comprehensive, and complete case framework for the construction of the case library and rule library. This solves the problem of incomplete and non-standard extraction of accident factors in the existing technology, which leads to a lack of key basis for emergency plan formulation. This enables the formulation of subsequent gas accident emergency rescue plans to more accurately target gas accidents of different types and causes, improving the scientific nature and effectiveness of emergency rescue plans.
[0086] In an embodiment of the present invention, the case library includes basic information on gas accidents, causes of gas accidents and emergency response processes; the rule library includes emergency process standards, safety operation specifications, equipment standards and specifications, personnel qualification specifications and gas safety specifications; by subdividing the contents of the case library and the rule library, the matching speed of subsequent gas accident cases can be improved, and the classification of cases and rules and the content can be kept clear. When formulating emergency rescue plans, historical cases and applicable rules similar to the current gas accident can be quickly located, thereby improving the efficiency and standardization of emergency response. At the same time, historical cases and rules can be retrieved and utilized more efficiently, thereby improving the scientific nature and pertinence of emergency plan formulation.
[0087] In an embodiment of the present invention, the semantic relationships between entity nodes are extracted from the case base and the rule base, and an entity-relationship-attribute structure is established in a top-down manner. The semantic relationships between entity nodes are extracted from the case base and the rule base, and based on the semantic relationships between entity nodes, triples of the case base and the rule base are constructed; wherein the triple is in the form of entity node 1, relationship, entity node 2, such as "accident type", "involved", and "gas leak".
[0088] In an embodiment of the present invention, the Py2neo tool is selected to interact with the Neo4j graph database to construct a knowledge graph for urban gas pipeline emergency rescue based on knowledge storage and fusion, specifically including:
[0089] Based on the triple structure of the case base and rule base, Py2neo is used to convert entity nodes and the semantic relationships between them into node and edge objects that can be recognized by the Neo4j graph database. The key entity nodes in the Neo4j graph database are indexed through the Py2neo interface, and the entities and relationships in the case base and rule base are expressed in the form of a knowledge graph visualization to obtain a knowledge graph for urban gas pipeline emergency rescue.
[0090] In an embodiment of the present invention, based on the urban gas pipeline emergency rescue knowledge graph and the gas accident to be handled, a town gas pipeline emergency rescue plan is generated based on a random walk strategy and word vector learning. Specifically, the plan includes:
[0091] Based on the urban gas pipeline emergency rescue knowledge graph, the random walk strategy and word vector learning are used to calculate the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph;
[0092] According to the gas accident to be handled, the embedding vector of the subgraph of the gas accident to be handled is calculated;
[0093] Calculate the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph, and obtain the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph; the similarity expression is as follows:
[0094] ;
[0095] in, is the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vector of the subgraph in the knowledge graph, is the embedding vector of the subgraph of the gas accident to be handled, is the embedding vector of the subgraph in the knowledge graph, is the norm of the embedded vector; the present invention adopts the cosine similarity formula to quantitatively compare the similarity between the gas accident to be handled and each subgraph in the knowledge graph, which solves the problem that it is difficult to accurately measure the similarity of accidents in the existing urban gas pipeline emergency rescue knowledge graph similarity comparison, and provides basic data support for the intelligent recommendation of urban gas emergency rescue plans.
[0096] From the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph, the subgraph corresponding to the largest similarity is selected as the target subgraph, and the gas accident emergency response plan corresponding to the target subgraph is used as the urban gas pipeline emergency response plan; the present invention is based on the establishment of the knowledge graph, and is processed through a random walk strategy and word vector learning to calculate the similarity of the embedding vectors of the subgraphs in the knowledge graph, and compares it with the similarity of the embedding vectors of the subgraphs of the current gas accident. The gas accident emergency response plan that is most similar to the current gas accident is found in historical gas accident cases, and the gas accident emergency response plan is completed. The past response plans are used for reference and comparison. The intelligent recommendation plan of the present invention is scientific and accurate. At the same time, the gas accident response plan is fast to formulate and respond quickly, and can quickly provide a reasonable and effective gas accident response plan, standardize the response process, and reduce the losses of gas accidents.
[0097] Example 2
[0098] The present invention provides an intelligent recommendation method for town gas emergency rescue plans. Based on the first embodiment, the method uses a random walk strategy and word vector learning based on the town gas pipeline emergency rescue knowledge graph to calculate the embedding vectors of all subgraphs in the town gas pipeline emergency rescue knowledge graph. Specifically, the method includes:
[0099] Random walk processing: According to the current entity node and the previous entity node in the urban gas pipeline emergency rescue knowledge graph, multiple rounds of random walks are performed through the random walk strategy to obtain the previous and next node sequence set of the current entity node; among them, assuming that the current entity node is , the previous entity node is , randomly walk to the next entity node , the expression of the random walk strategy is as follows:
[0100]
[0101]
[0102] in, From the current entity node Random walk to the next entity node The transition probability, is the random walk policy function, is the relationship edge weight, From the previous entity node and the next entity node The shortest path distance between To control the probability parameter of backtracking walk, To control the probability parameter of exploration walk; Since the urban gas pipeline emergency rescue knowledge graph is not a pure topological graph, it has both local process and cross-process connections, so the probability parameter of backtracking walk can be controlled Take 1 to maintain natural wandering, do not increase the probability of backtracking, and prevent falling into a small range cycle; control the probability parameter of exploration wandering Take 0.5 to enhance exploration and capture entity connections across processes;
[0103] The random walk strategy is used to perform multiple rounds of random walks on the current entity node in the urban gas pipeline emergency rescue knowledge graph to obtain the current entity node The expression of the set of before and after node sequences is as follows:
[0104]
[0105] in, For the current entity node The set of before and after node sequences, is the current entity node, are the previous and next entity nodes of the current entity node obtained by the random walk strategy, For the current entity node The previous entity node, For the current entity node The post-entity node, is the number of previous and next entity nodes obtained by the random walk strategy function;
[0106] Word vector learning process: Based on the set of node sequences before and after the current entity node, the word embedding model is trained to obtain the embedding vector representation of the current entity node, specifically including:
[0107] According to the current entity node, the probability of occurrence of the entity nodes before and after the current entity node is maximized, and the embedding vector representation of the current entity node is learned. By maximizing the objective function of the probability of occurrence of the previous and next nodes, the word embedding model training process is optimized so that the embedding vector representation of the obtained entity node can better capture the context information and improve the accuracy and richness of the semantic expression of the embedding vector representation. The expression for maximizing the probability of occurrence of the entity nodes before and after the current entity node is as follows:
[0108]
[0109] in, To maximize, is the current entity node, is the set of entity nodes in the knowledge graph, is a logarithmic function, For the current entity node The probability of occurrence of the entity nodes before and after , is the probability, For the current entity node The set of entity node sequences before and after , For the current entity node Embedded vector representation of .
[0110] At the same time, maximizing the probability of occurrence of the entity nodes before and after the current entity node follows the conditional independence assumption and the feature space symmetry assumption. The conditional independence assumption can emphasize the independence between entity nodes and the consistency of feature representation, simplifying the computational complexity. The feature space symmetry assumption ensures that the feature representation of entity nodes is consistent in different contexts, improving semantic coherence.
[0111] The conditional independence assumption is that the probability of occurrence of the entity nodes before and after the current entity node is independent of the other entity nodes. The expression is as follows:
[0112]
[0113] in, For the current entity node The probability of occurrence of the entity nodes before and after , is the product symbol, For the current entity node Neighbor nodes of For the current entity node The probability of occurrence of neighbor entity nodes;
[0114] The feature space symmetry assumption is that when an entity node is the current node or the neighboring node to be jumped to, it is represented by the same embedding vector, as shown in the following expression:
[0115]
[0116] in, is an exponential function, is the embedding vector representation of the entity node in the knowledge graph, For the summation symbol, is the embedding vector representation of the neighbor node to be jumped.
[0117] Obtain the embedding vector of a single subgraph: Perform the random walk and word vector learning processes described above on all entity nodes of a single subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector representations of all entity nodes. Then, average the embedding vector representations of all entity nodes to obtain the embedding vector of a single subgraph. The expression of the subgraph embedding vector is as follows:
[0118]
[0119] in, is the embedding vector of the subgraph, For the summation symbol, is the entity node set of the subgraph, Entity nodes of the subgraph The embedding vector representation of is the absolute value symbol; the present invention takes the average value of the embedding vectors of all entity nodes in the subgraph to construct the embedding vector of the subgraph, which can characterize the comprehensive characteristics of the subgraph from a low dimension, improve the efficiency and accuracy of subsequent similarity calculations between subgraphs, and improve the matching speed of similar gas accident emergency rescue plans.
[0120] Obtain the embedding vector of each subgraph: Obtain the embedding vector of the above-mentioned single subgraph for each subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector of each subgraph in the urban gas pipeline emergency rescue knowledge graph.
[0121] Example 3
[0122] The present invention provides an intelligent recommendation method for urban gas emergency rescue plans. Based on Examples 1 and 2, the method comprehensively collects gas accident emergency response plans and gas accident-related standards and specifications based on six stages: alarm reception stage, alarm dispatch stage, on-site confirmation stage, preliminary disposal stage, maintenance and processing stage, and post-recovery stage. Key elements such as accident type, failure mode, failure cause, emergency repair method, and precautions are extracted. Taking a certain case, assuming it is Case A, the gas accident emergency response plan and gas accident-related standards and specifications for Case A are obtained, as shown in Table 1.
[0123] Table 1
[0124]
[0125]
[0126]
[0127]
[0128] According to Table 1, the partial triples of the case base and rule base of Case A are constructed. Table 2 shows the partial triples of the case base of Case A, and Table 3 shows the partial triples of the rule base of Case A.
[0129] Table 2
[0130]
[0131] Table 3
[0132]
[0133] According to the triples of the case library and the rule library, the Py2neo tool is selected to interact with the Neo4j graph database, and a knowledge graph of urban gas pipeline emergency rescue is constructed based on knowledge storage and fusion, such as Figure 2 As shown, this is the knowledge graph of the case library in the maintenance phase. The maintenance phase includes failure point confirmation and maintenance operations. The leakage point positioning method for failure point confirmation is gas leak detector detection and soapy water. The indirect cause of failure point confirmation is heavy vehicle running over. The direct cause of failure point confirmation is weld cracking. The failure mode of failure point confirmation is leakage from the three-way interface. The number of personnel for the maintenance operation is 2. The pipes and fittings consumed in the maintenance operation are 2 boxes of anti-corrosion tape. The maintenance method of the maintenance operation is to replace the leaking pipe fittings. Whether the maintenance operation is to be replaced is yes. The tool configuration of the maintenance operation is tools. The inspection of the maintenance operation is weld quality inspection. The civil engineering restoration of the maintenance operation is yes.
[0134] like Figure 3As shown in the figure, it is a knowledge graph of the rule base for replacing leaking pipes during the maintenance phase. The operation process includes: step 1: stop the gas and release it, step 2: excavate the operation pit, step 3: replace it before welding, step 4: hot metal welding, step 5: welding quality inspection, step 6: ventilation replacement, step 7: restore gas supply, step 8: leak detection, and step 9: terrain restoration.
[0135] In this embodiment, the specific information of the gas accident to be handled is as follows: Figure 4 , including the event type is leakage, the event nature is corrosion and gas leakage, the casualty overview is none, the pipe material is steel pipe, the nominal diameter is DN25, the laying environment is crossing, the pipeline burial depth is 0.7, the pressure level system is low pressure, the surrounding area level is level four, whether the surrounding environment has intersections, encounters, and adjacencies is yes, whether there are confined spaces within 5m of the surrounding environment is yes, whether there are important buildings or structures in the surrounding environment is no, the failure mode is corrosion and perforation, the direct cause is external corrosion of the pipeline, and the indirect cause is old pipeline. Calculate the similarity between the gas accident to be handled and the cases in the case library and the rules in the rule library, and get the following: Figure 5 The similarity calculation results shown in the figure are as follows. In descending order of similarity, the top five similarities are approximately 0.83, 0.75, 0.70, 0.62, and 0.60, respectively. The gas accident with the greatest similarity is selected, and the nature of the event is rust leakage. The knowledge graph of the gas accident case library with the greatest similarity is obtained, as shown in the figure below. Figure 6 As shown in the figure, the knowledge graph of the gas accident rule base with the greatest similarity is obtained, as shown in Figure 7 As shown; based on the case base knowledge graph and rule base knowledge graph of the gas accident with the greatest similarity, an emergency rescue plan for urban gas pipeline emergencies of the gas accident to be handled is generated.
[0136] Based on the alarm reception stage, alarm dispatch stage, on-site confirmation stage, pre-processing stage, maintenance stage and post-recovery stage, the present invention comprehensively collects urban gas accident emergency response plans and related standards and specifications, including key elements such as accident type, failure mode, failure cause, emergency repair method and precautions, to form a case library and rule library to ensure coverage of the entire process and various situations of gas accident emergency response. A top-down approach is used to establish an entity-relationship-attribute structure, extract entity nodes and their relationships, and construct a triple of a gas pipeline emergency response case library and a rule library to structure the gas accident emergency response knowledge. Based on the case library and rule library triples, the Py2neo tool is used to interact with the Neo4j graph database to construct an urban gas pipeline emergency rescue knowledge graph based on knowledge storage and fusion, realizing the storage and visualization of gas accident response knowledge. Through a random walk strategy and word vector learning, the present invention intelligently generates urban gas pipeline emergency rescue plans, realizes accurate and efficient urban gas emergency rescue plan recommendations, and simultaneously has a high response speed to gas accidents, standardizes the gas accident response process, improves scientificity and reliability, and reduces the losses caused by gas accidents.
[0137] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0138] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for intelligently recommending urban gas emergency rescue plans, characterized in that: include: Obtain historical gas accident emergency response plans and gas accident-related standards and specifications for the town, extract gas accident factors from these gas accident emergency response plans and gas accident-related standards and specifications, and establish a case library and rule library based on gas accident factors; Extracting semantic relationships between entity nodes from the case base and the rule base, and constructing triples of the case base and the rule base based on the semantic relationships between entity nodes; Based on the triples of the case base and rule base, a knowledge graph of urban gas pipeline emergency rescue is constructed; According to the knowledge graph of urban gas pipeline emergency rescue and the gas accidents to be handled, an emergency rescue plan for urban gas pipeline incidents is generated based on random walk strategy and word vector learning.
2. The intelligent recommendation method for urban gas emergency rescue plan according to claim 1 is characterized in that: The acquisition of historical gas accident emergency response plans and gas accident-related standards and specifications for the town specifically includes: Obtain historical gas accident emergency response plans and gas accident-related standards and specifications in towns and cities based on the alarm receiving stage, alarm dispatch stage, on-site confirmation stage, preliminary handling stage, maintenance and processing stage, and later recovery stage.
3. The intelligent recommendation method for urban gas emergency rescue plan according to claim 1, characterized in that: The case library includes basic information on gas accidents, causes of gas accidents and emergency response processes; The rule base includes emergency process standards, safety operation specifications, equipment standards, personnel qualification specifications and gas safety specifications.
4. The intelligent recommendation method for urban gas emergency rescue plan according to claim 1, characterized in that: The method generates an emergency rescue plan for urban gas pipeline incidents based on the knowledge graph of urban gas pipeline emergency rescue and the gas accidents to be handled, based on the random walk strategy and word vector learning, specifically including: Based on the urban gas pipeline emergency rescue knowledge graph, the random walk strategy and word vector learning are used to calculate the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph; According to the gas accident to be handled, the embedding vector of the subgraph of the gas accident to be handled is calculated; Calculate the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vectors of all subgraphs in the urban gas pipeline emergency rescue knowledge graph, and obtain the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph; From the similarity of each subgraph in the urban gas pipeline emergency rescue knowledge graph, the subgraph corresponding to the largest similarity is selected as the target subgraph, and the gas accident emergency response plan corresponding to the target subgraph is used as the urban gas pipeline emergency rescue plan.
5. The intelligent recommendation method for urban gas emergency rescue plan according to claim 4 is characterized in that: According to the town gas pipeline emergency rescue knowledge graph, the random walk strategy and word vector learning are used to calculate the embedding vectors of all subgraphs in the town gas pipeline emergency rescue knowledge graph, specifically including: Random walk processing: Based on the current entity node and the previous entity node in the urban gas pipeline emergency rescue knowledge graph, multiple rounds of random walks are performed using a random walk strategy to obtain the previous and next node sequence set of the current entity node; Word vector learning process: Based on the set of previous and next node sequences of the current entity node, the word embedding model is trained to obtain the embedding vector representation of the current entity node; Obtaining the embedding vector of a single subgraph: Perform the aforementioned random walk and word vector learning processes on all entity nodes of a single subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector representation of all entity nodes. Average the embedding vector representations of all entity nodes to obtain the embedding vector of the single subgraph. Obtain the embedding vector of each subgraph: Obtain the embedding vector of the above-mentioned single subgraph for each subgraph in the urban gas pipeline emergency rescue knowledge graph to obtain the embedding vector of each subgraph in the urban gas pipeline emergency rescue knowledge graph.
6. The intelligent recommendation method for urban gas emergency rescue plan according to claim 5, characterized in that: The expression of the previous and next node sequence set of the current entity node is as follows: in, For the current entity node The set of before and after node sequences, is the current entity node, are the previous and next entity nodes of the current entity node obtained by the random walk strategy, For the current entity node The previous entity node of For the current entity node The post-entity node, is the number of previous and next entity nodes obtained by the random walk strategy function; The expression of the random walk strategy is as follows: in, From the current entity node Random walk to the next entity node The transition probability, is the random walk policy function, is the relationship edge weight, From the previous entity node and the next entity node The shortest path distance between To control the probability parameter of backtracking walk, is the probability parameter that controls the exploration walk.
7. The intelligent recommendation method for town gas emergency rescue plan according to claim 5, characterized in that: The word embedding model is trained based on the set of previous and next node sequences of the current entity node to obtain the embedding vector representation of the current entity node, specifically including: According to the current entity node, maximize the probability of occurrence of the entity nodes before and after the current entity node, and learn the embedded vector representation of the current entity node; The expression for maximizing the occurrence probability of the entity nodes before and after the current entity node is as follows: in, To maximize, is the current entity node, is the set of entity nodes in the knowledge graph, is a logarithmic function, For the current entity node The probability of occurrence of the entity nodes before and after , is the probability, For the current entity node The set of entity node sequences before and after , For the current entity node Embedded vector representation of .
8. The intelligent recommendation method for town gas emergency rescue plan according to claim 7, characterized in that: The maximization of the occurrence probability of the entity nodes before and after the current entity node follows the conditional independence assumption and the feature space symmetry assumption; The conditional independence assumption is that the probability of occurrence of the entity nodes before and after the current entity node is independent of the other entity nodes, and the expression is as follows: in, For the current entity node The probability of occurrence of the entity nodes before and after , is the product symbol, For the current entity node Neighbor nodes of For the current entity node The probability of occurrence of neighbor entity nodes; The feature space symmetry assumption is that when a certain entity node is the current node or the neighboring node to be jumped to, it is represented by the same embedding vector, and the expression is as follows: in, is an exponential function, is the embedding vector representation of the entity node in the knowledge graph, For the summation symbol, is the embedding vector representation of the neighbor node to be jumped.
9. The intelligent recommendation method for urban gas emergency rescue plan according to claim 5, characterized in that: The expression of the embedding vector of the subgraph is as follows: in, is the embedding vector of the subgraph, For the summation symbol, is the entity node set of the subgraph, Entity nodes of the subgraph The embedding vector representation of is the absolute value symbol.
10. The intelligent recommendation method for town gas emergency rescue plan according to claim 5, characterized in that: The expression of the similarity is as follows: ; in, is the similarity between the embedding vector of the subgraph of the gas accident to be handled and the embedding vector of the subgraph in the knowledge graph, is the embedding vector of the subgraph of the gas accident to be handled, is the embedding vector of the subgraph in the knowledge graph, is the norm of the embedding vector.
Citation Information
Patent Citations
Semantic search method and device based on case event knowledge graph and electronic equipment
CN112632225A
Broadcasting and TV program recommendation method based on knowledge graph and user microcosmic behaviors
CN112732936A
Emergency plan generation method and system based on neural network, equipment and medium
CN114004210A
Fault root cause analysis method and device, electronic equipment and storage medium
CN114430365A
Dangerous chemical accident knowledge base construction method based on knowledge graph
CN115953117A