Knowledge graph construction method, system and equipment based on electric power production field and medium

By applying the knowledge graph construction method of Transformer and HMM models in the field of power production, the problem of equipment information dispersion and inaccurate maintenance planning is solved, and efficient information integration and the accuracy of maintenance planning is achieved.

CN119691191APending Publication Date: 2025-03-25CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411529488.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the field of power production, equipment information is scattered in different systems and documents, resulting in isolated information. Operations and maintenance personnel need to frequently switch data sources when querying equipment-related information, which is time-consuming and labor-intensive. The maintenance plan cannot comprehensively consider the multiple factors of the equipment, resulting in untimely maintenance or excessive maintenance.

Method used

Using a knowledge graph construction method based on the Transformer model and HMM model, we collect and preprocess equipment operation and maintenance data in the field of power production, entity identification and relationship extraction are carried out to build a knowledge graph so as to more accurately identify and associate device information.

Benefits of technology

It realizes effective integration and correlation of equipment information, improves the query efficiency of operation and maintenance personnel, and can comprehensively consider multiple factors of the equipment, formulate more accurate maintenance plans to avoid excessive or untimely maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691191A_ABST
    Figure CN119691191A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of knowledge maps, and provides a knowledge map construction method, system and device based on the electric power production field and a medium, and the method comprises the steps: collecting related data information of equipment operation and maintenance in the electric power production field, and carrying out the data preprocessing; performing entity recognition on the preprocessed text data through a Transform model and an HMM model, and determining an entity type corresponding to each piece of text data; according to the determined entity category, collecting text data containing an entity involution relationship, taking the text data containing the entity involution relationship as a sample, inputting the sample into the constructed recurrent neural network for training, and performing entity relationship extraction and entity attribute extraction based on a trained model; and constructing a knowledge graph based on the entity category, the entity relationship and the entity attribute of each text. By improving the accuracy of the knowledge graph, an accurate data basis is provided for power equipment management, operation and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and in particular to a method, system, device and medium for constructing a knowledge graph based on the field of electric power production. Background Art

[0002] In the current equipment management and maintenance in the field of power production, equipment information is scattered in different systems and documents, including equipment ledgers, operation records, maintenance reports, technical manuals, etc. Due to the lack of effective integration and association between these information, each piece of information is isolated. When operation and maintenance personnel query equipment-related information, they need to switch back and forth between different data sources, which consumes a lot of time and energy. In the process of formulating equipment maintenance plans, they can only be based on single factors such as fixed time periods or simple equipment operating time, and cannot comprehensively consider multiple factors such as the actual operating status of the equipment, load conditions, environmental factors, and the synergistic relationship with other equipment, resulting in inaccurate maintenance plans and even excessive or untimely maintenance.

[0003] In view of this, a method, system, equipment and medium for constructing a knowledge graph based on the field of power production are needed. Summary of the invention

[0004] The embodiment of the present application provides a knowledge graph construction method based on the field of power production, which is used to solve the problem of excessive maintenance or untimely maintenance.

[0005] The first aspect of the embodiment of the present application provides a method for constructing a knowledge graph based on the field of power production, including:

[0006] Collect relevant data information on equipment operation and maintenance in the field of power production, and perform data preprocessing on the relevant data information;

[0007] Perform entity recognition on the preprocessed text data through the Transformer model and the HMM model to determine the entity type corresponding to each text data, wherein the entity type includes entities related to the power equipment itself, entities related to personnel, entities related to organizations, entities related to locations, entities related to time, entities related to documents and standards, and others;

[0008] According to the determined entity categories, text data containing entity pair relationships are collected, and the text data containing entity pairs and relationships are input as samples into the constructed recurrent neural network for training, and entity relationship extraction and entity attribute extraction are performed based on the trained model;

[0009] A knowledge graph is constructed based on the entity categories, entity relationships and entity attributes of the various texts.

[0010] Furthermore, the preprocessed text data is subjected to entity recognition through the Transformer model and the HMM model to determine the entity type corresponding to each text data, including:

[0011] Input the preprocessed text data into the Transformer model for training to obtain the feature vectors corresponding to each text data;

[0012] The parameters of the HMM model are determined according to the set entity categories and the entity category label sequence corresponding to the text data, and entity recognition is performed through the Viterbi algorithm to obtain the entity type corresponding to each text data.

[0013] Furthermore, the preprocessed text data is input into the Transformer model for training to obtain the feature vectors corresponding to each text data, including:

[0014] Convert each word in the preprocessed text into a word vector representation and add positional encoding;

[0015] Determine the architecture of a Transformer model, wherein the Transformer model includes an encoder and a decoder, wherein the encoder is used to extract features from the text data, and the decoder is used to generate an entity category label sequence corresponding to the text data;

[0016] Determine the training objective function based on the cross entropy loss function;

[0017] Processing the input text sequence through the encoder and decoder to obtain an output vector at each position;

[0018] The parameters of the model are updated by calculating the gradient of the loss function to the parameters of the Transformer model using a back-propagation algorithm, and the parameters are updated according to the gradient using an optimization algorithm.

[0019] Furthermore, determining the training objective function based on the cross entropy loss function includes:

[0020]

[0021] Where: n is the number of words in the text, x = {x1, x2, ..., x n} is a sentence containing n words, y={y1,y2,…,y n} is the corresponding label sequence, P(y i │x) is the word x predicted by the model i Belongs to label y i probability.

[0022] Furthermore, the parameters of the HMM model are determined according to the entity category set and the entity category label sequence corresponding to the text data, and entity recognition is performed by the Viterbi algorithm to obtain the entity type corresponding to each text data, including:

[0023] Determine the state set of the HMM model based on the set entity category,

[0024] Determine an observation set of the HMM model based on the entity category label sequence corresponding to the text data;

[0025] Calculating the initial probability distribution and the transition probability matrix according to each state in the state set, and calculating the probability of observing the feature vector in each state in the state set;

[0026] The entity type corresponding to each text data is obtained by initializing, recursively calculating and backtracking through the Viterbi algorithm.

[0027] Furthermore, the text data containing entity pair relationships is collected according to the determined entity categories, and the text data containing entity pairs and relationships is input as samples into the constructed recurrent neural network for training, and entity relationship extraction and entity attribute extraction are performed based on the trained model, including:

[0028] Perform word segmentation and word vector conversion on text data containing entity pairs and relationships to obtain word sequences and corresponding word vector sequences, and mark the positions of entities in the text;

[0029] Selecting a long short-term memory network to set initialization parameters, and extracting entity relationship features and entity attribute features respectively according to the initialization parameters;

[0030] Calculating the extraction loss of the entity relationship feature and the extraction loss of the entity attribute feature respectively, and updating the model parameters using an optimization algorithm to obtain a trained model;

[0031] The text data acquired in real time is input into the trained model to generate relationship information and entity attribute information between entities.

[0032] Furthermore, respectively calculating the extraction loss of the entity relationship feature and the extraction loss of the entity attribute feature includes:

[0033] Cross entropy loss function for entity relationship extraction:

[0034]

[0035] Cross entropy loss function for entity attribute extraction:

[0036]

[0037] in: is the true relationship label of the training sample, and m is the corresponding encoding dimension; is the true attribute category label, and k is the corresponding encoding dimension.

[0038] A second aspect of the embodiment of the present application provides a knowledge graph construction system based on the field of power production, including:

[0039] A data acquisition and preprocessing unit, used to collect relevant data information of equipment operation and maintenance in the field of power production, and perform data preprocessing on the relevant data information;

[0040] An entity recognition unit is used to perform entity recognition on the preprocessed text data through a Transformer model and an HMM model to determine the entity type corresponding to each text data, wherein the entity type includes entities related to the power equipment itself, entities related to personnel, entities related to organizations, entities related to locations, entities related to time, entities related to documents and standards, and others;

[0041] An entity relationship and entity attribute extraction unit is used to collect text data containing entity pair relationships according to the determined entity categories, and input the text data containing entity pairs and relationships as samples into the constructed recurrent neural network for training, and perform entity relationship extraction and entity attribute extraction based on the trained model;

[0042] A knowledge graph construction unit is used to construct a knowledge graph based on the entity categories, entity relationships and entity attributes of each text.

[0043] A third aspect of the embodiments of the present application provides a computer device, including:

[0044] memories, transceivers, processors, and bus systems;

[0045] Wherein, the memory is used to store programs;

[0046] The processor is used to execute the program in the memory, including executing the knowledge graph construction method based on the field of power production as described in any one of the above;

[0047] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

[0048] A fourth aspect of an embodiment of the present application provides a readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the knowledge graph construction method based on the field of electric power production as described above.

[0049] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0050] The present invention first collects relevant data information of equipment operation and maintenance in the field of power production and performs data preprocessing; then, the preprocessed text data is subjected to entity recognition through the Transformer model and the HMM model to determine the entity type corresponding to each text data; then, the text data containing entity pair relationships are collected according to the determined entity categories, and the text data containing entity pairs and relationships are input as samples into the constructed recurrent neural network for training, and entity relationship extraction and entity attribute extraction are performed based on the trained model; finally, a knowledge graph is constructed based on the entity categories, entity relationships and entity attributes of each text. The present invention combines the Transformer model and the HMM model for entity recognition, and can make full use of the powerful feature extraction capability of the Transformer to capture the semantics and contextual information of the text. At the same time, with the advantage of HMM's probabilistic modeling of sequences, the accuracy, recall and robustness of entity recognition are effectively improved, especially in the processing of power equipment management and operation and maintenance texts with complex semantics and sequence dependencies. It can more accurately identify multiple entity types. Using recurrent neural networks to extract entity relationships and entity attributes can effectively utilize text sequence information. By sequentially processing word vector sequences, it can adaptively learn the semantic associations between entities, relationships, and attributes, thereby accurately extracting entity relationships and attributes from text. It shows good performance when processing text data with contextual dependencies, thereby improving the accuracy of the knowledge graph.

[0051] Other advantages, objectives, and features of the present invention will be set forth in part in the following description, and in part will be apparent to those skilled in the art based on an examination of the following or may be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 The figure is a flow chart of an embodiment of a method for constructing a knowledge graph based on the field of electric power production in the present invention. DETAILED DESCRIPTION

[0053] In the description, claims and the above-mentioned drawings of this application, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0054] Embodiment 1

[0055] In this embodiment, the implementation method can be implemented in a system, on a server, or on a terminal, and no specific limitation is made. Below, from the perspective of system implementation, a method for constructing a knowledge graph based on the power production field in this application will be introduced. Please refer to Figure 1 , the method provided in the embodiment of this application includes the following steps:

[0056] S11. Collect relevant data information on equipment operation and maintenance in the power production field, and perform data preprocessing on the relevant data information;

[0057] In this embodiment, after collecting relevant data information on equipment operation and maintenance in the power production field, data preprocessing is performed. The specific data preprocessing includes text cleaning, entity vocabulary extraction and filtering, sentence and paragraph segmentation, and data standardization and conversion. The specific preprocessing operations are selectively performed according to subsequent entity recognition, entity relationship extraction, and entity attribute extraction.

[0058] 1. Text cleaning includes removing irrelevant characters and format markers and filtering stop words. Removing irrelevant characters and format markers is to screen out useful data. For example, in power equipment documents, HTML tags, redundant punctuation marks (such as consecutive exclamation marks or question marks), special encoding symbols, etc. are removed. These irrelevant characters and format markers usually do not contain entity-related information. Removing them can make the text content more focused on entity-related vocabulary and sentence structures, and help to subsequently screen out the text parts truly related to entity recognition. Filtering stop words are words that frequently appear in the text but do not substantially help in entity recognition, such as "of", "is", "in", etc. By filtering stop words, the key entity vocabulary in the text can be highlighted. For example, the original sentence "The maintenance personnel are in the substation to maintain the transformer" becomes "Maintenance personnel substation transformer maintenance" after filtering stop words, which is more convenient for identifying power equipment-related entities and personnel-related entities.

[0059] 2. Entity vocabulary extraction and filtering include dictionary-based entity vocabulary extraction and filtering texts with a high proportion of non-entity related words. Dictionary-based entity vocabulary extraction is to build an entity dictionary in the field of power equipment, such as a dictionary containing various power equipment names, personnel positions, organizational names, etc., scan the text, and extract words that match the dictionary. This is an effective way to filter useful data, because only the text parts containing these entity words are likely to be valuable for entity recognition. For example, in a text collection containing a large number of technical documents and operation records, sentences containing entity words such as "generator", "operator", and "power company" are extracted as potential useful data for subsequent entity recognition. Filtering texts with a high proportion of non-entity related words is to calculate the proportion of entity words in the text to the total vocabulary. If the proportion is too low, it means that the text may not be highly relevant to the entity recognition task. For example, a threshold is set, such as texts with a proportion of less than 10% of entity words are considered to be less useful and filtered out. In this way, texts with relatively rich entity information can be filtered out, improving the quality and relevance of the data.

[0060] 3. Sentence and paragraph segmentation includes segmenting text into sentence units and filtering according to paragraph topics. Segmenting text into sentence units means segmenting long text into individual sentences, which helps to filter useful data more finely. At the sentence level, it is possible to better evaluate whether each sentence contains entities and the relationship between entities. For example, in a long text of power equipment maintenance records, the segmented sentences can be individually judged to determine whether they contain entity information such as equipment, personnel, and time. For those sentences that do not contain any target entities, they can be temporarily excluded, and only sentences containing entities are retained as useful data. Filtering according to paragraph topics means that if the text has a paragraph structure, useful data can be filtered according to the paragraph topic. For example, in a technical report on power equipment, some paragraphs may be about the introduction of equipment technical parameters, and some paragraphs are about the description of equipment maintenance cases. By judging the paragraph topic (such as matching the paragraph topic by keywords), paragraphs with topics related to the entity recognition task are selected to further filter out useful data.

[0061] 4. Data standardization and conversion include entity name standardization and text format conversion. Entity name standardization is to standardize different ways of expressing the same entity. For example, in the field of power equipment, "transformer" may have multiple names, such as "power transformer" and "transformer equipment". Through standardization, these different names are unified as "transformer". In this process, texts that can be successfully standardized can be screened out because these texts are more likely to contain correct entity information. For texts that cannot be standardized (perhaps because the entity name is wrong or not standardized), they can be marked as suspicious data or directly excluded. Text format conversion is to convert texts in different formats into a unified format to facilitate the screening of useful data. For example, convert the table-based power equipment ledger data into text sentence form, and then filter according to whether the sentence contains enough entity information. If the text can clearly present the entity-related content after the format conversion, it can be retained as useful data; conversely, if the text is confusing or the entity information is lost after the format conversion, it can be considered to be discarded.

[0062] S12. Entity recognition is performed on the preprocessed text data through the Transformer model and the HMM model to determine the entity type corresponding to each text data. The entity types include entities related to the power equipment itself, personnel related entities, organization related entities, location related entities, time related entities, document and standard related entities and others:

[0063] 1. Input the preprocessed text data into the Transformer model for training to obtain the feature vectors corresponding to each text data;

[0064] 1. Convert each word in the preprocessed text into a word vector representation and add position encoding;

[0065] Collect various text materials related to power equipment management and operation and maintenance, including information on entities related to the power equipment itself, personnel, organization, location, time, documents, and standards, such as equipment operation manuals, maintenance records, technical reports, meeting minutes, etc.

[0066] The collected text is annotated in detail, and each word is labeled with its entity category. The entity category set is recorded as C = {C1, C2, C3, C4, C5, C6, C7}, where C1 represents entities related to the power equipment itself, C2 represents personnel-related entities, C3 represents organization-related entities, C4 represents location-related entities, C5 represents time-related entities, C6 represents document and standard-related entities, and C7 represents others (non-entity related). Convert each word in the preprocessed text into a word vector representation to obtain the initial vector representation of the word. Let the word vector of word w be The word vector dimension is d.

[0067] The positional encoding added here can be generated using sine and cosine functions. Assume that pos is the position of the word in the sentence and i is the dimension index of the vector. Add the word vector and positional encoding to get the final input vector representation

[0068] 2. Determine the architecture of the Transformer model, which includes an encoder and a decoder. The encoder is used to extract features from text data, and the decoder is used to generate an entity category label sequence corresponding to the text data;

[0069] Specifically, the encoder is composed of multiple identical layers stacked together, each of which contains a multi-head self-attention mechanism and a feedforward neural network. First, the query (Q), key (K), and value (V) matrices are calculated. For the input word vector sequence Through linear transformation Where W Q , W K , W V is a learnable parameter matrix with dimensions d×d q ,d×d k ,d×d v Then, perform multi-head attention calculation, split Q, K, and V into h heads respectively, and perform attention calculation on each head separately: in: Used to scale dot products to prevent gradient vanishing. The outputs of each head are concatenated and linearly transformed to obtain the output of the multi-head attention. Finally, a feedforward neural network is used to further transform the output of the multi-head attention.

[0070] The decoder is also composed of multiple identical layers stacked together. In addition to the multi-head self-attention mechanism and feedforward neural network similar to the encoder, an encoder-decoder attention layer is added. The calculation method is similar to the multi-head self-attention mechanism, except that the query matrix comes from the output of the previous layer of the decoder, and the key and value matrices come from the output of the encoder.

[0071] 3. Determine the training objective function based on the cross entropy loss function;

[0072] Specifically, the cross entropy loss function is used as the objective function of training:

[0073]

[0074] Where: n is the number of words in the text, x = {x1, x2, ..., x n} is a sentence containing n words, y={y1,y2,…,yn} is the corresponding label sequence, P(y i │x) is the word x predicted by the model i Belongs to label y i probability.

[0075] 4. The input text sequence is processed by the encoder and decoder to obtain the output vector at each position;

[0076] The input text sequence is processed by the encoder and decoder to obtain the output vector at each position. For the output of the decoder, it is converted into a probability distribution through a linear layer and a softmax function, indicating the probability that each word belongs to a different entity category. Let the output of the decoder at time step t be The probability distribution after the linear layer and the softmax function is:

[0077]

[0078] Where: W softmax is a weight matrix with a dimension of d×|C|, where |C| is the number of entity categories, and b softmax is a bias term with dimension |C|.

[0079] 5. Use the back-propagation algorithm to update the model parameters by calculating the gradient of the loss function to the Transformer model parameters, and use the optimization algorithm to update the parameters according to the gradient.

[0080] By calculating the gradient of the loss function to the model parameters, the back propagation algorithm is used to update the model parameters. Taking the parameter update of the multi-head self-attention mechanism in the encoder as an example, assuming that the gradient of the loss function L to the output of the multi-head self-attention mechanism is According to the chain rule, we can calculate the parameter W Q , W K , W V , W O The gradient is:

[0081]

[0082] The same calculation

[0083] Finally, an optimization algorithm (such as Adam, SGD, etc.) is used to update the parameters according to the calculated gradient.

[0084] 2. Determine the parameters of the HMM model according to the set entity category and the entity category label sequence corresponding to the text data, and perform entity recognition through the Viterbi algorithm to obtain the entity type corresponding to each text data.

[0085] 1. Determine the state set of the HMM model based on the set entity category,

[0086] The state set is the same as the entity category set, that is, S = C = {C1, C2, C3, C4, C5, C6, C7}.

[0087] 2. Determine the observation set of the HMM model based on the entity category label sequence corresponding to the text data;

[0088] The observation value is the feature vector of each word after being processed by the Transformer model. Let O = {O1, O2, ..., O n}, where n is the total number of words, O i is the feature vector of the i-th word.

[0089] 3. Calculate the initial probability distribution and transition probability matrix for each state in the state set, and calculate the probability of observing the feature vector in each state in the state set;

[0090] 4. Use the Viterbi algorithm to perform initialization, recursive calculation and backtracking to obtain the entity type corresponding to each text data.

[0091] Calculate the initial probability for each state, that is, the probability of being in the state at the beginning of the text. Obtain the initial probability distribution by counting the proportion of the first word in all annotated texts belonging to each entity category. Calculate the probability of transitioning from any state to another state, and calculate the transition probability by counting the number of transitions from one entity category to another in all annotated texts. Calculate the probability of observing a feature vector in the state. Since the observed value is a continuous feature vector, the Gaussian mixture model can be used here to estimate the emission probability. Finally, the entity type corresponding to each text data is obtained by initializing, recursively calculating, and backtracking through the Viterbi algorithm.

[0092] The above method is used to identify entities in power equipment management and operation and maintenance, and the following entities are obtained:

[0093] 1. Entities related to the power equipment itself: including power generation equipment, transmission equipment, substation equipment and distribution equipment. 2. Personnel-related entities: including operation and maintenance personnel, management personnel and technical experts. 3. Organization-related entities: including power generation enterprises, power supply companies, equipment manufacturing enterprises and operation and maintenance service companies. 4. Location-related entities: including power plants, substations and transmission line corridors. 5. Time-related entities: including equipment commissioning time, maintenance time and fault occurrence time. 6. Document and standard-related entities: including equipment operation manuals, maintenance specifications and technical standards.

[0094] Through the above steps, the Transformer architecture is combined with the hidden Markov model to achieve efficient recognition of multiple entity types in power equipment management and operation and maintenance texts. This combination makes full use of the powerful semantic feature extraction capabilities of the Transformer and the modeling advantages of the HMM for sequence data, improving the accuracy and efficiency of entity recognition. In practical applications, the model can be further optimized and adjusted according to specific circumstances, such as adjusting the hyperparameters of the Transformer and optimizing the parameter estimation method of the GMM, to adapt to different data sets and task requirements.

[0095] S13. Collect text data containing entity pair relationships according to the determined entity categories, and input the text data containing entity pairs and relationships as samples into the constructed recurrent neural network for training, and perform entity relationship extraction and entity attribute extraction based on the trained model;

[0096] 1. Perform word segmentation and word vector conversion on the text data containing entity pairs and relationships to obtain word sequences and corresponding word vector sequences, and mark the positions of entities in the text;

[0097] 2. Select the long short-term memory network to set the initialization parameters, and extract entity relationship features and entity attribute features respectively according to the initialization parameters;

[0098] Entity relationship feature extraction is done through GRU forward propagation. For each time step, the update gate, reset gate, and hidden state of the GRU are calculated. The feature representations of the two entities are combined to generate a feature vector for relationship classification. The relationship classification is performed using a fully connected layer, and the score is converted into a probability distribution through the softmax function. After determining the attribute category, the attribute value is extracted according to the rules or location information corresponding to the attribute category. For example, if the attribute category is "price", you can look for numbers related to "price" in the text as attribute values. Some rules may be needed to locate them, such as looking for numbers after keywords such as "is" and "for".

[0099] 3. Calculate the extraction loss of entity relationship features and entity attribute features respectively, and use the optimization algorithm to update the model parameters to obtain a trained model;

[0100] Cross entropy loss function for entity relationship extraction:

[0101]

[0102] Cross entropy loss function for entity attribute extraction:

[0103]

[0104] in: is the true relationship label of the training sample, and m is the corresponding encoding dimension; is the true attribute category label, and k is the corresponding encoding dimension.

[0105] 4. Input the text data obtained in real time into the trained model to generate the relationship information and entity attribute information between each entity.

[0106] Apply the trained model to new text data, and perform word vector conversion, GRU forward propagation, feature extraction, relationship classification, and attribute extraction according to the above steps to obtain the relationship between entities and entity attribute information.

[0107] The above method is used to extract entity relationships and entity attributes of power equipment management and operation and maintenance, and the following entity relationships and entity attributes are obtained:

[0108] 1. Equipment-personnel relationship: operation relationship, maintenance relationship, management relationship. 2. Equipment-organization relationship: affiliation relationship, production relationship, operation and maintenance service relationship. 3. Equipment-location relationship: installation location relationship, line connection relationship. 4. Equipment-time relationship: commissioning relationship, maintenance time relationship, failure time relationship. 5. Personnel-personnel relationship: collaboration relationship, guidance relationship. 6. Document-equipment / personnel / organization relationship: compliance relationship, compilation / release relationship.

[0109] 1. Entity attributes related to the power equipment itself: Attributes of power generation equipment include generators and steam turbines, attributes of transmission equipment include transmission lines, towers and insulators, attributes of substation equipment include transformers, reactors, and capacitors, and attributes of distribution equipment include distribution cabinets, distribution boxes and switchgear. 2. Entity attributes related to personnel: attributes of operation and maintenance personnel, attributes of management personnel, and attributes of technical experts. 3. Entity attributes related to organizational structure: attributes of power generation enterprises, attributes of power supply companies, attributes of equipment manufacturing enterprises, and attributes of operation and maintenance service companies. 4. Entity attributes related to location: attributes of power plants, attributes of substations, and attributes of transmission line corridors. 5. Entity attributes related to time: attributes of equipment commissioning time, attributes of maintenance time, and attributes of fault occurrence time. 6. Entity attributes related to documents and standards: attributes of equipment operation manuals, attributes of maintenance specifications, and attributes of technical standards.

[0110] S14. Build a knowledge graph based on the entity categories, entity relationships, and entity attributes of each text.

[0111] First, through in-depth analysis and processing of a large amount of text, various entity categories are accurately identified, such as power equipment, personnel, organizations, etc. Then, the complex relationships between these entities are carefully sorted out, including operational relationships, affiliation relationships, collaborative relationships, etc., as well as the specific attributes of each entity, such as equipment model, power, personnel skills, organization size, etc. This information is integrated, with nodes representing entities and edges representing relationships. The attributes of nodes and edges correspond to entity attributes and relationship characteristics respectively, to build an interconnected and hierarchical knowledge graph structure. Such a knowledge graph can clearly present the position and role of each entity in a specific field, as well as the interactive relationship between them, providing strong support for knowledge management, query and analysis, and helping to deeply understand and efficiently utilize information resources in related fields. For example, in power equipment management and operation and maintenance, it can achieve rapid retrieval of equipment information, correlation analysis of fault causes, and optimization of operation and maintenance strategies.

[0112] Embodiment 2

[0113] An embodiment of a knowledge graph construction system based on the field of power production in the present invention includes the following steps:

[0114] The data acquisition and preprocessing unit is used to collect relevant data information of equipment operation and maintenance in the field of power production, and to perform data preprocessing on the relevant data information;

[0115] An entity recognition unit is used to perform entity recognition on the preprocessed text data through the Transformer model and the HMM model to determine the entity type corresponding to each text data. The entity types include entities related to the power equipment itself, personnel related entities, organization related entities, location related entities, time related entities, document and standard related entities and others;

[0116] An entity relationship and entity attribute extraction unit is used to collect text data containing entity pair relationships according to the determined entity categories, and input the text data containing entity pairs and relationships as samples into the constructed recurrent neural network for training, and perform entity relationship extraction and entity attribute extraction based on the trained model;

[0117] A knowledge graph construction unit is used to construct a knowledge graph based on the entity categories, entity relationships and entity attributes of each text.

[0118] Embodiment 3

[0119] The present invention provides a computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the above method are implemented.

[0120] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0121] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored. In addition, each functional unit in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.

[0123] It can be understood that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

Claims

1. A knowledge graph construction method based on the field of power production, characterized in that: include: Collect relevant data information on equipment operation and maintenance in the field of power production, and perform data preprocessing on the relevant data information; Perform entity recognition on the preprocessed text data through the Transformer model and the HMM model to determine the entity type corresponding to each text data, wherein the entity type includes entities related to the power equipment itself, entities related to personnel, entities related to organizations, entities related to locations, entities related to time, entities related to documents and standards, and others; According to the determined entity categories, text data containing entity pair relationships are collected, and the text data containing entity pairs and relationships are input as samples into the constructed recurrent neural network for training, and entity relationship extraction and entity attribute extraction are performed based on the trained model; A knowledge graph is constructed based on the entity categories, entity relationships and entity attributes of the respective texts.

2. The method for constructing a knowledge graph based on the field of power production according to claim 1 is characterized in that: The method of performing entity recognition on the preprocessed text data by using the Transformer model and the HMM model to determine the entity type corresponding to each text data includes: Input the preprocessed text data into the Transformer model for training to obtain the feature vectors corresponding to each text data; The parameters of the HMM model are determined according to the set entity categories and the entity category label sequence corresponding to the text data, and entity recognition is performed through the Viterbi algorithm to obtain the entity type corresponding to each text data.

3. The method for constructing a knowledge graph based on the field of power production according to claim 2 is characterized in that: The preprocessed text data is input into the Transformer model for training to obtain the feature vectors corresponding to each text data, including: Convert each word in the preprocessed text into a word vector representation and add positional encoding; Determine the architecture of a Transformer model, wherein the Transformer model includes an encoder and a decoder, wherein the encoder is used to extract features from the text data, and the decoder is used to generate an entity category label sequence corresponding to the text data; Determine the training objective function based on the cross entropy loss function; Processing the input text sequence through the encoder and decoder to obtain an output vector at each position; The parameters of the model are updated by calculating the gradient of the loss function to the parameters of the Transformer model using a back-propagation algorithm, and the parameters are updated according to the gradient using an optimization algorithm.

4. The method for constructing a knowledge graph based on the field of power production according to claim 3 is characterized in that: Determining the training objective function based on the cross entropy loss function includes: Where: n is the number of words in the text, x = {x1, x2, ..., x n } is a sentence containing n words, y={y1,y2,…,y n } is the corresponding label sequence, P(y i │x) is the word x predicted by the model i Belongs to label y i probability.

5. The method for constructing a knowledge graph based on the field of power production according to any one of claims 1 to 4, characterized in that: The parameters of the HMM model are determined according to the set entity category and the entity category label sequence corresponding to the text data, and entity recognition is performed through the Viterbi algorithm to obtain the entity type corresponding to each text data, including: Determine the state set of the HMM model based on the set entity category, Determine an observation set of the HMM model based on the entity category label sequence corresponding to the text data; Calculating the initial probability distribution and the transition probability matrix according to each state in the state set, and calculating the probability of observing the feature vector in each state in the state set; The entity type corresponding to each text data is obtained by initializing, recursively calculating and backtracking through the Viterbi algorithm.

6. The method for constructing a knowledge graph based on the field of power production according to claim 1 is characterized in that: The text data containing entity pair relationships are collected according to the determined entity categories, and the text data containing entity pairs and relationships are input as samples into the constructed recurrent neural network for training, and entity relationship extraction and entity attribute extraction are performed based on the trained model, including: Perform word segmentation and word vector conversion on text data containing entity pairs and relationships to obtain word sequences and corresponding word vector sequences, and mark the positions of entities in the text; Selecting a long short-term memory network to set initialization parameters, and extracting entity relationship features and entity attribute features respectively according to the initialization parameters; Calculating the extraction loss of the entity relationship feature and the extraction loss of the entity attribute feature respectively, and updating the model parameters using an optimization algorithm to obtain a trained model; The text data acquired in real time is input into the trained model to generate relationship information and entity attribute information between entities.

7. The method for constructing a knowledge graph based on the field of power production according to claim 6 is characterized in that: The respectively calculating the extraction loss of the entity relationship feature and the extraction loss of the entity attribute feature includes: Cross entropy loss function for entity relationship extraction: Cross entropy loss function for entity attribute extraction: in: is the true relationship label of the training sample, and m is the corresponding encoding dimension; is the true attribute category label, and k is the corresponding encoding dimension.

8. A knowledge graph construction system based on the field of power production, characterized in that: include: A data acquisition and preprocessing unit, used to collect relevant data information of equipment operation and maintenance in the field of power production, and perform data preprocessing on the relevant data information; An entity recognition unit is used to perform entity recognition on the preprocessed text data through a Transformer model and an HMM model to determine the entity type corresponding to each text data, wherein the entity type includes entities related to the power equipment itself, entities related to personnel, entities related to organizations, entities related to locations, entities related to time, entities related to documents and standards, and others; An entity relationship and entity attribute extraction unit is used to collect text data containing entity pair relationships according to the determined entity categories, and input the text data containing entity pairs and relationships as samples into the constructed recurrent neural network for training, and perform entity relationship extraction and entity attribute extraction based on the trained model; A knowledge graph construction unit is used to construct a knowledge graph based on the entity categories, entity relationships and entity attributes of each text.

9. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, including executing the knowledge graph construction method based on the field of power production according to any one of claims 1 to 7; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.

10. A readable storage medium, characterized in that: It includes instructions, which, when executed on a computer, enable the computer to execute the knowledge graph construction method based on the field of electric power production as described in any one of claims 1 to 7.