Gas emergency aid decision-making method and device based on knowledge graph

By using a knowledge graph-based gas emergency decision support method, the problems of real-time performance and accuracy in traditional emergency decision-making are solved. This method enables efficient fusion of multi-source data and dynamic assessment of accident risks, thereby improving the scientific nature and response efficiency of emergency response.

CN121365801APending Publication Date: 2026-01-20SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511471073.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Traditional emergency decision-making for gas accidents relies on human experience and fixed plans, which is difficult to meet the requirements of real-time, accuracy and scientific rigor. Existing machine learning methods lack the ability to fuse multi-source heterogeneous data and model structured knowledge, making it difficult to achieve high-precision semantic understanding and prediction of accident evolution trends.

Method used

A knowledge graph-based gas emergency auxiliary decision-making method is adopted. Through an accident information collection module, a knowledge graph construction module, an emergency reasoning and prediction module, and an auxiliary decision control module, the method realizes multi-source data collection, standardized processing, extraction of key entities and event relationships for gas accidents, and generates accident risk assessment and emergency response measures.

Benefits of technology

It has improved the scientific nature, real-time performance, and operability of emergency response to gas accidents, enabled accurate identification and efficient management of accident information, and enhanced the accuracy and efficiency of emergency response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365801A_ABST
    Figure CN121365801A_ABST
Patent Text Reader

Abstract

The invention relates to an auxiliary decision-making method, in particular to a gas emergency auxiliary decision-making method and device based on a knowledge graph. Structured representation of accident information, key entity and event relation extraction and accident evolution trend prediction are realized, so that scientific, accurate and explainable auxiliary support is provided for emergency decision making. Comprising an accident information acquisition module, a knowledge graph construction module, an emergency reasoning and prediction module and an auxiliary decision control module. The accident information acquisition module is used for acquiring information, normalizing the information and outputting the information to the knowledge graph construction module; the knowledge graph construction module is used for identifying and extracting key elements in the accident information and providing the key elements to the emergency reasoning and predicting module; the emergency reasoning and predicting module is used for carrying out accident risk grade evaluation in combination with the knowledge graph and the real-time monitoring data; and the auxiliary decision-making control module is used for receiving the candidate treatment measures and converting the candidate treatment measures into executable operation instructions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an auxiliary decision-making method, in particular to a gas emergency auxiliary decision-making method and device based on a knowledge graph. BACKGROUND

[0002] Gas accidents include leakage, explosion and poisoning and other risk events. Accidents have the characteristics of strong suddenness, wide spread and urgent disposal time. The traditional emergency decision mainly relies on artificial experience and fixed plans, which is difficult to meet the real-time, accuracy and scientificity requirements of accidents.

[0003] The information related to gas accidents is extensive, including sensor data, accident reports, news reports and social media information, etc. These unstructured texts have problems such as non-uniform format, complex semantics and much noise information. The existing technology has limited ability in complex text analysis, context semantic understanding and implicit logical relationship identification, and it is difficult to accurately extract key entities and event relationships, and also difficult to realize effective prediction of accident evolution trend.

[0004] Although the existing machine learning method has tried in accident prediction, it mostly relies on single data source or shallow model, lacks the ability of multi-source heterogeneous data fusion and structured knowledge modeling, and has insufficient explainability, which is difficult to provide reliable support for emergency decision-making.

[0005] Therefore, there is an urgent need for a technical solution that can accurately understand the semantics of accident texts, fuse multi-source data, and intelligently infer and dynamically predict based on a knowledge graph. SUMMARY

[0006] The application is aimed at the defects of the prior art, and provides a gas emergency auxiliary decision-making method and device based on a knowledge graph. Through natural language processing and deep learning model, the application realizes the structured representation of accident information, the extraction of key entities and event relationships, and the prediction of accident evolution trend, thereby providing scientific, accurate and explainable auxiliary support for emergency decision-making.

[0007] To achieve the above purpose, the application adopts the following technical solution, a gas emergency auxiliary decision-making device based on a knowledge graph, comprising: an accident information acquisition module, a knowledge graph construction module, an emergency reasoning and prediction module, and an auxiliary decision-making control module.

[0008] The accident information acquisition module is used for collecting text information, sensor monitoring data and multi-source information related to gas accidents, and performing standardized processing and then outputting to the knowledge graph construction module;

[0009] The knowledge graph construction module is configured to identify and extract key elements in the accident information, including time, location, cause, loss and disposal measures, complete knowledge graph modeling and storage, and provide the updated knowledge graph to the emergency reasoning and prediction module.

[0010] The emergency reasoning and prediction module is configured to perform accident risk level assessment in combination with the knowledge graph and real-time monitoring data, and generate candidate emergency disposal measures based on knowledge reasoning and historical case matching.

[0011] The auxiliary decision control module is configured to receive the candidate disposal measures, convert them into executable operation instructions, and distribute them to the emergency management platform or on-site personnel.

[0012] A gas emergency auxiliary decision-making method based on a knowledge graph, comprising the following steps:

[0013] An accident information collection step: collecting text information, sensor monitoring data and multi-source information related to gas accidents, and performing standardized processing;

[0014] A knowledge graph construction step: identifying and extracting key elements of time, location, cause, loss and disposal measures in the accident information, completing knowledge graph modeling and storage;

[0015] An emergency reasoning and prediction step: combining the knowledge graph and real-time monitoring data to perform accident risk level assessment, and generating candidate emergency disposal measures based on knowledge reasoning and historical case matching;

[0016] An auxiliary decision control step: receiving the candidate disposal measures, converting them into executable operation instructions, and distributing them to the emergency management platform or on-site personnel.

[0017] Further, the accident information collection step is configured to perform data cleaning and standardization processing, as well as data preprocessing and feature extraction.

[0018] Further, the data cleaning and standardization processing fuses multi-source data through a semantic matching and alignment algorithm, specifically including:

[0019] S1, converting various data sources into a unified semantic representation, performing semantic matching by calculating the similarity between different data sources, the similarity calculation using a cosine similarity measurement method, the calculation formula being as follows:

[0020]

[0021] wherein v i and v j are the semantic vectors of the i-th and j-th data sources, · is the dot product operation, and ||·|| represents the vector norm;

[0022] S2, match and fuse similar semantic vectors through a semantic alignment algorithm, generate a fused semantic representation by weighted summation of semantic vectors; the calculation formula of the fusion process is as follows:

[0023]

[0024] where v a is the fused semantic representation, sim(v i , v j ) is the similarity between data sources i and j;

[0025] S3, fuse the aligned semantic vectors through a semantic fusion method to generate a unified semantic representation; realized by weighted average or splicing method, the calculation formula is as follows:

[0026]

[0027] where v f is the final fused semantic representation, M is the total number of data sources participating in fusion.

[0028] Further, the data preprocessing and feature extraction adopt a text encoding method based on BERT pre-training language model, specifically including:

[0029] S1, for the input gas accident information related text, use BERT model for semantic representation learning; convert the input sequence X = {x1, x2,... x n} into context-dependent semantic vector representation, the calculation formula is as follows:

[0030] M = BERT(X)

[0031] Where M = {m1, m2,..., m n} is the semantic representation matrix of the input sequence;

[0032] S2, model the context dependence of semantic representation based on multi-head self-attention mechanism, the calculation formula is as follows:

[0033]

[0034] MH(Q, K, V) = Contcat(head1,... head h )M N

[0035] Where Q, K, V are the query matrix, key matrix and value matrix obtained by projecting the input semantic vector, b p is the scaling factor, is a trainable parameter matrix, h is the number of attention heads;

[0036] S3, connect the classification layer and the conditional random field (CRF) layer to complete the named entity recognition of the accident elements (time, place, reason, loss, and measures); the calculation formula is as follows:

[0037]

[0038] Further, the knowledge graph construction step is realized based on a natural language processing technology, and includes the following steps:

[0039] A text preprocessing step is used to perform word segmentation, part-of-speech tagging, and dependency syntax analysis on the collected accident text information.

[0040] An entity recognition and relationship extraction step is used to automatically recognize and label key entities such as time, place, reason, loss, and disposal measures.

[0041] A knowledge storage step is used to model the structured knowledge units formed above and store them in a graph database.

[0042] Further, the text preprocessing step provides structured input for subsequent processing by performing multi-step preprocessing on the collected gas accident text information, specifically including the following steps:

[0043] S1, the collected gas accident text is segmented and processed, and the text is divided into the smallest unit, and the calculation formula is as follows:

[0044] T = Segment (O Text )

[0045] Where O Text represents the original accident text, and T represents the result sequence after segmentation;

[0046] S2, assign the corresponding part-of-speech label to the segmentation result, and the calculation formula is as follows:

[0047] POS i = POS T (T i )

[0048] Where POS i is the part-of-speech label of the i-th word, and POS T is a model used to perform part-of-speech tagging.

[0049] S3, used to determine the grammatical dependency relationship between words; the calculation formula is as follows:

[0050] DP(T) = {(head i ,dep i )}

[0051] wherein head i and dep i represent the parent node and child node in the syntactic dependency relationship of the i-th word respectively, and DP represents an algorithm for generating a syntactic dependency structure.

[0052] Further, the entity recognition and relationship extraction step includes global semantic feature extraction, context feature extraction, local semantic feature extraction, label prediction sequence extraction, and hierarchical learning rate strategy, and the specific steps are as follows:

[0053] S1, the global semantic feature extraction, encodes and processes the original accident, and the process performs semantic modeling on the text through the BERT model to obtain the semantic, syntactic and context features at the lexical level, and generates high-dimensional word vector representation; the calculation formula is as follows:

[0054] t i =BERT(T i )

[0055] wherein t i represents the high-dimensional word vector representation of the i-th word, and BERT(T i ) is the word vector generated based on the pre-trained BERT model;

[0056] S2, the context feature extraction, a bidirectional long short-term memory network (BiLSTM) is designed to capture the bidirectional context dependency information in the sequence; the calculation formula is as follows:

[0057] b i =BiLSTM(t i )

[0058] wherein b i is the output representation of the i-th word in the context feature extraction process;

[0059] S3, the local semantic feature extraction, a multi-head local self-attention mechanism (MH-SLA) is designed, which limits the attention calculation range through a local window, thereby focusing on important local dependency relationships in the sequence; the calculation formula is as follows:

[0060] c i =MH-SLA(b i )

[0061] wherein c i is the local semantic feature obtained by MH-SLA, and MH-SLA(b i ) is the output of the local self-attention mechanism.

[0062] S4, after residual connection and optimization fusion of the results of local semantic feature and context feature extraction, the fused features are spliced with the features generated by the global semantic feature extraction method to form a complete multi-level feature representation; then, feature compression and conversion are performed through a fully connected layer (FC); the calculation formula is:

[0063]

[0064] wherein, represents a splicing operation, d i is the final feature representation obtained by converting the spliced features through a fully connected layer;

[0065] S5, the fused features are input to a conditional random field (CRF) layer for sequence decoding to obtain an optimal label path; the calculation formula is as follows:

[0066]

[0067] wherein, is the optimal label sequence, is the score of the i-th word under the label y i , and is the label transition score;

[0068] S6, the hierarchical learning rate strategy, the BERT layer introduces three different learning rates according to the model depth, while other modules (such as BiLSTM, MH-SLA, fully connected layer and CRF layer) are respectively set with independent learning rates; the calculation formula is:

[0069]

[0070] wherein, δ t is the total loss, and δ i is the loss of each module (such as BERT, BiLSTM, MH-SLA, etc.);

[0071] In the knowledge storage step, the extracted accident elements are represented by triplets (h, r, t), wherein h is the head entity, t is the tail entity, and r is the relationship; the calculation formula of the TransE model is adopted:

[0072] h+r≈t

[0073] The target function calculation formula is:

[0074]

[0075] wherein (h', r, t') is a negative sample, and γ is a gap parameter;

[0076] The updated knowledge graph storage formula is:

[0077] G = (E, R, T)

[0078] Wherein, E is an entity set, R is a relationship set, and T is a triple set;

[0079] The knowledge graph construction step has a dynamic updating function, which is realized by the following steps:

[0080] Continuously receiving new accident text information and monitoring data;

[0081] Incremental entity recognition, relationship extraction and triple comparison algorithm is used to supplement and correct the graph;

[0082] Version control and consistency detection algorithm is used to ensure the real-time and traceability of the knowledge graph.

[0083] Further, the emergency reasoning and prediction step combines the knowledge graph G and the real-time monitoring data M to perform risk level assessment and emergency disposal prediction, specifically including:

[0084] S1, using graph neural network SimGNN to embed and propagate the knowledge graph, the calculation formula is:

[0085]

[0086] Get the high-order representation of the node {h v};

[0087] S2, the accident risk level is predicted by logistic regression or softmax, the formula is:

[0088]

[0089] At the same time, based on similarity measurement, historical case matching is performed, and the calculation formula is:

[0090]

[0091] Further, the auxiliary decision control step specifically includes comparison optimization, evaluation screening and recommendation output, and the following algorithm implementation scheme is used to generate instructions and resource scheduling:

[0092] S1, the mapping of measures to instructions uses template parameter filling or generates readable operation instructions based on neural text generation model;

[0093] S2, resource scheduling uses mathematical programming or heuristic scheduling algorithm (such as integer programming, constraint programming, heuristic greedy and meta-heuristic algorithm) to optimize response time and resource utilization;

[0094] S3, instruction issuing and confirmation uses reliable message passing and acknowledgement mechanism;

[0095] S4, the execution monitoring adopts real-time state aggregation, sensor feedback fusion and closed-loop re-planning strategy (for example, triggering re-inference or manual early warning based on monitoring results);

[0096] The auxiliary decision control step selects the final emergency measure through a weighted scoring function, and the calculation formula is as follows:

[0097] Score(a * )=α·P(risk|h n ,M)+β·S(c,c w )

[0098] The calculation formula of the optimal emergency measure is obtained:

[0099]

[0100] The measure a p is converted into an executable command and is issued to the emergency management platform and the on-site execution end.

[0101] Compared with the prior art, the present application has the following beneficial effects.

[0102] The present application establishes a gas emergency auxiliary decision method and device based on a knowledge graph, collects, standardizes and structures related text information of gas accidents, sensor monitoring data and multi-source information, realizes accurate identification and efficient management of accident information, can quickly extract key elements and establish semantic association when an accident occurs, and thus improves the accuracy and response efficiency of accident information.

[0103] The present application realizes dynamic assessment of accident risk level and generation of candidate emergency disposal measures by combining knowledge graph construction and historical case matching, and the auxiliary decision control module can convert the measures into executable instructions and quickly distribute them to the emergency management platform or on-site personnel, thereby improving the scientificity, real-time performance and operability of gas accident emergency response and optimizing the overall emergency disposal effect. BRIEF DESCRIPTION OF DRAWINGS

[0104] The present application will be further described below in combination with the drawings and specific embodiments. The protection scope of the present application is not limited to the following descriptions.

[0105] Figure 1 It is a system structure schematic diagram of the embodiment;

[0106] Figure 2 It is a device structure schematic diagram of the embodiment;

[0107] Figure 3 It is a working principle diagram of the knowledge graph construction module used in the device of the embodiment;

[0108] Figure 4 This is a general framework diagram of the device in the embodiment;

[0109] Figure 5 A diagram illustrating the device's global semantic feature extraction method in this embodiment;

[0110] Figure 6 This is a diagram illustrating the device context feature extraction method of an embodiment;

[0111] Figure 7 This is a diagram illustrating a method for extracting local semantic features from a device as described in an embodiment. Detailed Implementation

[0112] like Figure 1 As shown, the gas emergency auxiliary decision-making method and device based on knowledge graph includes: an accident information collection module, a knowledge graph construction module, an emergency reasoning and prediction module, and an auxiliary decision control module;

[0113] The accident information collection module is used to collect text information, sensor monitoring data and multi-source information related to gas accidents, and output them to the knowledge graph construction module after standardization processing.

[0114] The knowledge graph construction module is used to identify and extract key elements such as time, location, cause, loss and response measures from accident information, complete knowledge graph modeling and storage, and provide the updated knowledge graph to the emergency reasoning and prediction module.

[0115] The emergency reasoning and prediction module is used to combine knowledge graphs and real-time monitoring data to assess the level of accident risk, and generate candidate emergency response measures based on knowledge reasoning and historical case matching, and feed them back to the auxiliary decision control module.

[0116] The auxiliary decision control module is used to receive emergency response measures, convert them into executable operation instructions, and distribute them to the emergency management platform or on-site personnel to achieve rapid response and control of gas accidents.

[0117] The gas emergency auxiliary decision-making method and device based on a knowledge graph are composed of a global semantic feature extraction method, a context feature extraction method, a local semantic feature extraction method, a label prediction sequence extraction method, and a hierarchical learning rate. The global semantic feature extraction method mainly encodes the original text for preprocessing, effectively obtains the semantic, syntax, and context features at the lexical level in the named entity recognition task, and generates a high-dimensional word vector representation. Then, the representation is input into the context feature extraction method to capture the bidirectional context dependency information in the sequence. To further enhance the modeling capability of the model for local semantic relationships, MH-SLA is introduced and connected with the output of the context feature extraction method for residual connection fusion optimization, which strengthens the perception and interaction expression of local features while retaining the time sequence feature extraction capability. After the fused features are spliced with the results of the global semantic feature extraction method, the feature compression and conversion are realized through the full connection layer, and finally the conditional random field (CRF) layer is input for sequence decoding to output the optimal label path, thereby realizing high-precision recognition of entity information in the text. To optimize the model parameter training effect, a hierarchical learning rate strategy is adopted, in which the BERT layer introduces three different learning rates according to the model depth, and other modules (such as BiLSTM, MH-SLA, full connection layer, and CRF) are respectively set with independent learning rates, thereby realizing more detailed parameter adjustment and efficient training process.

[0118] The global semantic feature extraction method encodes the word embedding, position embedding, and unified label embedding based on the BERT pre-training model, and the specific steps are as follows:

[0119] S1 adds special marks [CLS] and [SEP] to the input text, wherein [CLS] is used to represent the overall semantics, and [SEP] is used to distinguish different text spans. The input sequence is represented as:

[0120] X={[CLS],x1,x2,…,x n ,[SEP]}S2 performs word embedding, position embedding, and unified label embedding on each word in the input sequence to form a comprehensive representation containing semantic, position information, and prior category information:

[0121] T0=E w (X)+E p (X)+E l (X)

[0122] S3 inputs the embedded sequence into a stacked Transformer layer to capture global dependency relationships through a multi-head self-attention mechanism to obtain a context-aware representation:

[0123] S l =Transformer(S l-1 ),l=1,2,...,L

[0124] S4 classifies the final output representation, predicting the entity class of each word:

[0125] y i = arg max Softmax(WS L [i]+a)

[0126] where W, a are trainable parameters, y i is the entity label of the i-th word.

[0127] The context feature extraction method designs a bidirectional long short-term memory network (BiLSTM). On the basis of the traditional LSTM structure, two information channels, forward and reverse, are designed, which can model the context information of the previous and subsequent context in the input sequence, thereby enhancing the model's ability to perceive global semantics. The input sequence is first converted into a word vector and input into the forward LSTM (LSTM f ) and reverse LSTM (LSTM b ) for time series feature encoding. The former performs forward propagation from left to right to generate a forward hidden state vector, and the latter performs backward propagation from right to left to generate a backward hidden state vector. At each time step, the forward and reverse hidden state vectors are spliced to form a comprehensive output representation that fuses bidirectional semantics. This structure not only effectively captures long-distance dependencies, but also significantly enhances the model's contextual understanding and recognition accuracy of key entities, making it particularly suitable for named entity recognition tasks that require high semantic understanding, such as gas accident emergency disposal. The basic unit of BiLSTM (Bidirectional Long Short-Term Memory Network) is LSTM, which effectively alleviates the gradient vanishing and explosion problem of traditional RNN in long sequence modeling and improves the learning ability of long and short term dependencies. Among them, P t represents the current input; k t-1 represents the hidden state at the previous time; Q t-1 represents the cell state at the previous time; Q t represents the cell state at the current time (updated); K t represents the hidden state output at the current time, and t represents a certain time.

[0128] The S1 forget gate controls the degree of historical information retention by applying a forgetting weight to the cell state at the previous time. The calculation formula is as follows:

[0129] f t = σ(R f [K t-1 , P t ]+d f )#

[0130] Among them, R f The weight matrix d represents the forget gate. f Let K denote the bias peak, σ denote the sigmoid activation function, and K... t-1 P represents the hidden state at the previous time step. t f represents the input at the current moment and the output f of the forget gate. t Will with Q t-1 Multiplication enables selective forgetting of old state information.

[0131] The S2 input gate controls the degree to which the current input affects the cell state, mainly consisting of two parts: a sigmoid layer that calculates the input weights (it), and a tanh layer that generates candidate memories. The calculation formula is as follows:

[0132] i t =σ(R) i [K t-1 P t ]+d i )#

[0133]

[0134] Among them, R i R c The weight matrix d represents the input gate and the candidate state. i d c Indicates the offset top. Q represents the candidate memory generated from the current input. t Represents the updated cell state; the input gate passes through i. t ,and The system controls the writing of information and, in conjunction with the output of the forget gate, updates the memory cell state Q. t .

[0135] The S3 output gate is used to determine the hidden state K at the current moment. t This is the final output of the LSTM. First, a sigmoid layer determines which cell states can be output. Then, tanh normalizes the cell states, and the two are multiplied point by point. The calculation formula is as follows:

[0136] O t =σ(R) o [K t-1 x t ]+d o )#

[0137] K t =O t *tanh(P t )#

[0138] Among them, Ro the weight matrix of the output gate, d o the bias of the top, K t the hidden state output at the current time, P t the current cell state, the output gate enables the LSTM to dynamically control the output of information according to the current context, effectively realizing long-term dependency modeling.

[0139] The local semantic feature extraction method is based on the multi-head self-attention mechanism, and a local window constraint is designed to limit the attention calculation range within a fixed size window, thereby reducing the overall computational complexity and focusing on key semantic information in the local context. The specific process is as follows:

[0140] S1 sets the input sequence as X = {x1, x2,..., x n}, and the corresponding query matrix, key matrix and value matrix are Q, K, V ∈ R n×d . Under the condition that the local window size is W, the local attention of the i-th position is represented as:

[0141]

[0142] Where N(i, W) = {j || i-j |≤ W} represents the neighborhood window of the i-th position; the attention weight α ij is defined as:

[0143]

[0144] S2 is based on this, and a multi-head mechanism is designed to improve the modeling ability of different semantic subspaces. Let the total number of attention heads be h, then the calculation process of multi-head local attention is:

[0145] MH-SLA(Q, K, V) = Concat(head1,..., head h )W o

[0146] Where:

[0147]

[0148] are the projection matrices of the m-th attention head, W O is the output weight matrix.

[0149] S3 can obtain the updated semantic representation through the above calculation:

[0150] H' = MH-SLA(Q, K, V) i

[0151] S4 Finally, the updated feature vector is input into the classification layer for entity class prediction:

[0152]

[0153] where C is a predefined set of entity classes, including trigger words, time, place, accident cause, and accident loss labels. This method can more accurately capture key information in the local context and improve the accuracy and robustness of entity recognition in long texts and complex contexts in the named entity recognition task of gas accident emergency disposal.

[0154] The label prediction extraction sequence method designs CRF (Conditional Random Field) as a discriminative probability model for label prediction sequence extraction in the model. This method has strong reasoning ability and can fully utilize context information to obtain the optimal label prediction sequence by modeling the transition relationship between adjacent labels. For the input text sequence, after the residual connection modeling of the MH-SLA and BiLSTM layers, a score matrix P is obtained, with dimensions n x k, where n represents the number of words in the sequence, and k represents the number of predefined label categories. The element Pi,j in the matrix represents the score of assigning the i-th word to the j-th label. Based on this score matrix, CRF introduces the transition probability between labels to define the global score function of the entire label sequence Y. This function considers the emission score between words and labels and the transition score between labels, as shown in the following formula, to model all possible label paths and infer the optimal label sequence with the maximum conditional probability.

[0155]

[0156] where matrix P is the score matrix output by the residual connection of the MH-SLA and BiLSTM layers, matrix A is the transition score matrix, A i,j is the score when label i is converted to label j, but the probability of obtaining the predicted sequence Y is:

[0157]

[0158] The likelihood function of the predicted sequence is obtained by taking the logarithm of both sides of the above equation:

[0159]

[0160] where Y is the true label sequence, and YX is all possible label sequences. Finally, the decoding maximum score output sequence Y * :

[0161] Y * = argmax (s (X, Y))

[0162] The gas emergency auxiliary decision-making method and device based on a knowledge graph are characterized by comprising the following steps:

[0163] First, collect multi-source heterogeneous data related to gas accidents in the accident information collection module, including but not limited to accident reports, news texts, voice transcription texts generated from monitoring videos, gas pipe network sensor monitoring data and external environment data; and perform format conversion, noise filtering, time alignment and semantic preprocessing on the above multi-source information to eliminate the differences between different data sources; at the same time, further generate a unified data expression format through data cleaning and standardization processing, and output the standardized data to the knowledge graph construction module in a structured manner.

[0164] Then, the knowledge graph construction module performs semantic analysis and information extraction on the standardized accident data, identifies and extracts key elements in the accident information, including time, place, triggering event, accident cause, loss situation and disposal measures; the module realizes the semantic association between the accident elements through named entity recognition, relationship extraction and event extraction technology, and models and graphically represents the above elements; and stores the newly created or updated knowledge graph, and provides it to the emergency reasoning and prediction module in the form of an interface to realize dynamic updating and continuous utilization of the accident information.

[0165] Finally, in combination with the knowledge graph and real-time monitoring data, the accident risk is dynamically analyzed and graded, and candidate emergency disposal measures are generated in combination with the historical case database, the candidate measures are received by the auxiliary decision-making control module and converted into executable operation instructions, and are distributed to the emergency management platform, the field personnel terminal or the automatic control system, so that the rapid response, accurate control and dynamic optimization of the gas accident are realized, and the scientificity, real-time performance and operability of the emergency decision are improved.

[0166] The gas emergency auxiliary decision-making method and device based on a knowledge graph have the service platform system structure diagram as shown in Figure 1 The accident information collection module is used for collecting gas accident related data and inputting the data to the knowledge graph construction module, the knowledge graph construction module performs structured modeling and updating on the data, and transmits the result to the emergency reasoning and prediction module for reasoning analysis and result generation, and finally the reasoning result is received by the auxiliary decision-making control module and an emergency disposal scheme is formed.

[0167] Figure 2 As shown in the device structure diagram of the application, a gas emergency auxiliary decision-making method and device based on a knowledge graph comprise a data collection layer, a knowledge extraction layer, a reasoning and prediction layer, and a scheme recommendation layer.

[0168] The data acquisition layer includes a text acquisition unit, a sensor data unit, a multi-source fusion unit, and a standardized output unit, for acquiring data from sensor monitoring, historical cases, accident documents, and multi-source heterogeneous environments,

[0169] The knowledge extraction layer includes a text processing unit, an entity recognition unit, a time extraction and relationship analysis unit, and a knowledge storage unit, for cleaning and semantic processing of the acquired multi-source data, extracting accident-related entities and event relationships, and storing them in the knowledge base.

[0170] The reasoning and prediction layer includes a rule-based reasoning engine and a knowledge representation learning module. The former performs logical reasoning on knowledge based on pre-set rules, and the latter implements deep modeling of knowledge based on knowledge representation learning, thereby predicting and completing the development trend of accidents.

[0171] The scheme recommendation layer includes a multi-scheme generation module, an instruction conversion module, a platform distribution module, a measure receiving module, and a rapid processing module, for generating multiple emergency disposal schemes based on reasoning and prediction results, and achieving rapid issuance and execution of emergency instructions through scheme recommendation and platform distribution.

[0172] Through the close cooperation and information flow of the above modules, the system can realize intelligent management of the whole process of gas accidents: from multi-source acquisition of accident information, including text records, sensor monitoring data, and on-site images, to standardized processing of data and construction of knowledge graph, and then supporting emergency reasoning and prediction analysis based on rule-based reasoning, graph neural network, or knowledge representation learning. The system can combine historical case library and real-time data to predict potential risks and accident evolution trends, and generate multi-scheme emergency disposal suggestions to realize priority sorting and dynamic adjustment of schemes. Through the support of this whole process, command personnel can obtain scientific, timely, and reliable decision-making assistance, thereby significantly improving the efficiency and accuracy of gas accident emergency response.

[0173] Figure 3 The figure shows a structured and process-oriented knowledge graph construction and dynamic maintenance scheme. The whole process includes three main stages: data preprocessing, knowledge extraction, and knowledge fusion and updating. This scheme can efficiently extract structured knowledge from multi-source heterogeneous data and maintain the timeliness and accuracy of the knowledge graph.

[0174] In the data preprocessing stage, the system first cleans the collected raw data, including denoising, deduplication, and error correction, to provide a high-quality data foundation for subsequent analysis. Then, the cleaned data is converted into a standard format that the system can process, preparing for the knowledge extraction stage.

[0175] Knowledge extraction is the core step in the process, and the main goal is to extract the basic elements of the knowledge graph from the formatted text, namely entities and relationships. The specific steps include entity recognition (extracting key named entities such as people, places, organizations, and equipment from text), entity classification (classifying the identified entities), candidate relationship extraction (initially identifying the semantic relationships between entities), relationship verification (judging and filtering the correctness and reliability of the relationships), and finally generating standard triple form "(head entity, relationship, tail entity)", which constitutes the basic unit of the knowledge graph.

[0176] In the knowledge fusion and updating stage, the system continuously maintains the constructed knowledge graph. First, it judges whether the newly extracted knowledge conflicts or is inconsistent with the existing knowledge, which is the key decision point for updating. Subsequently, the knowledge graph can be supplemented and revised in batches through regular updates, or processed in real time to handle streaming data, realizing online and dynamic evolution of the knowledge graph, thereby ensuring that it reflects the latest situation.

[0177] Overall, this process embodies an automatic and closed-loop knowledge management mechanism. It not only focuses on knowledge extraction, but also emphasizes relationship verification and consistency detection, and ensures the accuracy and timeliness of the knowledge graph through regular and real-time dual updating mechanisms, making it very suitable for industrial application scenarios with high data quality requirements.

[0178] As shown in Figure 4 The BLSA-CRF model proposed by the present application. The model is composed of a global semantic feature extraction method, a context feature extraction method, a local semantic feature extraction method, a label prediction sequence extraction method, and a hierarchical learning rate. In the global semantic feature extraction method, a BERT model is designed to encode and preprocess the original text, effectively obtaining the semantic, syntactic, and contextual features at the lexical level, and generating high-dimensional word vector representations. In the context feature extraction method, a BiLSTM is designed to capture bidirectional context dependency information in the sequence. To further enhance the model's ability to model local semantic relationships, an MH-SLA module is designed and connected with the context feature extraction method output for residual fusion optimization, which preserves the ability to extract temporal features while strengthening the perception and interaction of local features. After the fused features are concatenated with the results of the global semantic feature extraction method, feature compression and conversion are achieved through a fully connected layer, and finally a conditional random field (CRF) layer is input for sequence decoding, outputting the optimal label path, thereby achieving high-precision identification of entity information in the text. To optimize the model parameter training effect, a hierarchical learning rate strategy is designed, in which the BERT layer introduces three different learning rates according to the model depth, while other modules (such as BiLSTM, MH-SLA, fully connected layer, and CRF) are set with independent learning rates, thereby achieving more detailed parameter adjustment and efficient training process.

[0179] like Figure 5 As shown, this is the global semantic feature extraction method of the present invention. Based on the BERT pre-trained model, word embedding, position embedding and unified label embedding are encoded. The semantic relationship of the input text is mainly extracted through the Transformer encoder structure.

[0180] like Figure 6 As shown, the context feature extraction method of this invention employs a bidirectional long short-term memory (BiLSTM) network. Based on the traditional LSTM structure, two independent information pathways, forward and backward, are designed, enabling the model to simultaneously model the context of the input sequence, thereby improving the comprehensive perception of global semantics. Specifically, after the input sequence is converted into word vector representations through an embedding layer, it is input into the forward LSTM (BiLSTM...). f ) and inverse LSTM (LSTM) b In this process, the forward LSTM is recursively updated from left to right in chronological order to obtain the forward hidden state sequence; the backward LSTM is recursively updated from right to left in reverse chronological order to obtain the backward hidden state sequence.

[0181] like Figure 7 As shown, this invention presents a local semantic feature extraction method. An MH-SLA module is designed as the local semantic feature extraction unit of the BLSA-CRF model. Its core idea is to introduce local window constraints on top of the traditional self-attention mechanism, thereby calculating attention weights only within a predefined context. This design significantly reduces the computational complexity of global attention in long sequence scenarios and allows the model to focus more on the semantic dependencies of neighboring regions. For the hidden state representation of the input sequence, the MH-SLA module computes multiple attention heads in parallel within the local window, each attention head extracting contextual information from a different feature subspace. The introduction of the multi-head mechanism enables the model to simultaneously model multiple semantic relevances at the same location, thereby enhancing representational power and robustness.

[0182] It is understood that the above specific description of the present invention is only for illustrating the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention to achieve the same technical effect; as long as the use needs are met, they are all within the protection scope of the present invention.

Claims

1. A knowledge graph-based gas emergency auxiliary decision-making device, characterized in that, Comprise: An accident information collection module, a knowledge graph construction module, an emergency reasoning and prediction module, and an auxiliary decision control module; The accident information collection module is used for collecting text information, sensor monitoring data and multi-source information related to gas accidents, and performing standardized processing and outputting to the knowledge graph construction module; The knowledge graph construction module is used for identifying and extracting key elements in the accident information, including time, location, cause, loss and disposal measures, completing knowledge graph modeling and storage, and providing the updated knowledge graph to the emergency reasoning and prediction module; The emergency reasoning and prediction module is used for combining the knowledge graph and real-time monitoring data to evaluate the accident risk level, and generating candidate emergency disposal measures based on knowledge reasoning and historical case matching; The auxiliary decision control module is used for receiving the candidate disposal measures, converting them into executable operation instructions, and distributing them to the emergency management platform or on-site personnel.

2. A knowledge graph-based gas emergency auxiliary decision-making method, characterized in that, The method comprises the following steps: An accident information collection step: collecting text information, sensor monitoring data and multi-source information related to gas accidents, and performing standardized processing; A knowledge graph construction step: identifying and extracting key elements of time, location, cause, loss and disposal measures in the accident information, completing knowledge graph modeling and storage; An emergency reasoning and prediction step: combining the knowledge graph and real-time monitoring data to evaluate the accident risk level, and generating candidate emergency disposal measures based on knowledge reasoning and historical case matching; An auxiliary decision control step: receiving the candidate disposal measures, converting them into executable operation instructions, and distributing them to the emergency management platform or on-site personnel.

3. The method of claim 2, wherein, The accident information collection step is used for data cleaning and standardization processing, as well as data preprocessing and feature extraction.

4. The method of claim 3, wherein, The data cleaning and standardization processing fuses multi-source data through semantic matching and alignment algorithm, specifically including: S1, converting various data sources into unified semantic representation, performing semantic matching by calculating the similarity between different data sources, and using cosine similarity measurement method for similarity calculation, the calculation formula is as follows: where v i and v i are the semantic vectors of the ith and jth data sources, respectively, • is the dot product operation, and ||·|| denotes the vector norm. S2, matching and fusing similar semantic vectors through semantic alignment algorithm, generating fused semantic representation by weighted sum of semantic vectors; the calculation formula of the fusion process is as follows: where v a is the fused semantic representation, sim(v i , v j ) is the similarity between data sources i and j. S3, fusing the aligned semantic vectors through semantic fusion method to generate unified semantic representation; it is realized by weighted average or splicing method, the calculation formula is as follows: where v f is the final fused semantic representation, and M is the total number of data sources participating in the fusion.

5. The method of claim 3, wherein, The data preprocessing and feature extraction adopts a text encoding method based on BERT pre-training language model, specifically including: S1, for the input gas accident information related text, using BERT model for semantic representation learning; the input sequence X = {x1, X2, … x n} is converted into context-related semantic vector representation, the calculation formula is as follows: M=BERT(X) where M = {m1, m2,..., m n} is the semantic representation matrix of the input sequence; S2, modeling the context dependence of semantic representation based on multi-head self-attention mechanism, the calculation formula is as follows: MH(Q, K, V) = Contcat(head1,... head h )M N wherein Q, K, V are query matrix, key matrix and value matrix respectively obtained by projecting the input semantic vector, b p is a scaling factor, is a trainable parameter matrix, and h is the number of attention heads. S3, connecting classification layer and conditional random field (CRF) layer to complete named entity recognition of accident elements (time, location, cause, loss, measures); the calculation formula is as follows:

6. The method of claim 2, wherein, The knowledge graph construction step is realized based on natural language processing technology, including: A text preprocessing step: used for word segmentation, part-of-speech tagging and dependency syntax analysis of the collected accident text information; The entity recognition and relation extraction step is used to realize automatic recognition and labeling of key entities such as time, place, reason, loss and disposal measures. The knowledge storage step is used to model the structured knowledge units formed above and store them in a graph database.

7. The method of claim 6, wherein, The text preprocessing step provides structured input for subsequent processing by performing multi-step preprocessing on the collected gas accident text information, specifically including: S1, the collected gas accident text is segmented and processed, and the text is divided into the smallest unit, and the calculation formula is as follows: T = Segment(O Text ) wherein O Text represents the original accident text, and T represents the result sequence after word segmentation; S2, the segmented results are assigned corresponding part-of-speech tags, and the calculation formula is as follows: POS i = POS T (T i ) wherein POS i is a part-of-speech tag for the i-th word, POS T is a model for performing part-of-speech tagging; S3, used to determine the syntactic dependency between words; the calculation formula is as follows: DP(T) = {(head i , dep i )} where head i and dep i represent the parent and child nodes in the syntactic dependency relation of the i-th word, respectively, and DP denotes an algorithm that generates the syntactic dependency structure.

8. The method of claim 6, wherein, The entity recognition and relation extraction step includes global semantic feature extraction, context feature extraction, local semantic feature extraction, label prediction sequence extraction and hierarchical learning rate strategy, and the specific steps are as follows: S1, the global semantic feature extraction, encodes and processes the original accident, which models the semantics of the text through the BERT model to obtain the semantic, syntactic and contextual features at the lexical level, and generates high-dimensional word vector representation; The calculation formula is as follows: t i = BERT(T i ) where t i represents the high-dimensional word vector representation of the i-th word, BERT(T i ) is the word vector generated based on the pre-trained BERT model; S2, the context feature extraction, designs a bidirectional long short-term memory network to capture bidirectional context dependency information in the sequence; the calculation formula is as follows: b i = BiLSTM(t i ) where b i is the output representation of the ith word in the context feature extraction process; S3, the local semantic feature extraction, designs a multi-head local self-attention mechanism, which focuses on important local dependencies in the sequence by limiting the attention calculation range through a local window; the calculation formula is as follows: c i = MH-SLA(b i ) wherein c i is the local semantic feature obtained by the MH-SLA, MH-SLA(b i ) is the output of the local self-attention mechanism; S4, after residual connection and optimized fusion of the results of local semantic feature extraction and context feature extraction, the fused features are spliced with the features generated by the global semantic feature extraction method to form a complete multi-level feature representation; then, the feature is compressed and converted through a fully connected layer (FC); the calculation formula is: wherein, denotes the concatenation operation, di is the final feature representation converted by the fully connected layer after concatenation. S5, the fused features are input into the conditional random field layer for sequence decoding to obtain the optimal label path; the calculation formula is as follows: wherein, is the optimal tag sequence, is the score of the ith word under the tag yi, is the tag transition score; S6, the hierarchical learning rate strategy, BERT layer introduces three different learning rates according to the model depth, while other modules set independent learning rates respectively; the calculation formula is: where δ T is the total loss, δ i is the loss of each module; In the knowledge storage step, the extracted accident elements are represented by triplets (h, r, t), where h is the head entity, t is the tail entity, and r is the relationship; the calculation formula of TransE model is used: h+r≈t The target function calculation formula is: Where (h', r, t') is the negative sample, and γ is the interval parameter; The updated knowledge graph storage formula is: G=(E,R,T) Where E is the entity set, R is the relationship set, and T is the triplet set; The knowledge graph construction step has a dynamic updating function, which is realized by the following steps: Continuously receive new accident text information and monitoring data; Use incremental entity recognition, relation extraction and triplet comparison algorithm to supplement and correct the graph; Use version control and consistency detection algorithm to ensure the real-time and traceability of the knowledge graph.

9. The method of claim 2, wherein, The emergency reasoning and prediction step combines the knowledge graph G and the real-time monitoring data M to perform risk level evaluation and emergency disposal prediction, and specifically includes: S1, using a graph neural network SimGNN to embed and propagate the knowledge graph, the calculation formula is: get high order representation of node {h v} S2, the accident risk level is predicted by logistic regression or softmax, the formula is: At the same time, based on similarity measurement, historical case matching is performed, and the calculation formula is:

10. The method of claim 2, wherein, The auxiliary decision control step specifically includes comparison optimization, evaluation screening and recommendation output, and the following algorithm implementation scheme is adopted to generate scheme instructions and resource scheduling: S1, the mapping of measures to instructions uses template parameter filling or a neural text generation model to generate readable operation instructions; S2, resource scheduling uses mathematical programming or heuristic scheduling algorithms to optimize response time and resource utilization; S3, instruction issuance and confirmation uses a reliable message transmission and reply mechanism; S4, execution monitoring uses real-time state aggregation, sensor feedback fusion and closed-loop re-planning strategies; The auxiliary decision control step selects the final emergency measures through a weighted scoring function, and the calculation formula is as follows: Score(a i ) = a - P(risk | h v , M) + β - S(c, c i ) The optimal emergency measure calculation formula is: Selected measures a * Convert into executable commands and issue to emergency management platform and field execution end.