A kind of atlas ontology model construction method, device, electronic equipment and storage medium
By acquiring key elements and entity recognition models from power business data and combining them with association rule mining to construct a graph ontology model, the problem of inaccurate graph ontology model construction in traditional methods is solved, achieving efficient and accurate reflection of semantic relationships in power data.
Patent Information
- Application Number
- CN202511221243.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-08-29
AI Technical Summary
Traditional methods for constructing graph ontology models struggle to accurately capture the complex semantic relationships in power data, and integration barriers exist when multiple algorithms are used in collaborative construction, reducing construction efficiency.
By acquiring power business data from different data sources, key business elements are determined using word frequency inverse document frequency values. The power business entity identification model identifies key business objects, and a graph ontology model is constructed through association rule mining. A graph ontology model of power business data is constructed by combining preset event keywords.
The graph ontology model accurately reflects the complex semantic relationships between power data, improving construction efficiency and accuracy, and reducing the deviation between the model and actual business.
Smart Images

Figure CN120744142B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, and in particular to a graph ontology model construction method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the power network, the graph ontology model is of great significance for accurately expressing the complex semantic relationship between power data. The graph ontology model can help to comprehensively understand the business process and optimize the decision, and can effectively improve the efficiency of power grid operation. However, with the rapid development of new power systems, new business models and data types are emerging, which makes the drawbacks of the traditional graph ontology model construction method gradually apparent. On the one hand, the traditional graph ontology model construction method is difficult to accurately cover various types of data and their semantic details, so that the traditional graph ontology model constructed has deviation from the actual business, and cannot accurately reflect the complex semantic relationship between power data. On the other hand, there are problems in the collaborative construction of the graph ontology model by multiple algorithms, and the integration barrier is obvious, which reduces the efficiency of constructing the graph ontology model. Therefore, it has become a problem to be solved in the field of data processing to provide a graph ontology model construction method that can accurately reflect the complex semantic relationship between power data. SUMMARY
[0003] The present application provides a graph ontology model construction method, device, electronic equipment and storage medium, which ensures that the graph ontology model can accurately reflect the complex semantic relationship of various power business data, realizes the automatic construction of the graph ontology model, and improves the construction efficiency of the graph ontology model.
[0004] In one aspect of the present application, a graph ontology model construction method is provided, comprising:
[0005] Obtaining power business data of different data sources, determining the term frequency-inverse document frequency value of each business element in each power business data, and determining the key business elements in each power business data based on the term frequency-inverse document frequency value;
[0006] Identifying business object entities in the key business elements using a power business entity recognition model, and performing association rule mining on the key business elements based on each business object entity to determine the business relationship of each business object entity, wherein the power business entity recognition model is generated based on power business data labeled with power business entities and non-power business entities;
[0007] According to the preset event keyword, important business events are obtained in each power business data, and a graph ontology model of the power business data is constructed based on the important business events, business object entities and business relationships.
[0008] In another aspect of the present application, a graph ontology model construction device is provided, comprising:
[0009] An element determination module is configured to acquire power business data from different data sources, determine term frequency-inverse document frequency values of each business element in each power business data, and determine key business elements in each power business data based on the term frequency-inverse document frequency values;
[0010] A relationship determination module is configured to identify business object entities in the key business elements by using a power business entity recognition model, and perform association rule mining on the key business elements based on each business object entity to determine business relationships of each business object entity, wherein the power business entity recognition model is generated by training based on power business data annotated with power business entities and non-power business entities;
[0011] A model construction module is configured to acquire important business events in each power business data according to preset event keywords, and construct a graph ontology model of the power business data based on the important business events, the business object entities and the business relationships.
[0012] Another aspect of the embodiment of the present application provides an electronic device, comprising:
[0013] at least one processor;
[0014] and a memory connected in communication with the at least one processor;
[0015] wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the graph ontology model construction method of any of the embodiments of the present application.
[0016] Another aspect of the embodiment of the present application provides a computer readable storage medium, which stores:
[0017] computer instructions, the computer instructions being used to enable the processor to execute the graph ontology model construction method of any of the embodiments of the present application.
[0018] The embodiment of the present application can obtain a series of power business data related to power system operation from a data source providing a plurality of business type data. It can be understood that the power business data can be composed of business elements. The term frequency and inverse document frequency of each business element in the power business data can be calculated. The term frequency and inverse document frequency can be multiplied to obtain the term frequency-inverse document frequency value of each business element. The key business elements can be determined in the power business data based on the term frequency-inverse document frequency value of each business element. The power business entity recognition model for extracting entities can be obtained. The power business entity recognition model can be trained by using power business data in which power business entities and non-power business entities have been labeled. The key business elements can be input into the power business entity recognition model. The power business entity recognition model can identify entities in the key business elements and output the identification results. It can be understood that the output results of the power business entity recognition model are business object entities. The preset event keywords related to the power business can be obtained. A series of specific data can be identified in the power business data based on the preset event keywords. The series of specific data identified can be important business events in the power business data. The important business events, business object entities and business relationships can be used as the constituent elements of the graph ontology model to form the graph ontology model. In the embodiment of the present application, the graph ontology model is constructed based on data of different data sources. It is ensured that the graph ontology model can comprehensively cover all kinds of data in the power business and improve the comprehensiveness of the graph ontology model. The business object entities and business relationships are determined based on the screened key business elements. The construction accuracy of the graph ontology model is enhanced. The power business entity recognition model and the association rule mining algorithm are used to cooperatively work to mine entities and entity relationships of the key business elements. The graph ontology model can more accurately capture the complex semantic relationship between the key business elements. The deviation between the graph ontology model and the actual business is reduced. The construction efficiency of the graph ontology model is improved through the automatic construction process of the graph ontology model. The cost of constructing the graph ontology model is reduced.
[0019] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application. Other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1 is a kind of atlas ontology model construction method flow chart according to the embodiment one of the present application;
[0022] Figure 2 is another kind of atlas ontology model construction method flow chart according to the embodiment two of the present application;
[0023] Figure 3 is a kind of key business element extraction flow chart according to the embodiment three of the present application;
[0024] Figure 4 is a kind of data source interrelation determination flow chart according to the embodiment three of the present application;
[0025] Figure 5 is a kind of business object entity, business relationship and important business event identification flow chart according to the embodiment three of the present application;
[0026] Figure 6 is a kind of business object entity attribute, business relationship attribute and important business event attribute acquisition flow chart according to the embodiment three of the present application;
[0027] Figure 7 is a kind of atlas ontology model construction flow chart according to the embodiment three of the present application;
[0028] Figure 8 is a kind of atlas ontology model construction method device structure schematic diagram of the embodiment of the present application;
[0029] Figure 9 is the electronic equipment block diagram of the atlas ontology model construction method of the embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the person skilled in the art better understand the present application scheme, the technical scheme in the embodiment of the present application will be described clearly and completely in the embodiment of the present application, obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiment in the present application, all other embodiments obtained by the person skilled in the art without creative labor should belong to the scope of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment one
[0033] Figure 1 A flowchart of a graph ontology model construction method is provided for the first embodiment of the present application. The first embodiment of the present application can be applicable to the case of automatically constructing a graph ontology model based on power business data from different data sources. The method can be executed by a graph ontology model construction device, which can be realized in the form of hardware and / or software, and can be configured in a device. As shown in Figure 1 , the method comprises:
[0034] S101, acquiring power business data from different data sources, determining the term frequency-inverse document frequency value of each business element in each power business data, and determining the key business elements in each power business data based on the term frequency-inverse document frequency value.
[0035] Among them, the data source can be understood as a kind of data collection, which can be used to provide power business data of various business types. For example, the data source can include power business failure data, power business defect data or power business hidden danger data and other types of power business data.
[0036] The power business data can be understood as a series of data related to the operation of the power system. For example, the power business data can include power grid operation data, equipment account data and user power consumption data, etc.
[0037] The term frequency-inverse document frequency value refers to the product value of the term frequency and the inverse document frequency of each business element in the power business data, which is used to evaluate the importance of each business element in the power business data.
[0038] The key business element refers to a series of business elements with high importance in the power business data after evaluation by the term frequency-inverse document frequency value. It can be understood that the identification of business object entities in the key business element can improve the accuracy of identification.
[0039] Specifically, a series of power business data related to power system operation can be obtained from a data source providing a plurality of business type data. It can be understood that the power business data can be composed of business elements. The term frequency and inverse document frequency of each business element in the power business data can be calculated. The term frequency and inverse document frequency can be multiplied to obtain the term frequency-inverse document frequency value of each business element. The key business elements can be determined in the power business data based on the term frequency-inverse document frequency value of each business element.
[0040] Specifically, the step of determining the key business elements in the power business data based on the term frequency-inverse document frequency value of each business element can include: obtaining a preset term frequency-inverse document frequency threshold value; comparing the term frequency-inverse document frequency value of each business element with the preset term frequency-inverse document frequency threshold value; and determining the business elements with the term frequency-inverse document frequency value higher than the preset term frequency-inverse document frequency threshold value as the key business elements in the power business data.
[0041] S102, identifying business object entities in the key business elements by using a power business entity recognition model, and performing association rule mining on the key business elements based on each business object entity to determine the business relationship of each business object entity, wherein the power business entity recognition model is generated based on training of power business data labeled with power business entities and non-power business entities.
[0042] The power business entity recognition model can be understood as an entity extraction framework, which can be used to extract business object entities from the key business elements.
[0043] The business object entity can be understood as an object that actually exists in the power system. For example, the business object entity can include power equipment or user entities.
[0044] The association rule refers to a rule describing the relationship between different business object entities found in the key business elements, which can be used to determine the business relationship between the business object entities. For example, the association rule can include single-item association rules or multi-item association rules.
[0045] The business relationship can be understood as an interaction relationship between different business object entities. For example, the type of business relationship can include physical connection, logical association, or functional dependence.
[0046] Specifically, a power business entity recognition model for extracting entities can be obtained, where the power business entity recognition model can be trained using power business data that has been labeled with power business entities and non-power business entities. The key business elements can be input into the power business entity recognition model, and the power business entity recognition model can identify entities in the key business elements and output the identification results. It can be understood that the output results of the power business entity recognition model are the business object entities. A correlation rule mining technique can be used to mine potential correlation rules between the business object entities, and the mined correlation rules can be determined as business relationships between the power business entities.
[0047] For example, using a correlation rule mining technique, potential correlation rules between business object entities can be mined, and the mined correlation rules can be determined as business relationships between the power business entities. The step of determining the business relationships between the power business entities can include: calling a priori Apriori algorithm to identify business object entities of the key business elements and generate correlation rules between the business object entities; and when the confidence of the correlation rules is greater than a threshold confidence threshold, the correlation rules are determined as business relationships of the business object view.
[0048] S103, acquiring important business events in each power business data according to preset event keywords, and constructing a graph ontology model of the power business data based on the important business events, the business object entities, and the business relationships.
[0049] The preset event keywords can be understood as a series of core words related to power business, which can be used to identify specific business events in the power business data.
[0050] The important business events refer to a series of specific data extracted in the power business data based on the preset event keywords. For example, the types of the important business events can include: power grid failure event data, equipment maintenance event data, or user power consumption event data, etc.
[0051] The graph ontology model can be understood as a knowledge base that covers various entities in the power business data, relationships between the entities, and important business events.
[0052] Specifically, the preset event keywords related to the power business can be obtained, a series of specific data can be identified in the power business data based on the preset event keywords, the identified series of specific data can be determined as important business events in the power business data, and the important business events, the business object entities, and the business relationships can be used as the constituent elements of the graph ontology model to construct the graph ontology model.
[0053] For example, the step of constructing the graph ontology model of the power business data based on the important business events, the business object entities and the business relationships can include: extracting a preset power business logic, establishing an event relationship between the important business events and the business object entities according to the power business logic; taking each business object entity as a vertex of the graph ontology model, taking the business relationship between each business object entity as an edge between the vertices; and taking each important business event as a special vertex of the graph ontology model, and establishing a special edge between the special vertex and the vertex according to the event relationship.
[0054] In the embodiment of the present application, a series of power business data related to power system operation can be acquired from a data source providing a plurality of business type data. It can be understood that the power business data can be composed of business elements. The term frequency and the inverse document frequency of each business element appearing in the power business data can be calculated in the power business data. The term frequency and the inverse document frequency can be multiplied to obtain the term frequency-inverse document frequency value of each business element. The key business elements can be determined in the power business data based on the term frequency-inverse document frequency value of each business element. The power business entity recognition model used for extracting entities can be acquired. The power business entity recognition model can be trained by using power business data in which power business entities and non-power business entities have been labeled. The key business elements can be input into the power business entity recognition model. The power business entity recognition model can identify entities in the key business elements and output the identification results. It can be understood that the output results of the power business entity recognition model are the business object entities. The preset event keywords related to the power business can be acquired. A series of specific data can be identified in the power business data based on the preset event keywords. The series of specific data identified can be taken as the important business events in the power business data. The important business events, the business object entities and the business relationships can be taken as the constituent elements of the graph ontology model to constitute the graph ontology model. In the embodiment of the present application, the graph ontology model is constructed based on data of different data sources. It is ensured that the graph ontology model can comprehensively cover all kinds of data in the power business, and the comprehensiveness of the graph ontology model is improved. The business object entities and the business relationships are determined based on the key business elements screened. The construction accuracy of the graph ontology model is enhanced. The power business entity recognition model and the association rule mining algorithm are used to cooperatively work to mine the entities and the entity relationships of the key business elements. The graph ontology model can more accurately capture the complex semantic relationship between the key business elements, and the deviation between the graph ontology model and the actual business is reduced. The construction efficiency of the graph ontology model is improved through the automatic construction process of the graph ontology model, and the cost of constructing the graph ontology model is reduced.
[0055] On the basis of the above-mentioned embodiment, the step of determining the key business elements in each power business data of the embodiment of the application further comprises: extracting numerical data in the power business data, performing standardization processing on the numerical data to obtain standardized numerical data; performing principal component analysis processing on the standardized numerical data to obtain power business feature data, and taking the power business feature data as the key business elements.
[0056] The numerical data can be understood as a series of information represented in the form of numbers. For example, the numerical data can include current data, voltage data or power consumption data.
[0057] The standardization processing can be understood as a data processing process, which aims to eliminate the dimensional difference and numerical range difference between the numerical data.
[0058] The standardized numerical data refers to the numerical data after standardization processing. It can be understood that the standardized numerical data can have the same standard deviation and mean value.
[0059] The principal component analysis processing can be understood as a dimension reduction process of data, which aims to obtain the main feature data in the power business data.
[0060] The power business feature data refers to the power business data after standardization processing and principal component analysis processing. Based on the power business feature data, the subsequent identification of the business object entity can be performed, which can improve the accuracy of identification.
[0061] Specifically, the step of determining the key business elements in each power business data can further include the following steps: obtaining the power business data, extracting the numerical data represented in the form of numbers in the power business data, performing standardization processing on the extracted numerical data, obtaining standardized numerical data with the same standard deviation and mean value, using principal component analysis processing technology to continue principal component analysis processing on the standardized numerical data, obtaining power business feature data after dimension reduction, and taking the power business feature data as the key business elements in the power business data.
[0062] Embodiment two
[0063] Figure 2 Another flowchart of the method for constructing the atlas ontology model provided by the embodiment two of the application is shown in the figure. On the basis of the above-mentioned embodiment, the embodiment of the application provides another method for constructing the atlas ontology model. As shown in the figure, the method comprises: Figure 2
[0064] S201, obtain raw power service data of different data sources stored in the power data middle platform, perform data cleaning on the raw power service data to obtain power service data, wherein the data cleaning operation at least includes a repeated data removal operation and an abnormal data removal operation.
[0065] The power data middle platform can be understood as a structural component that can be used to store power text data from different data sources.
[0066] The raw power service data can be understood as power-related service data directly obtained from various data sources without any data processing, for example, the data processing steps at least include data cleaning.
[0067] Specifically, the raw power service data from different data sources pre-stored in the power data middle platform can be obtained, at least two data cleaning operations such as removing repeated data and removing abnormal data can be performed on the raw power service data, the raw power service data after data cleaning can be used as power service data, and subsequent operations can be performed based on the power service data.
[0068] S202, determine the term frequency-inverse document frequency value of each business element in each power service data, and determine the key business element in each power service data based on the term frequency-inverse document frequency value.
[0069] S203, obtain a pre-trained bidirectional encoder model based on an attention mechanism as a power service entity recognition model, wherein the training data set of the power service entity recognition model at least includes power service data labeled with power service entities and non-power service entities.
[0070] Specifically, the pre-trained bidirectional encoder model based on the attention mechanism can be obtained, wherein the pre-trained bidirectional encoder model based on the attention mechanism is obtained by training the power service data labeled with power service entities and non-power service entities.
[0071] S204, input the key business element into the bidirectional encoder model based on the attention mechanism to obtain the business object entity in the key business element.
[0072] Specifically, the pre-trained bidirectional encoder model based on the attention mechanism can be obtained, the key business element can be input into the bidirectional encoder model based on the attention mechanism as the input of the bidirectional encoder model based on the attention mechanism, the bidirectional encoder model based on the attention mechanism can identify the entity in the key business element and output the identification result, and it can be understood that the identification result output by the bidirectional encoder model based on the attention mechanism is the business object entity.
[0073] S205, calling the apriori algorithm to identify the business object entities of the key business elements, and generating the association rules between the business object entities.
[0074] The apriori algorithm is an algorithm for mining association rules between key business elements, and can be used to determine the business relationships between the business object entities.
[0075] Specifically, the apriori algorithm for mining association rules between key business elements can be called to identify business object entities in the key business elements, and the association rules of the business object entities can be generated based on the identified business object entities.
[0076] For example, the step of calling the apriori algorithm to generate the association rules of the business object entities can include determining the confidence threshold of the apriori algorithm, calling the apriori algorithm to identify the business object entities in the key business elements, generating candidate item sets containing single elements based on a single business object entity, calculating the confidence of each candidate item set, filtering the frequent item sets corresponding to the business object entities according to the confidence threshold, generating the association rules based on the frequent item sets, filtering the association rules greater than the confidence threshold according to the preset confidence threshold, and describing the association rules as the business relationships between the business object entities.
[0077] S206, when the confidence of the association rules is greater than the confidence threshold, the association rules are taken as the business relationships of the business object entities.
[0078] The confidence can be understood as a numerical index, which can be used to measure the strength of the association rules.
[0079] The confidence threshold can be understood as a preset standard value, which can be used to filter the association rules.
[0080] Specifically, the confidence threshold for filtering the association rules can be obtained, the confidence of the generated association rules can be obtained, the obtained confidence of the association rules can be compared with the confidence threshold, the association rules with the confidence greater than the confidence threshold can be taken as the output of the apriori algorithm, and the output association rules of the apriori algorithm can be taken as the business relationships of the business object entities.
[0081] S207, extracting the preset power business logic, and establishing the event relationships between the important business events and the business object entities according to the power business logic.
[0082] The power business logic can be understood as a series of rules followed by the operation of the power industry, and can be used to guide the determination of the event relationships between the important business events and the business object entities.
[0083] The event relationship refers to the interaction between the important business event and the business object entity. For example, based on the event relationship, it can be revealed how the event affects the entity and how the entity responds to the event.
[0084] Specifically, the power business logic for guiding the determination of the event relationship between the important business event and the business object entity can be acquired. The event relationship between the important business event and the business object entity can be defined according to a series of rules contained in the acquired power business logic.
[0085] For example, the rules contained in the power business logic can include that the power system must maintain the balance between supply and demand, that is, the power generation should be equal to or slightly greater than the power consumption, to ensure the stable operation of the power system, and then based on the above rules, the event relationship between the important business event and the business object entity can be determined as: when the user power consumption increases, the power generation needs to be increased.
[0086] For example, the rules contained in the power business logic can also include that the grid dispatching mechanism must adjust the operation state of the power grid according to the actual situation of the power transaction to ensure the stable transmission and distribution of power, and then based on the above rules, the event relationship between the important business event and the business object entity can be determined as: the grid dispatching mechanism formulates a dispatching plan according to the power generation plan and the power demand.
[0087] S208, taking each business object entity as a vertex of the graph ontology model, and taking the business relationship between each business object entity as an edge between the vertices.
[0088] Specifically, each business object entity in the power key elements and the business relationship between each business object entity can be acquired. All business object entities acquired in the power key elements can be abstracted as vertices, all business relationships can be abstracted as edges connecting the vertices, and the graph ontology model can be constructed based on all abstracted vertices and edges between each pair of vertices.
[0089] S209, taking each important business event as a special vertex of the graph ontology model, and establishing a special edge between the special vertex and the vertex according to the event relationship.
[0090] Specifically, each important business event in the power key elements can be acquired. All important business events in the power key elements can be abstracted as special vertices, and all event relationships can be abstracted as edges connecting the vertices and the special vertices. The graph ontology model can be constructed based on all abstracted special vertices and special edges between each pair of vertices and special vertices.
[0091] The embodiment of the present application can obtain raw power business data from different data sources pre-stored in the power data platform, can perform at least two data cleaning operations such as removing duplicate data and removing abnormal data on the raw power business data, can use the raw power business data after data cleaning as power business data, can determine the term frequency-inverse document frequency value of each business element in each power business data, can determine the key business elements in each power business data based on the term frequency-inverse document frequency value, can obtain a pre-trained bidirectional encoder model based on an attention mechanism, wherein the pre-trained bidirectional encoder model based on the attention mechanism is obtained by training power business data of labeled power business entities and non-power business entities, can use the key business elements as the input of the bidirectional encoder model based on the attention mechanism, input into the bidirectional encoder model based on the attention mechanism, the bidirectional encoder model based on the attention mechanism can identify entities in the key business elements and output the identification result, it can be understood that the identification result output by the bidirectional encoder model based on the attention mechanism is the business object entity, the prior Apriori algorithm for mining the association rules between the key business elements can be called to identify the business object entity in the key business elements, the association rules of each business object entity can be generated based on the identified business object entity, the confidence threshold for screening the association rules can be obtained, the confidence of the generated association rules can be obtained, the confidence of the obtained association rules can be compared with the confidence threshold, the association rules with the confidence greater than the confidence threshold can be used as the output of the prior Apriori algorithm, the association rules output by the prior Apriori algorithm can be used as the business relationship of the business object entity, the power business logic for guiding the determination of the important business events and the event relationship between the business object entities can be obtained, the event relationship between the important business events and the business object entities can be defined according to a series of rules contained in the obtained power business logic, all business object entities obtained in the power key elements can be abstracted as vertices, all business relationships can be abstracted as edges connecting the vertices, all important business events in the power key elements can be abstracted as special vertices, all event relationships can be abstracted as edges connecting the vertices and the special vertices, and the graph ontology model can be constructed based on all abstracted vertices, edges between each pair of vertices in all vertices, all abstracted special vertices, and special edges between each pair of vertices and special vertices.The embodiment of the present application improves the quality and reliability of data by performing data cleaning operation on original electric power service data, and further improves the accuracy of the construction of the graph ontology model; the complex semantic features in the key service elements can be captured by the bidirectional encoder model based on the attention mechanism, so that the accurate identification of the entities in the key service elements is realized; the association rules between the key service elements are mined by calling the prior Apriori algorithm, and then the association relationship between the service object entities is determined, so that the accuracy of the service relationship determination is ensured, the confidence threshold is set to screen the association rules, and the reliability of the service relationship between the service object entities is ensured; the event relationship between the important business events and the business object entities is defined according to the obtained electric power service logic, so that the graph ontology model can more accurately reflect the actual operation process of the electric power service, the deviation between the graph ontology model and the actual service is reduced, the interpretability and prediction ability of the graph ontology model are enhanced, the automatic construction of the graph ontology model is realized by comprehensively utilizing the electric power service entity identification model and the association rule mining algorithm, and the construction efficiency of the graph ontology model is improved.
[0092] On the basis of the above-mentioned embodiment, the embodiment of the present application further comprises: obtaining entity attributes of the service object entities, event attributes of the important business events and relationship attributes of the business relationships; adding the entity attributes, the event attributes and the relationship attributes to the vertices, the special vertices and the edges of the graph ontology model as attribute information respectively.
[0093] The entity attributes refer to the characteristic information possessed by the service object entities, and by adding attribute information to the service object entities, the detailed information of the service object entities can be provided or different service object entities can be distinguished.
[0094] The event attributes refer to the characteristic information carried by the important business events, and by adding attribute information to the important business events, the event attributes can be analyzed or the detailed event state can be provided.
[0095] The relationship attributes can be understood as the characteristic information carried by the business relationships, and by adding attribute information to the business relationships, deeper business relationships can be mined.
[0096] Specifically, the entity attributes of the service object entities, the event attributes of the important business events and the relationship attributes of the business relationships can be obtained respectively, and the obtained entity attributes, event attributes and relationship attributes can be added to the graph ontology model as attribute information of the vertices, attribute information of the special vertices and attribute information of the edges respectively.
[0097] For example, the manner of acquiring the entity attribute of the business object entity, the event attribute of the important business event, and the relationship attribute of the business relationship can include: the entity attribute of the business object entity, the relationship attribute of the business relationship, and the event attribute of the important business event can be extracted from the key business elements respectively by using a Pandas tool, or the entity attribute, the event attribute, and the relationship attribute can be extracted in a database by using an SQL query language. It can be understood that when the SQL query language extracts the entity attribute, the event attribute, and the relationship attribute in the database, the entity attribute of the business object entity, the event attribute of the important business event, and the relationship attribute of the business relationship have been pre-stored in the database.
[0098] Embodiment three
[0099] On the basis of the above-mentioned embodiments, another graph ontology model construction method is provided, which comprises: (1) acquiring key business elements in power business data, such as Figure 3 As shown: power business data from different data sources in the power data platform is gathered, the data sources can include power grid operation data tables, equipment account data tables, user power consumption data tables, etc. A data flow processing system Apache NiFi can be used to clean the power business data, and data quality rules can be set in the graphical interface of Apache NiFi, such as removing duplicate records based on the rule that all fields are completely the same, removing error values according to the data type range, removing abnormal values based on the 3σ principle, and ensuring data quality. The Term Frequency-Inverse Document Frequency (TF-IDF) regular expression algorithm in the Scikit-learn library can be used to extract text key information, and the text data is converted into a TF-IDF feature matrix using the default parameter configuration. For example, for the text description in the equipment account, the key feature information of the equipment can be extracted by the TF-IDF algorithm, which can be used as a key business element. Principal Component Analysis (PCA) can also be used to reduce the dimension of numerical data, and 95% of the variance contribution rate can be set to extract the main features, which can be used as key business elements. For example, the main components representing the key features of the equipment can be obtained by performing PCA on the rated capacity and operating current of the equipment. Through these operations, the equipment type, rated capacity, and manufacturer in the equipment account data are extracted as key business elements. (2) determining the association relationship between data sources, such as Figure 4As shown: using the Apriori algorithm in the mlxtend library of Python, set the minimum support to 0.01 and the minimum confidence to 0.8, analyze the association between elements in different data sets. For example, analyze the association between load changes in power grid operation data and electricity consumption of different industry users in user electricity consumption data, and find out the association rules with high support and confidence. With the help of MySQL Workbench, analyze the data dependency relationship, for example, the device account data and power grid operation data are associated through the device ID, and the device status data depends on the basic information in the device account. (3) Identify business object entities, business relationships, and business events, such as Figure 5 As shown: according to the extracted business key elements and business semantics, use the AllenNLP tool based on the attention mechanism of the bidirectional encoder model to process the power business data, and identify business object entities such as substations, transmission lines, and user IDs. The identification results can be saved in JSON format for subsequent processing. According to the association between business rules and data sets, use Python to write a custom relationship recognition algorithm to determine the business relationships between business object entities. For example, by querying the device account data and power grid topology data, determine the connection relationship between substations and transmission lines. From the power business data, set the time window to 1 hour before and after the event, and use regular expressions or string matching algorithms to accurately identify important business events such as power grid failure events, device maintenance events, and user new electricity installation events, with keywords such as "fault", "maintenance", and "new installation". (4) Get the attributes of business object entities, business relationships, and business events, such as Figure 6 As shown: use the Pandas tool to extract the attributes of business object entities, business relationships, and important business events. For example, extract the voltage level, capacity, and other attributes of the substation entity; extract the connection method, transmission capacity, and other attributes of the transmission line and substation connection relationship; extract the fault type, fault time, fault impact range, and other attributes of the power grid failure event. Uniformly encode different sources of device models, establish a device model coding table, and map all device models to a unified code. Standardize the attribute data format, such as converting voltage levels to kV units and capacities to MVA units. Integrate the standardized attribute data into a data set and store it in a relational database or NoSQL database to form a complete and standardized attribute data set. (5) Build a graph ontology model, such as Figure 7As shown: using the AtlasGraph graph database, through its Python driver AtlasGraph-Driver, the identified business object entity is taken as a node, the business relationship is taken as an edge, and the business event is taken as a special node or is associated with a node to construct a business data relationship graph atlas. Each node and edge carries corresponding attribute information, forming a graph structure with rich semantics and deep business association. Use the Cypher query language to write verification scripts to query the attribute integrity of all nodes and edges, and check whether there are isolated nodes, etc. For example, use the "MATCH (n) WHERE NOT EXISTS ((n)--()) OR NOT EXISTS (keys (n)) RETURN n" script to check the node attribute integrity. Through actual business scenario testing, such as simulating power grid fault diagnosis, input the fault data into the constructed graph model, and observe the fault positioning time and accuracy, and optimize and adjust the model according to the results. (6) In the process of completing the above steps to construct the business data relationship graph ontology model, the embodiment of the present application can start recording the mapping relationship between the data items in the original data set and the data elements after cleaning in the data aggregation and cleaning stage, for example, a certain specific timestamp field in the power grid operation data is corresponded to the specific recording method of the time attribute in the graph after cleaning. In the key business element extraction stage, the original position of the extracted key elements (such as device type, rated capacity, etc.) in the data set is determined, and how they are transformed into node attributes in the graph. For example, the device type element in the device account data is presented as a key attribute of the device node in the graph, and the correspondence is recorded. In the data source association relationship determination stage, the association rules found in the data set are corresponded to the edges in the graph. For example, if it is found that there is a strong association between load change in power grid operation data and user power consumption in user power consumption data, it will be embodied in the graph as an edge representing this relationship, and the corresponding relationship between the edge and the association rule in the data set is recorded. In the identification of business object entities, relationships and events stage, for each identified entity (such as a transformer substation, a power transmission line, etc.), a relationship (such as a connection relationship, a power supply relationship, etc.) and an event (such as a fault event, a maintenance event, etc.), their source in the data set and their corresponding identifier as a node, an edge or a special node in the graph are recorded in detail. For example, the specific recording position of the transformer substation entity in the device account data set and its unique identifier as a node in the graph, and its connection with other entities through relationship edges. When the entity, relationship and event attribute acquisition is performed, the whole process of extracting attribute data from the data set, standardizing the processing, and then integrating the node and edge attributes in the graph is recorded. For example, the voltage level attribute is extracted from the power grid operation data set, standardized to kV unit, and then accurately corresponded to the voltage level attribute field of the transformer substation node or the power transmission line edge in the graph.Finally, the graph conversion relationship is output in the form of a visualization chart or a detailed document. The visualization chart can intuitively show how different data items in the data set are converted into nodes, edges and attributes in the graph, facilitating technical personnel and business personnel to understand the logic of graph construction and the data source. The detailed document further records the specific details of each conversion step, the algorithms and rules used, and provides comprehensive reference for subsequent graph maintenance, optimization and business applications based on the graph.
[0100] Embodiment four
[0101] Figure 8 The device for performing the graph ontology model construction method provided in the embodiment four of the present application is shown in Figure 8 The device comprises:
[0102] The element determination module 301 is configured to acquire power business data of different data sources, determine the term frequency-inverse document frequency value of each business element in each power business data, and determine the key business elements in each power business data based on the term frequency-inverse document frequency value.
[0103] The relationship determination module 302 is configured to identify the business object entity in the key business elements by using a power business entity recognition model, and perform association rule mining on the key business elements based on each business object entity to determine the business relationship of each business object entity, wherein the power business entity recognition model is generated by training based on power business data annotated with power business entities and non-power business entities.
[0104] The model construction module 303 is configured to acquire important business events corresponding to the key business elements in each power business data according to a preset event keyword, and construct a graph ontology model of the power business data based on the important business events, the business object entity and the business relationship.
[0105] The embodiment of the present application can obtain a series of power business data related to power system operation from a data source providing a plurality of business type data. It can be understood that the power business data can be composed of business elements. The term frequency and inverse document frequency of each business element in the power business data can be calculated. The term frequency and inverse document frequency can be multiplied to obtain the term frequency-inverse document frequency value of each business element. The key business elements can be determined in the power business data based on the term frequency-inverse document frequency value of each business element. The power business entity recognition model for extracting entities can be obtained. The power business entity recognition model can be trained by using power business data in which power business entities and non-power business entities have been labeled. The key business elements can be input into the power business entity recognition model. The power business entity recognition model can identify entities in the key business elements and output the identification results. It can be understood that the output results of the power business entity recognition model are business object entities. The preset event keywords related to the power business can be obtained. A series of specific data can be identified in the power business data based on the preset event keywords. The series of specific data identified can be important business events in the power business data. The important business events, business object entities and business relationships can be used as the constituent elements of the graph ontology model to form the graph ontology model. In the embodiment of the present application, the graph ontology model is constructed based on data of different data sources. It is ensured that the graph ontology model can comprehensively cover all kinds of data in the power business, thereby improving the comprehensiveness of the graph ontology model. The business object entities and business relationships are determined based on the key business elements screened. The construction accuracy of the graph ontology model is enhanced. The power business entity recognition model and the association rule mining algorithm are used to cooperatively work to mine entities and entity relationships of the key business elements. The graph ontology model can more accurately capture the complex semantic relationship between the key business elements, thereby reducing the deviation between the graph ontology model and the actual business. The construction efficiency of the graph ontology model is improved through the automatic construction process of the graph ontology model, thereby reducing the cost of constructing the graph ontology model.
[0106] On the basis of the above-mentioned embodiment, the step of determining the key business elements in each power business data in the embodiment of the present application further includes:
[0107] The numerical value type data in the power business data is extracted. The numerical value type data is standardized to obtain standardized numerical value data. The principal component analysis is performed on the standardized numerical value data to obtain power business feature data. The power business feature data is used as the key business elements.
[0108] On the basis of the above-mentioned embodiment, the embodiment of the present application further includes:
[0109] An entity attribute of a business object entity, an event attribute of an important business event and a relationship attribute of a business relationship are acquired, and the entity attribute, the event attribute and the relationship attribute are added to vertices, special vertices and edges of the graph ontology model as attribute information respectively.
[0110] On the basis of the above-mentioned embodiments, the element determination module 301 is specifically configured to acquire original power business data of different data sources stored in the power data middle platform, and clean the original power business data to obtain power business data, wherein the data cleaning operation at least includes a duplicate data removal operation and an abnormal data removal operation.
[0111] On the basis of the above-mentioned embodiments, the relationship determination module 302 is specifically configured to acquire a pre-trained bidirectional encoder model based on an attention mechanism as a power business entity recognition model, wherein a training data set of the power business entity recognition model at least includes power business data labeled with power business entities and non-power business entities; and input the key business elements into the bidirectional encoder model based on the attention mechanism to obtain business object entities in the key business elements.
[0112] On the basis of the above-mentioned embodiments, the relationship determination module 302 is specifically configured to call an Apriori priori algorithm to identify business object entities of the key business elements, and generate association rules between the business object entities; and when the confidence of the association rules is greater than a confidence threshold, the association rules are used as business relationships of the business object entities.
[0113] On the basis of the above-mentioned embodiments, the graph model construction module 303 is specifically configured to extract a pre-set power business logic, establish an event relationship between important business events and business object entities according to the power business logic, use each business object entity as a vertex of the graph ontology model, use the business relationships between the business object entities as edges between the vertices, use each important business event as a special vertex of the graph ontology model, and establish a special edge between the special vertex and the vertex according to the event relationship.
[0114] Embodiment five
[0115] The embodiment of the present application provides an electronic device for performing a graph ontology model construction method, a computer readable storage medium and a computer program product.
[0116] Figure 9A block diagram of a device that can be used to implement embodiments of the present application is shown. The device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The device can also represent various forms of mobile devices such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headgear, eyewear, watches, etc.), and other similar computing devices. The components shown in the device, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0117] As shown in Figure 9 The device includes at least one processor 11, and memory, such as a Read-Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., connected to the at least one processor 11, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the ROM 12 or loaded into the RAM 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An Input / Output (I / O) interface 15 is also connected to the bus 14.
[0118] Various components in the device are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the device to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0119] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, central processing units, graphics processing units, various specialized artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any appropriate processors, controllers, microcontrollers, etc. The processor 11 performs various methods and processes described above, such as the graph ontology model construction method.
[0120] In some embodiments, the graph ontology model construction method can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto the device via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the graph ontology model construction method can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the graph ontology model construction method by way of other means, e.g., with the aid of firmware.
[0121] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits, application specific standard products, chips, microprocessors, computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0122] Computer programs implementing methods of embodiments of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0123] In the context of embodiments of the present application, a computer- readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0124] To provide for interaction with a user, the systems and techniques described here can be implemented on a device having a display (e.g., a cathode ray tube or a liquid crystal display monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0125] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network, a wide area network, a blockchain network, and the Internet.
[0126] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server service.
[0127] It should be understood that the various forms of flow shown above can be reordered, added to, or have steps deleted. For example, the steps described in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, and this is not limited herein.
[0128] The above specific embodiments do not constitute a limitation on the protection scope of the embodiments of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for constructing a graph ontology model, characterized by, The method comprises: acquiring power business data of different data sources, determining the term frequency-inverse document frequency value of each business element in each power business data, and determining the key business elements in each power business data based on the term frequency-inverse document frequency value; identifying business object entities in the key business elements by using a power business entity recognition model, and performing association rule mining on the key business elements based on each business object entity to determine the business relationship of each business object entity, wherein the power business entity recognition model is generated based on training of power business data labeled with power business entities and non-power business entities; acquiring important business events corresponding to the key business elements in each power business data according to a preset event keyword, constructing a graph ontology model of the power business data based on the important business events, the business object entities and the business relationship, including: extracting a preset power business logic, establishing an event relationship between the important business events and the business object entities according to the power business logic; taking each business object entity as a vertex of the graph ontology model, and taking the business relationship between each business object entity as an edge between the vertices; taking each important business event as a special vertex of the graph ontology model, and establishing a special edge between the special vertex and the vertex according to the event relationship; wherein the type of the important business event includes at least one of the following: power grid failure event data type, equipment maintenance event data type and user power consumption event data type; the power business logic at least includes: power system balance keeping rule and power grid dispatching mechanism adjusting power grid operation state rule according to actual power transaction situation; the power business logic is used to establish the event relationship between the important business events and the business object entities.
2. The method of claim 1, wherein, The acquisition of the power business data of different data sources comprises: acquiring original power business data of different data sources stored in a power data platform, and performing data cleaning on the original power business data to obtain the power business data; wherein the data cleaning operation at least includes a duplicate data removal operation and an abnormal data removal operation.
3. The method of claim 1, wherein, The step of determining the key business elements in each power business data further comprises: extracting numerical data in the power business data, performing standardization processing on the numerical data to obtain standardized numerical data; performing principal component analysis processing on the standardized numerical data to obtain power business feature data, and taking the power business feature data as the key business elements.
4. The method of claim 1, wherein, The identification of the business object entities in the key business elements by using the power business entity recognition model comprises: acquiring a pre-trained bidirectional encoder model based on an attention mechanism as the power business entity recognition model, wherein the training data set of the power business entity recognition model at least includes power business data labeled with power business entities and non-power business entities; input the key business element into the attention mechanism-based bidirectional encoder model to obtain the business object entity in the key business element.
5. The method of claim 1, wherein, The association rule mining on the key business element based on each business object entity to determine the business relationship of each business object entity comprises: calling an a priori algorithm to identify the business object entity of the key business element and generate an association rule between each business object entity; when the confidence of the association rule is greater than a confidence threshold, the association rule is taken as the business relationship of the business object entity.
6. The method of claim 1, wherein, Further comprising: obtaining entity attributes of the business object entity, event attributes of the important business event and relationship attributes of the business relationship; adding the entity attributes, the event attributes and the relationship attributes to the vertex, the special vertex and the edge of the graph ontology model as attribute information respectively.
7. A graph ontology model construction apparatus characterized by comprising: The device comprises: An element determination module is configured to acquire power business data from different data sources, determine the term frequency-inverse document frequency value of each business element in each power business data, and determine a key business element in each power business data based on the term frequency-inverse document frequency value. A relationship determination module is configured to identify a business object entity in the key business element by using a power business entity identification model, and perform association rule mining on the key business element based on each business object entity to determine the business relationship of each business object entity, wherein the power business entity identification model is generated by training based on power business data labeled with power business entities and non-power business entities. A model construction module is configured to acquire an important business event in each power business data according to a preset event keyword, and construct a graph ontology model of the power business data based on the important business event, the business object entity and the business relationship. The model construction module is specifically configured to extract a preset power business logic, establish an event relationship between the important business event and the business object entity according to the power business logic, take each business object entity as a vertex of the graph ontology model, take the business relationship between each business object entity as an edge between the vertices, take each important business event as a special vertex of the graph ontology model, and establish a special edge between the special vertex and the vertex according to the event relationship; wherein the type of the important business event comprises at least one of the following: a power grid fault event data type, a device maintenance event data type and a user power consumption event data type; the power business logic at least comprises a power system balance maintaining rule and a power grid operation state adjusting rule according to an actual power transaction situation; and the power business logic is used to establish the event relationship between the important business event and the business object entity.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected in communication with the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the graph ontology model construction method in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores: Computer instructions for causing a processor to implement the graph ontology model construction method in any one of claims 1-6 when executed.
Citation Information
Patent Citations
Power equipment knowledge graph ontology construction method and system, equipment and medium
CN115712732A