A data service system for power base

Through a data service system for power grassroots, using big data and artificial intelligence technology to build a power knowledge graph, the problems of data silos and low quality in traditional power data management systems are solved, intelligent analysis and personalized query are realized, and data application is improved Value and user service quality.

CN119003616BActive Publication Date: 2025-02-07INFORMATION & COMM COMPANY OF QINGHAI ELECTRIC POWER +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411091358.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2025-02-07
Estimated Expiration
2044-08-09

Smart Images

  • Figure CN119003616B_ABST
    Figure CN119003616B_ABST
Patent Text Reader

Abstract

The present invention relates to a data service system for the grassroots level of electric power, including a data acquisition and preprocessing module, a data storage module, a knowledge graph construction and update module, a knowledge graph query and analysis module, a user analysis module and a visualization module; the present invention effectively solves the problems of data islands, low data quality, and difficulty in intelligent analysis in traditional electric power data management systems. By comprehensively utilizing big data, graph algorithms and artificial intelligence technologies, the system can not only provide accurate user portraits and personalized query services, but also help users deeply understand data associations through visualization methods, thereby improving the application value of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data management, and in particular to a data service system for power bases. Background Art

[0002] The power system is an important infrastructure for the operation of modern society. The management and efficient use of power data are of great significance to ensure the stable operation of the power system and the quality of user services. Traditional power data management systems often have data island problems, making it difficult to achieve cross-system and cross-departmental data sharing and intelligent analysis. With the development of big data, artificial intelligence and knowledge graph technology, building a data service system for the grassroots level of the power industry and providing efficient data collection, storage, analysis and visualization services has become a current technical hotspot. Summary of the invention

[0003] In order to solve the above problems, the purpose of the present invention is to provide a data service system for the grassroots level of the power industry to meet the needs of grassroots personnel in finding and using data, promote data application innovation and reduce the burden and empower grassroots work.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A data service system for the electric power grassroots, including a data acquisition and preprocessing module, a data storage module, a knowledge graph construction and update module, a knowledge graph query and analysis module, a user analysis module and a visualization module;

[0006] The data acquisition and preprocessing module collects power data and user-related information from different data sources, including power equipment operation data, maintenance records, user feedback, and environmental monitoring data; and preprocesses the power data, including data cleaning, format conversion, missing data filling, and data standardization, to ensure data consistency and integrity;

[0007] The knowledge graph construction and update module builds the power knowledge graph based on the preprocessed power data, introduces the rule engine for automatic update, and dynamically adjusts the knowledge graph according to the new rules and data;

[0008] The user analysis module obtains user-related information from the data storage module and the power knowledge graph, extracts user features, and uses the clustering algorithm K-means to group users based on the user features; based on the user grouping results, it performs graph analysis and data mining, including community discovery and path analysis, and finally builds a user portrait by combining the results of community discovery and path analysis;

[0009] Knowledge graph query module: When users query knowledge graph data, the user portrait is considered to obtain the final query results;

[0010] The visualization module displays data through the visualization library based on the query of the knowledge graph query module, and explores the entities and relationships in the graph through interaction to understand cross-domain business connections, as follows:

[0011] The raw data obtained from the SPARQL query is cleaned and aggregated; invalid or abnormal data is removed through data cleaning; data is aggregated according to needs through data aggregation, including summarizing power consumption by time period and energy consumption by device type;

[0012] Based on the processed data, Cytoscape.js is used for visualization to display the graph structure of nodes and edges, and interactive effects are achieved by monitoring user operation events (click, hover, drag, etc.);

[0013] Ensure timely update of graph data through regular polling or real-time data push mechanism, and dynamically load more data based on user operations;

[0014] The filtering component is implemented through the front-end framework React. After the user enters the conditions, the data is filtered in real time, and the filtering results are displayed through the map redrawing;

[0015] Using the ontology model of the knowledge graph, entities and relationships in different fields are modeled and displayed in association, and cross-domain association analysis and recommendations are performed based on the reasoning mechanism of the knowledge graph.

[0016] Furthermore, based on the preprocessed power data, a power knowledge graph is constructed, as follows:

[0017] The data model of the predefined power knowledge graph includes entities and relationships, wherein the entity Node includes power equipment, geographic location, user, and event; the relationship Edge includes the connection relationship between power equipment, the index relationship between equipment and geographic location, the usage relationship between user and equipment, and the impact relationship between event and equipment;

[0018] Based on predefined entities and relations, the NER model is used to identify power equipment, users, events, and geographic location entities in the text, and the identified entities are disambiguated and standardized;

[0019] Parse text data based on business rules to identify the connection, index, usage, and impact relationships between entities; for example, determine the connection relationship between a substation and a distribution transformer through device connection information;

[0020] Create the node and relationship model of the power knowledge graph, import the identified entity and relationship data, and use the graph database to complete the construction and storage of the graph;

[0021] Introduce the rule engine Drools for automatic updates and dynamically adjust the knowledge graph based on new rules and data.

[0022] Furthermore, the NER model is used to identify the power equipment, users, events, and geographic location entities in the text, and the identified entities are disambiguated and standardized as follows:

[0023] Define NER tags for power equipment, geographic location, users, and events, input preprocessed text into the pre-trained NER model, identify and extract corresponding entities, including the identification of power equipment, geographic location, users, events, etc.

[0024] Based on extracting the entity E to be disambiguated from the preprocessed text i and its context C i , traverse all possible standardized entities E in the knowledge base KnowledgeBase j , for each knowledge base entity E j , calculate its difference with entity E i In context C i The matching score Score(E i ,E j ,C i ), select the E with the highest score j , which best matches context C i And the knowledge base entity of entity Ei:

[0025]

[0026] Among them, DisambiguatedEntity(E i , C i ) is the entity after disambiguation; KnowledgeBase is the knowledge base in the electric power field; Score() is the matching score function;

[0027] Standardize the identified entities to ensure that the same entity name is consistent across different text sources.

[0028] Furthermore, a rule engine (such as Drools) is introduced for automatic updating, and the knowledge graph is dynamically adjusted according to new rules and data, as follows:

[0029] Convert business rules into DRL files that can be parsed and executed by the rule engine Drools;

[0030] Pass the entities and relationships in the power knowledge graph as input data to Drools.

[0031] Drools triggers corresponding rules based on input data and updates the data status;

[0032] Update the results of rule execution to the knowledge graph to reflect the latest system status.

[0033] Furthermore, user-related information is obtained from the data storage module and the power knowledge graph, user features are extracted, and based on the user features, the clustering algorithm K-means is used to group users, as follows:

[0034] Obtain user-related data from the power knowledge graph and data storage module, and extract key features of users based on the collected data, including power consumption characteristics (average daily power consumption, peak power consumption, minimum power consumption), equipment usage characteristics (type and quantity of equipment used), time characteristics (statistics during peak power consumption hours), and geographic location characteristics (user's geographic location: such as longitude and latitude);

[0035] Construct a dataset based on key features {x1,x2,...,x i′ ,..,x n};

[0036] Use K-means and other clustering algorithms to group users and divide users into several clusters based on their characteristics:

[0037] (1) Randomly select k initial cluster centers {u1,u2,...,u j ,..,u k};

[0038] (2) Assign data to the nearest cluster center:

[0039]

[0040] Among them, label(x i′ ) is the data x i′ The assigned cluster label;

[0041] (3) Update cluster center:

[0042]

[0043] Among them, C j represents all data points in the jth cluster, |C j | represents the number of data points in cluster j;

[0044] (4) Repeat steps (2) and (3) until the cluster center no longer changes or the change amplitude is less than a preset threshold.

[0045] Furthermore, community discovery uses the Louvain community discovery algorithm to detect communities and extract community features, as follows:

[0046] (1) Treat each user as an independent community;

[0047] (2) Based on the local optimum, nodes are continuously moved to maximize the modularity Q;

[0048]

[0049] Among them, A i″j″ is the edge weight between nodes i″ and j″; k i″ ,k j″ are the degrees of nodes i″ and j″ respectively; m is the total number of edges in the knowledge graph; δ(c i″ ,c j″ ) When c i″ =c j″ 1 when it is, otherwise 0, indicating that community c i″ and c j″ Are they the same?

[0050] (3) Treat each community as a new node, rebuild the graph, and repeat step (2) until the modularity no longer increases.

[0051] Further, path analysis uses Dijkstra path algorithm to analyze user behavior paths, as follows:

[0052] Set the source node s, the initial distance to all nodes is infinite, and the distance to itself is 0;

[0053]

[0054] Iteratively update the shortest path estimate until all nodes are traversed:

[0055] d(s,i″)=min(d(s,i″)+A i″j″ ;

[0056] Get the shortest path set between users.

[0057] Furthermore, we construct a user portrait, as follows:

[0058] Based on the community discovery results, the common characteristics of users in the community are analyzed to extract static characteristics of each community, including power consumption patterns and device types used;

[0059] Through path analysis, based on the shortest path set, dynamic behavior features are obtained, including high-frequency paths and key node features, which represent the user's interaction mode in the system;

[0060] Combine community features and behavior path features to form a comprehensive user profile, including static features and dynamic behavior features:

[0061] UserProfile(U)={StaticFeatures(U),BehaviorPatterns(U)};

[0062] Among them, StaticFeatures(U) are static features; BehaviorPatterns(U) are dynamic behavior features.

[0063] Furthermore, in the knowledge graph query module, when a user queries the knowledge graph data, the user portrait is considered to obtain the final query result, as follows:

[0064] Let the user portrait feature vector be u, and the user query request definition query vector be q;

[0065] Based on the user profile and query conditions, a fusion model is defined to fuse the user profile features with the query conditions:

[0066] f=α·u+β·q

[0067] Among them, α and β are weight coefficients;

[0068] The corresponding SPARQL query statement is constructed according to the fusion result f, and then the SPARQL query is executed and the result is returned to the visualization module.

[0069] Furthermore, the ontology model of the knowledge graph is used to model and associate entities and relationships in different fields. Based on the reasoning mechanism of the knowledge graph, cross-domain association analysis and recommendations are performed as follows:

[0070] Obtain the business domain and the relationships between them, and determine the entities and relationships that need to be analyzed;

[0071] Define entity types, relationship types and attributes, and build ontology models; extract, transform and load cross-domain data into knowledge graphs;

[0072] Create RDF data or graph databases, import and organize entities and relationships;

[0073] Based on the inference rules, the inference engine performs inference and generates implicit relationships;

[0074] Based on the knowledge graph and reasoning results, association analysis and intelligent recommendation are performed as follows:

[0075] If user U uses data P in domain D1, and other user U′ uses similar data P′ in domain D2, then recommend other user U to try data P′ in domain D2;

[0076]

[0077] Build a recommendation model using matrix factorization:

[0078] R≈P·Q T

[0079] Among them, R is the rating matrix; P is the user's latent factor matrix, and Q is the data's latent factor matrix;

[0080] Optimization goal:

[0081]

[0082] The present invention has the following beneficial effects:

[0083] 1. The present invention effectively solves the problems of data islands, low data quality, and difficulty in intelligent analysis in traditional power data management systems. By comprehensively utilizing big data, graph algorithms, and artificial intelligence technologies, the system can not only provide accurate user portraits and personalized query services, but also help users deeply understand data associations through visualization, thereby improving the application value of data and the quality of user services;

[0084] 2. The present invention obtains user-related information from the power knowledge graph and data storage module, extracts key features, and uses the K-means clustering algorithm to group users, and builds a more accurate user portrait by combining the results of community discovery and path analysis;

[0085] 3. The present invention effectively integrates user portraits with query conditions, so that knowledge graph queries can more closely meet users' personalized needs and provide more accurate and meaningful query results. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 This is a system architecture diagram of the present invention;

[0087] Figure 2 The figure is a schematic diagram of the user image construction process in one embodiment of the present invention. DETAILED DESCRIPTION

[0088] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0089] refer to Figure 1 , in this embodiment, a data service system for the electric power grassroots is provided, including a data acquisition and preprocessing module, a data storage module, a knowledge graph construction and update module, a knowledge graph query and analysis module, a user analysis module and a visualization module;

[0090] The data acquisition and preprocessing module collects power data and user-related information from different data sources, including power equipment operation data, maintenance records, user feedback, and environmental monitoring data; data sources include SCADA systems, equipment ledgers, power GIS systems, CRM systems, etc.; and preprocesses power data, including data cleaning, format conversion, missing data filling, and data standardization, to ensure data consistency and integrity;

[0091] The knowledge graph construction and update module builds the power knowledge graph based on the preprocessed power data, introduces the rule engine for automatic update, and dynamically adjusts the knowledge graph according to the new rules and data;

[0092] The user analysis module obtains user-related information from the data storage module and the power knowledge graph, extracts user features, and uses the clustering algorithm K-means to group users based on the user features; based on the user grouping results, it performs graph analysis and data mining, including community discovery and path analysis, and finally builds a user portrait by combining the results of community discovery and path analysis;

[0093] Knowledge graph query module: When users query knowledge graph data, the user portrait is considered to obtain the final query results;

[0094] The visualization module displays data through the visualization library based on the query of the knowledge graph query module, and explores the entities and relationships in the graph through interaction to understand cross-domain business connections, as follows:

[0095] The raw data obtained from the SPARQL query is cleaned and aggregated; invalid or abnormal data is removed through data cleaning; data is aggregated according to needs through data aggregation, including summarizing power consumption by time period and energy consumption by device type;

[0096] Based on the processed data, Cytoscape.js is used for visualization to display the graph structure of nodes and edges, and interactive effects are achieved by monitoring user operation events (click, hover, drag, etc.);

[0097] Ensure timely update of graph data through regular polling or real-time data push mechanism, and dynamically load more data based on user operations;

[0098] The filtering component is implemented through the front-end framework React. After the user enters the conditions, the data is filtered in real time, and the filtering results are displayed through the map redrawing;

[0099] Using the ontology model of the knowledge graph, entities and relationships in different fields are modeled and displayed in association, and cross-domain association analysis and recommendations are performed based on the reasoning mechanism of the knowledge graph.

[0100] In this embodiment, based on the preprocessed power data, a power knowledge graph is constructed, as follows:

[0101] The data model of the predefined power knowledge graph includes entities and relationships, wherein the entity Node includes power equipment (such as substations, generators, distribution transformers), geographic locations (such as cities, regions), users, and events; the relationship Edge includes the connection relationship between power equipment, the index relationship between equipment and geographic location, the usage relationship between users and equipment, and the impact relationship between events and equipment;

[0102] Based on predefined entities and relations, the NER model is used to identify power equipment, users, events, and geographic location entities in the text, and the identified entities are disambiguated and standardized;

[0103] Parse text data based on business rules to identify the connection, index, usage, and impact relationships between entities; for example, determine the connection relationship between a substation and a distribution transformer through device connection information;

[0104] Create the node and relationship model of the power knowledge graph, import the identified entity and relationship data, and use the graph database to complete the construction and storage of the graph;

[0105] Introduce the rule engine Drools for automatic updates and dynamically adjust the knowledge graph based on new rules and data.

[0106] In this embodiment, the NER model is used to identify the power equipment, user, event and geographic location entities in the text, and the identified entities are disambiguated and standardized as follows:

[0107] Define NER tags for power equipment, geographic location, users, and events, input preprocessed text into the pre-trained NER model, identify and extract corresponding entities, including the identification of power equipment, geographic location, users, events, etc.

[0108] Based on extracting the entity E to be disambiguated from the preprocessed text i and its context C i , traverse all possible standardized entities E in the knowledge base KnowledgeBase j , for each knowledge base entity E j , calculate its difference with entity E i In context C i The matching score Score(E i ,E j ,C i ), select the E with the highest score j , which best matches context C i And the knowledge base entity of entity Ei:

[0109]

[0110] Among them, DisambiguatedEntity(E i , C i ) is the entity after disambiguation; KnowledgeBase is the knowledge base in the electric power field; Score() is the matching score function;

[0111] Standardize the identified entities to ensure that the same entity name is consistent across different text sources.

[0112] In this embodiment, a rule engine (such as Drools) is introduced for automatic updating, and the knowledge graph is dynamically adjusted according to new rules and data, as follows:

[0113] Convert business rules into DRL files that can be parsed and executed by the rule engine Drools;

[0114] Pass the entities and relationships in the power knowledge graph as input data to Drools.

[0115] Drools triggers corresponding rules based on input data and updates the data status;

[0116] Update the results of rule execution to the knowledge graph to reflect the latest system status.

[0117] In this embodiment, user-related information is obtained from the data storage module and the power knowledge graph, user features are extracted, and based on the user features, the clustering algorithm K-means is used to group users, as follows:

[0118] Obtain user-related data from the power knowledge graph and data storage module, including: basic user information: user ID, geographic location, etc.; user power consumption records: average daily power consumption, peak power consumption, minimum power consumption, etc.; equipment usage data: the situation of different power equipment used by users; user behavior data: such as peak power consumption hours, seasonal changes, etc. And based on the collected data, extract the key features of the user, including power consumption characteristics (average daily power consumption, peak power consumption, minimum power consumption), equipment usage characteristics (type and quantity of equipment used), time characteristics (peak power consumption period statistics), and geographic location characteristics (user's geographic location: such as longitude and latitude);

[0119] Construct a dataset based on key features {x1,x2,...,x i′ ,..,x n};

[0120] Use K-means and other clustering algorithms to group users and divide users into several clusters based on their characteristics:

[0121] (1) Randomly select k initial cluster centers {u1,u2,...,u j ,..,u k};

[0122] (2) Assign data to the nearest cluster center:

[0123]

[0124] Among them, label(x i′ ) is the data x i′ The assigned cluster label;

[0125] (3) Update cluster center:

[0126]

[0127] Among them, C j represents all data points in the jth cluster, |C j | represents the number of data points in cluster j;

[0128] (4) Repeat steps (2) and (3) until the cluster center no longer changes or the change amplitude is less than a preset threshold.

[0129] In this embodiment, community discovery uses the Louvain community discovery algorithm to detect communities and extract community features, as follows:

[0130] (1) Treat each user as an independent community;

[0131] (2) Based on the local optimum, nodes are continuously moved to maximize the modularity Q;

[0132]

[0133] Among them, A i″j″ is the edge weight between nodes i″ and j″; k i″ ,k j″ are the degrees of nodes i″ and j″ respectively; m is the total number of edges in the knowledge graph; δ(c i″ ,c j″ ) When c i″ =c j″ 1 when it is, otherwise 0, indicating that community c i″ and c j″ Are they the same?

[0134] (3) Treat each community as a new node, rebuild the graph, and repeat step (2) until the modularity no longer increases.

[0135] In this embodiment, path analysis uses Dijkstra path algorithm to analyze user behavior paths, as follows:

[0136] Set the source node s, the initial distance to all nodes is infinite, and the distance to itself is 0;

[0137]

[0138] Iteratively update the shortest path estimate until all nodes are traversed:

[0139] d(s,i″)=min(d(s,i″)+A i″j″ ;

[0140] Get the shortest path set between users.

[0141] In this embodiment, a user portrait is constructed as follows:

[0142] Based on the community discovery results, the common characteristics of users in the community are analyzed to extract static characteristics of each community, including power consumption patterns and device types used;

[0143] Through path analysis, based on the shortest path set, dynamic behavior features are obtained, including high-frequency paths and key node features, which represent the user's interaction mode in the system;

[0144] Combine community features and behavior path features to form a comprehensive user profile, including static features and dynamic behavior features:

[0145] UserProfile(U)={StaticFeatures(U),BehaviorPatterns(U)};

[0146] Among them, StaticFeatures(U) are static features; BehaviorPatterns(U) are dynamic behavior features.

[0147] In this embodiment, the knowledge graph query module, when a user performs a knowledge graph data query, takes the user portrait into consideration and obtains the final query result, as follows:

[0148] Let the user portrait feature vector be u, and the user query request definition query vector be q;

[0149] Based on the user profile and query conditions, a fusion model is defined to fuse the user profile features with the query conditions:

[0150] f=α·u+β·q

[0151] Among them, α and β are weight coefficients;

[0152] The corresponding SPARQL query statement is constructed according to the fusion result f, and then the SPARQL query is executed and the result is returned to the visualization module.

[0153] In this embodiment, the ontology model of the knowledge graph is used to model and associate entities and relationships in different fields. Based on the reasoning mechanism of the knowledge graph, cross-domain association analysis and recommendations are performed as follows:

[0154] Obtain the business domain and the relationships between them, and determine the entities and relationships that need to be analyzed;

[0155] Define entity types, relationship types and attributes, and build ontology models; extract, transform and load cross-domain data into knowledge graphs;

[0156] Create RDF data or graph databases, import and organize entities and relationships;

[0157] Based on the inference rules, the inference engine performs inference and generates implicit relationships;

[0158] Based on the knowledge graph and reasoning results, association analysis and intelligent recommendation are performed as follows:

[0159] If user U uses data P in domain D1, and other user U′ uses similar data P′ in domain D2, then recommend other user U to try data P′ in domain D2;

[0160]

[0161] Build a recommendation model using matrix factorization:

[0162] R≈P·Q T

[0163] Among them, R is the rating matrix; P is the user's latent factor matrix, and Q is the data's latent factor matrix;

[0164] Optimization goal:

[0165]

[0166] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0170] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A data service system for power base, characterized in that: It includes data collection and preprocessing module, data storage module, knowledge graph construction and update module, knowledge graph query and analysis module, user analysis module and visualization module; The data acquisition and preprocessing module collects power data and user-related information from different data sources, including power equipment operation data, maintenance records, user feedback, and environmental monitoring data; And pre-process the power data, including data cleaning, format conversion, missing data filling and data standardization, to ensure the consistency and integrity of the data; The knowledge graph construction and update module builds the power knowledge graph based on the preprocessed power data, introduces the rule engine for automatic update, and dynamically adjusts the knowledge graph according to the new rules and data; The user analysis module obtains user-related information from the data storage module and the power knowledge graph, extracts user features, and uses the K-means clustering algorithm to group users based on the user features; Based on the user grouping results, graph analysis and data mining are performed, including community discovery and path analysis. Finally, the user portrait is constructed by combining the results of community discovery and path analysis. Knowledge graph query and analysis module: When users query knowledge graph data, the user portrait is considered to obtain the final query results; The visualization module displays data through the visualization library based on the query of the knowledge graph query and analysis module, and explores the entities and relationships in the graph through interaction to understand cross-domain business connections, as follows: The raw data obtained from the SPARQL query is cleaned and aggregated; invalid or abnormal data is removed through data cleaning; data is aggregated according to needs through data aggregation, including summarizing power consumption by time period and energy consumption by device type; Based on the processed data, Cytoscape.js is used for visualization to display the graph structure of nodes and edges, and interactive effects are achieved by monitoring user operation events. Ensure timely update of graph data through regular polling or real-time data push mechanism, and dynamically load more data based on user operations; The filtering component is implemented through the front-end framework React. After the user enters the conditions, the data is filtered in real time, and the filtering results are displayed through the map redrawing; Using the ontology model of the knowledge graph, entities and relationships in different fields are modeled and displayed in association, and cross-domain association analysis and recommendations are performed based on the reasoning mechanism of the knowledge graph; The user-related information is obtained from the data storage module and the power knowledge graph, user features are extracted, and based on the user features, the user is grouped using the clustering algorithm K-means, as follows: Obtain user-related data from the power knowledge graph and data storage module, and extract key features of users based on the collected data, including power consumption features, equipment usage features, time features, and geographic location features; Build a dataset based on key features ; Use the K-means clustering algorithm to group users and divide them into several clusters based on their characteristics: (1) Randomly select k initial cluster centers ; (2) Assign data to the nearest cluster center: ; in, For data The assigned cluster label; (3) Update cluster center: ; in, represents all data points in the jth cluster, represents the number of data points in cluster j; Repeat steps (2) and (3) until the cluster center no longer changes or the change amplitude is less than a preset threshold; The community discovery uses the Louvain community discovery algorithm to detect communities and extract community features, as follows: (1) Treat each user as an independent community; (2) Based on the local optimum, continuously move nodes to maximize modularity ; ; in, Is a node and The edge weights between The nodes are and degree; m is the total number of edges in the knowledge graph; when hour 1, otherwise 0, indicating community and Are they the same? Treat each community as a new node, rebuild the graph, and repeat step (2) until the modularity no longer increases; The path analysis uses the Dijkstra path algorithm to analyze the user behavior path, as follows: Set the source node s, the initial distance to all nodes is infinite, and the distance to itself is 0; ; Iteratively update the shortest path estimate until all nodes are traversed: ; Get the shortest path set between users; The construction of the user portrait is as follows: Based on the community discovery results, the common characteristics of users in the community are analyzed to extract static characteristics of each community, including power consumption patterns and device types used; Through path analysis, based on the shortest path set, dynamic behavior features are obtained, including high-frequency paths and key node features, which represent the user's interaction mode in the system; Combine community features and behavior path features to form a comprehensive user profile, including static features and dynamic behavior features: UserProfile(U)={StaticFeatures(U),BehaviorPatterns(U)}; Among them, StaticFeatures(U) is the static features; BehaviorPatterns(U) is the dynamic behavior features; The ontology model of the knowledge graph is used to model and associate entities and relationships in different fields, and cross-field association analysis and recommendations are performed based on the reasoning mechanism of the knowledge graph, as follows: Obtain the business domain and the relationships between them, and determine the entities and relationships that need to be analyzed; Define entity types, relationship types and attributes, and build ontology models; extract, transform and load cross-domain data into knowledge graphs; Create RDF data or graph databases, import and organize entities and relationships; Based on the inference rules, the inference engine performs inference and generates implicit relationships; Based on the knowledge graph and reasoning results, association analysis and intelligent recommendation are performed as follows: If user u uses data B in domain D1, and other user u′ uses similar data B′ in domain D2, then it is recommended that user u try data B′ in domain D2; ; Build a recommendation model using matrix factorization: Among them, R is the rating matrix; P is the user's latent factor matrix, and Q is the data's latent factor matrix; Optimization goal: 。 2. A data service system for electric power base according to claim 1, characterized in that: The power knowledge graph is constructed based on the preprocessed power data, as follows: The data model of the predefined power knowledge graph includes entities and relationships, wherein the entities include power equipment, geographic locations, users, and events; the relationships include connection relationships between power equipment, index relationships between equipment and geographic locations, usage relationships between users and equipment, and impact relationships between events and equipment; Based on predefined entities and relations, the NER model is used to identify power equipment, users, events, and geographic location entities in the text, and the identified entities are disambiguated and standardized; Parse text data based on business rules to identify the connection, index, usage, and impact relationships between entities; create node and relationship models for the power knowledge graph, import the identified entity and relationship data, and use the graph database to complete the construction and storage of the graph; Introduce the rule engine Drools for automatic updates and dynamically adjust the knowledge graph based on new rules and data.

3. A data service system for electric power base according to claim 2, characterized in that: The NER model is used to identify power equipment, users, events, and geographic location entities in the text, and the identified entities are disambiguated and standardized, as follows: Define NER tags for power equipment, geographic location, user, and event, input preprocessed text into the pre-trained NER model, identify and extract corresponding entities, including the identification of power equipment, geographic location, user, and event entities; Based on extracting the entity E to be disambiguated from the preprocessed text i and its context C i , traverse all standardized entities E in the knowledge base KnowledgeBase j , for each knowledge base entity E j , calculate its difference with entity E i In context C i The matching score Score(E i , E j ,C i ), select the E with the highest score j , which best matches context C i And the knowledge base entity of entity Ei: in, is the entity after disambiguation; KnowledgeBase is the knowledge base in the power field; Score() is the matching score function; Standardize the identified entities to ensure that the same entity name is consistent across different text sources.

4. The data service system for electric power base according to claim 1, characterized in that: The rule engine Drools is introduced for automatic updating, and the knowledge graph is dynamically adjusted according to new rules and data, as follows: Convert business rules into DRL files that can be parsed and executed by the rule engine Drools; Pass entities and relationships in the power knowledge graph as input data to Drools; Drools triggers corresponding rules based on input data and updates the data status; Update the results of rule execution to the knowledge graph to reflect the latest system status.

5. The data service system for electric power base according to claim 1 is characterized in that: The knowledge graph query and analysis module considers the user profile when the user queries the knowledge graph data and obtains the final query results, as follows: Assume that the user portrait feature vector is o, and the user query request definition query vector is q; Based on the user profile and query conditions, a fusion model is defined to fuse the user profile features with the query conditions: Among them, α and β are weight coefficients; According to the fusion result f, the corresponding SPARQL query statement is constructed, and then the SPARQL query is executed and the result is returned to the visualization module.

Citation Information

Patent Citations

  • Data knowledge processing system applied to electricity transaction

    CN114282498A

  • Personnel portrait knowledge graph analysis method and system based on graph convolutional neural network

    CN116610816A

  • Park energy consumption dynamic portrait division method based on electric power big data

    CN116628534A