Power data query method and device and storage medium

By constructing a multi-level geospatial and electrical topology-connected cube index using a stream computing engine, the problem of low cube service efficiency in existing power data analysis solutions is solved, enabling efficient multi-dimensional cross-queries and real-time responses.

CN121301408APending Publication Date: 2026-01-09CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511407726.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing power data analysis solutions focus on single-dimensional analysis, resulting in low accuracy in fault location and power flow analysis. The reliance on offline computing engines leads to low efficiency and long update cycles for Cube services, failing to meet the real-time business response requirements of the power grid.

Method used

A stream computing engine is used to construct a cube index with multi-level geospatial and multi-level electrical topology connections. Through entity filtering, association, aggregation and hierarchical caching, the incremental cube index can be queried quickly.

Benefits of technology

It enables multi-dimensional cross-queries, reduces latency, improves the efficiency of Cube services, supports second-level updates and millisecond-level queries, and meets the real-time business needs of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301408A_ABST
    Figure CN121301408A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power data query method and device and a storage medium. The method comprises the following steps: screening an entity meeting the standard of a public information model from original electric power data of a power grid; according to the entity, constructing a connection between a multi-stage geographic space and a multi-stage electrical topology which are mutually associated; the multi-level geographic space and the multi-level electrical topology are connected and aggregated into an incremental cubic Cube index in a stream calculation engine; the cubic Cube indexes are cached in a graded mode; and when a query request is received, querying the cubic Cube index from the adaptive cache according to the query request. According to the embodiment of the invention, the multi-level geography level covers the space attribute, the multi-level topology level covers the electrical relationship, the two are associated, the multi-dimensional cross aggregation is realized, the arbitrary cross query of geography and topology is supported, and the requirements of fault location and power flow analysis are met. And moreover, the delay is reduced by the multi-level cache, and the query speed and the data integrity are both considered, so that the Online Cube service efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of power grids, and in particular to a method, device, and storage medium for querying power data. Background Technology

[0002] With the continuous advancement of smart grid construction, the real-time data generated by the power system is growing explosively. In the daily operation of the power grid, the demand for real-time data analysis and multi-dimensional correlation insights is becoming increasingly prominent. The dispatch and monitoring link can grasp the operating parameters of equipment at different voltage levels in different areas in real time, and output the overall operating status of the power grid in a timely manner by aggregating measurement data from multiple dimensions. When facing fault location, the deep correlation between geographical location and electrical topology can be combined to sort out the correlation links of abnormal equipment in order to shorten the handling time.

[0003] Existing power data analysis solutions are mainly based on "offline Cube + data mining and analysis," with the following workflow:

[0004] 1) Data collection and cleaning: Collect power data, clean and standardize the power data, and convert the power data into a unified scale.

[0005] 2) Data conversion and integration: Convert the format of power data from different systems, merge heterogeneous power data into a central data warehouse, and support subsequent Cube modeling.

[0006] 3) Build the Cube: Determine the Cube dimensions based on business needs, decompose the data into sub-databases or partitions according to the dimensions, and build the Cube structure by applying standardized operations and fusion technologies.

[0007] 4) Data mining and analysis: Apply machine learning or statistical algorithms to conduct in-depth analysis based on Cube.

[0008] 5) Results presentation: The operation and management results are presented through the display layer.

[0009] This analysis scheme focuses on single-dimensional analysis, resulting in low accuracy in fault location, power flow analysis, and other business operations. Furthermore, it is built on an offline computing engine with an update cycle of hours or T+1, which leads to slow response to real-time business operations in the scheduling center, resulting in low efficiency of the Cube service. Summary of the Invention

[0010] In view of this, the present invention provides a method, device and storage medium for querying power data, so as to improve the efficiency of Cube service in the power grid.

[0011] A first aspect of the present invention provides a method for querying electricity data, applied to a public information model, wherein the public information model is configured with a stream computing engine, the method comprising:

[0012] Entities that conform to the standards of the public information model are selected from the raw power data of the power grid;

[0013] Based on the entities, construct interconnected multi-level geospatial and multi-level electrical topology connections;

[0014] In the streaming computing engine, the multi-level geospatial and multi-level electrical topology connections are aggregated into an incremental cube index.

[0015] The cube index is cached hierarchically;

[0016] Upon receiving a query request, the cube index is retrieved from the adapted cache based on the query request.

[0017] A second aspect of the present invention provides a power data query device applied to a public information model, wherein the public information model is configured with a stream computing engine, the device comprising:

[0018] The entity filtering module is used to filter out entities that conform to the standards of the public information model from the raw power data of the power grid;

[0019] The entity modeling module is used to construct interconnected multi-level geospatial and multi-level electrical topology connections based on the entities;

[0020] The cube index aggregation module is used to aggregate multi-level geospatial and multi-level electrical topology connections into incremental cube in the streaming computing engine.

[0021] A cube index caching module is used to cache the cube index in a hierarchical manner;

[0022] The cube metric query module is used to query the cube metric from the adapted cache according to the query request when a query request is received.

[0023] A third aspect of the present invention provides an electronic device, the electronic device comprising:

[0024] At least one processor; and

[0025] A memory communicatively connected to the at least one processor; wherein,

[0026] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the power data query method as described in the first aspect above.

[0027] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for querying power data as described in the first aspect above.

[0028] A fifth aspect of the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements the power data query method as described in the first aspect above.

[0029] In this embodiment, entities conforming to the standards of the Public Information Model are selected from the raw power data of the power grid; multi-level geospatial and multi-level electrical topology connections are constructed based on these entities; the multi-level geospatial and multi-level electrical topology connections are aggregated into incremental cube indicators in the stream computing engine; the cube indicators are hierarchically cached; and upon receiving a query request, the cube indicators are retrieved from the appropriate cache according to the query request. This embodiment uses a multi-level geographic hierarchy to cover spatial attributes and a multi-level topology hierarchy to cover electrical relationships. These two are interconnected, enabling multi-dimensional cross-aggregation and supporting arbitrary cross-queries of geographic and topological data, meeting the needs of fault location and power flow analysis. Furthermore, multi-level caching reduces latency, balancing query speed and data integrity, thereby effectively improving the efficiency of the Online Cube service.

[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart of a power data query method provided in Embodiment 1 of the present invention.

[0033] Figure 2 This is a system architecture diagram of CIM provided in Embodiment 1 of the present invention.

[0034] Figure 3 This is a flowchart of an Online Cube provided in Embodiment 1 of the present invention.

[0035] Figure 4This is an example diagram of geospatial and elevator topology association modeling provided in Embodiment 1 of the present invention.

[0036] Figure 5 This is a schematic diagram of a Cube data provided in Embodiment 1 of the present invention.

[0037] Figure 6 This is a schematic diagram of the structure of a power data query device provided in Embodiment 2 of the present invention.

[0038] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

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

[0040] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate so that the embodiments of the invention described herein can cover implementations in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0041] Example 1

[0042] See Figure 1The diagram illustrates a flowchart of a power data query method provided in Embodiment 1 of the present invention. This method can be executed by a power data query device, which can be implemented in hardware and / or software. The power data query device can be configured in an electronic device, wherein the electronic device can be applied to the Common Information Model (CIM) of the power system. The CIM is a standardized model used to uniformly describe core entities such as equipment, measurement, and topology relationships in the power system, and to realize data interoperability between multiple business systems. The CIM is configured with a stream computing engine (such as Flink).

[0043] like Figure 2 As shown, the CIM architecture can be divided into five parts: data source layer, storage layer, multi-dimensional modeling layer, query engine layer, and application layer.

[0044] The underlying data source layer integrates multimodal data such as real-time telemetry from SCADA (Supervisory Control and Data Acquisition), synchronous phasors from PMU (Phasor Measurement Unit), scheduling instructions from EMS (Energy Management System), historical measurement data, and basic data from detection units.

[0045] The system utilizes a storage layer (L1 local cache, L2 Redis (Remote Dictionary Server) cluster, and L3 HDFS (Hadoop Distributed File System) distributed storage) to achieve hierarchical management and backup of hot, warm, and cold data.

[0046] The multi-dimensional modeling layer is based on the Flink stream processing engine. It performs dynamic multi-dimensional cross-aggregation and incremental state maintenance on two dimensions: multi-level geospatial and multi-level electrical topology. It also supports real-time response to changes in power grid topology connections.

[0047] The query engine layer distributes REST / gRPC interface requests to the optimal storage level through intelligent routing and outputs them in both JSON and Protobuf protocols.

[0048] The application layer provides advanced business scenarios such as real-time operation monitoring, intelligent scheduling optimization, dynamic risk warning, power trading decision-making, and demand response management, forming a closed-loop system from data access to value services.

[0049] like Figure 1As shown, the method includes:

[0050] Step 101: Select entities that meet the standards of the public information model from the raw power data of the power grid.

[0051] like Figure 3 As shown, in the CIM standardized data processing module, multiple sources of raw power data are accessed, and entities that conform to the Public Information Model (CIM) standard are selected from the raw power data of the power grid.

[0052] In practical implementation, on the one hand, real-time raw power data from the power grid can be collected from the distributed message queue Kafka. On the other hand, offline historical raw power data from the power grid can be collected from the distributed file system HDFS.

[0053] Data cleaning is performed on both real-time and offline raw power data to obtain candidate power data.

[0054] Data cleaning includes cleaning data using the 3σ criterion, and completing missing data using linear interpolation, among other things.

[0055] Candidate power data are mapped to entities that conform to the CIM standard based on the classes defined in the Common Information Model (CIM).

[0056] Step 102: Construct interconnected multi-level geospatial and multi-level electrical topology connections based on entities.

[0057] like Figure 3 As shown, in the geographic-topology dual-dimensional hierarchical modeling module, a streaming multi-level geographic space and multi-level electrical topology connection can be constructed based on entities, and the multi-level geographic space and multi-level electrical topology connection can be interconnected to achieve dual-dimensional association, and the associated multi-level geographic space and multi-level electrical topology connection can be constructed into a Flink data stream.

[0058] In specific implementations, such as Figure 4 As shown, on the one hand, entities can be extended to multi-level geospatial space based on the Location class in the Public Information Model (CIM).

[0059] Among them, the Location class is the basic class in the Common Information Model (CIM) used to abstractly describe the physical location information of power system objects (such as equipment, nodes, and regions). It does not directly participate in electrical connection logic, focuses on "spatial coordinates and geographical association", and is the key carrier for mapping the power model with real geographical scenes.

[0060] The functions and roles of Location include:

[0061] 1. Spatial positioning: Provides precise geographic coordinates (such as latitude, longitude, and altitude) for equipment such as transformers, lines, and switches, or logical / physical objects such as ConnectivityNodes and Substations.

[0062] Hierarchical association: Supports "parent-child" location hierarchy (e.g., Location (province) → Location (city) → Location (substation) → Location (equipment)) to realize geographical hierarchical management of the power system.

[0063] On the other hand, such as Figure 4 As shown, entities can be extended into multi-level electrical topology connections based on the ConnectivityNode class and TopologicalNode class in the Common Information Model (CIM).

[0064] ConnectivityNode is a class in CIM that describes the physical connection points of electrical equipment terminals, representing the "physical interface between devices"—for example, the joint of two cables, the connection point between a switch terminal and a busbar, which is the "smallest connection unit" that constitutes the physical wiring diagram of a power system.

[0065] The functions and roles of ConnectivityNode include:

[0066] 1. Physical connection carrier: Each ConnectivityNode is associated with at least two Terminal objects (from different devices), otherwise there is no actual connection meaning (e.g., the "incoming terminal" and "bus terminal" of a switch are connected to a ConnectivityNode together).

[0067] 2. Explicit Wiring Relationships: Through the association relationships of ConnectivityNode, it is possible to directly trace "which devices are connected through which points" (e.g., the high-voltage terminal of transformer T1 → ConnectivityNode CN1 → the terminal of switch S1), which is the basis for generating electrical wiring diagrams.

[0068] 3. Location association: ConnectivityNode can be associated with a Location object to specify its physical installation location (e.g., "CN1 is located at busbar No. 2 of the substation").

[0069] The TopologicalNode class is a class in CIM that describes equipotential logical nodes in a power system. It is dynamically generated based on the "switch state"—when the switches (such as circuit breakers and disconnectors) between multiple ConnectivityNodes are in the "closed" state, these ConnectivityNodes are electrically equipotential and will be merged into a single TopologicalNode; if the switch is open, it will be split into multiple TopologicalNodes.

[0070] The functions and roles of TopologicalNode include:

[0071] 1. Dynamic topology generation: Based on the real-time status of the switch (open / closed), the ConnectivityNode is automatically aggregated / split to reflect the current electrical connectivity of the system (for example, during normal operation, the ConnectivityNodes of the bus, switch, and transformer terminals are merged into one TopologicalNode; after the switch is opened, the TopologicalNode is split into two: the "bus side" and the "transformer side").

[0072] 2. Electrical analysis carrier: Power flow calculation, short circuit calculation, etc. are all based on Topological Node (such as calculating the voltage and power of a certain Topological Node), rather than directly using Connectivity Node (because the latter is a physical point and has no electrical equivalent meaning).

[0073] 3. Status Identifier: The electrical status of the Topological Node can be marked (such as "energized", "power outage", "fault") to provide a basis for scheduling decisions.

[0074] Multi-level geospatial and multi-level electrical topology connections with the same nodes are interconnected.

[0075] For example, such as Figure 4 As shown, the multi-level geographic space includes, in order, the country, region, province, city, and substation.

[0076] The multi-level electrical topology connection includes, in sequence, substation, voltage level, busbar, bay, topology node and connection node.

[0077] Therefore, by using substations (represented by IDs or other identifiers) as the association key for multi-level geographic spaces and multi-level electrical topology connections, multi-level geographic spaces and multi-level electrical topology connections with the same substations (represented by IDs or other identifiers) can be interconnected, ensuring a two-dimensional connection.

[0078] Step 103: In the stream computing engine, aggregate multi-level geospatial and multi-level electrical topology connections into incremental cube metrics.

[0079] like Figure 3 As shown, in the Flink real-time incremental Cube aggregation module, the Flink streaming engine is used to aggregate multi-level geospatial and multi-level electrical topology connections into incremental cube metrics.

[0080] In specific implementations, such as Figure 3 As shown, in the Flink streaming engine, cross-aggregation of multi-level geospatial and multi-level electrical topology data is performed to obtain cubic structure data.

[0081] Among them, such as Figure 5 As shown, the cube structure data is a four-dimensional composite key, including geospatial, electrical topology connections, equipment type, and measurement type.

[0082] like Figure 3 As shown, a sliding time window is configured for the cube structure data. The length of the time window is usually smaller than the step size of the time window. For example, the length of the time window is 5 seconds and the step size of the time window is 1 second. This fine-grained time window adapts to the high-frequency update characteristics of power data and ensures that the cube update delay is ≤1 second.

[0083] The Cube index is used to statistically increase the cube structure data as the time window slides according to a preset step size.

[0084] For example, the Cube metric includes at least one of the following:

[0085] Sum, Average, Max, Count.

[0086] The keyed state in the Flink streaming engine is used to store the cube index of each cube structure data. When new raw power data is obtained, the cube index of the cube structure data corresponding to the new raw power data is updated to realize incremental state calculation and reduce computational overhead.

[0087] KeyedState is a state type that can be used on KeyedStream. It is bound to a specific key, allowing the state to be partitioned and managed according to the key. This state mechanism is one of the features of Flink for handling stateful stream computations, and it is especially suitable for scenarios that require maintaining state by key (such as accumulation, counting, window aggregation, etc.).

[0088] In addition, the BroadcastStream in the Flink streaming engine can be used to receive topology change events of the power grid in real time, and the multi-level electrical topology can be dynamically updated based on the topology change events to achieve dynamic topology updates and ensure that the aggregation logic is consistent with the actual power grid topology.

[0089] In Flink, BroadcastStream is a data stream used to efficiently distribute a single piece of data across all parallel task instances.

[0090] Step 104: Implement hierarchical caching of the Cube index.

[0091] like Figure 3 As shown, in the multi-level Cube storage and indexing module, the cube metrics can be split from different dimensions, and the cube metrics can be cached hierarchically. At least one hierarchical cache can be used for some cube metrics, and at least one hierarchical cache can be used for all cube metrics.

[0092] In specific implementations, such as Figure 3 As shown, key cube metrics can be filtered out based on the query dimensions. Key cube metrics are also known as popular cube metrics.

[0093] Key cube metrics for the most recent period (e.g., 10 minutes) are cached in the Level 1 device (L1). The Level 1 device includes the TaskManager node in the Flink streaming engine to ensure that the query latency is ≤10ms.

[0094] All critical cube metrics are cached in the L2 device; the L2 device includes a remote dictionary service cluster, Redis Cluster, to ensure latency ≤50ms.

[0095] The full set of cube metrics is cached in the L3 device, and a row key index is built for the cube metrics based on multi-level geospatial, multi-level electrical topology connections and time, supporting time range queries; the L3 device includes a distributed column storage database HBase with a latency of ≤100ms.

[0096] Step 105: Upon receiving a query request, retrieve the Cube metrics from the appropriate cache based on the query request.

[0097] like Figure 3As shown, the hierarchical caching of the Cube metrics provides the Online Cube service. The Online Cube service refers to a multi-dimensional data cube that is built in real time based on a stream computing engine and supports low-latency queries, enabling second-level updates and millisecond-level queries.

[0098] The Online Cube service provides external APIs (Application Programming Interfaces) that conform to standards such as REST / gRPC, enabling query operations such as dimension filtering, data slicing, and data chunking. It can perform routed queries based on query conditions, output structured Cube results, support formats such as JSON / Protobuf, and adapt to monitoring dashboards and scheduling systems.

[0099] In the actual implementation, the query conditions are extracted from the query request.

[0100] Query the cube index that meets the query conditions in the primary and / or secondary equipment.

[0101] If a cube index that meets the query criteria has been found in the primary or secondary equipment, then the structured cube index that meets the query criteria will be output.

[0102] If no matching cube index is found in the Level 1 or Level 2 devices, then the matching cube index is found in the Level 3 devices, and the structured cube index that meets the query criteria is output.

[0103] In this embodiment, entities conforming to the standards of the Public Information Model are selected from the raw power data of the power grid; multi-level geospatial and multi-level electrical topology connections are constructed based on these entities; the multi-level geospatial and multi-level electrical topology connections are aggregated into incremental cube indicators in the stream computing engine; the cube indicators are hierarchically cached; and upon receiving a query request, the cube indicators are retrieved from the appropriate cache according to the query request. This embodiment uses a multi-level geographic hierarchy to cover spatial attributes and a multi-level topology hierarchy to cover electrical relationships. These two are interconnected, enabling multi-dimensional cross-aggregation and supporting arbitrary cross-queries of geographic and topological data, meeting the needs of fault location and power flow analysis. Furthermore, multi-level caching reduces latency, balancing query speed and data integrity, thereby effectively improving the efficiency of the Online Cube service.

[0104] Example 2

[0105] See Figure 6This diagram illustrates the structure of a power data query device according to Embodiment 3 of the present invention. It is applied to a public information model, which is configured with a stream computing engine, such as... Figure 6 As shown, the device includes:

[0106] The entity filtering module 601 is used to filter out entities that conform to the standards of the public information model from the raw power data of the power grid;

[0107] The entity modeling module 602 is used to construct interconnected multi-level geospatial and multi-level electrical topology connections based on the entities;

[0108] The cube index aggregation module 603 is used to aggregate multi-level geospatial and multi-level electrical topology connections into incremental cube in the streaming computing engine.

[0109] The cube index caching module 604 is used for hierarchical caching of the cube index;

[0110] The cube metric query module 605 is used to query the cube metric from the adapted cache according to the query request when a query request is received.

[0111] In one embodiment of the present invention, the entity filtering module 601 includes:

[0112] The real-time data acquisition module is used to collect real-time raw power data from the power grid from a distributed message queue.

[0113] The offline data acquisition module is used to acquire raw power data from the power grid offline from the distributed file system;

[0114] The data cleaning module is used to perform data cleaning on the raw power data to obtain candidate power data;

[0115] The entity mapping module is used to map the candidate power data into entities that conform to the standards of the public information model based on the classes defined in the public information model.

[0116] In one embodiment of the present invention, the entity modeling module 602 includes:

[0117] A geospatial extension module is used to extend the entity into a multi-level geospatial space based on the Location class in the public information model.

[0118] An electrical topology connection extension module is used to extend the entity into a multi-level electrical topology connection based on the ConnectivityNode class and TopologicalNode class in the public information model.

[0119] The model association module is used to associate the multi-level geographic space with the multi-level electrical topology with the same nodes.

[0120] For example, the multi-level geographic space includes, in sequence, a country, a region, a province, a city, and a substation;

[0121] The multi-level electrical topology connection sequentially includes substation, voltage level, busbar, bay, topology node, and connection node;

[0122] The model association module is also used for:

[0123] The geographic space and electrical topology of the substations with the same characteristics are interconnected.

[0124] In one embodiment of the present invention, the cube index aggregation module 603 includes:

[0125] A cube structure data aggregation module is used to cross-aggregate the multi-level geographic space and the multi-level electrical topology connections in the streaming computing engine to obtain cube structure data; the cube structure data includes the geographic space, the electrical topology connections, the device type, and the measurement type.

[0126] A time window configuration module is used to configure a time window for the cube structure data;

[0127] The cube index statistics module is used to count the incremental cube index of the cube structure data as the time window slides according to a preset step size.

[0128] A cube index storage module is used to store the cube index using the keying state in the stream computing engine.

[0129] In one embodiment of the present invention, the cube index aggregation module 603 further includes:

[0130] The topology change event receiving module is used to receive topology change events of the power grid in real time using the broadcast stream in the streaming computing engine;

[0131] An electrical topology update module is used to update the electrical topology at multiple levels based on the topology change event.

[0132] For example, the cube index includes at least one of the following:

[0133] Sum, average, maximum value, quantity.

[0134] In one embodiment of the present invention, the cube index caching module 604 includes:

[0135] The key indicator query module is used to filter out the key cube indicators based on the query dimensions.

[0136] A first-level cache module is used to cache key cube metrics within a recent period in a first-level device; the first-level device includes a task management node in the stream computing engine;

[0137] A secondary cache module is used to cache all key cube metrics in a secondary device; the secondary device includes a remote dictionary service cluster.

[0138] A three-level caching module is used to cache the full set of cube metrics in a three-level device, and to construct a row key index for the cube metrics based on the multi-level geospatial, multi-level electrical topology connections and time; the three-level device includes a distributed column-oriented storage database.

[0139] In one embodiment of the present invention, the cube index query module 605 includes:

[0140] The query condition extraction module is used to extract query conditions from the query request.

[0141] A shallow query module is used to query the cube index that meets the query conditions in the primary device and / or the secondary device;

[0142] The cube index output module is used to output the cube index that satisfies the query conditions if a cube index that satisfies the query conditions has been found in the first-level device or the second-level device.

[0143] The deep query module is used to query the Cube index that meets the query conditions in the tertiary device if no Cube index that meets the query conditions is found in the primary device or the secondary device, and to output the Cube index that meets the query conditions.

[0144] The power data query device provided in this embodiment of the invention can execute the power data query method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the power data query method.

[0145] Example 3

[0146] See Figure 7This diagram illustrates a structural schematic of an electronic device according to an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0147] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0148] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0149] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for querying power data.

[0150] In some embodiments, the method for querying power data may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via 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 power data querying method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the power data querying method by any other suitable means (e.g., by means of firmware).

[0151] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0152] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0153] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0154] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; 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 sound input, voice input, or tactile input).

[0155] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0156] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0157] Example 4

[0158] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the power data query method provided in any embodiment of this invention.

[0159] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0160] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0161] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. 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 substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for querying electricity data, characterized in that, Applied to a public information model, wherein the public information model is configured with a stream computing engine, the method includes: Entities that conform to the standards of the public information model are selected from the raw power data of the power grid; Based on the entities, construct interconnected multi-level geospatial and multi-level electrical topology connections; In the streaming computing engine, the multi-level geospatial and multi-level electrical topology connections are aggregated into an incremental cube index. The cube index is cached hierarchically; Upon receiving a query request, the cube index is retrieved from the adapted cache based on the query request.

2. The method according to claim 1, characterized in that, The process of filtering entities from the raw power data of the power grid that conform to the standards of the public information model includes: Collect real-time raw power data from the power grid using a distributed message queue; Raw power data from the power grid is collected offline from a distributed file system; Data cleaning is performed on the raw power data to obtain candidate power data; The candidate power data is mapped to entities that conform to the standards of the public information model based on the classes defined in the public information model.

3. The method according to claim 1, characterized in that, The construction of interconnected multi-level geospatial and multi-level electrical topology connections based on the entities includes: Based on the Location class in the public information model, the entity is expanded into a multi-level geographic space; Based on the ConnectivityNode and TopologicalNode classes in the public information model, the entity is extended into a multi-level electrical topology connection. The multi-level geographic space with the same nodes is interconnected with the multi-level electrical topology.

4. The method according to claim 3, characterized in that, The multi-level geographic space includes, in sequence, the country, region, province, city, and substation; The multi-level electrical topology connection sequentially includes substation, voltage level, busbar, bay, topology node, and connection node; The method of associating the multi-level geographic space with the multi-level electrical topology having the same nodes includes: The geographic space and electrical topology of the substations with the same characteristics are interconnected.

5. The method according to claim 1, characterized in that, The aggregation of multi-level geospatial and multi-level electrical topology connections into an incremental cube metric in the streaming computing engine includes: In the streaming computing engine, the multi-level geospatial data and the multi-level electrical topology connections are cross-aggregated to obtain cube structure data; the cube structure data includes the geospatial data, electrical topology connections, device type, and measurement type. Configure a time window for the cube structure data; During the process of sliding the time window according to a preset step size, the cube index of the cube structure data is statistically incremented. The cube index is stored using the keyed state in the stream computing engine.

6. The method according to claim 5, characterized in that, The aggregation of multi-level geospatial and multi-level electrical topology connections into an incremental cube metric in the streaming computing engine also includes: The topology change events of the power grid are received in real time using the broadcast stream in the streaming computing engine. Update the electrical topology at multiple levels based on the aforementioned topology change events; The cube index includes at least one of the following: Sum, average, maximum value, quantity.

7. The method according to any one of claims 1-6, characterized in that, The hierarchical caching of the cube index includes: Filter out the key cube metrics based on the query dimensions; The key cube metrics for a recent period are cached in a primary device; the primary device includes the task management node in the stream computing engine. The full set of critical cube metrics is cached in a secondary device; the secondary device includes a remote dictionary service cluster. The full set of cube metrics is cached in the tertiary device, and a row key index is constructed for the cube metrics based on the multi-level geospatial, multi-level electrical topology connections and time; the tertiary device includes a distributed column-oriented storage database.

8. The method according to claim 7, characterized in that, The step of querying the cube metrics from the adapted cache based on the query request includes: Extract the query conditions from the query request; Query the Cube index that satisfies the query conditions in the primary device and / or the secondary device; If a cube index that meets the query conditions has been found in the primary device or the secondary device, then the cube index that meets the query conditions is output. If no cube index that meets the query conditions is found in the first-level device or the second-level device, then the cube index that meets the query conditions is queried in the third-level device, and the cube index that meets the query conditions is output.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for querying power data as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for querying power data as described in any one of claims 1-8.