Causal network simulation and causal event deduction method for urban gas pipeline explosion

By combining the heterogeneous graph neural network model and the multi-agent collaborative model, the generation of the cause network is optimized, and the problems of insufficient universality and practicality in the existing technology are solved, and more efficient cause network generation and application are achieved.

CN114139447BActive Publication Date: 2025-05-06BEIJING SOFTONG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111420833.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-05-06
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

The prior art is poor in versatility and practicality when generating a cause network for urban gas pipeline explosions, and has high requirements for expert experience and data statistics.

Method used

The heterogeneous graph neural network model is used to combine it with the multi-agent collaborative model to generate a causal network by optimizing the heterogeneous graph neural network model, which is used to deduce the possible causal events of gas pipeline explosion.

Benefits of technology

It improves the universality and practicality of the cause network, and can make full use of relevant data on gas pipeline explosion historical events to generate the cause network online, reducing the dependence on expert experience and data statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139447B_ABST
    Figure CN114139447B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method for causal network simulation and causal event deduction of urban gas pipeline explosion. The method comprises: inputting a heterogeneous graph neural network model into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to target nodes of historical events of gas pipeline explosion, gas leakage simulation data, and set edge weights; optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical events of gas pipeline explosion. The method is based on a heterogeneous graph neural network model and is optimized based on a multi-agent collaborative model. It can make full use of relevant data of historical events of gas pipeline explosion to generate a causal network online, thereby improving the versatility and practicality of the causal network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of gas pipeline explosion analysis, and in particular to a causal network simulation and causal event deduction method for urban gas pipeline explosion. Background Art

[0002] With the increasing number of gas pipeline accident cases, the research on causal networks related to gas pipelines is also increasing. At present, the research on causal networks is mainly concentrated in two aspects: on the one hand, qualitative research, that is, based on statistical data and expert experience methods, statistical identification of causal events, and then expert weighting analysis of the relationship between causal events, and then generating corresponding causal networks based on the relationship between causal events; however, this method is highly subjective and requires high expert experience, and is not completely universal. On the other hand, qualitative and quantitative analysis are combined, based on actual explosion accidents and other relevant statistical data, certain causal events are identified based on expert experience and data statistics, and then the relationship between causal events is obtained based on quantitative analysis methods such as entropy weight method to generate causal networks; however, these two aspects have high requirements for expert experience, data statistics and related algorithms, and the universality and practicality of the generated causal networks are poor.

[0003] Therefore, how to generate a causal network with strong versatility and high practicality is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiment of the present invention provides a causal network simulation and causal event deduction method for city gas pipeline explosion, so as to improve the versatility and practicality of the causal network.

[0005] In a first aspect, an embodiment of the present invention provides a causal network simulation method, comprising:

[0006] Inputting the heterogeneous graph neural network model into the multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target node of the gas pipeline explosion historical event, the gas leakage simulation data and the set edge weight;

[0007] The heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

[0008] In a second aspect, an embodiment of the present invention further provides a method for deducing a causal event, comprising:

[0009] Acquire a causal network, wherein the causal network is generated according to the causal network generation method described in any one of the embodiments;

[0010] Generate an actual causal network based on the actual leakage data and leakage-related data of the actual gas pipeline explosion incident;

[0011] Possible causal events of the actual gas pipeline explosion event are extracted based on the causal network and the actual causal network.

[0012] In a third aspect, an embodiment of the present invention further provides a causal network simulation device, comprising:

[0013] An input module, used to input a heterogeneous graph neural network model into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to target nodes of historical gas pipeline explosion events, gas leakage simulation data, and set edge weights;

[0014] The first generation module is used to optimize the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

[0015] In a fourth aspect, an embodiment of the present invention further provides a causal event deduction device, comprising:

[0016] an acquisition module, used for acquiring a causal network, wherein the causal network is generated according to the causal network generation method described in any one of the embodiments;

[0017] The second generation module is used to generate an actual cause network based on actual leakage data and leakage-related data of an actual gas pipeline explosion event;

[0018] An extraction module is used to extract possible causal events of the actual gas pipeline explosion event based on the causal network and the actual causal network.

[0019] In a fifth aspect, an embodiment of the present invention further provides an electronic device, including:

[0020] one or more processors;

[0021] A storage device for storing one or more programs;

[0022] The one or more programs are executed by the one or more processors, so that the one or more processors implement the causal network simulation method provided by an embodiment of the present invention or the causal event deduction method provided by an embodiment of the present invention.

[0023] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the causal network simulation method provided by an embodiment of the present invention or the causal event deduction method provided by an embodiment of the present invention.

[0024] The embodiment of the present invention provides a method for simulating a causal network and deducing causal events of a city gas pipeline explosion, wherein a heterogeneous graph neural network model is input into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to target nodes of a historical event of a gas pipeline explosion, gas leakage simulation data, and set edge weights; the heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate a causal network, which is used to deduce possible causal events of the historical event of the gas pipeline explosion. The method is based on a heterogeneous graph neural network model and is optimized based on a multi-agent collaborative model, and can fully utilize the relevant data of the historical event of the gas pipeline explosion to generate a causal network online, thereby improving the versatility and practicality of the causal network. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of a flow chart of a causal network simulation method provided in Embodiment 1 of the present invention;

[0026] Figure 2 A schematic diagram of implementing a causal network generation method provided in the first embodiment of the present invention;

[0027] Figure 3 A schematic diagram of a causal network provided in Embodiment 1 of the present invention;

[0028] Figure 4 A schematic diagram of a process flow of a causal event deduction method provided in Embodiment 2 of the present invention;

[0029] Figure 5 A schematic diagram of the structure of a causal network simulation device provided in Embodiment 3 of the present invention;

[0030] Figure 6 A schematic diagram of the structure of a causal event deduction device provided in Embodiment 4 of the present invention;

[0031] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0033] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0034] The term “including” and its variations used in the present invention are open inclusions, that is, “including but not limited to.” The term “based on” means “based at least in part on.” The term “one embodiment” means “at least one embodiment.”

[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish the corresponding contents, and are not used to limit the order or interdependence.

[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0037] In order to better understand the embodiments of the present invention, relevant terms are introduced below.

[0038] Causing event: refers to an event that leads to a gas pipeline accident (such as gas pipeline leakage, gas pipeline explosion, etc.).

[0039] Causal network: refers to abstracting the gas pipeline of the gas pipeline explosion incident and the corresponding causal events into nodes, and connecting the nodes into a complex network according to the relationship between the causal events. This complex network is the causal network, which can characterize the connection relationship between the gas pipeline where the gas pipeline explosion occurs and the corresponding causal events.

[0040] In this embodiment, based on the data statistics of events that lead to gas pipeline accidents (ie, causal events), the causal events may include 31 types. The 31 causal events can be divided into three types. Specifically, the first type is the bottom-layer causal events, which may include pipeline cracking, pipeline perforation and pipeline penetration, and these three causal events are numbered from V1 to V3; the second type is the middle-layer causal events, which may include pipeline corrosion, failure of the inner protective layer, transportation of corrosive media, soil corrosiveness, damage to the outer protective layer, failure of electrical protection and pipeline stress, and these seven causal events are numbered from V4 to V10; the third type is the outermost causal events, which may include malicious destruction, illegal occupation, barbaric construction, geological disasters, meteorological disasters, shallow burial depth, unclear markings, long patrol intervals, careless patrol, pipe defects, construction defects, improper design, improper operation, improper maintenance, improper construction, equipment failure, poor daily patrol and maintenance management, incomplete operating specifications, incomplete training system, insufficient skills and quality of staff and insufficient publicity and education for residents, and these 21 causal events are numbered from V11 to V31.

[0041] With the increasing number of gas pipeline accident cases and the continuous maturity of causal network research, the research on causal networks related to gas pipelines is also increasing at home and abroad. At present, firstly, the current causal networks are usually analyzed qualitatively or quantitatively with statistical data, that is, they cannot make full use of known gas pipeline related data, and they lack persuasiveness to a certain extent; secondly, the generated causal network model has poor universality, and is usually modeled and generated based on a certain region, and its application data often contains a large amount of empirical data; thirdly, the application direction of the causal network is unclear. When the causal network is generated, it is generally analyzed or applied in a certain direction, and there is no universal analysis. The embodiment of the present invention proposes a causal network simulation method and a causal event deduction method based on the causal network, which can realize the online optimization and application of the causal network according to the actual gas pipeline explosion related data, and realize the universality of the causal network.

[0042] Embodiment 1

[0043] Figure 1 A flow chart of a causal network simulation method provided in Embodiment 1 of the present invention is provided. The method can be applied to the case where a corresponding causal network is generated based on relevant data of historical gas pipeline explosion events. The method can be executed by a causal network generation device, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: desktop computers, laptop computers, servers and other devices.

[0044] like Figure 1 As shown, a causal network simulation method provided by Embodiment 1 of the present invention includes the following steps:

[0045] S110. Inputting the heterogeneous graph neural network model into the multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target nodes of the historical events of gas pipeline explosion, the gas leakage simulation data and the set edge weights.

[0046] In this embodiment, the heterogeneous graph neural network model may refer to a graph neural network model with heterogeneous graph structure learning; wherein the heterogeneous graph may be understood as a graph structure composed of multiple different types of nodes and edges.

[0047] The historical events of gas pipeline explosions may refer to gas pipeline explosions that occurred within a certain period of time in the past. The target node may refer to the network node required to construct a heterogeneous graph neural network model; for example, the target node may include a gas pipeline node and a causal event node. Exemplarily, the connection points between the various gas pipelines in a certain area or a certain city are abstracted as nodes, and the gas pipelines between the connection points of every two gas pipelines are abstracted as edges. On this basis, the geometric network structure composed of the obtained nodes and edges can be understood as a gas pipeline topology structure; each node in the gas pipeline topology structure can be understood as each gas pipeline node. In other words, the gas pipeline topology structure can be used to characterize the connection structure between each gas pipeline.

[0048] The gas leakage simulation data may refer to the data obtained by simulating the gas leakage amount of the gas pipeline according to the gas pipeline related data. The gas leakage simulation data may be used as the network edge attribute required to construct a heterogeneous graph neural network (the edge attribute may refer to the edge data between two nodes). For example, the edge attribute between every two gas pipeline nodes may be the gas leakage simulation data between every two gas pipeline nodes; the edge attribute between the gas pipeline node and the causal event node may be the gas leakage simulation data of the gas pipeline connected to the causal event node.

[0049] The set edge weight may refer to the pre-set network edge weight required for constructing a heterogeneous graph neural network; each edge corresponds to a set edge weight, for example, the set edge weight of the edge between a gas pipeline node and a gas pipeline node may be the normalized length of the gas pipeline between the two gas pipeline nodes; the set edge weight of the edge between the gas pipeline node and the causal event node may be 1; the set edge weight of the edge between the causal event nodes may be a set network weight.

[0050] When constructing a heterogeneous graph neural network model, the target node of the gas pipeline explosion historical event is used as the network node, the connection line between every two network nodes is used as the edge, and the gas leakage simulation data is used as the edge attribute. On this basis, the edge weight is set to construct the corresponding heterogeneous graph neural network model.

[0051] It should be noted that the gas pipeline node and the causal event node may also include corresponding node attributes, and the node attributes may also be used as a network setting parameter for constructing a heterogeneous graph neural network model. Specifically, the node attributes of each gas pipeline node may include: the number of the gas pipeline connected to the node, the material of the gas pipeline connected to the node, the caliber of the gas pipeline connected to the node, the length of the gas pipeline connected to the node, the gas flow rate of the gas pipeline connected to the node (including time and flow rate), the buried form of the gas pipeline connected to the node, and the internal pressure of the gas pipeline connected to the node. There can usually be multiple connecting edges of a gas pipeline node, that is, each gas pipeline node may be connected to multiple gas pipelines.

[0052] The node attribute of each causal event node may be the severity of the impact of the causal event on the gas pipeline accident, and the severity of each causal event may be flexibly set according to actual conditions.

[0053] Optionally, before the heterogeneous graph neural network model is input into the multi-agent collaborative model, it also includes: constructing the heterogeneous graph neural network model in the following manner: taking the gas pipeline node and the causal event node as the target node; performing computational fluid dynamics (CFD) simulation on each gas pipeline based on the gas pipeline topology data and the gas flow data, and using the obtained gas leakage simulation data as the edge attribute; constructing the heterogeneous graph neural network model based on the target node, edge attributes and set edge weights.

[0054] Among them, the gas pipeline topology data may refer to the structural data of the connection relationship between each gas pipeline. The gas flow data may refer to the gas transmission flow in each gas pipeline. The gas pipeline can be used to be responsible for gas transmission. Different gas pipelines are responsible for different specific tasks, and the geographical locations, calibers, pipeline materials and internal pressures of the pipelines they pass through are also different. The gas transmission volume of different gas pipelines at different times (i.e., gas flow data) can be statistically analyzed by methods such as gas meter copying. In this embodiment, according to the gas pipeline topology data and the gas flow data, the appropriate position of the gas pipeline in the gas pipeline topology data can be selected (since the actual gas pipeline is too large, some appropriate positions in the gas pipeline can be selected for gas leakage simulation), and the appropriate pipeline perforation and pipeline cracking parameters are set according to the actual situation, and CFD simulation is performed. The obtained CFD simulation data is the gas leakage simulation data.

[0055] The gas pipeline node and the causal event node are taken as the target nodes, the gas leakage simulation data are taken as the edge attributes, and the heterogeneous graph neural network model is constructed according to the target nodes (which may include the node attributes of the target nodes), the edge attributes and the set edge weights.

[0056] Optionally, a set number of gas pipeline nodes are connected to corresponding causal event nodes.

[0057] Among them, in the constructed heterogeneous graph neural network model, not every gas pipeline node is connected to a corresponding causal event node. According to the statistical data of historical gas pipeline explosion events in the past period of time, a set number of gas pipeline nodes are connected to one or more corresponding causal event nodes. The set number can be flexibly set according to actual needs, and there is no limitation on this here.

[0058] The multi-agent collaborative model can refer to abstracting certain information into agents (one information corresponds to one agent), and each agent coordinates with each other by adjusting its own behavior to achieve a common goal.

[0059] S120. Optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, wherein the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

[0060] In this embodiment, optimization may refer to collaboratively computing the connection relationship between the gas pipeline nodes and the causal event nodes in the heterogeneous graph neural network model based on the multi-agent collaborative model to obtain a network structure with the optimal connection relationship, i.e., the causal network. Specifically, the constructed heterogeneous graph neural network model is input into the multi-agent collaborative model, and based on the multi-agent collaborative model, each gas pipeline node and causal event node in the heterogeneous graph network model is abstracted as a corresponding agent, and collaborative computing between each agent is performed by setting an algorithm to obtain a network structure with the optimal connection relationship between the gas pipeline node and the corresponding causal event node, i.e., the causal network. It should be noted that in the actual optimization process, in order to reduce the amount of calculation of the multi-agent collaborative model, some gas pipeline nodes and some causal event nodes that are not related to the generation of the causal network can be set according to actual needs and can not participate in the collaborative computing.

[0061] Simulation can be considered to refer to the use of models to reproduce the essential processes that occur in actual systems, and to study existing or designed systems through experiments on system models, also known as simulation. Therefore, it can be understood that the process of optimizing heterogeneous graph neural network models based on multi-agent collaborative models to generate causal networks can be understood as a process of simulating causal networks.

[0062] Optionally, a heterogeneous graph neural network model is optimized based on a multi-agent collaborative model to generate a causal network, including: abstracting each target node in the heterogeneous graph neural network model into an agent to obtain a corresponding multi-agent collaborative model; obtaining a Q function network corresponding to each agent in the multi-agent collaborative model by setting an algorithm; and generating a causal network based on the Q function network.

[0063] Among them, in the process of optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate the causal network, each target node in the heterogeneous graph neural network model is firstly abstracted as an agent to obtain the corresponding multi-agent collaborative model. Then, the Q function network corresponding to each agent in the multi-agent collaborative model is obtained by setting an algorithm. For example, classical reinforcement learning (such as DQN network) can be used to obtain the Q function network corresponding to each agent in the multi-agent collaborative model through the gradient descent algorithm; the Q function network can be understood as the optimal connection relationship network between a certain agent and multiple other agents connected to it. Finally, the corresponding causal network is generated based on the Q function network. Each causal network can include a gas pipeline node and multiple corresponding causal event nodes.

[0064] In this embodiment, the causal network can be used to deduce possible causal events of historical gas pipeline explosion events. Among them, the possible causal event can be understood as the causal event with the highest probability of causing an accident at the gas pipeline node among multiple causal events in each causal network.

[0065] A causal network simulation method provided in Embodiment 1 of the present invention inputs a heterogeneous graph neural network model into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target nodes of the historical event of the gas pipeline explosion, the simulation data of the gas leakage, and the set edge weights; the heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce the possible causal events of the historical event of the gas pipeline explosion. This method is based on the heterogeneous graph neural network model and is optimized based on the multi-agent collaborative model. It can make full use of the relevant data of the historical event of the gas pipeline explosion to generate a causal network online, thereby improving the versatility and practicality of the causal network.

[0066] In one embodiment, a total of 31 causal events (i.e., V1 to V31 mentioned above) can be set. It should be noted that both the middle-layer causal events and the outermost causal events can directly or indirectly affect the bottom-layer causal events, that is, cause the bottom-layer causal events to occur and cause gas pipeline accidents; wherein, the middle-layer causal events and the outermost causal events will also affect each other, which is not limited here. In the initial stage of heterogeneous graph neural network model construction, the impact of some causal events in the outermost causal events and the middle-layer causal events on the bottom-layer causal events can be analyzed, and CFD simulation gas leakage data can be designed based on the gas pipeline topology data and gas flow data. On this basis, the causal network generation method in the above embodiment is used to learn the causal network of some causal events. The remaining causal events in the outermost causal events and the middle-layer causal events can be consulted by experts or actual gas pipeline accident data to conduct online learning of the causal network and update and improve the causal network.

[0067] When using a multi-agent collaborative model based on reinforcement learning to optimize the heterogeneous graph neural network model and generate a causal network, the generation problem of the causal network can be abstracted as the Traveling Salesman Problem (TSP). The TSP problem can be understood as a directed graph Ts = (S, E), where S represents the set of all causal event nodes, E represents the set of edges between causal event nodes, and edge e ij ∈E(i,j∈L,i≠j) corresponds to the cost d associated with it ij , where L can represent the set of all causal event nodes.

[0068] The decision variables of the TSP problem can be expressed as:

[0069]

[0070] The optimization objective function of the TSP problem (which can be understood as a Q function network) can be expressed as:

[0071]

[0072] where x ij It can represent the connection relationship between two causal event nodes, q ijIt can represent the gas leakage simulation data after each CFD gas leakage simulation operation. The optimization of the heterogeneous graph neural network model based on the multi-agent collaborative model to generate the causal network can be formally defined as a random game g = (N, A, C, R, P, γ), where N can represent the set of all agents, A can represent the joint action space of all agents, C can represent the state space, R can represent the reward function, P can represent the state transfer function, and γ can represent the discount factor. The causal network can be obtained according to the final result of the random game.

[0073] Figure 2 This is a schematic diagram of implementing a generation causal network provided in the first embodiment of the present invention. Figure 2 As shown in the figure, first, the gas pipeline nodes are extracted according to the gas pipeline topological structure data. The multilayer perceptron (MLP) deep neural network can be used to perform heterogeneous network representation learning on the gas pipeline nodes and the causal event nodes, unifying them into a dimensional space. Then, the heterogeneous network influence learning is performed on the gas pipeline nodes and the causal event nodes. For example, the attention mechanism can be introduced to learn to communicate on the representation of the believed nodes, and the neural network activation function (such as the softmax function) is used to process the edge between each two nodes to obtain the mapping relationship between each two nodes. On this basis, the heterogeneous graph neural network model is constructed according to the gas pipeline nodes, the causal event nodes, the attributes of each node, the edge attributes (i.e., the gas leakage simulation data) and the set edge weights. Among them, the causal event nodes are extracted according to the causal events. When the causal event nodes are added in the process of constructing the heterogeneous graph neural network model, the causal event nodes are connected to the upper nodes of the corresponding gas pipeline (for example, if the gas in a gas pipeline flows from left to right, the node on the left of the gas pipeline is the upper node). Finally, the heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate the causal network.

[0074] Figure 3 FIG. 1 is a schematic diagram of a causal network provided in Embodiment 1 of the present invention. Figure 3 As shown, according to Figure 2 In a causal network generated by the process shown, T7 can represent the gas pipeline to which the gas leakage accident belongs; T5, T6 and T8 represent pipeline cracking, pipeline perforation and pipeline penetration respectively, T1 and T2 represent pipeline corrosion and soil corrosivity respectively, and T3 and T4 represent failure of the inner protective layer and damage to the outer protective layer respectively.

[0075] Embodiment 2

[0076] Figure 4A flow chart of a causal event deduction method provided in the second embodiment of the present invention, the method can be applied to the situation of deducing possible causal events of the actual event of the gas pipeline explosion based on the causal network generated above and the current actual causal network, the method can be executed by a causal event deduction device, wherein the device can be implemented by software and / or hardware, and is generally integrated on an electronic device, in this embodiment, the electronic device includes but is not limited to: desktop computers, laptops and servers and other devices. It should be noted that the technical details not described in detail in this embodiment can be referred to any of the above embodiments.

[0077] like Figure 4 As shown, a method for deducing causal events provided by Embodiment 2 of the present invention includes the following steps:

[0078] S210, obtaining a causal network.

[0079] The causal network may be generated according to any one of the causal network generation methods described in Embodiment 1. The causal network may be generated according to relevant data of historical gas pipeline explosion events.

[0080] S220. Generate an actual cause network based on actual leakage data and leakage-related data of the actual gas pipeline explosion event.

[0081] In this embodiment, the actual gas pipeline explosion event may refer to the actual gas pipeline explosion event that occurred within the current period of time. The actual leakage data may be understood as the amount of gas actually leaked in the actual gas pipeline explosion event. The leakage-related data may be understood as data related to the gas pipeline and its surrounding environment where the gas leaked in the actual gas pipeline explosion event, for example, data such as the specific location of the gas pipeline where the gas leaked, the soil corrosiveness of the surrounding environment, etc. The corresponding causal event in the actual gas pipeline explosion event may be extracted based on the leakage-related data, which may be used as the causal event node data.

[0082] It is understandable that after extracting the actual leakage data and leakage-related data of the actual gas pipeline explosion event, it is not necessary to use the gas leakage simulation data completely. For example, the actual leakage data can be used to replace the corresponding part of the gas leakage simulation data as the network edge attribute required to construct the heterogeneous graph neural network, and the causal event node data extracted according to the leakage-related data can be used as the causal event node connected to the gas pipeline node corresponding to the actual gas pipeline explosion event. On this basis, the constructed heterogeneous graph neural network model is updated according to the leakage-related data of the actual leakage data, and the updated heterogeneous graph neural network model can generate a new causal network based on the multi-agent collaborative model, that is, the actual causal network generated according to the actual leakage data and leakage-related data of the actual gas pipeline explosion event.

[0083] Optionally, an actual causal network is generated based on actual leakage data and leakage-related data of the actual gas pipeline explosion event, including: inserting the actual leakage data and leakage-related data of the actual gas pipeline explosion event into the gas pipeline topology structure data to generate an actual heterogeneous graph neural network model; inputting the actual heterogeneous graph neural network model into the multi-agent collaborative model to obtain the corresponding actual causal network.

[0084] Among them, according to the actual leakage data and leakage-related data of the actual gas pipeline explosion event, the process of generating the actual causal network can be as follows: first, the actual leakage data and leakage-related data of the actual gas pipeline explosion event are extracted to obtain the corresponding actual gas leakage volume and causal event node data, and the extracted data are inserted into the gas pipeline topological structure data, which can be understood as inserting the actual gas leakage volume and causal event node data into the gas pipeline node corresponding to the actual gas pipeline explosion event; then, according to the actual leakage data and leakage-related data of the actual gas pipeline explosion event, an actual heterogeneous graph neural network model can be generated on the basis of the original heterogeneous graph neural network model; finally, the actual heterogeneous graph neural network model is input into the multi-agent collaborative model to obtain the corresponding actual causal network.

[0085] S230. Extract possible causal events of the actual gas pipeline explosion event according to the causal network and the actual causal network.

[0086] In this embodiment, according to the overlapping part in the causal network and the actual causal network, wherein the overlapping part may include a connection relationship chain composed of multiple causal event nodes; by analyzing the relationship between the causal event nodes in the overlapping part, the causal event corresponding to the topmost node in the connection relationship chain corresponding to the overlapping part can be extracted as the possible causal event corresponding to the actual gas pipeline explosion event.

[0087] Optionally, possible causal events of the actual gas pipeline explosion event are extracted based on the causal network and the actual causal network, including: comparing the actual causal network with the causal network to extract the overlapping part; if the overlapping part includes a complete causal event chain, extracting the top causal event of the causal event chain as the possible causal event; if the overlapping part includes a causal event chain containing multiple link branches, then checking whether each top causal event in the causal event chain containing multiple link branches is valid; if one or more of the top causal events are valid, extracting one or more valid causal events as possible causal events; if all the top causal events are invalid, optimizing the causal network online until the top causal event in at least one causal event chain in the overlapping part of the actual causal network and the causal network is valid, and taking the valid top causal event as the possible causal event.

[0088] In this embodiment, a complete causal event chain may refer to a complete connection relationship chain without branches consisting of at least two causal event nodes, that is, the causal event chain has only one link top and a top causal event at the top, and has no branches, wherein each node on the complete causal event chain corresponds to a causal event. A causal event chain with multiple link branches may be understood as a causal event chain having multiple link branches, and each link branch may have a top causal event at its top.

[0089] Specifically, the actual causal network is compared with the causal network, and the overlapping part is extracted. If the overlapping part includes a complete causal event chain, the top causal event of the causal event chain is extracted as the possible causal event of the actual event of the gas pipeline explosion. If the overlapping part includes a causal event chain containing multiple link branches, each top causal event in the causal event chain containing multiple link branches is checked to see if it is valid (such as checking whether each top causal event has a certain correlation with the actual event causing the gas pipeline explosion). On this basis, if one or more of the top causal events are valid, then one or more valid causal events are extracted as possible causal events of the actual event of the gas pipeline explosion. If all the top causal events are invalid, that is, each top causal event has nothing to do with the actual event causing the gas pipeline explosion, then the causal network can be optimized online, such as redesigning and optimizing the causal network according to the gas pipeline topological structure data, the relevant data of the gas pipeline explosion historical event, the relevant data of the actual event of the gas pipeline explosion, etc., until the top causal event in at least one causal event chain in the overlapping part of the actual causal network and the causal network is valid, and the valid top causal event is used as a possible causal event. It should be noted that the causal event chain includes a centralized evolutionary mode, that is, multiple causal events can lead to a final causal result.

[0090] A method for deducing causal events provided in the second embodiment of the present invention first obtains a causal network, wherein the causal network can be generated according to any method in the first embodiment; then generates an actual causal network according to the actual leakage data and leakage-related data of the actual gas pipeline explosion event; finally, extracts possible causal events of the actual gas pipeline explosion event according to the causal network and the actual causal network. The method generates an actual causal network according to the actual data of the actual gas pipeline explosion event, and on this basis extracts possible causal events of the actual gas pipeline explosion event according to the original causal network and the actual causal network, and can perform actual analysis according to actual problems to deduce possible causal events of the actual gas pipeline explosion event, effectively improving the practical applicability of the causal network.

[0091] The embodiment of the present invention first establishes a heterogeneous graph neural network model, based on the gas pipeline topology, and combines the causal events, gas flow and CFD simulated gas leakage as data to construct a heterogeneous graph neural network model. Then, based on the heterogeneous graph neural network model, the multi-agent collaborative model based on reinforcement learning is used to optimize the heterogeneous graph neural network model for causal network online learning, which can make full use of various data of the gas pipeline and effectively generate a more complete causal network, solving the problem of insufficient causal network learning data to a certain extent. Among them, the multi-agent collaborative model based on reinforcement learning can apply both statistical data and qualitative empirical data, so that the causal network generation method and causal network of this embodiment are highly versatile and can no longer be limited to a certain project or a certain city. In addition, the causal network in the embodiment of the present invention has strong practical applicability. It can be combined with the heterogeneous graph neural network model according to the actual problems of the gas pipeline explosion event to conduct actual analysis, find actual problems, and effectively reduce the probability of accidents or reduce the impact of accidents.

[0092] Embodiment 3

[0093] Figure 5 This is a schematic diagram of the structure of a causal network simulation device provided in Embodiment 3 of the present invention, which can be implemented by software and / or hardware. Figure 5 As shown, the device includes: an input module 310 and a first generating module 320;

[0094] The input module 310 is used to input the heterogeneous graph neural network model into the multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target node of the gas pipeline explosion historical event, the gas leakage simulation data and the set edge weight;

[0095] The first generation module 320 is used to optimize the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

[0096] In this embodiment, the device inputs the heterogeneous graph neural network model into the multi-agent collaborative model through the input module 310, wherein the heterogeneous graph neural network model is constructed according to the target node of the historical event of the gas pipeline explosion, the gas leakage simulation data, and the set edge weight; through the first generation module 320, the heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce the possible causal events of the historical event of the gas pipeline explosion. The device is based on the heterogeneous graph neural network model and is optimized based on the multi-agent collaborative model. It can make full use of the relevant data of the historical event of the gas pipeline explosion to generate a causal network online, thereby improving the versatility and practicality of the causal network.

[0097] Optionally, before inputting the heterogeneous graph neural network model into the multi-agent collaborative model, the device further comprises: constructing the heterogeneous graph neural network model in the following manner:

[0098] A target node determination module, used to take a gas pipeline node and a causal event node as the target node;

[0099] An edge attribute determination module is used to perform computational fluid dynamics (CFD) simulation on each gas pipeline according to the gas pipeline topology data and the gas flow data, and use the obtained gas leakage simulation data as the edge attribute;

[0100] A construction module is used to construct the heterogeneous graph neural network model according to the target node, the edge attributes and the set edge weights.

[0101] Optionally, a set number of gas pipeline nodes are connected to corresponding causal event nodes.

[0102] Optionally, the first generating module 320 specifically includes:

[0103] An abstraction unit is used to abstract each target node in the heterogeneous graph neural network model into an agent to obtain a corresponding multi-agent collaborative model;

[0104] A Q function determination unit, used to obtain a Q function network corresponding to each agent in the multi-agent collaborative model by setting an algorithm;

[0105] A causal network generating unit is used to generate the causal network based on the Q function network.

[0106] The above-mentioned causal network simulation device can execute the causal network simulation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0107] Embodiment 4

[0108] Figure 6 This is a schematic diagram of the structure of a causal event deduction device provided in Embodiment 4 of the present invention, which can be implemented by software and / or hardware. Figure 6 As shown, the device includes: an acquisition module 410, a second generation module 420 and an extraction module 430;

[0109] The acquisition module 410 is used to acquire a causal network, wherein the causal network is generated according to the causal network generation method described in any one of the embodiments;

[0110] The second generating module 420 is used to generate an actual cause network according to the actual leakage data and leakage related data of the actual gas pipeline explosion event;

[0111] The extraction module 430 is used to extract possible causal events of the actual gas pipeline explosion event according to the causal network and the actual causal network.

[0112] In this embodiment, the device first obtains a causal network through an acquisition module 410, wherein the causal network can be generated according to any method in the first embodiment; then, through a second generation module 420, an actual causal network is generated according to actual leakage data and leakage-related data of the actual event of the gas pipeline explosion; finally, through an extraction module 430, possible causal events of the actual event of the gas pipeline explosion are extracted according to the causal network and the actual causal network. The device generates an actual causal network according to actual data of the actual event of the gas pipeline explosion, and on this basis, extracts possible causal events of the actual event of the gas pipeline explosion according to the original causal network and the actual causal network, and can perform actual analysis according to actual problems to deduce possible causal events of the actual event of the gas pipeline explosion, effectively improving the practical applicability of the causal network.

[0113] Optionally, the second generating module 420 specifically includes:

[0114] A heterogeneous graph generation unit, used to insert actual leakage data and leakage-related data of an actual gas pipeline explosion event into the gas pipeline topology data to generate an actual heterogeneous graph neural network model;

[0115] The actual causal network generation unit is used to input the actual heterogeneous graph neural network model into the multi-agent collaborative model to obtain the corresponding actual causal network.

[0116] Optionally, the extraction module 430 specifically includes:

[0117] An overlap extraction unit, used for comparing the actual causal network with the causal network to extract the overlapped part;

[0118] a first extraction unit, configured to extract the top causal event of the causal event chain as a possible causal event if the overlapping portion includes a complete causal event chain;

[0119] a checking unit, configured to check whether each top causal event in the causal event chain containing multiple link branches is valid if the overlapping portion includes a causal event chain containing multiple link branches;

[0120] A second extraction unit is used for extracting one or more valid causal events as the possible causal events if one or more of the top causal events are valid;

[0121] The optimization unit is used for optimizing the causal network online if all the top causal events are invalid, until at least one top causal event in the overlapping part between the actual causal network and the causal network is valid, and taking the valid top causal event as the possible causal event.

[0122] The above-mentioned causal event deduction device can execute the causal event deduction method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0123] Embodiment 5

[0124] Figure 7 This is a schematic diagram of the structure of an electronic device provided by Embodiment 5 of the present invention. Figure 7 As shown, the electronic device provided by the fourth embodiment of the present invention includes: one or more processors 41 and a storage device 42; the processor 41 in the electronic device can be one or more, Figure 7 A processor 41 is taken as an example; the storage device 42 is used to store one or more programs; the one or more programs are executed by the one or more processors 41, so that the one or more processors 41 implement the causal network simulation method as described in Embodiment 1 of the present invention or the causal event deduction method as described in Embodiment 2 of the present invention.

[0125] The electronic device may further include: a communication device 43 , an input device 44 and an output device 45 .

[0126] The processor 41, storage device 42, communication device 43, input device 44 and output device 45 in the electronic device can be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0127] The storage device 42 in the electronic device is a computer-readable storage medium, which can be used to store one or more programs, and the program can be a software program, a computer executable program, and a module, such as the program instructions / modules corresponding to the causal network simulation method provided in the first embodiment of the present invention (for example, the attached Figure 5 The modules in the causal network simulation device shown include: an input module 310 and a first generation module 320); or a program instruction / module corresponding to the causal event deduction method provided in the second embodiment of the present invention (for example, Figure 6 The modules in the causal event deduction device shown include: an acquisition module 410, a second generation module 420 and an extraction module 430). The processor 41 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the storage device 42, that is, the causal network simulation method or the causal event deduction method in the above method embodiment is implemented.

[0128] The storage device 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 42 may further include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0129] The communication device 43 may include a receiver and a transmitter. The communication device 43 is configured to perform information transmission and reception communication according to the control of the processor 41.

[0130] The input device 44 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 45 may include a display device such as a display screen.

[0131] Furthermore, when one or more programs included in the above-mentioned electronic device are executed by the one or more processors 41, the program performs the following operations: inputting the heterogeneous graph neural network model into the multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target nodes of the historical event of the gas pipeline explosion, the gas leakage simulation data and the set edge weights; optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce the possible causal events of the historical event of the gas pipeline explosion.

[0132] Alternatively, when one or more programs included in the above-mentioned electronic device are executed by the one or more processors 41, the program performs the following operations: obtaining a causal network, wherein the causal network is generated according to the causal network generation method described in any one of the embodiments of the present invention; generating an actual causal network based on actual leakage data and leakage-related data of an actual gas pipeline explosion event; and extracting possible causal events of the actual gas pipeline explosion event based on the causal network and the actual causal network.

[0133] Embodiment 5

[0134] Embodiment 5 of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program can be used to execute any of the causal network simulation methods described in Embodiment 1 of the present invention or any of the causal event deduction methods described in Embodiment 2 of the present invention.

[0135] Optionally, when the program is executed by a processor, it can be used to execute the causal network simulation method in Example 1 of the present invention, the method comprising: inputting a heterogeneous graph neural network model into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to target nodes of the historical event of the gas pipeline explosion, gas leakage simulation data, and set edge weights; optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical event of the gas pipeline explosion.

[0136] Optionally, when the program is executed by a processor, it can be used to execute the causal event deduction method in Example 1 of the present invention, the method comprising: obtaining a causal network, wherein the causal network is generated according to the causal network generation method described in any one of Example 1; generating an actual causal network based on actual leakage data and leakage-related data of an actual gas pipeline explosion event; and extracting possible causal events of the actual gas pipeline explosion event based on the causal network and the actual causal network.

[0137] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0138] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0139] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, or radio frequency (RF), etc., or any suitable combination of the above.

[0140] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0141] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A causal network simulation method, characterized in that: The method comprises: Inputting the heterogeneous graph neural network model into the multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to the target node of the gas pipeline explosion historical event, the gas leakage simulation data and the set edge weight, wherein the set edge weight includes: the set edge weight of the edge between the gas pipeline node and the gas pipeline node is the normalized length of the gas pipeline between the gas pipeline nodes, the set edge weight of the edge between the gas pipeline node and the causal event node is 1; the set edge weight of the edge between the causal event nodes is the set network weight; The heterogeneous graph neural network model is optimized based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

2. The method according to claim 1, characterized in that: Before inputting the heterogeneous graph neural network model into the multi-agent collaborative model, the method further includes: constructing the heterogeneous graph neural network model in the following manner: The gas pipeline node and the causal event node are used as the target nodes; According to the gas pipeline topology data and gas flow data, computational fluid dynamics (CFD) simulation is performed on each gas pipeline, and the obtained gas leakage simulation data is used as the edge attribute; The heterogeneous graph neural network model is constructed according to the target node, the edge attributes and the set edge weights.

3. The method according to claim 2, characterized in that A set number of gas pipeline nodes are connected to corresponding causal event nodes.

4. The method according to claim 1, characterized in that: The step of optimizing the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network includes: Abstracting each target node in the heterogeneous graph neural network model into an agent to obtain a corresponding multi-agent collaboration model; Obtaining the Q function network corresponding to each agent in the multi-agent collaborative model by setting an algorithm; The causal network is generated based on the Q-function network.

5. A method for deducing causal events, characterized in that: The method comprises: Obtaining a causal network, wherein the causal network is generated according to the method according to any one of claims 1 to 4; Generate an actual causal network based on actual leakage data and leakage-related data of actual gas pipeline explosion events; Possible causal events of the actual gas pipeline explosion event are extracted based on the causal network and the actual causal network.

6. The method according to claim 5, characterized in that The actual cause network is generated based on the actual leakage data and leakage-related data of the actual gas pipeline explosion event, including: Insert the actual leakage data and leakage-related data of the actual gas pipeline explosion event into the gas pipeline topology data to generate an actual heterogeneous graph neural network model; The actual heterogeneous graph neural network model is input into the multi-agent collaborative model to obtain the corresponding actual causal network.

7. The method according to claim 6, characterized in that The extracting possible causal events of the actual gas pipeline explosion event according to the causal network and the actual causal network includes: Comparing the actual causal network with the causal network, and extracting overlapping parts; If the overlapping portion includes a complete causal event chain, extracting the top causal event of the causal event chain as a possible causal event; If the overlapping portion includes a causal event chain containing multiple link branches, then each top causal event in the causal event chain containing multiple link branches is checked to see whether it is valid; If one or more of the top causal events are valid, extracting the valid one or more causal events as the possible causal events; If all the top causal events are invalid, the causal network is optimized online until at least one top causal event in the overlapping part of the actual causal network and the causal network is valid, and the valid top causal event is used as the possible causal event.

8. A causal network simulation device, characterized in that: include: An input module is used to input a heterogeneous graph neural network model into a multi-agent collaborative model, wherein the heterogeneous graph neural network model is constructed according to a target node of a gas pipeline explosion historical event, gas leakage simulation data, and set edge weights, wherein the set edge weights include: the set edge weights of the edges between gas pipeline nodes are the normalized lengths of the gas pipelines between the gas pipeline nodes, the set edge weights of the edges between the gas pipeline nodes and the causal event nodes are 1; the set edge weights of the edges between the causal event nodes are the set network weights; The first generation module is used to optimize the heterogeneous graph neural network model based on the multi-agent collaborative model to generate a causal network, and the causal network is used to deduce possible causal events of the historical gas pipeline explosion event.

9. A causal event deduction device, characterized in that: include: An acquisition module, used for acquiring a causal network, wherein the causal network is generated according to the method according to any one of claims 1 to 4; The second generation module is used to generate an actual cause network based on actual leakage data and leakage-related data of an actual gas pipeline explosion event; An extraction module is used to extract possible causal events of the actual gas pipeline explosion event based on the causal network and the actual causal network.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the causal network simulation method as described in any one of claims 1-4 or the causal event deduction method as described in any one of claims 5-7.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the causal network simulation method as described in any one of claims 1 to 4 or the causal event deduction method as described in any one of claims 5 to 7 is implemented.