Knowledge graph-based security boundary identification method, device, medium and product

By using a knowledge graph-based approach, pre-trained language units, bidirectional long short-term memory networks, and conditional random field units to generate safety boundaries for train control systems, the problems of inaccurate safety boundary identification and integration difficulties were solved. This enabled accurate identification and information integration of dynamic safety boundaries, thereby improving train operation safety.

CN119646233BActive Publication Date: 2025-10-24BEIJING JIAOTONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411603644.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-10-24
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

In existing technologies, the safety boundary identification process in train operation safety protection is not accurate enough and is difficult to integrate, with serious information fragmentation and a lack of effective parameterized identification tools.

Method used

A knowledge graph-based approach is adopted to extract text from hazard source logs, and to extract knowledge using pre-trained language units, bidirectional long short-term memory networks, and conditional random field units. This generates a triplet table, and the knowledge is then fused and processed to ultimately generate the safety boundary of the train control system.

Benefits of technology

It achieves accurate and comprehensive identification of safety boundaries, has strong dynamic update capabilities, and improves the safety of train operation and the efficiency of information integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646233B_ABST
    Figure CN119646233B_ABST
Patent Text Reader

Abstract

The application discloses a knowledge graph-based safety boundary identification method and device, medium and product, relates to the technical field of train operation safety protection in rail transit, and comprises the following steps: acquiring a hazard source log, performing text extraction, and obtaining a hazard event database; using a knowledge extraction model to perform knowledge extraction on the hazard event database, and obtaining a triple table comprising entities, relationships and attributes; the knowledge extraction model comprises a pre-training language unit, a bidirectional long short-term memory network unit and a conditional random field unit; performing knowledge fusion operation and knowledge processing operation on the triple table, and obtaining a knowledge graph; and performing logical relationship negation on the knowledge graph, and obtaining a safety boundary of a train control system. By introducing the knowledge graph technology, the defects of inaccurate identification of the safety boundary in the prior art are solved, and the identification of the dynamic safety boundary is effectively supported, so that the safety of train operation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of train operation safety protection in rail transit, and in particular to a safety boundary identification method and device based on a knowledge graph, a medium and a product. BACKGROUND

[0002] In the field of rail transit, the key to ensuring train operation safety lies in the constraint of train safety behavior, which is reflected in the design of the train control system. The definition of functional safety and availability is crucial for ensuring train operation safety, and is usually guaranteed in the form of contract management. In this process, the information sources involved mainly have two aspects; on the one hand, the information is recorded in detail in the system safety constraint document, and on the other hand, the information is reflected in the hazard source log. However, since these information are described in natural language, there are problems of incompleteness, non-standardization and inaccuracy, which may lead to ambiguity in the understanding of technical personnel, and thus affect the train operation safety.

[0003] In addition, in the evolution process of the train control system, the automation level is continuously improved, and the system function and structure are continuously changed, which leads to changes in the corresponding safety boundary, which may break through the static safety boundary defined by the traditional train control system document form. Therefore, in order to adapt to the evolution of the train control system, dynamic safety boundary protection technology needs to be adopted, that is, the safety boundary parameters of the system are monitored in real time, and appropriate control strategies are selected. However, the first step to achieve this goal is to comprehensively identify the safety boundary.

[0004] In summary, the train operation safety protection needs to comprehensively identify the safety boundary, but at present, the identification process of the safety boundary mostly stays at the level of natural language description and manual experience, and there are problems of inaccurate identification process of the safety boundary and difficulty in integration, the information left is seriously fragmented, and there is a lack of effective tools and technology for parameterized identification of the safety boundary. SUMMARY

[0005] The purpose of the present application is to provide a safety boundary identification method, device, medium and product based on a knowledge graph, which can effectively support the identification of dynamic safety boundary, and solve the problems of inaccurate analysis results of the safety boundary and difficulty in integration.

[0006] To achieve the above-mentioned purpose, the present application provides the following solutions:

[0007] In a first aspect, the present application provides a safety boundary identification method based on a knowledge graph, comprising:

[0008] acquire a hazard source log, and perform text extraction on the hazard source log to obtain a hazard event database; the hazard source log is a text recording a hazard event;

[0009] perform knowledge extraction on the hazard event database by using a knowledge extraction model to obtain a triple table including entities, relationships and attributes; the knowledge extraction model includes a pre-training language unit, a bidirectional long short-term memory network unit and a conditional random field unit;

[0010] perform a knowledge fusion operation and a knowledge processing operation on the triple table to obtain a knowledge graph;

[0011] perform logical relation negation on the knowledge graph to obtain a safety boundary of a train control system;

[0012] The determination process of the knowledge extraction model includes:

[0013] based on a safety boundary ontology model of the train control system, annotate a historical text data set to obtain a historical sample data set; the safety boundary ontology model of the train control system is used to define entities, relationships and attributes in the train control system; the historical sample data set includes a plurality of sample data; the sample data includes historical text data and corresponding label data; the historical text data is historical hazard event data, and the label data is entities, relationships and attributes;

[0014] construct a knowledge extraction network;

[0015] based on the historical sample data set, train the knowledge extraction network to obtain the knowledge extraction model.

[0016] In a second aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the safety boundary identification method based on the knowledge graph in the above.

[0017] In a third aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the safety boundary identification method based on the knowledge graph in the above.

[0018] In a fourth aspect, the present application provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the safety boundary identification method based on the knowledge graph in the above.

[0019] According to the specific embodiments provided by the present application, the following technical effects are disclosed:

[0020] The application provides a knowledge graph-based safety boundary identification method, device, medium and product. The method comprises the following steps: obtaining a hazard source log, and performing text extraction to obtain a hazard event database; performing knowledge extraction on the hazard event database by using a knowledge extraction model to obtain a triple table comprising entities, relationships and attributes; the knowledge extraction model comprises a pre-training language unit, a bidirectional long short-term memory network unit and a conditional random field unit; performing knowledge fusion operation and knowledge processing operation on the triple table to obtain a knowledge graph; performing logical relationship negation on the knowledge graph to obtain a safety boundary of a train control system; wherein the determination process of the knowledge extraction model comprises the following steps: based on a safety boundary ontology model of the train control system, labeling historical text data sets to obtain a historical sample data set; constructing a knowledge extraction network; and based on the historical sample data set, training the knowledge extraction network to obtain the knowledge extraction model.

[0021] The application converts information in the hazard source log into nodes and edges in the knowledge graph, thereby eliminating the problem of information fragmentation. Meanwhile, as the functions of the train control system change, the knowledge graph can be dynamically updated, effectively supporting identification of a dynamic safety boundary, thereby improving the safety of train operation. Moreover, the historical sample data set is generated based on the safety boundary ontology model of the train control system, which can ensure the richness of the generated historical data set, thereby enabling accurate and comprehensive identification of the entity, relationship and attribute triple table. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] Figure 1 An application environment diagram of a knowledge graph-based safety boundary identification method in an embodiment of the present application;

[0024] Figure 2 A flowchart of a knowledge graph-based safety boundary identification method provided in an embodiment of the present application;

[0025] Figure 3 A structure diagram of a pre-training language unit provided in an embodiment of the present application;

[0026] Figure 4 A structure diagram of a bidirectional long short-term memory network unit provided in an embodiment of the present application;

[0027] Figure 5A conditional random field unit structure diagram provided by an embodiment of the present application is shown in the figure;

[0028] Figure 6 A safety boundary ontology model diagram of a train control system provided by an embodiment of the present application is shown in the figure;

[0029] Figure 7 A Word2Vec model structure diagram provided by an embodiment of the present application is shown in the figure.

[0030] Figure 8 A computer device structure diagram provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0032] The above purposes, features and advantages of the present application can be more obvious and easy to understand. The present application will be described in further detail below with reference to the drawings and specific embodiments.

[0033] The safety boundary identification method provided by the embodiments of the present application can be applied in an application environment as shown in the figure. Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be separately arranged, can be integrated on the server 104, or can be placed on a cloud or other server. The terminal 102 can send a to-be-processed dangerous source log to the server 104. The server 104 receives the to-be-processed dangerous source log. For the to-be-processed dangerous source log, the server 104 is configured to perform text extraction to obtain a dangerous event database. The server 104 is configured to perform knowledge extraction on the dangerous event database by using a knowledge extraction model to obtain a triple table including entities, relationships and attributes. The server 104 is configured to perform knowledge fusion operation and knowledge processing operation on the triple table to obtain a knowledge graph. The server 104 is configured to perform logical relationship negation on the knowledge graph to obtain a safety boundary of a train control system. The server 104 can feed back the obtained safety boundary of the train control system to the terminal 102. In addition, in some embodiments, the safety boundary identification method can also be implemented by the server 104 or the terminal 102 alone, for example, the terminal 102 can directly perform safety boundary identification processing on the to-be-processed dangerous source log, or the server 104 can obtain the to-be-processed dangerous source log from the data storage system and perform safety boundary identification processing on the to-be-processed dangerous source log.

[0034] The terminal 102 can be, but is not limited to, various desktop computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The server 104 can be implemented by a stand-alone server or a server cluster composed of multiple servers, and can also be a cloud server.

[0035] In recent years, with the rapid development of knowledge graph technology, the technology describes the concepts and relationships between things in the real world in a structured form, and stores the relationships between entities in the form of a graph, which has obvious advantages in mining data implicit associations. In natural language processing, knowledge graph can be used as a powerful tool to help us understand the complex factors behind the entity.

[0036] In an exemplary embodiment, as shown in Figure 2 , a knowledge graph-based security boundary identification method is provided, which is executed by a computer device, specifically by a terminal or a server, or by both a terminal and a server. In the embodiments of the present application, the method is applied to the server 104 in Figure 1 , which includes the following steps 201 to 205. Among them:

[0037] Step 201, obtaining a hazard source log, and performing text extraction on the hazard source log to obtain a hazard event database; the hazard source log is a text recording a hazard event.

[0038] An example: the hazard source log is a text recording a hazard event during train travel.

[0039] Step 202, using a knowledge extraction model to extract knowledge from the hazard event database to obtain a triple table including entities, relationships and attributes; the knowledge extraction model includes a pre-training language unit, a bidirectional long short-term memory network unit and a conditional random field unit.

[0040] Further, the hazard event database includes a plurality of current text data; the knowledge extraction model is used to extract knowledge from the hazard event database to obtain a triple table including entities, relationships and attributes, specifically including:

[0041] Step 2021, inputting the current text data into the pre-training language unit to perform vectorization representation on the current text data to obtain a pre-trained word vector result. The structure diagram of the pre-training language unit is as shown in Figure 3 .

[0042] Step 2022, input the pre-trained word vector result into the bidirectional long short-term memory network unit to perform forward processing and reverse processing on the pre-trained word vector result, and capture the context information of the pre-trained word vector result, to obtain a context information fused predicted label sequence, so as to improve the generalization ability of the model and reduce the risk of overfitting. The structure diagram of the bidirectional long short-term memory network unit is as shown in Figure 4 .

[0043] Step 2023, input the context information fused predicted label sequence into the conditional random field unit to perform decoding processing on the context information fused predicted label sequence, to obtain an optimal label sequence; the optimal label sequence is a triple table including entities, relationships and attributes obtained after knowledge extraction on the current text data. The structure diagram of the conditional random field unit is as shown in Figure 5 .

[0044] Step 203, in order to determine whether the entities mentioned in different data sources refer to the same object in the real world, a knowledge fusion operation is used to update the entities in the triple table, to obtain a new triple table; the knowledge fusion operation includes entity disambiguation and entity alignment.

[0045] Further, the knowledge fusion operation is used to update the entities in the triple table, to obtain a new triple table, which specifically includes:

[0046] Step 2031, feature extraction is performed on the entities in the triple table, to obtain entity feature vectors; the entity feature vectors can include the name, attribute, context information and co-occurrence word of the entity.

[0047] Step 2032, a cosine similarity calculation method is used to calculate the similarity between any two entity feature vectors, and a similarity matrix is constructed according to the calculated similarity, and the similarity matrix is represented by S ij , representing the similarity between entity i and entity j.

[0048] The cosine similarity calculation formula is:

[0049]

[0050] Wherein, A and B are any two entity feature vectors, A·B is the dot product of any two entity feature vectors, |A|×|B| is the norm of any two entity feature vectors, A i and B i are the components of vectors A and B in the i-th dimension, respectively.

[0051] In step 2033, the K-means clustering algorithm and the similarity matrix are used to iteratively calculate the entities corresponding to the similarity matrix until a convergence condition is met, to obtain entity pairs. The objective of the K-means clustering algorithm is to group data points such that the sum of the distances of each data point to the center of the cluster it belongs to (i.e., the mean of all points in the cluster) is minimized.

[0052] In addition, the quality of the clustering results is evaluated by accuracy, recall, and F1 score. The accuracy represents the proportion of correctly identified entity links to all identified links; the recall represents the proportion of correctly identified entity links to all links that should be identified; and the F1 score is the harmonic mean of accuracy and recall, which is an index for balancing accuracy and recall; wherein TP is the number of correctly identified entity links, FP is the number of incorrectly identified entity links, and FN is the number of un-identified entity links.

[0053] In step 2034, a support vector machine is used to determine whether the entity pairs are aligned, and the entities in the triple table are updated according to the determination result to obtain a new triple table.

[0054] Specifically, the support vector machine (SVM) algorithm is used to perform the entity alignment process. First, for any pair of entities, features reflecting their similarity are extracted, and the extracted features are converted into numerical vectors for easy processing by the SVM. Then, a linear SVM model is selected, and a linear kernel function is used to map the data to a high-dimensional space. An hyperplane that can maximize the boundary between different classes is found by optimizing the margin, as follows:

[0055]

[0056] u=β·(w * ·α+b * );

[0057]

[0058] where d is the normalized linear function output; β is the true target value; w is the weight vector, w * is the transpose of the weight vector; α is the input feature vector; b is the bias term, b * is the transpose of the bias vector; and u is the un-normalized linear function output.

[0059] The Lagrange multiplier method is used to convert the optimization problem of the SVM into a dual problem, and the optimal solution is obtained, as follows:

[0060]

[0061] Wherein, L(w, b, l) is a loss function; l is a Lagrange multiplier, l i is the Lagrange multiplier of the i-th data point; w is the weight vector; b is the bias term; oi is the true target value of the i-th sample; N is the number of samples; vi is the feature vector of the i-th sample.

[0062] In the solving process, the data points that have a decisive influence on the hyperplane, i.e. support vectors, are identified, and the final hyperplane is constructed using support vectors and Lagrange multipliers. The class to which the new data point belongs is determined by calculating its position on the hyperplane. Finally, the accuracy, recall, F1 score and other indicators are used to evaluate the performance of the SVM model.

[0063] Step 204, using knowledge processing operation, supplement the relationship between entities in the new triple table to obtain the knowledge graph; after updating the entities in the triple table, the relationship between the entities is mostly incomplete, and the missing value is very serious, so the knowledge processing operation is used to supplement the relationship between entities in the new triple table.

[0064] Specifically, the relationship between entities in the new triple table is supplemented by local structure graph reasoning to obtain the knowledge graph. The determination process of the local structure graph reasoning is as follows: the degree of the entity (i.e. the number of edges connected to the entity) is selected as the local structure feature of reasoning; the selected feature is extracted from the knowledge graph to create a feature vector for each entity and relationship; an adjacency matrix is created to represent the relationship between entities; a feature matrix is constructed according to the extracted features, each entity and relationship occupies a row in the matrix; model parameters are initialized, including weight matrix. The feature space is expanded by linear transformation to enhance the expression ability of the model. Define the cross-entropy loss function to measure the difference between the predicted results and the actual results. Use training data to adjust model parameters through gradient descent optimization algorithm to minimize the loss function. Predict the missing relationships in the knowledge graph to generate a candidate relationship set; set a threshold to filter the prediction results to balance precision and recall. In addition, test data is used to evaluate the performance of the model, and the evaluation is carried out through accuracy, recall and F1 score indicators, and the model is iteratively optimized according to the evaluation results to adjust the feature selection and parameters to improve the reasoning performance. Finally, the verified reasoning results are integrated back into the knowledge graph to update the entity and relationship information, and the performance is continuously iteratively optimized to improve the performance.

[0065] Step 205, logical relationship negation is performed on the knowledge graph to obtain the safety boundary of the train control system. Since the generated knowledge graph is a hazard cause graph, to obtain the safe elements, the logical relationship of the above elements needs to be negated, i.e. the conditions that the system safety needs to meet.

[0066] Further, logical relation negation is performed on the knowledge graph to obtain the safety boundary of the train control system, and the safety boundary of the train control system specifically includes:

[0067] In step 2051, the accuracy index, the coverage index and the consistency index are used to evaluate the knowledge graph.

[0068] In step 2052, when the evaluation result of the knowledge graph meets the preset condition, logical relation negation is performed on the knowledge graph whose evaluation result meets the preset condition to obtain the safety boundary of the train control system; when the evaluation result of the knowledge graph does not meet the preset condition, the knowledge extraction network is retrained to obtain a new knowledge extraction model, and based on the new knowledge extraction model, a new knowledge graph is obtained, and the new knowledge graph is evaluated again.

[0069] The calculation process of the accuracy index is that the accuracy of the knowledge graph is calculated by using a random sampling method to obtain the accuracy index; the calculation process of the coverage index is that the coverage of entities, relationships and attributes in the knowledge graph is calculated to obtain a coverage result; the coverage result is obtained by comparing the entities, relationships and attributes in the knowledge graph with the entities, relationships and attributes in the historical sample data set, and the coverage index is obtained according to the coverage result; the determination process of the consistency index is that data is extracted from the knowledge graph by using the query function of the graph database, and the extracted data is transmitted to the rule engine, and the consistency index is obtained according to the predefined rules in the rule engine. Moreover, for complex inconsistency problems, manual review and judgment are performed.

[0070] Further, the determination process of the knowledge extraction model is that:

[0071] Based on the safety boundary ontology model of the train control system, the historical text data set is labeled by using the BIO labeling system and Label-Studio to obtain the historical sample data set.

[0072] The safety boundary ontology model of the train control system is constructed by using the Protégé tool, and is used to define entities, relationships and attributes in the train control system; for example, Figure 6As shown, the train control system itself is a system repeatedly running under a complete safety guarantee system, and is generally periodically run under given line conditions and operation plans, and is generally composed of two parts of safety constraints for train safe operation guarantee and operation assumptions for guaranteeing safe use of the operation environment. For rail transit, the running process of the train is realized through necessary equipment and facilities for train operation and active safety protection system (signal system) to avoid train collision during operation and maintain main operation constraints. Therefore, the safety constraints specify the function and timeliness requirements of the actions of the signal equipment to prevent dangerous situations of the train, and can be generally divided into signal subsystem, vehicle subsystem, communication subsystem, etc. from the system composition; the operation assumptions mainly include environmental information, dispatching information, speed limit information, etc. required for train operation control except the signal system.

[0073] The historical sample data set includes a plurality of sample data; the sample data includes historical text data and corresponding label data; the historical text data is historical dangerous event data, and the label data is entity, relationship and attribute.

[0074] A knowledge extraction network is constructed; the knowledge extraction network includes a pre-trained language network, a bidirectional long short-term memory network and a conditional random field.

[0075] Based on the historical sample data set, the knowledge extraction network is trained to obtain the knowledge extraction model.

[0076] In the training process of the pre-trained language network, any historical text data is input into a Word2Vec model to obtain an initialized word vector, and the initialized word vector is used to initialize the embedding layer of the pre-trained language network; the structure of the Word2Vec model is as shown in Figure 7 The specific steps are as follows:

[0077] a. Walk parameter setting: the parameters of random walk set in the application include walk length, walk quantity, and return parameter and entry parameter.

[0078] b. Random walk execution: starting from each node of the model, a walk path is generated according to the set parameters.

[0079] c. Walk data preprocessing: converting the walk path into a serialized node list format suitable for model training.

[0080] d. Embedding model selection: Word2Vec model is used to learn node embedding, including CBOW and Skip-gram two architectures, and using negative sampling technology and hierarchical Softmax technology to optimize training; wherein, the hierarchical Softmax reduces the computational complexity by constructing a binary tree; the Word2Vec model adjusts the weight to minimize the loss function by the gradient descent algorithm, and updates the weight based on the loss function by the back propagation algorithm.

[0081] The loss function formula is as follows:

[0082]

[0083]

[0084] Wherein, p is the real distribution; q is the predicted probability distribution; a is the sample; is the output of the exponential function, fg i is the logarithmic probability calculated by the model for a specific class i input a; f is the weight and bias of the linear combination input to the softmax function; g i is the output value of a certain specific class; fj is the linear transformation of the jth element of the feature vector input to the softmax function.

[0085] e. Training the Word2Vec model.

[0086] f. Apply embedding vectors: apply the initialized word vectors obtained by training to the embedding layer of the pre-trained language network.

[0087] The training process of the bidirectional long short-term memory network (BiLSTM) is as follows: first, initialize the bidirectional long short-term memory network by setting the dimensions of the hidden layer and the word embedding layer, the bidirectional long short-term memory network consists of two LSTM units, which process the forward and reverse information of the sequence respectively, and each LSTM unit has its own initial hidden state and cell state; in the forward propagation process, the forward LSTM unit updates the state according to the word vector of the current word and the state of the previous time step; the reverse propagation process is similar, but the reverse LSTM unit starts processing from the end of the sequence, i.e. updates the current hidden state and cell state according to the word vector of the current word, the hidden state and cell state of the next time step. Then, the hidden states generated by the forward and reverse LSTM at the same time step are merged to obtain a final hidden state that integrates information from both directions; this merged state can capture the context information of the pre-trained word vector result and obtain a word vector sequence that integrates context information.

[0088] Wherein, the calculation process of the LSTM unit is:

[0089]

[0090] where f t , i t , o t are the activation values of forget gate, input gate and output gate respectively; c t is the cell state of the current time step, is the new candidate cell state; h t is the hidden state of the current time step; σ is an output that represents the degree of gate opening between 0 and 1; W f , W i , W c , W o are used for input gate, forget gate, cell state and output gate respectively; b f , b i , b c , b o are used for input gate, forget gate, cell state and output gate respectively; h t is the hidden state of the current time step, h t-1 is the hidden state of the previous time step; x t is the input of the current time step.

[0091] The conditional random field (CRF) considers the dependency between labels, and obtains the label sequence with the highest probability by calculating emission scores and transition scores. The emission score represents the score of each word under a specific label, while the transition score represents the probability of transitioning from one label to another. The normalization factor ensures that the probability sum of all possible label sequences is 1. By using the Viterbi algorithm, the most likely label sequence is found, i.e. the label sequence with the highest probability given the input sequence, i.e. the optimal label sequence. The calculation process of the conditional random field is as follows:

[0092]

[0093] where, is the emission score of the i-th word under the label y i ; is the transition score from label y i to y i+1 ; Z(x) is the normalization factor; n is the length of the observation sequence; x is the observation sequence; y is the label sequence.

[0094] In the training process, the conditional random field optimizes the model parameters by maximizing the ratio of the score of the true path to the score of all possible paths, uses the Adam optimizer, and uses the backpropagation algorithm to update the model parameters.

[0095] In a specific implementation, the conditional random field unit first receives the output features of the bidirectional long short-term memory network unit as input, then defines a label set, calculates transition features, and constructs a potential function. The potential function score is converted into a probability through a normalization factor, and the Viterbi algorithm is used to decode the optimal label sequence as the identification result of the model for entities, relationships and attributes.

[0096] The application can eliminate the problem of information fragmentation by introducing knowledge graph technology to convert the information in the hazard source log into nodes and edges in the knowledge graph. At the same time, as the functions of the train control system change, the knowledge graph can be dynamically updated, effectively supporting the identification of dynamic safety boundaries, thereby improving the safety of train operation. Moreover, the application generates a historical sample data set based on the safety boundary ontology model of the train control system, which can ensure the richness of the generated historical data set, thereby enabling accurate and comprehensive identification of entity, relationship and attribute triple tables.

[0097] The application also provides an application scenario of the safety boundary identification method. Specifically, the safety boundary identification method provided by the embodiment can be applied in a train operation safety protection scenario. The train operation safety protection scenario includes a safety boundary identification link and a safety boundary execution link. The safety boundary identification method provided by the embodiment belongs to the safety boundary identification link in the train operation safety protection.

[0098] In an exemplary embodiment, a computer device, which can be a server or a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store hazard source log processing data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a safety boundary identification method based on a knowledge graph.

[0099] Those skilled in the art can understand that, Figure 8The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0100] In an exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.

[0101] In an exemplary embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.

[0102] In an exemplary embodiment, a computer program product is provided, including a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.

[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0104] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, databases or other media used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0105] The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0106] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.

[0107] The principles and implementation modes of the present application are described by applying specific examples herein, and the above-mentioned embodiments are only used to help understand the method and its core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range can be changed. In conclusion, the content of the present application should not be understood as a limitation.

Claims

1. A knowledge graph based security boundary identification method, characterized in that, The knowledge graph-based safety boundary identification method comprises: acquiring a hazard source log and performing text extraction on the hazard source log to obtain a hazard event database; the hazard source log is a text recording a hazard event; performing knowledge extraction on the hazard event database by using a knowledge extraction model to obtain a triple table comprising entities, relationships and attributes; the knowledge extraction model comprises a pre-training language unit, a bidirectional long short-term memory network unit and a conditional random field unit; performing knowledge fusion and knowledge processing operations on the triple table to obtain a knowledge graph; performing logical relationship negation on the knowledge graph to obtain a safety boundary of a train control system; wherein the determination process of the knowledge extraction model is: annotating a historical text data set based on a safety boundary ontology model of a train control system to obtain a historical sample data set; the safety boundary ontology model of the train control system is used to define entities, relationships and attributes in the train control system; the historical sample data set comprises a plurality of sample data; the sample data comprises historical text data and corresponding label data; the historical text data is historical hazard event data, and the label data is entities, relationships and attributes; constructing a knowledge extraction network; training the knowledge extraction network based on the historical sample data set to obtain the knowledge extraction model; performing logical relationship negation on the knowledge graph to obtain a safety boundary of a train control system, specifically comprising: evaluating the knowledge graph by using an accuracy index, a coverage index and a consistency index; when the evaluation result of the knowledge graph meets a preset condition, performing logical relationship negation on the knowledge graph whose evaluation result meets the preset condition to obtain the safety boundary of the train control system; when the evaluation result of the knowledge graph does not meet the preset condition, retraining the knowledge extraction network to obtain a new knowledge extraction model, and based on the new knowledge extraction model, obtaining a new knowledge graph, and then evaluating the new knowledge graph; wherein the calculation process of the accuracy index is: calculating the accuracy of the knowledge graph by using a random sampling method to obtain the accuracy index; the calculation process of the coverage index is: comparing with the historical sample data set to calculate the coverage result of entities, relationships and attributes in the knowledge graph to obtain the coverage index; the determination process of the consistency index is: extracting data from the knowledge graph by using a query function of a graph database, and delivering the extracted data to a rule engine, and obtaining the consistency index according to a predefined rule in the rule engine. 2.The knowledge graph based security boundary argumentation method of claim 1, wherein, The hazard event database comprises a plurality of current text data; the knowledge extraction model is used to perform knowledge extraction on the hazard event database to obtain a triple table comprising entities, relationships and attributes, specifically comprising: inputting the current text data into the pre-training language unit to perform vectorization representation on the current text data to obtain a pre-trained word vector result; The pre-trained word vector result is input into the bidirectional long short-term memory network unit to perform forward processing and reverse processing on the pre-trained word vector result and capture context information of the pre-trained word vector result, so as to obtain a predicted label sequence fused with context information; The predicted label sequence fused with context information is input into the conditional random field unit to perform decoding processing on the predicted label sequence fused with context information, so as to obtain an optimal label sequence; the optimal label sequence is a triple table including entities, relationships and attributes obtained by performing knowledge extraction on current text data. 3.The knowledge graph based security boundary argumentation method of claim 1, wherein, The triple table is subjected to knowledge fusion operation and knowledge processing operation, so as to obtain a knowledge graph, specifically including: The knowledge fusion operation is used to update the entities in the triple table, so as to obtain a new triple table; the knowledge fusion operation includes entity disambiguation and entity alignment. The knowledge processing operation is used to supplement the relationships between the entities in the new triple table, so as to obtain the knowledge graph. 4.The knowledge graph based security boundary identification method of claim 3, wherein, The knowledge fusion operation is used to update the entities in the triple table, so as to obtain a new triple table, specifically including: Feature extraction is performed on the entities in the triple table, so as to obtain entity feature vectors; Similarity calculation is performed on any two entity feature vectors, and a similarity matrix is constructed according to the calculated similarity; The K-means clustering algorithm and the similarity matrix are used to perform iterative calculation on the entities corresponding to the similarity matrix, so as to obtain entity pairs. Support vector machines are used to determine whether the entity pairs are aligned, and the entities in the triple table are updated according to the determination result, so as to obtain a new triple table. 5.The knowledge graph based security boundary identification method of claim 4, wherein, The knowledge processing operation is used to supplement the relationships between the entities in the new triple table, so as to obtain the knowledge graph, specifically including: Local structure graph reasoning is used to supplement the relationships between the entities in the new triple table, so as to obtain the knowledge graph. 6.The knowledge graph based security boundary argumentation method of claim 1, wherein, The knowledge extraction network includes a pre-trained language network, a bidirectional long short-term memory network and a conditional random field; wherein during the training process of the pre-trained language network, any historical text data is input into a Word2Vec model to obtain an initialized word vector, and the initialized word vector is used to initialize an embedding layer of the pre-trained language network.

7. A computer device comprising: A memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the knowledge graph-based security boundary identification method of any one of claims 1-6.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the knowledge graph-based security boundary identification method of any one of claims 1-6.

9. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the knowledge graph-based security boundary identification method of any one of claims 1-6.

Citation Information

Patent Citations

  • Public security risk assessment method based on knowledge graph

    CN118093889A

  • System and method for capturing, indexing and extracting digital workflow from videos using artificial intelligence

    US20210271886A1