Power transmission engineering safety early warning method, terminal and medium based on knowledge graph

By constructing a power transmission project safety early warning system based on knowledge graphs, the problems of information omission and disordered association in traditional methods are solved. The system achieves structured integration of hidden danger data and dynamic risk prediction, thereby improving the accuracy and efficiency of safety management.

CN122240729APending Publication Date: 2026-06-19HEFEI UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2026-01-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Traditional methods for safety management in power transmission projects struggle to deeply mine semantic information and potential connections within texts. Existing risk prediction models cannot adapt to the dynamic characteristics of hidden dangers changing with time and environmental factors, resulting in information omissions and disordered connections in the construction of a safety hazard knowledge system, and limited prediction accuracy.

Method used

A knowledge graph-based method for safety early warning of power transmission projects is constructed. This method involves collecting and preprocessing historical data, defining entity and relationship types, constructing a structured knowledge representation model, extracting entity relationship triples to form a hidden danger knowledge graph, and combining it with real-time data to construct a time-series knowledge graph for risk quantification and early warning.

🎯Benefits of technology

It enables the structured integration and dynamic prediction of potential hazards, improves safety prevention and control capabilities, assesses the current risk status and predicts future risk trends, and assists in the formulation of precise prevention and control measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240729A_ABST
    Figure CN122240729A_ABST
Patent Text Reader

Abstract

This invention relates to the field of power transmission engineering safety management technology, and discloses a knowledge graph-based method, terminal, and medium for power transmission engineering safety early warning. The method collects and preprocesses historical power transmission engineering data to construct a standardized text corpus; defines entity and relation types based on professional knowledge in the field of power transmission engineering safety, forming a structured knowledge representation model; extracts entity relation triples from the standardized text corpus, aligns and stores the entities, completing the construction of a knowledge graph of power transmission engineering safety hazards; integrates the knowledge graph of power transmission engineering safety hazards with real-time power transmission engineering data to construct a time-series knowledge graph; learns dynamic entity representations based on the time-series knowledge graph and performs risk quantification calculations to obtain entity risk values; when an entity risk value exceeds a preset risk threshold, a safety hazard early warning is triggered. This invention achieves structured integration and dynamic prediction of hazard data, improving safety pre-control capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power transmission engineering safety management technology, specifically to a knowledge graph-based power transmission engineering safety early warning method, terminal, and medium. Background Technology

[0002] With the continuous improvement of the intelligent operation and maintenance level of power transmission projects, the types of data involved in safety management are becoming increasingly rich and the structure is becoming increasingly complex. These data mainly include two core sources: first, text data such as hazard investigation and management records, equipment operation and maintenance logs, and fault reports accumulated through the enterprise's internal systems; and second, real-time status data collected through sensors, monitoring devices, and remote sensing technology.

[0003] Faced with such complex power transmission project data, traditional power transmission project safety management methods often rely on manual experience or simple keyword matching techniques to process hazard data, making it difficult to deeply mine semantic information and potential correlations within the text. This results in information omissions and disordered associations in the construction of a safety hazard knowledge system. Furthermore, existing risk prediction models are mostly static models, unable to adapt to the dynamic characteristics of hazards changing with time and environmental factors, leading to limited prediction accuracy. Therefore, these issues urgently need to be addressed. Summary of the Invention

[0004] To address the technical problems existing in the prior art, this invention provides a knowledge graph-based method, terminal, and medium for safety early warning of power transmission projects, which realizes the structured integration and dynamic prediction of potential hazards, thereby improving safety pre-control capabilities.

[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention discloses a knowledge graph-based safety early warning method for power transmission projects, comprising: S1. Collect historical power transmission project data and preprocess it to build a standardized text corpus; S2. Define entity and relationship types based on professional knowledge in the field of power transmission engineering safety, and form a structured knowledge representation model; S3. Extract entity relation triples from the standardized text corpus, perform entity alignment and storage, and complete the construction of the knowledge graph of safety hazards in power transmission projects; S4. The knowledge graph of safety hazards in the power transmission project is integrated with real-time power transmission project data to construct a time-series knowledge graph. Based on the time-series knowledge graph, the dynamic representation of entities is learned and risk quantification is performed to obtain the entity risk value. When the entity risk value exceeds the preset risk threshold, a warning of safety hazards is triggered.

[0006] As a further improvement to the above scheme, in step S1, the historical power transmission project data comes from the recorded text of the enterprise's internal hidden danger investigation and management system, as well as the relevant case text crawled from public data sources; the preprocessing includes cleaning and deduplication of the text, noise reduction, standardization of professional terms, and sentence segmentation. By integrating the standardized sentences obtained after preprocessing, a structured text set with sentences that completely describe a single hidden danger event as the basic unit is formed, namely the standardized text corpus.

[0007] As a further improvement to the above scheme, step S2 includes the following specific steps: S21. Based on professional knowledge in the field of power transmission engineering safety, define the entity type set and relation type set of the knowledge graph to form a structured pattern specification; wherein, the entity type set includes the hidden danger phenomenon HP, equipment Eq, hidden danger location HL, hidden danger cause HC, possible consequences PC, control measures CM, and date DT; the relation type set includes occurrence at OT, origin from FI, cause of RI, and treatment measure as DI; S22. Based on the structured pattern specification, entity boundary annotation and relation annotation are performed on the standardized text corpus, and the annotation results are formalized into the training data required by the model; wherein, the annotation results of each sentence in the standardized text corpus and the formula for constructing the final training dataset are as follows:

[0008]

[0009] In the formula, The first in the standardized text corpus i One sentence. N This represents the number of training samples; Sentence The annotation results; Sentence The set of all annotated entities in the set; and This represents two entities in the sentence, both of which are... Elements in; For entity pairs The relationship between them, whose values ​​come from the set of relationship types, i.e. ; Represents a dataset; S23. Divide the training dataset into training set, validation set and test set according to the set ratio.

[0010] As a further improvement to the above scheme, step S3 includes the following specific steps: S31. Based on the training set, train the named entity recognition model and the relation classification model respectively; S32. Input the sentences from the standardized text corpus into the trained named entity recognition model to perform batch entity recognition; for each sentence and its identified entity pairs, use the trained relation classification model to predict the relation, and compare the predicted probability with the set relation probability threshold, retaining the entity relation triplet with the probability exceeding the threshold as the extraction result; S33. Calculate the cosine similarity between entities in the entity relation triples. When the cosine similarity exceeds the set entity alignment threshold, merge the entities and store the deduplicated triples in the graph database to form a knowledge graph of safety hazards in power transmission projects, represented as:

[0011] In the formula, A knowledge graph of safety hazards in power transmission projects; Represents the entities in an entity relation triple. and entity Cosine similarity between them; This is the entity alignment threshold.

[0012] As a further improvement to the above scheme, step S4 includes the following specific steps: S41. Collect real-time power transmission engineering data and preprocess it. Then, use the named entity recognition model and relation classification model trained in step S31 to extract entity relations and generate timestamped data. t The relation triples are then updated in the graph database to form a time-series knowledge graph, represented as:

[0013] In the formula, Representing a time-series knowledge graph; A set of timestamps; S42. A temporal graph neural network model is used to learn the dynamic vector representation of entities in the temporal knowledge graph; wherein, for entities... In time The representation through entities e The historical neighbor information is aggregated and calculated, and the expression is:

[0014] In the formula, Representing entities e The set of historical neighbors; It is an aggregate function; and These are model parameters; For activation functions; For entities that are historical neighbors of entity e and have a relationship r, For the corresponding neighbor entity Time step; For entities In time The vector representation of , For relationship In time Vector representation of; S43. Based on the dynamic vector representation of entities, calculate the risk value of an entity using the following formula:

[0015] In the formula, For entities e In time t The risk value; For learnable weight vectors, for transpose; For relationship The propagation coefficient; For relationship The weighting function; For entities In time The risk value; S44. When the risk value of any entity exceeds the set risk threshold, a warning of security risks is triggered.

[0016] As a further improvement to the above scheme, in step S31, both the named entity recognition model and the relation classification model are trained based on the pre-trained language model BERT.

[0017] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described above.

[0018] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described above.

[0019] Compared with the prior art, the beneficial effects of the present invention are: This invention constructs a unified ontology for the safety domain of power transmission engineering based on preprocessed data, clearly defining entity types and relation types, and forming a structured knowledge representation model. Based on annotated corpora, it trains an efficient entity recognition and relation extraction model, achieving end-to-end automatic construction from unstructured text to a structured knowledge graph, improving the efficiency and accuracy of the hazard knowledge system construction. By introducing a temporal knowledge graph, combining static knowledge graphs with real-time monitoring data, it not only expresses the semantic relationships between entities but also incorporates dynamic temporal information, thereby describing the evolution and dynamic correlation characteristics of safety hazards over time.

[0020] This invention utilizes a risk propagation model to quantify and dynamically extrapolate potential risks, enabling the assessment of current risk status and prediction of future risk trends. By setting risk thresholds and establishing an early warning mechanism, it achieves automatic identification and real-time alerts for high-risk entities, assisting managers in developing precise prevention and control measures. Attached Figure Description

[0021] Figure 1 This is a flowchart of the knowledge graph-based safety early warning method for power transmission projects in Embodiment 1 of the present invention.

[0022] Figure 2 This is a schematic diagram of the structure of the computer terminal in Embodiment 2 of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Example 1

[0025] Please see Figure 1 This embodiment provides a knowledge graph-based method for early warning of power transmission engineering safety, including: S1. Collect historical power transmission project data and preprocess it to build a standardized text corpus.

[0026] In step S1, the historical power transmission project data comes from the recorded text of the enterprise's internal hidden danger investigation and management system, as well as relevant case texts crawled from public data sources. The preprocessing includes cleaning and deduplication of the text, noise reduction, standardization of professional terms, and sentence segmentation. By integrating the standardized sentences obtained after preprocessing, a structured text set with sentences that completely describe a single hidden danger event as the basic unit is formed, which is the standardized text corpus. , The first in the standardized text corpus i One sentence. N This represents the number of training samples.

[0027] S2. Define entity and relationship types based on professional knowledge in the field of power transmission engineering safety, and form a structured knowledge representation model.

[0028] Step S2 includes the following specific steps: S21. Based on professional knowledge in the field of power transmission engineering safety, define the entity type set of the knowledge graph. E With relation type set R This forms a structured pattern specification; wherein, the entity type set includes hazard phenomenon HP, equipment Eq, hazard location HL, hazard cause HC, possible consequence PC, control measure CM, and date DT; the relation type set includes occurrence at OT, originating from FI, causing RI, and treatment measure DI, expressed in the following form:

[0029] S22. Based on the structured pattern specification, manually annotate the standardized text corpus. The annotation process includes entity boundary annotation and relation annotation.

[0030] In this embodiment, Cohen's Kappa coefficient is used to evaluate inter-annotator consistency, and its calculation formula is as follows:

[0031] In the formula, the Kappa coefficient is used to measure the consistency of annotations; This refers to the proportion of samples in the actual annotation results where multiple annotators provide completely consistent annotation results for all samples; This refers to the expected consistency rate resulting from the completely random and independent annotation behavior of multiple annotators (i.e., their annotations are randomly selected based on their own experience rather than on the sample itself), which is purely due to chance.

[0032] and It comes from the independent annotation results of multiple annotators on the same batch of samples.

[0033] The annotation results are formalized into the training data required by the model. The formula for standardizing the annotation results of each sentence in the text corpus and constructing the final training dataset is as follows:

[0034]

[0035] In the formula, Sentence The annotation results; Sentence The set of all annotated entities in the set; and This represents two entities in the sentence, both of which are... Elements in; For entity pairs The relationship between them, whose values ​​come from the set of relationship types, i.e. ; This represents a dataset.

[0036] S23. Divide the training dataset into training sets according to a 7:2:1 ratio. Validation set and test set .

[0037] S3. Extract entity relation triples from the standardized text corpus, perform entity alignment and storage, and complete the construction of the knowledge graph of safety hazards in power transmission projects. Step S3 may include the following specific steps: S31. Based on the training set, train the named entity recognition model and the relation classification model respectively.

[0038] In this embodiment, both the named entity recognition model and the relation classification model are trained based on the pre-trained language model BERT.

[0039] Specifically, the training set divided in step S23 This serves as the input to the model. Each sample contains a sentence. and its corresponding annotation results The manual annotation from step S22 uses the BIO annotation system, assigning a label to each word in the sentence.

[0040] For the training set Each sentence in The model first converts it into a sequence of word vectors; this process uses the pre-trained language model BERT to obtain the context vector representation of each word, which can be calculated as follows:

[0041] in, The token identifier is obtained by segmenting the text corpus output by S1 and then converting it through the BERT tokenizer. It is the sequence length.

[0042] The model is optimized by minimizing the cross-entropy loss, which calculates the difference between the model's predicted probability distribution and the true label distribution. The formula for this loss function is as follows:

[0043] In the formula, For real BIO tags, To predict probabilities for the model, This represents the batch sample size. Indicates the first In the training samples, the th The true label of each word. It is the probability predicted by the model, representing the probability for the th... The first sample The model determines that a given word belongs to a true label. The probability value of the corresponding category. It represents the number of samples in a training batch, not the size of the entire training set.

[0044] A classification model is then trained to determine whether a predefined semantic relationship exists between two identified entities in the same sentence.

[0045] The training set divided in step S23 As input to the relation classification model, training samples for the relation classification task are constructed based on the manually labeled results from step S22. The model input is constructed by inserting special markers before and after entities, and then the processed text sequence is input into the BERT model.

[0046] The vector corresponding to the [CLS] tag is used as the aggregate representation of the sentence pair. Relationship classification is performed through a fully connected layer, and the model is optimized using the cross-entropy loss function.

[0047] In the formula, M This refers to the batch sample size. For relationship tags; To predict probabilities for the model. Specifically, Indicates the first In the training samples, the th The true label of each word. It is the probability predicted by the model, representing the probability for the th... The first sample The model determines that a given word belongs to a true label. The probability value of the corresponding category.

[0048] S32. The standardized text corpus The sentences are input into the trained named entity recognition model for batch entity recognition:

[0049] In the formula, Indicates from the sentence The entity set identified in the process, each element of which consists of an entity and its corresponding type; For entities The type.

[0050] For each sentence and its identified entity pairs, a pre-trained relation classification model is used to predict the relation. The expression for the prediction probability is:

[0051] In the formula, Indicates that in a given pair of entities ( Predict the probability that the relationship is r under the condition of ). Represents the predictive processing of a relation classification model; These are the parameters for the RC model.

[0052] Set relationship probability threshold High-confidence relation triples are selected. The predicted probabilities are compared with a set relation probability threshold, and those probabilities exceeding the threshold are retained. The entity relation triples are used as the extraction result, and the expression is:

[0053] In the formula, Indicates from the sentence The set of entity relation triples extracted from the data.

[0054] S33. Calculate the cosine similarity between entities in an entity relation triplet using the following formula:

[0055] In the formula, This is a cosine similarity algorithm; For entity pairs The vector representation of . It is an L2 norm.

[0056] When the cosine similarity exceeds a set entity alignment threshold, entity merging is performed. The deduplicated triples are then stored in the graph database Neo4j, forming a knowledge graph of safety hazards in power transmission projects, represented as:

[0057] In the formula, A knowledge graph of safety hazards in power transmission projects; Represents the entities in an entity relation triple. and entity Cosine similarity between them; This is the entity alignment threshold.

[0058] Preferably, a test set is used. The performance of the final constructed knowledge graph of safety hazards in power transmission projects was evaluated, and the accuracy was calculated. P Recall rate R And F1 value.

[0059]

[0060]

[0061]

[0062] in, The number of true positives represents the number of positive cases correctly predicted by the model. The number of false positives is the number of instances that the model incorrectly predicted as positive. False negatives represent the number of instances where the model incorrectly predicted a negative result.

[0063] S4. The knowledge graph of safety hazards in the power transmission project is integrated with real-time power transmission project data to construct a time-series knowledge graph. Based on the time-series knowledge graph, the dynamic representation of entities is learned and risk quantification is performed to obtain the entity risk value. When the entity risk value exceeds the preset risk threshold, a warning of safety hazards is triggered.

[0064] Step S4 includes the following specific steps: S41. Collect real-time power transmission engineering data and preprocess it. Then, use the named entity recognition model and relation classification model trained in step S31 to extract entity relations and generate timestamped data. t The relation triples are then updated in the Neo4j graph database to form a time-series knowledge graph, represented as:

[0065] In the formula, Representing a time-series knowledge graph; It is a set of timestamps.

[0066] S42. A temporal graph neural network model is used to learn the dynamic vector representation of entities in the temporal knowledge graph; wherein, for entities... In time The representation through entities e The historical neighbor information is aggregated and calculated, and the expression is:

[0067] In the formula, Representing entities e The set of historical neighbors; It is an aggregate function; and These are model parameters; For activation functions; For entities that are historical neighbors of entity e and have a relationship r, For the corresponding neighbor entity Time step; For entities In time The vector representation of , For relationship In time The vector representation of .

[0068] S43. Based on the dynamic vector representation of entities, calculate the risk value of an entity using the following formula:

[0069] In the formula, For entities e In time t The risk value; For learnable weight vectors, for transpose; For relationship The propagation coefficient; For relationship The weighting function; For entities In time The risk value.

[0070] S44. When the risk value of any entity exceeds the set risk threshold, a warning of security risks is triggered.

[0071] The above steps can be encapsulated into a risk prediction model. Preferably, historical data can be used for backtesting to evaluate the performance of the risk prediction model. Calculate the early warning accuracy. Recall rate and F1 value :

[0072]

[0073]

[0074] in, The number of correct warnings, The number of false alarms. This represents the number of times the report was missed.

[0075] Example 2

[0076] This embodiment provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described in Embodiment 1.

[0077] like Figure 2 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to at least one processor 101. This embodiment does not limit the specific connection medium between the processor 101 and the memory 102. Figure 2 The example shown is the connection between processor 101 and memory 102 via bus 100. Bus 100 is... Figure 2 The connections between other components are shown in thick lines and are for illustrative purposes only, not as limiting information. Bus 100 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 2 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Alternatively, the processor 101 may also be called a controller; there is no restriction on the name.

[0078] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101. The at least one processor 101 can execute the aforementioned method by executing the instructions stored in the memory 102.

[0079] The processor 101 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 102 and calling data stored in memory 102, the processor can perform various functions and process data, thereby monitoring the device as a whole.

[0080] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.

[0081] Processor 101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the knowledge graph-based power transmission engineering safety early warning method disclosed in Embodiment 1 can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules in processor 101.

[0082] Memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In this embodiment, memory 102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0083] By designing and programming the processor 101, the code corresponding to the knowledge graph-based power transmission engineering safety early warning method described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during operation. Figure 1 The steps of the knowledge graph-based power transmission engineering safety early warning method are shown. How to design and program the processor 101 is a technique well-known to those skilled in the art and will not be described further here.

[0084] Example 3

[0085] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described in Embodiment 1.

[0086] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.

[0087] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A knowledge graph-based safety early warning method for power transmission projects, characterized in that, include: S1. Collect historical power transmission project data and preprocess it to build a standardized text corpus; S2. Define entity and relationship types based on professional knowledge in the field of power transmission engineering safety, and form a structured knowledge representation model; S3. Extract entity relation triples from the standardized text corpus, perform entity alignment and storage, and complete the construction of the knowledge graph of safety hazards in power transmission projects; S4. The knowledge graph of safety hazards in the power transmission project is integrated with real-time power transmission project data to construct a time-series knowledge graph. Based on the time-series knowledge graph, the dynamic representation of entities is learned and risk quantification is performed to obtain the entity risk value. When the entity risk value exceeds the preset risk threshold, a warning of safety hazards is triggered.

2. The knowledge graph-based safety early warning method for power transmission projects according to claim 1, characterized in that, In step S1, the historical power transmission project data comes from the recorded text of the enterprise's internal hidden danger investigation and management system, as well as the relevant case text crawled from public data sources; the preprocessing includes cleaning and deduplication of the text, noise reduction, standardization of professional terms, and sentence segmentation. By integrating the standardized sentences obtained after preprocessing, a structured text set with sentences that completely describe a single hidden danger event as the basic unit is formed, which is the standardized text corpus.

3. The knowledge graph-based safety early warning method for power transmission projects according to claim 1, characterized in that, Step S2 includes the following specific steps: S21. Based on professional knowledge in the field of power transmission engineering safety, define the entity type set and relation type set of the knowledge graph to form a structured pattern specification; wherein, the entity type set includes the hidden danger phenomenon HP, equipment Eq, hidden danger location HL, hidden danger cause HC, possible consequences PC, control measures CM, and date DT; the relation type set includes occurrence at OT, origin from FI, cause of RI, and treatment measure as DI; S22. Based on the structured pattern specification, entity boundary annotation and relation annotation are performed on the standardized text corpus, and the annotation results are formalized into the training data required by the model; wherein, the annotation results of each sentence in the standardized text corpus and the formula for constructing the final training dataset are as follows: In the formula, The first in the standardized text corpus i One sentence. N This represents the number of training samples; Sentence The annotation results; Sentence The set of all annotated entities in the set; and This represents two entities in the sentence, both of which are... Elements in; For entity pairs The relationship between them, whose values ​​come from the set of relationship types, i.e. ; Represents a dataset; S23. Divide the training dataset into training set, validation set and test set according to the set ratio.

4. The knowledge graph-based safety early warning method for power transmission projects according to claim 3, characterized in that, Step S3 includes the following specific steps: S31. Based on the training set, train the named entity recognition model and the relation classification model respectively; S32. Input the sentences from the standardized text corpus into the trained named entity recognition model to perform batch entity recognition; for each sentence and its identified entity pairs, use the trained relation classification model to predict the relation, and compare the predicted probability with the set relation probability threshold, retaining the entity relation triplet with the probability exceeding the threshold as the extraction result; S33. Calculate the cosine similarity between entities in the entity relation triples. When the cosine similarity exceeds the set entity alignment threshold, merge the entities and store the deduplicated triples in the graph database to form a knowledge graph of safety hazards in power transmission projects, represented as: In the formula, A knowledge graph of safety hazards in power transmission projects; Represents the entities in an entity relation triple. and entity Cosine similarity between them; This is the entity alignment threshold.

5. The knowledge graph-based safety early warning method for power transmission projects according to claim 4, characterized in that, Step S4 includes the following specific steps: S41. Collect real-time power transmission engineering data and preprocess it. Then, use the named entity recognition model and relation classification model trained in step S31 to extract entity relations and generate timestamped data. t The relation triples are then updated in the graph database to form a time-series knowledge graph, represented as: In the formula, Representing a time-series knowledge graph; A set of timestamps; S42. A temporal graph neural network model is used to learn the dynamic vector representation of entities in the temporal knowledge graph; wherein, for entities... In time The representation through entities e The historical neighbor information is aggregated and calculated, and the expression is: In the formula, Representing entities e The set of historical neighbors; It is an aggregate function; and These are model parameters; For activation functions; For entities that are historical neighbors of entity e and have a relationship r, For the corresponding neighbor entity Time step; For entities In time The vector representation of , For relationship In time Vector representation of; S43. Based on the dynamic vector representation of entities, calculate the risk value of an entity using the following formula: In the formula, For entities e In time t The risk value; For learnable weight vectors, for Transpose of; For relationship The propagation coefficient; For relationship The weighting function; For entities In time The risk value; S44. When the risk value of any entity exceeds the set risk threshold, a warning of security risks is triggered.

6. The knowledge graph-based safety early warning method for power transmission projects according to claim 4, characterized in that, In step S31, both the named entity recognition model and the relation classification model are trained based on the pre-trained language model BERT.

7. A computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the knowledge graph-based power transmission engineering safety early warning method as described in any one of claims 1 to 6.