Knowledge service platform construction method based on knowledge representation and related device

By building a knowledge service platform based on two-way knowledge representation, the problem of complexity of entity and relationship representation in the power field is solved, and higher quality knowledge services are achieved.

CN120297280APending Publication Date: 2025-07-11SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510370474.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

Existing knowledge service platforms are difficult to effectively represent complex entity types and relationships in the power field, resulting in the inability to provide accurate and comprehensive knowledge services.

Method used

By constructing two-way knowledge representation, using the information identification model to extract entities and relationships from the initial text data in the power field, and combining technologies such as bidirectional long and short-term memory networks and graph convolution networks to build a knowledge service platform.

Benefits of technology

It improves the quality of knowledge services, can more accurately reflect the relationship between entities in the text in the power field, and provides more comprehensive and intelligent knowledge services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120297280A_ABST
    Figure CN120297280A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge service platform construction method based on knowledge representation and a related device, and the method comprises the steps: obtaining initial text data for an electric power field, and carrying out the preprocessing of the initial text data, and obtaining target text data; inputting the target text data into an information identification model to obtain n entities and m relationships; determining m entity relationship joint information according to the n entities and the m relationships; according to the direction characteristics of the m relationships, determining a bidirectional knowledge representation corresponding to each piece of entity relationship joint information in the m pieces of entity relationship joint information, and obtaining m bidirectional knowledge representations; and constructing a target knowledge service platform based on the m bidirectional knowledge representations. By adopting the method to construct the knowledge service platform, the quality of knowledge service can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power information technology, and in particular, to a method for constructing a knowledge service platform based on knowledge representation and related devices. Background Art

[0002] With the development of the power industry, a large amount of text data such as power equipment manuals, fault reports, and operation and maintenance records has important guiding significance for the optimal operation, fault diagnosis, equipment maintenance, etc. of the power system. However, most of these text data exist in unstructured or semi-structured forms, lacking effective organization and management. Therefore, it is difficult to extract valuable information from the text data to construct a knowledge representation in the power field, and thus an intelligent knowledge service platform cannot be constructed for the operation and maintenance management of the power system.

[0003] For the existing knowledge service platform constructed based on knowledge representation, due to the characteristics of strong text professionalism, diverse entity types, and complex relationships in the power field, the constructed knowledge representation is difficult to effectively represent the corresponding knowledge. Furthermore, the constructed knowledge service platform cannot provide accurate and comprehensive answers and solutions.

[0004] The existing methods for constructing knowledge service platforms can no longer meet the needs of the power industry and other fields for knowledge services. Therefore, a more effective method for constructing a knowledge service platform based on knowledge representation is needed to improve the quality of knowledge representation and thus provide users with higher-quality and intelligent knowledge services. Summary of the Invention

[0005] The embodiments of this application provide a method for constructing a knowledge service platform based on knowledge representation and related devices. By constructing a bidirectional knowledge representation to construct a knowledge service platform, the quality of knowledge services is improved.

[0006] In a first aspect, the embodiments of this application provide a method for constructing a knowledge service platform based on knowledge representation. The method includes:

[0007] Obtain initial text data for the power field and preprocess the initial text data to obtain target text data;

[0008] Input the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1. Among them, the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field;

[0009] Determine m entity relationship joint information according to the n entities and the m relationships;

[0010] Determine the bidirectional knowledge representation corresponding to each entity relationship union information in the m entity relationship union information according to the direction characteristics of the m relationships, and obtain m bidirectional knowledge representations;

[0011] Construct a target knowledge service platform based on the m bidirectional knowledge representations.

[0012] In a second aspect, a device for constructing a knowledge service platform based on knowledge representation, the device for constructing a knowledge service platform based on knowledge representation includes: a data input module, an entity relationship recognition module, an entity relationship union module, a knowledge representation construction module, and a service platform construction module, where,

[0013] The data input module is used to obtain initial text data for the power field and preprocess the initial text data to obtain target text data;

[0014] The entity relationship recognition module is used to input the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1; where the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field;

[0015] The entity relationship union module is used to determine m entity relationship union information according to the n entities and the m relationships;

[0016] The knowledge representation construction module is used to determine the bidirectional knowledge representation corresponding to each entity relationship union information in the m entity relationship union information according to the direction characteristics of the m relationships, and obtain m bidirectional knowledge representations;

[0017] The service platform construction module is used to construct a target knowledge service platform based on the m bidirectional knowledge representations.

[0018] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, a communication interface, and one or more programs, where the above one or more programs are stored in the above memory and are configured to be executed by the above processor, and the above programs include instructions for executing the steps in the first aspect of the embodiment of the present application.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the above computer-readable storage medium stores a computer program for electronic data exchange, and where the above computer program enables a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product can be a software installation package.

[0021] It can be seen that by adopting the embodiment of the present application, the following beneficial effects are achieved:

[0022] By implementing the embodiment of the present application, initial text data for the power field is obtained, and the initial text data is preprocessed to obtain target text data; the target text data is input into an information recognition model to obtain n entities and m relationships; m entity relationship joint information is determined according to the n entities and the m relationships; according to the direction characteristics of the m relationships, a bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information is determined, obtaining m bidirectional knowledge representations; a target knowledge service platform is constructed based on the m bidirectional knowledge representations. By using the present application to construct a knowledge service platform, the quality of knowledge services can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the following will describe the drawings required to be used in the embodiments of the present application or the background art.

[0024] Figure 1 is a schematic flowchart of a method for constructing a knowledge service platform based on knowledge representation provided by an embodiment of the present application;

[0025] Figure 2 is a schematic flowchart of a text processing provided by an embodiment of the present application;

[0026] Figure 3 is a schematic diagram of constructing a bidirectional knowledge representation provided by an embodiment of the present application;

[0027] Figure 4 is a schematic diagram of a knowledge service platform provided by an embodiment of the present application;

[0028] Figure 5 is an application scenario diagram of an intelligent question and answer service provided by an embodiment of the present application;

[0029] Figure 6 is a schematic structural diagram of a device for constructing a knowledge service platform based on knowledge representation provided by an embodiment of the present application;

[0030] Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of this application.

[0032] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0033] Referring to "embodiment" herein means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of this application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.

[0034] The relevant content, concepts, meanings, technical problems, technical solutions, beneficial effects, etc. involved in the embodiments of this application will be described below.

[0035] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for constructing a knowledge service platform based on knowledge representation provided by an embodiment of this application. The method includes but is not limited to the following steps:

[0036] S101. Obtain initial text data for the power field, and preprocess the initial text data to obtain target text data.

[0037] In the embodiments of this application, the development of the power industry will generate a large amount of text data, which may include key information such as equipment performance, fault causes, and operation and maintenance strategies. By obtaining the initial text data for the power field, these key information can be mined and utilized, so as to provide data support for the operation and maintenance, management, fault diagnosis, equipment optimization, etc. of the power system, and promote the intelligent development of the power industry.

[0038] In specific embodiments, public download technologies can be used to obtain initial text data related to the power field from Internet public data and literature data. For example, initial text data can be obtained by publicly downloading power technology research literature from professional power database websites.

[0039] Since the initial text data has problems such as inconsistent formats, a lot of noise, and information redundancy, directly using it for subsequent analysis and processing will affect the accuracy and efficiency of the results. Therefore, after obtaining the initial text data for the power field, the initial text data can be preprocessed to obtain target text data, where the preprocessing includes steps such as data cleaning and semantic annotation.

[0040] Optionally, the above step S101, which is to obtain the initial text data for the power field and preprocess the initial text data to obtain target text data, specifically includes the following steps:

[0041] A101. Clean the initial text data to obtain first text data; the data cleaning includes at least one of the following: removing noise, de-duplication, and removing format error information;

[0042] A102. Obtain entity annotation data corresponding to each entity and relationship annotation data corresponding to each relationship in the first text data;

[0043] A103. Determine the target text data according to the first text data, the entity annotation data, and the relationship annotation data.

[0044] Among them, the initial text data in the power field has a wide range and is complex in source, and it contains a large amount of noise, duplicate content, and format error information. Noise data may be irrelevant characters, garbled codes, etc. mixed in during the data collection process. Duplicate information not only occupies storage space but also affects data processing efficiency, leading to deviations in analysis results. Format error information, such as inconsistent date formats and text encoding errors, makes the data difficult to be effectively parsed.

[0045] Specifically, the initial text data can be cleaned to obtain first text data, where the data cleaning includes at least one of the following: removing noise, de-duplication, removing format error information, etc. Through data cleaning, techniques such as string matching and regular expressions can be used to accurately identify and remove this noise data, and de-duplication techniques such as the hash algorithm can be used to quickly find and delete duplicate information. Finally, according to the preset format specifications, the format error information can be corrected to obtain relatively clean and standardized first text data.

[0046] After obtaining the first text data, entity annotation data corresponding to each entity and relationship annotation data corresponding to each relationship in the first text data can be obtained. Among them, the entity annotation data is used to represent various entities in the text, such as device names, fault types, geographical locations, etc., and the relationship annotation data is used to identify the association relationships between entities, such as the occurrence relationship in "device A has fault B".

[0047] These annotation data are usually obtained by combining manual annotation and machine learning algorithms. Specifically, professional personnel in the power field and natural language processing experts can first jointly formulate detailed annotation rules, and then use annotation tools to manually annotate the first text data. At the same time, some machine learning-based annotation auxiliary tools, such as the Conditional Random Field (CRF) model, can be used to improve the annotation efficiency and accuracy.

[0048] Determine the target text data according to the first text data, entity annotation data, and relationship annotation data. Specifically, integrate the first text data, entity annotation data, and relationship annotation data to determine the target text data. During the integration process, the annotation data can be embedded into the first text data in a specific format to construct a dataset containing semantic information. For example, the entity annotation data and relationship annotation data are added to the corresponding text segments in the form of labels to form the target text data with clear semantic annotations. The target text data obtained by preprocessing the initial text data incorporates the annotated entity and relationship information, and at the same time provides high-quality data, which helps to improve the accuracy and efficiency of the subsequent information recognition model for entity and relationship extraction, and thus promotes the effective construction of the entire knowledge service platform.

[0049] S102: Input the target text data into the information recognition model to obtain n entities and m relationships.

[0050] In the implementation of this application, both n and m are integers greater than or equal to 1. The information recognition model is obtained by training and optimizing a preset model based on the historical text data in the power field. By inputting text data, it can output the entities and relationships in the text data. Among them, the preset model can be a neural network model, which includes structures such as bidirectional long short-term memory network (Bi-LSTM), conditional random field (CRF), and graph convolutional network (GCN).

[0051] In a specific embodiment, the target text data is input into an information recognition model to obtain n entities and m relationships. Among them, the n entities and m relationships represent key information in the power text, such as equipment names, fault types, geographical locations, and the relationships between these entities. By sorting out and integrating these key information, a structured knowledge representation can be constructed, which in turn provides support for the construction of subsequent knowledge service platforms.

[0052] Optionally, the following steps may further be included:

[0053] A201. Perform the preprocessing on the historical text data to obtain training text data;

[0054] A202. Divide the training text data to obtain a training set and a validation set;

[0055] A203. Train a preset model based on the training set to obtain a first information recognition model;

[0056] A204. Determine a first loss function and a second loss function; the first loss function represents the loss function corresponding to entity recognition; the second loss function represents the loss function corresponding to relationship extraction;

[0057] A205. Determine a first weight corresponding to the first loss function and a second weight corresponding to the second loss function; the sum of the first weight and the second weight is 1;

[0058] A206. Perform weighted summation based on the first loss function, the first weight, the second loss function, and the second weight to obtain a target loss function;

[0059] A207. Optimize the first information recognition model based on the target loss function through a preset backpropagation algorithm to obtain a second information recognition model;

[0060] A208. Verify the second information recognition model based on the validation set to obtain a target verification result;

[0061] A209. If the target verification result meets a preset verification condition, use the second information recognition model as the information recognition model.

[0062] Among them, historical text data refers to various types of text materials accumulated in the power field in the past, such as operation and maintenance records of power equipment, fault reports, technical manuals, academic papers, etc.

[0063] A preset model refers to the basic model architecture preset before training. It is usually constructed based on artificial neural networks. In the construction of a knowledge service platform in the power field, neural network models such as Bidirectional Long Short-Term Memory Network (Bi-LSTM) combined with Conditional Random Field (CRF) can be used for entity recognition, and the multi-head attention mechanism or Graph Convolutional Network (GCN) can be used for relation extraction. The first loss function is used to measure the difference between the model prediction result and the true label in the entity recognition task, and the cross-entropy loss function can be adopted. The second loss function is used to evaluate the model performance in the relation extraction task, and the cross-entropy loss function can also be adopted. The preset backpropagation algorithm is an optimization algorithm for training neural networks, and Stochastic Gradient Descent (SGD) or its variants can be adopted.

[0064] The preset verification condition is a standard for judging whether the model has achieved the expected performance. Metrics such as accuracy, recall, and F1 value can be used for measurement. Specifically, the thresholds of these metrics can be set. When the metrics for verifying the model prediction results reach the set thresholds, it can be considered that the model meets the preset verification condition. Otherwise, the model needs to be adjusted and optimized, such as adjusting the model structure, changing the training parameters, etc.

[0065] In a specific embodiment, the historical text data is preprocessed in the same way as the target text data, that is, data cleaning and annotating entities and relationships, to obtain the training text data. Then, the training text data is divided into a training set and a validation set. Specifically, it can be divided according to a ratio of 70%-30% or 80%-20%. Among them, the training set is used for learning the model parameters, and the validation set is used to evaluate the model performance to prevent overfitting of the model.

[0066] Then, the preset model is trained through the training set to obtain the first information recognition model, which initially has the ability to recognize entities and relationships. Determine the first loss function and the second loss function. Among them, the first loss function represents the loss function corresponding to entity recognition, and the second loss function represents the loss function corresponding to relation extraction. In order to jointly train the entity recognition task and the relation extraction task, the first weight corresponding to the first loss function and the second weight corresponding to the second loss function can be set, and a weighted sum is performed based on the first loss function, the first weight, the second loss function, and the second weight to obtain the target loss function. Among them, the sum of the first weight and the second weight is 1, and the first weight and the second weight can be adjusted according to task requirements and experience.

[0067] It should be noted that text recognition in the power field includes two closely related tasks: entity recognition and relation extraction. If these two tasks are optimized independently, the model may perform well in one task but poorly in the other, and it is impossible to achieve the overall optimum. Therefore, by performing weighted summation on the loss functions corresponding to entity recognition and relation extraction, these two tasks can be integrated into a unified optimization objective. During the model training process, the model not only considers the accuracy of entity recognition or relation extraction, but also takes both into account simultaneously, enabling the features and parameters learned by the model to better adapt to the requirements of the two tasks, thereby improving the overall information extraction effect. For example, in the text recognition of power equipment fault reports, the model can not only accurately identify entities such as equipment names and fault types, but also extract the relationships between entities, such as the occurrence relationship of equipment failures. Through the unified optimization objective, the accuracy of entity recognition and relation extraction can be ensured to be improved simultaneously.

[0068] Optionally, during the training process of the information recognition model, it may over-learn the noise and specific patterns in the training data, resulting in poor performance on new data. Therefore, a regularization term can be introduced to constrain the parameters of the model, prevent the model from being too complex, and thus improve the generalization ability of the model. At the same time, the diversity and complexity of the data may cause the model to be prone to overfitting, and introducing a regularization term can prevent overfitting. Specifically, a preset regularization term can be added to the original loss function to form a new objective loss function. Among them, the difference between the vocabulary probability distribution predicted by the model and the vocabulary statistical distribution in the power field can be calculated as the regularization term, and the prior probability distribution of the relationship can also be defined, and the difference between the relationship probability distribution predicted by the model and the prior distribution can be used as the regularization term.

[0069] Next, optimize the first information recognition model based on the objective loss function through the preset backpropagation algorithm. Specifically, the parameters of the model, such as the weights and biases of the neural network, can be continuously adjusted according to the objective loss function, so that the loss of the first information recognition model on the training set is continuously reduced, and then the second information recognition model can be obtained.

[0070] Use the validation set to verify the second information recognition model, calculate indicators such as the accuracy, recall rate, and F1 value of the model on the validation set to obtain the target verification result. If the target verification result meets the preset verification conditions, it indicates that the performance of the second information recognition model is good, and the second information recognition model can be used as the information recognition model finally used to process the target text data. If the target verification result does not meet the preset verification conditions, the model structure needs to be adjusted, the weights need to be reset, or the training data needs to be increased, and the above training and verification processes need to be repeated until the model reaches the ideal performance.

[0071] Optionally, the above step S102, inputting the target text data into an information recognition model to obtain n entities and m relationships, specifically includes the following steps:

[0072] B201. Perform word segmentation on the target text data to obtain q word segments; q is an integer greater than or equal to n;

[0073] B202. Determine the word vectors corresponding to the q word segments to obtain q word vectors;

[0074] B203. Predict the entities in the q word vectors to obtain the n entities;

[0075] B204. Predict the relationships between the n entities according to a preset relationship classifier to obtain the m relationships.

[0076] Among them, the preset relationship classifier refers to a model that has been pre-trained and is used to judge the type of relationship between entities. It can be a multi-head attention mechanism or a graph convolutional network (GCN). The multi-head attention mechanism can focus on different parts of the input information in different sub-spaces, capture the semantic relationships of entities from multiple perspectives, and accurately judge the relationship by encoding the input to dynamically allocate weights. The graph convolutional network is a neural network for processing graph-structured data. It can regard text entities as graph nodes and potential relationships as edges to construct a graph structure, and learn relationship representations by propagating and aggregating feature information through convolutional operations.

[0077] In a specific embodiment, perform word segmentation on the target text data to obtain q word segments, where q is an integer greater than or equal to n. Specifically, in the text of the power field, there are many professional terms and specific expressions, such as transformers, short-circuit faults, bus voltages, etc. Ordinary word segmentation tools may not be able to accurately segment them. Therefore, a word segmentation method combining a dictionary and statistics can be adopted. First, construct a professional dictionary for the power field, use dictionary matching for preliminary word segmentation, and then combine a statistical model to process the words that do not appear in the dictionary, so as to obtain q word segments.

[0078] Next, the word vectors corresponding to the q word segments can be determined to obtain q word vectors. The word vector is a representation method that maps words in the text to a low-dimensional vector space. It can capture the semantic information and context features of words. Specifically, a pre-trained language model, such as a BERT variant pre-trained based on power text, can be used to generate word vectors. Input the q word segments into the pre-trained language model, and the language model will generate corresponding context-related vector representations for each word segment. The context-related vector representation can effectively solve the problem of polysemy and improve the information recognition model's ability to understand the text semantics.

[0079] Predicting entities in q word vectors can obtain n entities. Specifically, a bidirectional long short-term memory network (Bi-LSTM) combined with a conditional random field (CRF) can be used to process the word vectors, and predict the entity labels corresponding to each word vector. That is, Bi-LSTM can model the word vector sequence from both the forward and backward directions, fully capture the context information of words, and learn the dependency relationships between words. CRF, on the basis of Bi-LSTM, considers the constraint conditions between adjacent labels, further improving the accuracy of entity recognition. By processing the word vectors, the entity category corresponding to each word vector can be output, such as equipment, fault, location, etc., so as to identify n entities in the text.

[0080] After identifying n entities, the relationship between the n entities can be predicted according to a preset relationship classifier, and m relationships can be obtained. Among them, the preset relationship classifier can be constructed based on a multi-head attention mechanism or a graph convolutional network.

[0081] In a possible embodiment, the input text is "Transformer Y in Substation X has a short circuit fault". By performing the entity recognition task, it is identified that "Substation X" is a location entity, "Transformer Y" is an equipment entity, and "short circuit" is a fault entity. By performing the relationship extraction task, the relationship type between entities is predicted, and it is determined that there is an "occurrence" relationship between "Transformer Y" and "short circuit fault", and there is a "location in" relationship between "Transformer Y" and "Substation X".

[0082] Please refer to Figure 2 , Figure 2 FIG. is a schematic flowchart of a text processing provided by an embodiment of the present application. As shown in the figure, the target text data represents the original text information that needs to be processed and analyzed. These text data can come from various channels, such as documents, reports, web page content, etc. In the embodiment of the present application, the target text data is data in the power field, which can be text such as equipment manuals, fault repair records, etc.

[0083] The word segmentation module is the first step for preliminary processing of the target text data. It can split continuous text into individual words or word chunks according to certain rules. For example, splitting "Transformer has a short circuit fault" into "Transformer", "has", and "fault". The accuracy of word segmentation is crucial for subsequent analysis. Common word segmentation methods include dictionary-based word segmentation, statistical model-based word segmentation, etc.

[0084] The word vector module is used to convert each word into a vector form after word segmentation. Specifically, a pre-trained language model, such as a BERT model or a Word2Vec model, etc., can be used.

[0085] The entity recognition module is used to recognize entities with specific meanings from the text based on the results of word segmentation and word vectors. Entities can be names of people, places, device names, etc. In the embodiments of this application, device entities such as transformers and circuit breakers can be recognized. Entity recognition usually uses named entity recognition (NER) technology, including rule-based methods and statistical model-based methods, such as the model combining Bi-LSTM and CRF.

[0086] The relationship extraction module is used to extract the relationships between entities from the text after the entities are recognized. For example, there may be an occurrence relationship between a transformer and a short circuit fault. The relationship extraction module can make predictions based on a preset relationship classifier to determine the relationships between entities.

[0087] After entity recognition and relationship extraction, structured entity and relationship data can finally be extracted from the target text data. This data can be used to construct knowledge representation and support various applications such as intelligent question answering, fault diagnosis, and equipment operation and maintenance analysis.

[0088] S103. Determine m pieces of entity relationship joint information according to the n entities and the m relationships.

[0089] In a specific embodiment, for each relationship, find the relevant entity pairs from the n entities. For example, for the occurrence relationship, find the two entities that constitute the occurrence relationship from the n entities, such as a transformer and a short circuit fault, and determine that there is an occurrence relationship between these two entities. Combine the matched entity pairs and the corresponding relationships together to form a complete entity relationship joint information. For example, it can be represented in the form of a triple, that is, in the form of (entity 1, relationship, entity 2). According to the n entities and the m relationships, m pieces of entity relationship joint information can be determined.

[0090] The entity relationship joint information is used as the basic unit for constructing knowledge representation. As a specific form of knowledge representation, a knowledge graph can be constructed according to the entity relationship joint information. The knowledge graph represents the relationships between entities in the form of a graph. Therefore, the entity relationship joint information can be directly used as the nodes and edges in the graph, which is convenient for knowledge storage and query. Based on the entity relationship joint information, knowledge reasoning can also be carried out to deduce new knowledge based on the known entity relationships.

[0091] S104. Determine the two-way knowledge representation corresponding to each piece of entity relationship joint information in the m pieces of entity relationship joint information according to the direction characteristics of the m relationships, and obtain m two-way knowledge representations.

[0092] In the embodiments of the present application, the direction characteristic of a relationship refers to the directivity that the relationship has between two entities, which clarifies the way the relationship points from one entity to another and reflects the logical order and semantic meaning of the association between entities. The direction characteristic of a relationship determines the direction of information flow and the roles of entities in the relationship. For example, when a short - circuit fault occurs in a transformer, the occurrence relationship is from the transformer to the short - circuit fault, indicating that the transformer is the subject where the fault occurs and the fault is the situation that appears in the transformer. Therefore, its forward relationship can be from the transformer to the short - circuit fault. From another perspective, that is, when a short - circuit fault occurs, it can be predicted that it is caused by the transformer. Therefore, its reverse relationship can be from the short - circuit fault to the transformer. Thus, the direction characteristic of a relationship can include a forward relationship and a reverse relationship.

[0093] Bidirectional knowledge representation is a knowledge representation method that comprehensively considers the forward and reverse semantic information of a relationship. It records the forward relationship information from one entity to another entity and also records the reverse relationship information from the other entity to this entity, thereby more comprehensively describing the association between entities. Bidirectional knowledge representation can capture the complete semantics of a relationship, avoid information loss caused by unidirectional representation, and when performing knowledge reasoning, it can reason from both forward and reverse perspectives, increasing the accuracy and reliability of reasoning.

[0094] In a specific embodiment, according to the direction characteristics of m relationships, the bidirectional knowledge representation corresponding to each entity - relationship joint information in the m entity - relationship joint information can be determined, obtaining m bidirectional knowledge representations. Traditional knowledge representation methods often model based on unidirectional relationships, ignoring the direction characteristics of relationships, resulting in incomplete semantic information. While bidirectional knowledge representation fully considers the bidirectionality of relationships and can more accurately reflect the complex relationships between entities in power - domain texts.

[0095] Optionally, the above - mentioned step S104, determining the bidirectional knowledge representation corresponding to each entity - relationship joint information in the m entity - relationship joint information according to the direction characteristics of the m relationships, obtaining m bidirectional knowledge representations, specifically includes the following steps:

[0096] A401: Determine m entity - relationship pairs according to the m entity - relationship joint information;

[0097] A402: Determine the forward relationship vector and reverse relationship vector corresponding to each entity - relationship pair in the m entity - relationship pairs according to the direction characteristics of the m relationships, obtaining m forward relationship vectors and m reverse relationship vectors;

[0098] A403: Determine the entity vector corresponding to each entity in the m entity - relationship pairs, obtaining 2m entity vectors;

[0099] A404. Construct m bidirectional knowledge representations based on the m positive relationship vectors, the m negative relationship vectors, and the 2m entity vectors; the bidirectional knowledge representation includes a positive relationship vector, a negative relationship vector, and two entity vectors.

[0100] Among them, entity-relationship joint information usually exists in the form of triples, which includes two entities and a relationship. To facilitate the processing of entity-relationship joint information, the entity-relationship joint information can be converted into entity-relationship pairs. An entity-relationship pair is a data form used to represent a specific relationship between two entities and can be obtained by processing and converting the entity-relationship joint information, so as to facilitate efficient processing and analysis by a computer.

[0101] In a specific embodiment, the entity vectors obtained by mapping the entities in the entity-relationship joint information to the vector space and the relationship vectors obtained by mapping the relationships to the vector space can be specifically obtained by using a pre-trained language model to encode the entities or relationships. After obtaining two entity vectors and a relationship vector, these vectors can be combined to obtain an entity-relationship pair. Then, according to the m entity-relationship joint information, m entity-relationship pairs can be determined.

[0102] Next, determine the positive relationship vector and the negative relationship vector corresponding to each entity-relationship pair in the m entity-relationship pairs according to the direction characteristics of the m relationships, and obtain m positive relationship vectors and m negative relationship vectors. For example, in the occurrence relationship of a short-circuit fault in a transformer, the positive relationship vector can be expressed as transformer, occurrence, short-circuit fault, and the negative relationship vector is short-circuit fault, occurrence, transformer.

[0103] Determine the entity vectors corresponding to each entity in the m entity-relationship pairs to obtain 2m entity vectors. Construct m bidirectional knowledge representations based on the m positive relationship vectors, the m negative relationship vectors, and the 2m entity vectors. Among them, the bidirectional knowledge representation includes a positive relationship vector, a negative relationship vector, and two entity vectors. The bidirectional knowledge representation synthesizes entity information and relationship information and describes the relationship between entities from both positive and negative perspectives, making the knowledge representation more comprehensive and accurate.

[0104] Please refer to Figure 3 , Figure 3It is a schematic diagram of constructing a two-way knowledge representation provided by an embodiment of the present application. As shown in the figure, the input target text data is that a short-circuit fault occurs in a transformer, which describes the information of the power equipment fault situation. From the text data, the combined entity relationship information of ("transformer", "occurs", "short-circuit fault") can be extracted. The entities and relationships are further transformed into vector forms to obtain the entity relationship pairs of (transformer vector, occurs vector, short-circuit fault vector). Based on the entity relationship pairs, the forward relationship vector and the reverse relationship vector are respectively deduced. The forward relationship reflects the logical order from the transformer to the occurrence of the short-circuit fault, while the reverse relationship infers from the short-circuit fault back to the transformer. Such two-way representation can more comprehensively capture the semantic connections between entities, enhancing the integrity and accuracy of knowledge representation. Finally, the entity vector pairs and the forward and reverse relationship vectors are integrated to form the knowledge representation.

[0105] Optionally, the above step A404, constructing m two-way knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors and the 2m entity vectors, specifically includes the following steps:

[0106] B401, constructing m initial knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors and the 2m entity vectors;

[0107] B402, mapping the m initial knowledge representations to a low-dimensional vector space to obtain the m two-way knowledge representations.

[0108] In a specific embodiment, m initial knowledge representations are constructed according to m forward relationship vectors, m reverse relationship vectors and 2m entity vectors. The initial knowledge representations may be in a high-dimensional vector space, which will lead to a high data dimension, not only increasing the computational complexity but also possibly causing the problem of dimensionality disaster. Therefore, dimensionality reduction techniques such as principal component analysis and autoencoders can be used to map the m initial knowledge representations to a low-dimensional vector space, reducing the data dimension while trying to retain the original data information, and then obtaining m two-way knowledge representations.

[0109] S105, constructing a target knowledge service platform based on the m two-way knowledge representations.

[0110] In an embodiment of the present application, the knowledge service platform is a digital platform that integrates multiple technologies, with the collection, collation, storage, retrieval, analysis and application of knowledge as the core, and provides professional and intelligent knowledge services for users. There are various user-friendly services on the knowledge service platform.

[0111] In specific embodiments, data management services, intelligent question-and-answer services, fault diagnosis services, equipment operation and maintenance suggestion services, risk warning services, user interaction services, etc. can be constructed based on m bidirectional knowledge representations, and a target knowledge service platform can be constructed based on these services. The knowledge service platform constructed based on bidirectional knowledge representations can provide more accurate and comprehensive knowledge services, meet the diverse needs of users, improve the quality of knowledge services in the power field, and at the same time promote the intelligent operation and maintenance and management of the power system, improve work efficiency, reduce operating costs, and promote the intelligent development process of the power industry.

[0112] Please refer to Figure 4 , Figure 4 which is a schematic diagram of a knowledge service platform provided by an embodiment of the present application. As shown in the figure, the knowledge service platform includes knowledge services such as data management services, intelligent question-and-answer services, fault diagnosis services, equipment operation and maintenance suggestion services, risk warning services, and user interaction services. Among them, the data management service is mainly responsible for operations such as storing, maintaining, updating, and retrieving knowledge representation information related to knowledge services. The intelligent question-and-answer service is mainly used to understand the questions raised by users through technologies such as natural language processing and knowledge graphs, and retrieve accurate answers from knowledge resources. The fault diagnosis service mainly judges whether the equipment has a fault and the type and cause of the fault by analyzing knowledge such as equipment operation data and historical fault records, in combination with fault diagnosis models and algorithms. The equipment operation and maintenance suggestion service can provide reasonable operation and maintenance plans and suggestions for the equipment according to knowledge such as the operation status, maintenance history, and performance indicators of the equipment, including regular inspections of the equipment, maintenance cycles, and replacement of parts. The risk warning service can identify and warn potential risks through data analysis and prediction models. The user interaction service is mainly responsible for interacting with users, including interface design, user feedback processing, etc., to improve the user experience.

[0113] Optionally, the above step S105, constructing a target knowledge service platform based on the m bidirectional knowledge representations, specifically includes the following steps:

[0114] A501. Store the m bidirectional knowledge representations in a preset relational database, and construct a data management service for the preset relational database;

[0115] A502. Construct target services according to the m bidirectional knowledge representations; the target services include at least one of the following: intelligent question-and-answer service, fault diagnosis service, equipment operation and maintenance suggestion service, risk warning service;

[0116] A503. Perform visual design on the data management service and the target services to obtain the target knowledge service platform.

[0117] In a specific embodiment, m bidirectional knowledge representations are stored in a preset relational database. The preset relational database can be a database such as Neo4j. Neo4j, in the form of a graph database, takes entities as nodes and the relationships between entities as edges, and can well store the entity vectors and relationship vectors in the bidirectional knowledge representation, facilitating the query and management of complex relationships. Then, a data management service is constructed for this database. The data management service can be used for functions such as data update, backup, recovery, and permission management. As the device information and fault cases in the power field continue to be generated, the data management service can timely add the new bidirectional knowledge representations constructed from this information to the database to ensure the timeliness of knowledge.

[0118] Multiple target services can also be constructed based on the bidirectional knowledge representation to meet different business requirements in the power field. The target services can include at least one of the following: intelligent question-answering service, fault diagnosis service, equipment operation and maintenance advice service, risk warning service. For example, the intelligent question-answering service, based on natural language processing technology, understands the user's question and retrieves the answer from the bidirectional knowledge representation. For example, in the power equipment operation and maintenance knowledge service, assuming the user asks which devices are related to a short-circuit fault, based on the constructed bidirectional knowledge representation, the service can quickly retrieve all device entities that have an occurrence relationship with the short-circuit fault, such as transformers, lines, etc., and give an accurate answer. When diagnosing equipment faults, if an abnormality is found in a certain line, using the bidirectional knowledge representation, not only can the possible faults of the line be searched forward, but also which faults may affect this line can be searched backward, so as to more comprehensively analyze the cause of the fault and formulate a more effective maintenance plan.

[0119] Visual design is carried out for the data management service and the target services to improve the usability and interactivity of the platform. In terms of the visualization of the data management service, information such as the structure, data volume, and update status of the database is displayed through an intuitive interface, facilitating management and monitoring by administrators. At the same time, knowledge can be displayed in the form of charts, graphs, etc. through an intuitive visualization interface, facilitating users' understanding and analysis. For the target services, the results can be presented in a visual way such as charts and graphs. For example, when showing the relationships between devices, a relationship diagram clearly presents the connection and subordination relationships between devices. When presenting the fault diagnosis results, a fault tree diagram shows the hierarchical structure of the fault causes. In the equipment operation and maintenance advice service, a calendar view shows the operation and maintenance plan, and a progress bar shows the device status.

[0120] Please refer to Figure 5 , Figure 5FIG. 0 is an application scenario diagram of an intelligent question-answering service provided by an embodiment of the present application. As shown in the figure, it simulates an interactive interface of an intelligent question-answering service. The user asks the question "What are the possible causes of a short circuit fault in transformer Y?", and the intelligent question-answering service gives the answer "The possible causes of a short circuit fault in transformer Y include overload and insulation aging."

[0121] Through visual design, users can more intuitively understand and use various services, improve work efficiency, and thus obtain a target knowledge service platform with perfect functions and good user experience.

[0122] In summary, by implementing the embodiments of the present application, initial text data for the power field can be obtained, and the initial text data can be preprocessed to obtain target text data; the target text data is input into an information recognition model to obtain n entities and m relationships; m entity relationship joint information is determined according to the n entities and the m relationships; according to the direction characteristics of the m relationships, a two-way knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information is determined to obtain m two-way knowledge representations; a target knowledge service platform is constructed based on the m two-way knowledge representations. Using the present application to construct a knowledge service platform can improve the quality of knowledge services.

[0123] Please refer to Figure 6 , Figure 6 FIG. 13 is a schematic structural diagram of a knowledge service platform construction device based on knowledge representation provided by an embodiment of the present application. The knowledge service platform construction device 600 based on knowledge representation includes: a data input module 601, an entity relationship recognition module 602, an entity relationship joint module 603, a knowledge representation construction module 604, and a service platform construction module 605, where,

[0124] The data input module 601 is used to obtain initial text data for the power field and preprocess the initial text data to obtain target text data;

[0125] The entity relationship recognition module 602 is used to input the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1; where the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field;

[0126] The entity relationship joint module 603 is used to determine m entity relationship joint information according to the n entities and the m relationships;

[0127] The knowledge representation construction module 604 is configured to determine the bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information according to the directional characteristics of the m relationships, so as to obtain m bidirectional knowledge representations;

[0128] The service platform construction module 605 is configured to construct a target knowledge service platform based on the m bidirectional knowledge representations.

[0129] Optionally, in terms of preprocessing the initial text data to obtain target text data, the data input module 601 is further specifically configured to:

[0130] Perform data cleaning on the initial text data to obtain first text data; the data cleaning includes at least one of the following: removing noise, de-duplicating, and removing format error information;

[0131] Obtain entity annotation data corresponding to each entity and relationship annotation data corresponding to each relationship in the first text data;

[0132] Determine the target text data according to the first text data, the entity annotation data, and the relationship annotation data.

[0133] Optionally, the knowledge service platform construction device 600 based on knowledge representation is further specifically configured to:

[0134] Perform the preprocessing on historical text data to obtain training text data;

[0135] Partition the training text data to obtain a training set and a validation set;

[0136] Train a preset model based on the training set to obtain a first information recognition model;

[0137] Determine a first loss function and a second loss function; the first loss function represents the loss function corresponding to entity recognition; the second loss function represents the loss function corresponding to relationship extraction;

[0138] Determine a first weight corresponding to the first loss function and a second weight corresponding to the second loss function; the sum of the first weight and the second weight is 1;

[0139] Perform weighted summation based on the first loss function, the first weight, the second loss function, and the second weight to obtain a target loss function;

[0140] Optimize the first information recognition model based on the target loss function through a preset backpropagation algorithm to obtain a second information recognition model;

[0141] Verify the second information recognition model based on the verification set to obtain a target verification result;

[0142] If the target verification result meets the preset verification conditions, use the second information recognition model as the information recognition model.

[0143] Optionally, in the aspect of inputting the target text data into the information recognition model to obtain n entities and m relationships, the entity relationship recognition module 602 is further specifically configured to:

[0144] Perform word segmentation on the target text data to obtain q word segments; q is an integer greater than or equal to n;

[0145] Determine the word vectors corresponding to the q word segments to obtain q word vectors;

[0146] Predict the entities in the q word vectors to obtain the n entities;

[0147] Predict the relationships between the n entities according to a preset relationship classifier to obtain the m relationships.

[0148] Optionally, in the aspect of determining the bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information according to the directional characteristics of the m relationships to obtain m bidirectional knowledge representations, the knowledge representation construction module 604 is further specifically configured to:

[0149] Determine m entity relationship pairs according to the m entity relationship joint information;

[0150] Determine the forward relationship vector and the reverse relationship vector corresponding to each entity relationship pair in the m entity relationship pairs according to the directional characteristics of the m relationships to obtain m forward relationship vectors and m reverse relationship vectors;

[0151] Determine the entity vectors corresponding to each entity in the m entity relationship pairs to obtain 2m entity vectors;

[0152] Construct m bidirectional knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors and the 2m entity vectors; the bidirectional knowledge representation includes a forward relationship vector, a reverse relationship vector and two entity vectors.

[0153] Optionally, in the aspect of constructing m bidirectional knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors and the 2m entity vectors, the knowledge representation construction module 604 is further specifically configured to:

[0154] Construct m initial knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors and the 2m entity vectors;

[0155] Map the m initial knowledge representations to a low-dimensional vector space to obtain the m bidirectional knowledge representations.

[0156] Optionally, in terms of constructing the target knowledge service platform based on the m bidirectional knowledge representations, the service platform construction module 605 is further specifically configured to:

[0157] Store the m bidirectional knowledge representations in a preset relational database, and construct a data management service for the preset relational database;

[0158] Construct a target service according to the m bidirectional knowledge representations; the target service includes at least one of the following: intelligent question and answer service, fault diagnosis service, equipment operation and maintenance advice service, risk warning service;

[0159] Perform visual design on the data management service and the target service to obtain the target knowledge service platform.

[0160] The knowledge service platform construction device 600 described in this application can obtain initial text data for the power field, preprocess the initial text data to obtain target text data; input the target text data into an information recognition model to obtain n entities and m relationships; determine m entity relationship joint information according to the n entities and the m relationships; determine the bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information according to the direction characteristics of the m relationships to obtain m bidirectional knowledge representations; construct a target knowledge service platform based on the m bidirectional knowledge representations. Using this application to construct a knowledge service platform can improve the quality of knowledge services.

[0161] Please refer to Figure 7 , Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of this application. The electronic device may include a processor, a memory, a communication interface, and one or more programs. The processor, the memory, and the communication interface may be connected to each other through a bus; the above one or more programs are stored in the above memory and are configured to be executed by the above processor; in the embodiment of this application, the above program includes instructions for performing the following steps:

[0162] Obtain initial text data for the power field, and preprocess the initial text data to obtain target text data;

[0163] Input the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1; where the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field;

[0164] Determine m pieces of combined entity relationship information based on the n entities and the m relationships;

[0165] Determine the two-way knowledge representation corresponding to each piece of combined entity relationship information in the m pieces of combined entity relationship information according to the direction characteristics of the m relationships, and obtain m two-way knowledge representations;

[0166] Construct a target knowledge service platform based on the m two-way knowledge representations.

[0167] The electronic device described in this application can obtain initial text data for the power field, preprocess the initial text data to obtain target text data; input the target text data into an information recognition model to obtain n entities and m relationships; determine m pieces of combined entity relationship information based on the n entities and the m relationships; determine the two-way knowledge representation corresponding to each piece of combined entity relationship information in the m pieces of combined entity relationship information according to the direction characteristics of the m relationships, and obtain m two-way knowledge representations; construct a target knowledge service platform based on the m two-way knowledge representations. By using this application to construct a knowledge service platform, the quality of knowledge services can be improved.

[0168] This application embodiment also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute some or all of the steps of any method recorded in the above method embodiment, and the above computer includes an electronic device.

[0169] This application embodiment also provides a computer program product, the above computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above computer program is operable to cause a computer to execute some or all of the steps of any method recorded in the above method embodiment. The computer program product can be a software installation package, and the above computer includes an electronic device.

[0170] Those of ordinary skill in the art can understand all or part of the processes in the methods of the above embodiments. These processes can be completed by a computer program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes: various media such as ROM or random access memory RAM, magnetic disk or optical disc that can store program code.

[0171] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable hard disks, compact disc read-only memory (CD-ROM), or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also exist as discrete components in the terminal device or the management device.

[0172] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of this application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0173] Each device and product described in the above embodiments, and each module / unit included therein, can be a software module / unit, a hardware module / unit, or can be partially a software module / unit and partially a hardware module / unit. For example, for each device and product applied to or integrated into a chip, each module / unit included therein can be implemented in the form of hardware such as circuits, or at least some modules / units can be implemented in the form of software programs that run on a processor integrated inside the chip, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits; for each device and product applied to or integrated into a chip module, each module / unit included therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented in the form of software programs that run on a processor integrated inside the chip module, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits; for each device and product applied to or integrated into a terminal device, each module / unit included therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components within the terminal device, or at least some modules / units can be implemented in the form of software programs that run on a processor integrated inside the terminal device, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits.

[0174] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above is only the specific embodiments of the embodiments of the present application and is not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included within the protection scope of the embodiments of the present application.

Claims

1. A method for constructing a knowledge service platform based on knowledge representation, characterized in that, The method includes: Obtaining initial text data for the power field and preprocessing the initial text data to obtain target text data; Inputting the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1; wherein, the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field; Determining m entity relationship joint information according to the n entities and the m relationships; Determining the bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information according to the direction characteristics of the m relationships, and obtaining m bidirectional knowledge representations; Constructing a target knowledge service platform based on the m bidirectional knowledge representations.

2. The method according to claim 1, wherein The preprocessing the initial text data to obtain target text data includes: Performing data cleaning on the initial text data to obtain first text data; the data cleaning includes at least one of the following: removing noise, de-duplicating, and removing format error information; Obtaining entity annotation data corresponding to each entity and relationship annotation data corresponding to each relationship in the first text data; Determining the target text data according to the first text data, the entity annotation data, and the relationship annotation data.

3. The method according to claim 1, wherein The method further includes: Performing the preprocessing on the historical text data to obtain training text data; Dividing the training text data to obtain a training set and a validation set; Training a preset model based on the training set to obtain a first information recognition model; Determining a first loss function and a second loss function; the first loss function represents the loss function corresponding to entity recognition; the second loss function represents the loss function corresponding to relationship extraction; Determining a first weight corresponding to the first loss function and a second weight corresponding to the second loss function; the sum of the first weight and the second weight is 1; Performing weighted summation based on the first loss function, the first weight, the second loss function, and the second weight to obtain a target loss function; Optimizing the first information recognition model based on the target loss function through a preset backpropagation algorithm to obtain a second information recognition model; Validating the second information recognition model based on the validation set to obtain a target validation result; If the target validation result meets a preset validation condition, then using the second information recognition model as the information recognition model.

4. The method according to any one of claims 1 to 3, characterized in that The inputting the target text data into an information recognition model to obtain n entities and m relationships includes: Performing word segmentation processing on the target text data to obtain q word segments; q is an integer greater than or equal to n; Determining the word vectors corresponding to the q word segments to obtain q word vectors; Predicting the entities in the q word vectors to obtain the n entities; Predicting the relationships between the n entities according to a preset relationship classifier to obtain the m relationships.

5. The method according to claim 4, wherein The determining the bidirectional knowledge representation corresponding to each entity relationship joint information in the m entity relationship joint information according to the direction characteristics of the m relationships, and obtaining m bidirectional knowledge representations includes: Determine m entity relationship pairs based on the combined information of the m entity relationships; Determine the forward relationship vector and the reverse relationship vector corresponding to each entity relationship pair in the m entity relationship pairs according to the direction characteristics of the m relationships, and obtain m forward relationship vectors and m reverse relationship vectors; Determine the entity vector corresponding to each entity in the m entity relationship pairs, and obtain 2m entity vectors; Construct m bidirectional knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors, and the 2m entity vectors; the bidirectional knowledge representation includes a forward relationship vector, a reverse relationship vector, and two entity vectors.

6. The method according to claim 5, wherein The constructing m bidirectional knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors, and the 2m entity vectors includes: Construct m initial knowledge representations according to the m forward relationship vectors, the m reverse relationship vectors, and the 2m entity vectors; Map the m initial knowledge representations to a low-dimensional vector space to obtain the m bidirectional knowledge representations.

7. The method according to any one of claims 1 to 3, characterized in that, The constructing a target knowledge service platform based on the m bidirectional knowledge representations includes: Store the m bidirectional knowledge representations in a preset relational database, and construct a data management service for the preset relational database; Construct a target service according to the m bidirectional knowledge representations; the target service includes at least one of the following: intelligent question-answering service, fault diagnosis service, equipment operation and maintenance advice service, risk warning service; Perform visual design on the data management service and the target service to obtain the target knowledge service platform.

8. A knowledge service platform construction device based on knowledge representation, characterized in that The apparatus for constructing a knowledge service platform based on knowledge representation includes: a data input module, an entity relationship recognition module, an entity relationship combination module, a knowledge representation construction module, and a service platform construction module, where The data input module is configured to obtain initial text data for the power field and preprocess the initial text data to obtain target text data; The entity relationship recognition module is configured to input the target text data into an information recognition model to obtain n entities and m relationships; both n and m are integers greater than or equal to 1; where the information recognition model is obtained by training and optimizing a preset model based on historical text data in the power field; The entity relationship combination module is configured to determine m entity relationship combination information according to the n entities and the m relationships; The knowledge representation construction module is configured to determine the bidirectional knowledge representation corresponding to each entity relationship combination information in the m entity relationship combination information according to the direction characteristics of the m relationships, and obtain m bidirectional knowledge representations; The service platform construction module is configured to construct a target knowledge service platform based on the m bidirectional knowledge representations.

9. An electronic device, characterized in that, Including: A processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for performing the steps in the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1-7.