Electronic equipment, data analysis method and device and storage medium

By using electronic devices and a target spatial tree model, the problem of complex energy consumption data statistics within the park has been solved, enabling more efficient and accurate energy consumption analysis and supporting refined management.

CN120851333APending Publication Date: 2025-10-28BOE TECHNOLOGY GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410525592.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-10-28

Smart Images

  • Figure CN120851333A_ABST
    Figure CN120851333A_ABST
Patent Text Reader

Abstract

The invention provides electronic equipment, a data analysis method and device and a storage medium, relates to the technical field of data processing, and is used for improving the statistical analysis efficiency of energy consumption data. The electronic equipment comprises a communication interface and a processor. The communication interface is configured to obtain energy consumption data monitored by each instrument device in at least two instrument devices in a target area, wherein the target area comprises a plurality of monitoring areas; the processor is configured to determine energy consumption data of energy consumption equipment in a target monitoring area in the multiple monitoring areas based on energy consumption data monitored by each instrument equipment and target space tree models corresponding to the multiple monitoring areas, and the target space tree models comprise multiple first nodes; each first node is used for indicating a target monitoring area, and instrument equipment is deployed in the target monitoring area indicated by at least one first node, and / or instrument equipment is deployed in the target monitoring area indicated by any child node corresponding to at least one first node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to an electronic device, a data analysis method, an apparatus, and a storage medium. Background Technology

[0002] Park energy efficiency management mainly involves the refined management of energy consumption by energy-consuming equipment within the park. Through multi-dimensional analysis, it aims to grasp the real-time dynamics of energy usage, thereby providing effective data support for energy management. However, due to the large area and numerous buildings within the park, a large number of metering instruments need to be installed to collect data on the consumption of various energy sources in different areas.

[0003] Because the park uses a variety of energy sources (such as water, electricity, and natural gas), different types of metering equipment are needed to collect data on the consumption of the same energy source. Furthermore, there are various types of metering equipment for the same energy source. Therefore, the process of statistically analyzing energy consumption data within the park is complex and inefficient. Summary of the Invention

[0004] On the one hand, an electronic device, a data analysis method, an apparatus, and a storage medium are provided to improve the efficiency of statistical analysis of energy consumption data within a park.

[0005] The electronic device includes a communication interface and a processor. The communication interface is configured to acquire energy consumption data monitored by each of at least two instrument devices within a target area. The target area includes multiple monitoring areas with a hierarchical relationship. One instrument device is used to monitor the energy consumption data of an energy-consuming device within a monitoring area. The processor is configured to determine the energy consumption data of an energy-consuming device within a target monitoring area based on the energy consumption data monitored by each instrument device and a target spatial tree model corresponding to the multiple monitoring areas. The target spatial tree model includes multiple first nodes, each first node indicating a target monitoring area. At least one of the multiple first nodes indicates a target monitoring area where an instrument device is deployed, and / or at least one of the first nodes indicates a target monitoring area where an instrument device is deployed.

[0006] In view of this, embodiments of this application provide an electronic device that can acquire energy consumption data monitored by each instrument within a target area. Based on the energy consumption data monitored by each instrument and a target spatial tree model indicating the hierarchical relationship between multiple monitoring areas included in the target area, the device can determine the energy consumption data of energy-consuming devices within the target monitoring area, including those deployed within the monitoring area and / or those deployed in sub-areas within the monitoring area. Thus, according to the hierarchical relationship between multiple monitoring areas indicated by the target spatial tree model, and the monitoring areas where instrumentation is deployed, the energy consumption data of energy-consuming devices within each target monitoring area can be determined using the acquired energy consumption data monitored by each instrument. This improves the efficiency of statistical analysis of energy consumption data within the target area.

[0007] In some embodiments, the communication interface is further configured to: acquire the hierarchical relationship between multiple monitoring areas and the deployment information of each instrument device, wherein the deployment information is used to indicate the correspondence between the instrument device and the monitoring area; the processor is further configured to: construct a basic spatial tree model based on the hierarchical relationship and the deployment information, wherein the basic spatial tree model includes multiple second nodes, each second node is used to indicate a monitoring area, the multiple second nodes include: a root node and child nodes, the root node is used to indicate a target area, the child nodes are used to indicate monitoring areas other than the target area among the multiple monitoring areas, and the second node corresponding to the monitoring area where the instrument device is deployed has an association relationship with the instrument device; and adjust the basic spatial tree model to obtain a target spatial tree model based on the second nodes in the basic spatial tree model that indicate the correspondence with the instrument device.

[0008] Based on the above technical solution, this application can construct a basic spatial tree model corresponding to the target area based on the hierarchical relationship between multiple monitoring areas within the target area and the deployment information of each instrument device. Then, based on the correspondence between each instrument device and the monitoring area, the basic spatial tree model is adjusted to obtain a more accurate target spatial tree model, thereby enabling more accurate statistical analysis of energy consumption data within the target area based on the target spatial tree model.

[0009] In some embodiments, the processor is specifically configured to: determine the child node corresponding to each of the plurality of second nodes; delete the third node in the basic spatial tree model to obtain the target spatial tree model, wherein the third node is the second node among the plurality of second nodes that does not have a corresponding relationship with the instrument device and each of its corresponding child nodes does not have a corresponding relationship with the instrument device.

[0010] Based on the above technical solution, this application determines the child nodes corresponding to each second node based on the basic spatial tree model, and deletes the second nodes in the basic spatial tree model that do not have a corresponding relationship with the instrument equipment and whose corresponding child nodes do not have a corresponding relationship with the instrument equipment, based on the correspondence between the instrument equipment, the second node and the monitoring area. This results in a more accurate target spatial tree model corresponding to the target area, so as to perform statistical analysis on the energy consumption data in the target area more accurately based on the target spatial tree model.

[0011] In some embodiments, the communication interface is further configured to: acquire energy value information, which indicates the value of a unit of energy in different time periods; the processor is further configured to: determine the value of energy consumption by energy-consuming devices in the target monitoring area in each time period based on the energy value information and energy consumption data of energy-consuming devices in the target monitoring area.

[0012] Based on the above technical solution, this application further combines the energy value information of the indicated unit energy at different time periods with the energy consumption data of energy-consuming equipment in the target monitoring area to determine the energy consumption value of the energy-consuming equipment in the target monitoring area at each time period, thereby further analyzing the energy consumption data in the target area through the value.

[0013] In some embodiments, the processor is specifically configured to: determine the energy consumption data corresponding to the target monitoring area where the instrument devices are deployed, based on the energy consumption data monitored by each instrument device; determine at least one fourth node from a plurality of first nodes, and determine the child nodes of each fourth node, wherein the at least one fourth node is a node among the plurality of first nodes that does not have a corresponding relationship with the instrument devices; and determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node, based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node.

[0014] Based on the above technical solution, since some target monitoring areas are not equipped with instruments, the child nodes of each node in the target space tree model can be determined. By using the energy consumption data of the target monitoring areas with instruments, the energy consumption data of the target monitoring areas without instruments can be determined, thereby improving the accuracy of statistical analysis of energy consumption data in the target area.

[0015] In some embodiments, the processor is specifically configured to: determine the energy consumption data corresponding to the target monitoring area where the instrument devices are deployed, based on the energy consumption data monitored by each instrument device; determine at least one fourth node from a plurality of first nodes, and determine the leaf node of each fourth node, wherein the at least one fourth node includes a leaf node, and the at least one fourth node is a first node among a plurality of first nodes that does not have a corresponding relationship with the instrument device; and determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node, based on the energy consumption data corresponding to the target monitoring area indicated by the leaf node of each fourth node.

[0016] Based on the above technical solution, since some target monitoring areas are not equipped with instruments, the leaf nodes of each node in the target space tree model can be determined. By using the energy consumption data of the target monitoring areas with instruments, the energy consumption data of the target monitoring areas without instruments can be determined, thereby improving the accuracy of statistical analysis of energy consumption data in the target area.

[0017] In some embodiments, the processor is further configured to: determine whether a data table exists in the database for each of at least two instrument devices; if no data table exists in the database for any instrument device, create a data table for any instrument device; and store the energy consumption data monitored by each instrument device into the corresponding data table.

[0018] Based on the above technical solution, after obtaining the energy consumption data detected by each instrument, this application needs to store the energy consumption data detected by each instrument into the corresponding data table. Therefore, it is necessary to first determine whether there is a data table corresponding to each instrument in the database. If there is no data table corresponding to a certain instrument, a data table corresponding to any instrument can be created first, and then the corresponding energy consumption data can be stored. This can ensure the integrity of the data.

[0019] In some embodiments, energy consumption data is used to indicate the energy consumption data of energy-consuming devices in the monitoring area per unit time; the communication interface is specifically configured to: obtain basic data monitored by each instrument from at least two instrument devices, the basic data being the total energy consumption of energy-consuming devices in the monitoring area determined in real time at preset intervals; the processor is specifically configured to: determine the energy consumption data monitored by each instrument device based on the basic data.

[0020] Based on the above technical solution, the data obtained from each instrument device in this application is the total energy consumption of energy-consuming devices in the monitoring area, which is determined in real time at each preset time interval. Therefore, it is necessary to determine the energy consumption data of energy-consuming devices in the monitoring area monitored by each instrument device within a unit time based on the data determined in real time at each preset time interval. Thus, based on the data within a unit time, the energy consumption data of energy-consuming devices can be determined more accurately, thereby improving the accuracy of statistical analysis of energy consumption data in the target area.

[0021] In view of this, embodiments of this application provide a data analysis method applied to electronic devices. The method includes: acquiring energy consumption data monitored by each of at least two instrument devices in a target area, wherein the target area includes multiple monitoring areas with a hierarchical relationship between them, and one instrument device is used to monitor the energy consumption data of energy-consuming devices in one monitoring area; and determining the energy consumption data of energy-consuming devices in a target monitoring area within the multiple monitoring areas based on the energy consumption data monitored by each instrument device and a target spatial tree model corresponding to the multiple monitoring areas, wherein the target spatial tree model includes multiple first nodes, each first node is used to indicate a target monitoring area, and at least one of the multiple first nodes indicates that the target monitoring area is equipped with instrument devices, and / or at least one of the first nodes indicates that the target monitoring area is equipped with instrument devices.

[0022] In some embodiments, before acquiring energy consumption data monitored by each of at least two instruments within a target area, the method further includes: acquiring the hierarchical relationship between multiple monitoring areas and the deployment information of each instrument, wherein the deployment information is used to indicate the correspondence between the instrument and the monitoring area; constructing a basic spatial tree model based on the hierarchical relationship and the deployment information, wherein the basic spatial tree model includes multiple second nodes, each second node is used to indicate a monitoring area, the multiple second nodes include: a root node and child nodes, the root node is used to indicate the target area, the child nodes are used to indicate monitoring areas other than the target area among the multiple monitoring areas, and the second node corresponding to the monitoring area where the instrument is deployed has an association relationship with the instrument; and adjusting the basic spatial tree model to obtain a target spatial tree model based on the second nodes in the basic spatial tree model that indicate the correspondence with the instrument.

[0023] In some embodiments, based on the second node in the basic spatial tree model that indicates a corresponding relationship with the instrument device, the basic spatial tree model is adjusted to obtain the target spatial tree model, including: determining the child node corresponding to each of the multiple second nodes; deleting the third node in the basic spatial tree model to obtain the target spatial tree model, wherein the third node is the second node among the multiple second nodes that does not have a corresponding relationship with the instrument device, and each of its corresponding child nodes does not have a corresponding relationship with the instrument device.

[0024] In some embodiments, after determining the energy consumption data of energy-consuming devices in the target monitoring area within multiple monitoring areas based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the method further includes: acquiring energy value information, which is used to indicate the value of a unit of energy in different time periods; and determining the value of energy consumption by energy-consuming devices in the target monitoring area in each time period based on the energy value information and the energy consumption data of energy-consuming devices in the target monitoring area.

[0025] In some embodiments, based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas is determined, including: determining the energy consumption data corresponding to the target monitoring area where the instrument is deployed based on the energy consumption data monitored by each instrument; determining at least one fourth node from multiple first nodes, and determining the child nodes of each fourth node, wherein the at least one fourth node is a node among the multiple first nodes that does not have a corresponding relationship with the instrument; and determining the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node.

[0026] In some embodiments, based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas is determined, including: determining the energy consumption data corresponding to the target monitoring area where the instrument is deployed based on the energy consumption data monitored by each instrument; determining at least one fourth node from multiple first nodes, and determining the leaf node of each fourth node, wherein the at least one fourth node includes leaf nodes, and the at least one fourth node is a node among the multiple first nodes that does not have a corresponding relationship with the instrument; and determining the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the leaf node of each fourth node.

[0027] In some embodiments, after obtaining the energy consumption data monitored by each of the at least two instrument devices in the target area, the method further includes: determining whether there is a data table corresponding to each of the at least two instrument devices in the database; if there is no data table corresponding to any instrument device in the database, creating a data table corresponding to any instrument device; and storing the energy consumption data monitored by each instrument device into the corresponding data table.

[0028] In some embodiments, energy consumption data is used to indicate the energy consumption data of energy-consuming devices in the monitoring area per unit time; obtaining energy consumption data monitored by each of at least two instrument devices in the target area includes: obtaining basic data monitored by each instrument device from at least two instrument devices, wherein the basic data is the total energy consumption of energy-consuming devices in the monitoring area determined in real time at preset time intervals; and determining the energy consumption data monitored by each instrument device based on the basic data.

[0029] In another aspect, a data analysis apparatus is provided, including a processor and a memory. The memory stores a computer program. The processor is used to execute the computer program or instructions to implement the data analysis method as described in any of the above embodiments.

[0030] In another aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer program instructions that, when executed on a computer, cause the computer to perform the data analysis method as described in any of the above embodiments.

[0031] In another aspect, a computer program product is provided, which includes computer program instructions. When the computer program instructions are executed on a computer, the computer program instructions cause the computer to perform the data analysis method as described in any of the above embodiments.

[0032] In another aspect, a computer program is provided that, when executed on a computer, causes the computer to perform the data analysis method as described in any of the above embodiments. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly described below. Obviously, the drawings described below are only drawings of some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams and are not intended to limit the actual size of the product, the actual flow of the method, the actual timing of the signals, etc. involved in the embodiments of this disclosure.

[0034] Figure 1 This is a structural diagram of an electronic device according to some embodiments;

[0035] Figure 2 This is a flowchart of a data analysis method according to some embodiments;

[0036] Figure 3 This is a schematic diagram of a task scheduling model architecture according to some embodiments;

[0037] Figure 4 A flowchart of a data analysis method according to some other embodiments;

[0038] Figure 5 A flowchart of a data analysis method according to some other embodiments;

[0039] Figure 6 A flowchart of a data analysis method according to some other embodiments;

[0040] Figure 7 This is a schematic diagram of a spatial tree model according to some embodiments;

[0041] Figure 8 This is a schematic diagram of a spatial tree model according to some other embodiments;

[0042] Figure 9 This is a schematic diagram of a spatial tree model according to some other embodiments;

[0043] Figure 10 This is a schematic diagram of a spatial tree model according to some other embodiments;

[0044] Figure 11 This is a schematic diagram of a spatial tree model according to some other embodiments;

[0045] Figure 12 This is a schematic diagram of a spatial tree model according to some other embodiments;

[0046] Figure 13 A flowchart of a data analysis method according to some other embodiments;

[0047] Figure 14 This is a structural diagram of a data analysis apparatus according to some embodiments;

[0048] Figure 15 This is a structural diagram of a data analysis apparatus according to some other embodiments. Detailed Implementation

[0049] The technical solutions in some embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments provided in this disclosure are within the scope of protection of this disclosure.

[0050] Unless the context otherwise requires, throughout the specification and claims, the term "comprise" and its other forms, such as the third-person singular "comprises" and the present participle "comprising," are interpreted as open-ended and encompassing, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiments," "example," "specific example," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, a particular feature, structure, material, or characteristic may be included in any suitable manner in any one or more embodiments or examples.

[0051] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0052] "At least one of A, B and C" has the same meaning as "at least one of A, B or C", both including the following combinations of A, B and C: only A, only B, only C, combinations of A and B, combinations of A and C, combinations of B and C, and combinations of A, B and C.

[0053] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.

[0054] As used herein, depending on the context, the term “if” may optionally be interpreted as meaning “when”, “in the event of”, “in response to determination”, or “in response to detection”. Similarly, depending on the context, the phrase “if it is determined that…” or “if [the stated condition or event] is detected” may optionally be interpreted as meaning “in the event of determination that…”, “in response to determination that…”, “when [the stated condition or event] is detected”, or “in response to the detection of [the stated condition or event]”.

[0055] The use of “applies to” or “configured to” in this article implies an open and inclusive language that does not preclude applicability to or configuration to devices that perform additional tasks or steps.

[0056] In addition, the use of "based on" implies openness and inclusivity, because processes, steps, calculations or other actions "based on" one or more conditions or values ​​can in practice be based on additional conditions or values ​​beyond those conditions.

[0057] As used herein, “about,” “approximately,” or “approximately” includes the value stated and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).

[0058] As used herein, “equal” includes the described situation and situations that are similar to the described situation, within an acceptable range of deviation, which is determined by those skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the particular quantity (i.e., the limitations of the measurement system). “Equal” includes absolute equality and approximate equality, where an acceptable range of deviation for approximate equality may be, for example, a difference between the two equal entities less than or equal to 5% of either one.

[0059] Terminology Explanation:

[0060] Extract-transform-load (ETL) describes the process of extracting, transforming, and loading data from a business system from its source to its destination. ETL is commonly used in data warehouses, but its application is not limited to data warehouses. Its purpose is to integrate scattered, disorganized, and non-standardized data to provide analytical support for decision-making.

[0061] As industrial parks (such as industrial parks, science parks, etc.) continue to develop, their scale is expanding, and the number of buildings is increasing. Consequently, the energy consumption of these parks is also growing. Therefore, statistical analysis of energy consumption data within these parks has become a key issue, enabling refined management of energy consumption and providing data support for energy conservation and emission reduction. Currently, electricity, water, and natural gas are the main energy sources. Furthermore, because the unit price of energy varies at different times, after obtaining energy consumption data from metering equipment, it is necessary to combine this data with the corresponding unit price at different time periods to further refine the management of energy consumption within the park. Therefore, the current process of statistical analysis of energy consumption within industrial parks is relatively complex and inefficient, resulting in low efficiency and accuracy in refined energy consumption management.

[0062] In view of this, embodiments of this application provide an electronic device that can acquire energy consumption data monitored by each instrument within a target area. Based on the energy consumption data monitored by each instrument and a target spatial tree model indicating the hierarchical relationship between multiple monitoring areas included in the target area, the device can determine the energy consumption data of energy-consuming devices within the target monitoring area, including those deployed within the monitoring area and / or those deployed in sub-areas within the monitoring area. Thus, according to the hierarchical relationship between multiple monitoring areas indicated by the target spatial tree model, and the monitoring areas where instrumentation is deployed, the energy consumption data of energy-consuming devices within each target monitoring area can be determined using the acquired energy consumption data monitored by each instrument. This improves the efficiency of statistical analysis of energy consumption data within the target area.

[0063] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0064] like Figure 1 As shown, Figure 1 This is a structural diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a device with communication and data processing capabilities, such as a computer. The electronic device 100 may include a communication interface 101 and a processor 102.

[0065] For example, the computer in this application embodiment may be a tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, and personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. This application embodiment does not impose any special restrictions on the specific form of the device.

[0066] The data analysis method provided in this application can be executed by a computer's central processing unit (CPU), a processing module in the computer used to implement data analysis, or an application system in the computer used to implement data analysis.

[0067] The computer in this application embodiment can be a server, desktop computer, laptop, mobile phone, cloud device, or virtual machine, etc. It can provide a way to access service logic for use by client application programs (systems). The computer can provide a simple and manageable access mechanism for system resources for applications. It also provides services such as the implementation of Hypertext Transfer Protocol (HTTP) and database connection management.

[0068] In this embodiment of the application, the electronic device 100 can respond to the acquisition of energy consumption data monitored by each of at least two instrument devices in the target area through the communication interface 101. The target area includes multiple monitoring areas, and there is a hierarchical relationship between the multiple monitoring areas. One instrument device is used to monitor the energy consumption data of the energy-consuming devices in one monitoring area.

[0069] It should be noted that, in this embodiment of the application, the target area can be a park (such as an industrial park, science park, etc.), or a residential area or community in a city. The instrumentation equipment can be monitoring equipment used to monitor the consumption of energy such as electricity, water, and gas. In multiple monitoring areas, some monitoring areas may be equipped with instrumentation equipment, while others may not.

[0070] Furthermore, the hierarchical relationship between multiple monitoring areas can be understood as follows: there may be overlapping areas between two monitoring areas included in the target area (for example, one monitoring area contains the same area as another monitoring area), or there may be an inclusion relationship between two monitoring areas, that is, one area is included in another area (the other area may also contain a larger area).

[0071] Electronic device 100 can connect to other devices via communication interface 101. These other devices may include, for example, a computer, a graphics tablet, or a mouse. For instance, a computer can send energy consumption data monitored by each of at least two instruments to electronic device 100 via communication interface 101, enabling electronic device 100 to acquire the energy consumption data monitored by each of the at least two instruments via communication interface 101. Alternatively, a user can input a request for energy consumption data using an input device such as a graphics tablet or mouse, and after receiving the input request, transmit the request to electronic device 100 via communication interface 101.

[0072] The processor 102 in the electronic device 100 can be used to determine the energy consumption data of the energy-consuming devices in the target monitoring areas of multiple monitoring areas based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas. The target spatial tree model includes multiple first nodes, each first node is used to indicate a target monitoring area, and at least one of the multiple first nodes indicates that the target monitoring area is where the instrument is deployed, and / or at least one of the first nodes indicates that the target monitoring area is where the instrument is deployed.

[0073] In this embodiment of the application, after obtaining the energy consumption data monitored by each instrument device, the energy consumption data monitored by each instrument device can be analyzed, and combined with the target spatial tree model corresponding to multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring area can be determined.

[0074] The communication interface 101 in the electronic device 100 can also obtain the hierarchical relationship between multiple monitoring areas and the deployment information of each instrument device. The deployment information is used to indicate the correspondence between the instrument device and the monitoring area.

[0075] The processor 102 in the electronic device 100 can also construct a basic spatial tree model based on hierarchical relationships and deployment information. The basic spatial tree model includes multiple second nodes, each of which indicates a monitoring area. The multiple second nodes include a root node and child nodes. The root node indicates the target area, and the child nodes indicate the monitoring areas other than the target area. The second nodes corresponding to the monitoring areas where instruments are deployed have an association relationship with the instruments. Then, based on the second nodes in the basic spatial tree model that indicate the corresponding relationship with the instruments, the basic spatial tree model is adjusted to obtain the target spatial tree model.

[0076] The processor 102 in the electronic device 100 can specifically determine the child node corresponding to each of the multiple second nodes; then, the third node in the basic spatial tree model is deleted to obtain the target spatial tree model. The third node is the second node among the multiple second nodes that does not have a corresponding relationship with the instrument device, and each of its corresponding child nodes does not have a corresponding relationship with the instrument device.

[0077] The communication interface 101 in the electronic device 100 can also acquire energy value information, which is used to indicate the value of a unit of energy at different time periods.

[0078] The processor 102 in the electronic device 100 can also determine the value of energy consumption by energy-consuming devices in the target monitoring area in each time period based on energy value information and energy consumption data of energy-consuming devices in the target monitoring area.

[0079] The processor 102 in the electronic device 100 can specifically determine the energy consumption data corresponding to the target monitoring area where the instrument devices are deployed based on the energy consumption data monitored by each instrument device; then, it determines at least one fourth node from multiple first nodes, and determines the child nodes of each fourth node, wherein the at least one fourth node is a node among the multiple first nodes that does not have a corresponding relationship with the instrument devices; and determines the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node.

[0080] Specifically, the processor 102 in the electronic device 100 can determine the energy consumption data corresponding to the target monitoring area where the instrument devices are deployed based on the energy consumption data monitored by each instrument device; then, it can determine at least one fourth node from multiple first nodes, and determine the leaf node of each fourth node, wherein at least one fourth node includes leaf nodes, and at least one fourth node is a node among multiple first nodes that does not have a corresponding relationship with the instrument devices; and determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the leaf nodes of each fourth node.

[0081] The processor 102 in the electronic device 100 can also determine whether there is a data table corresponding to each of the at least two instrument devices in the database; if there is no data table corresponding to any instrument device in the database, a data table corresponding to any instrument device can be created; then, the energy consumption data monitored by each instrument device can be stored in the corresponding data table.

[0082] When energy consumption data is used to indicate the energy consumption data of energy-consuming devices in the monitoring area per unit time, the communication interface 101 in the electronic device 100 can specifically obtain the basic data monitored by each instrument from at least two instrument devices. The basic data is the total energy consumption of energy-consuming devices in the monitoring area determined in real time at each preset time interval.

[0083] The processor 102 in the electronic device 100 can specifically determine the energy consumption data monitored by each instrument based on the basic data.

[0084] In this embodiment, the processor 102 can be a chip. Chips can include five main categories: logic chips, memory chips, sensor chips, power chips, and communication chips. Processors primarily handle specific computational and control tasks within the system, such as microcontroller units (MCUs), single-chip microcomputers, central processing units (CPUs), graphics processing units (GPUs), and network processors (NPUs). Memory chips primarily handle data storage within the system, as well as some memory controller chips, such as dynamic random access memory (DRAM), static random access memory (SRAM), and flash memory. Sensor chips primarily handle information acquisition, presentation, and interaction within the system, such as input / output devices and some signal processing chips. Communication chips (wired and wireless) are those that primarily perform communication functions in a system. Examples include Ethernet chips, switching chips, WAN and LAN, point-to-point and ad hoc network chips, as well as auxiliary communication devices such as filters, amplifiers, and power devices. Commonly known chips such as Wi-Fi, Bluetooth, 5G baseband, Global Positioning System (GPS), Narrow Band Internet of Things (NB-IoT), network cards, and switches can all be classified into this category.

[0085] The methods described in the following embodiments can all be implemented in the electronic device 100 having the above-described hardware structure. The following embodiments use the electronic device 100 as an example to illustrate the methods of this application.

[0086] The data analysis method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0087] The data analysis method described in this application can be applied to business development scenarios. For example... Figure 2 As shown, this data analysis method may include S201-S202. S201 can be referred to as the "acquiring energy consumption data monitored by instruments and equipment" process, and S202 can be referred to as the "energy consumption data analysis" process. S201-S202 are described in detail below.

[0088] S201. The electronic device acquires energy consumption data monitored by each of at least two instrument devices within the target area.

[0089] The target area includes multiple monitoring areas, which are hierarchically related. One instrument is used to monitor the energy consumption data of energy-consuming equipment within a monitoring area.

[0090] Optionally, at least two meters can be used to monitor energy consumption data for any type of energy source, such as water meters, electricity meters, gas meters, etc. Furthermore, there can be multiple models of meters corresponding to the same energy source.

[0091] Optionally, the hierarchical relationship between multiple monitoring areas can be understood as the belonging relationship between monitoring areas. For example, the location information of the first monitoring area is: Park 1 / Area 1 / Building A, indicating that it is Building A within Area 1 of Park 1, while the location information of the second monitoring area is: Park 1 / Area 1 / Building A / 1st Floor, indicating that it is the 1st floor of Building A within Area 1 of Park 1. Therefore, the second monitoring area belongs to the monitoring area within the first monitoring area.

[0092] Optionally, before acquiring the energy consumption data monitored by each instrument, the electronic device needs to pre-build a task scheduling model architecture for data analysis. For example... Figure 3As shown, the task scheduling model architecture includes: a business layer, a data analysis layer, a data ETL layer, and a database. The business layer specifically includes an energy efficiency management system page for user interaction, allowing users to input commands. Based on these commands, the system analyzes the corresponding data to determine energy consumption data. The data analysis layer specifically analyzes and determines energy consumption data through the following steps: acquiring energy consumption data monitored by instruments and calculating energy costs; or including: establishing a spatial tree model, associating the spatial tree model with instruments, determining the list of child nodes (i.e., the child nodes corresponding to each node), removing useless nodes, associating the spatial tree model with energy value (i.e., energy costs), and determining the value of energy consumption. The data ETL layer includes real-time ETL and offline ETL. Real-time ETL is for Kafka data sources, creating corresponding table structures in ClickHouse and storing the corresponding data information. Offline ETL is for PostgreSQL data processing. The database selection can be PostgreSQL, and the data warehouse selection can be ClickHouse.

[0093] In this embodiment of the application, the data sources required when pre-constructing the task scheduling model architecture for data analysis include: device data. This device data is sent to the message queue Kafka by the Internet of Things (IoT) platform at a certain frequency, and the data format of the device data can be JSON format.

[0094] For example, taking an electricity meter as an example, the data message format corresponding to the energy consumption data monitored by the electricity meter can be:

[0095]

[0096] Among them, categoryNo, deviceId, deviceSn, and sendTime are general fields. categoryNo indicates the category / type of the meter device, deviceId indicates the identifier of the meter device (which may not be a unique identifier), and deviceSn is the unique identifier of the reporting data device (i.e., the meter device). The propertyMap contains attribute fields unique to each meter device. TotalPower is the total electricity consumption currently monitored by the meter (i.e., the total energy consumption). sendTime indicates the time when the energy consumption data was monitored (i.e., the timestamp).

[0097] In this embodiment, the task scheduling model architecture includes a physical model corresponding to the device data. Specifically, the task scheduling model architecture requires constructing a virtual model (i.e., a physical model) for each instrument device, and then associating the energy consumption data monitored by the instrument device with the physical model. This means that even if the data format sent to Kafka is different, the corresponding data can only be stored in the corresponding table if the table structure matches the physical model. Whenever a new type of instrument device is added, a new physical model is added, and the IoT platform sends the data information of the newly added instrument device to the message queue.

[0098] For example, the object model interface can return the following values:

[0099]

[0100] The categoryNo field is used to define the table name, and the modelPropertyList field stores all field names and types. Based on this information, the table can be created in ClickHouse.

[0101] Furthermore, in this embodiment, the data source also includes business data. The business data is stored in a PostgreSQL database, and the tables included in the business data may be: a spatial hierarchy table (indicating the hierarchical relationship of the monitoring area), an instrument and equipment information table, and time-of-use billing rules (indicating energy value information), etc.

[0102] The spatial hierarchy table is shown in Table 1, which includes the hierarchical relationship of multiple monitoring areas. Each monitoring area is associated with a code (an identifier indicating the monitoring area) and a parent code (an identifier indicating the upper-level area). Each monitoring area has a corresponding name (full_name), a region level (level), and a corresponding region level name (name).

[0103] Table 1

[0104] code parent_code name level full_name 001 Park 1 0 Park 1 001001 001 Area 1 1 Park 1 / Area 1 001001001 001001 Building A 2 Park 1 / Area 1 / Building A 001001001001 001001001 1st floor 3 Park 1 / Area 1 / Building A / 1st Floor 001001001002 001001001 2nd floor 3 Park 1 / Area 1 / Building A / 2nd Floor

[0105] The instrument and equipment information table is shown in Table 2, which includes basic information about multiple instruments and equipment. The product serial number (sn) is the unique identifier of the instrument and equipment (i.e., deviceSn), device_name indicates the name of the instrument and equipment, category_no indicates the category of the instrument and equipment, energy_category_id indicates the energy category of the instrument and equipment, energy_category_name indicates the name of the energy category of the instrument and equipment, and space_code indicates the monitoring area where the instrument and equipment is installed; this is a field used to associate with the spatial dimension table.

[0106] Table 2

[0107]

[0108] Optionally, when constructing the task scheduling model architecture, energy prices can be set for different time periods (i.e., time-of-use billing rules). Taking electricity costs as an example: set the price at 1.2 for peak hours (08:30-11:30 and 18:30-23:00); 0.6 for off-peak hours (23:00-07:00); and 0.8 for normal hours (07:00-08:30 and 11:30-18:30). Therefore, when calculating the cost of electricity consumption, it is necessary to calculate based on different time periods and corresponding energy consumption data; the same applies to water and gas.

[0109] Correspondingly, three tables can be set up in the business table (rate configuration table, rate period price table, and rate period detail table). When performing data analysis, the three tables are linked together to obtain information such as energy consumption type (electricity / water / gas), period name (peak / off-peak / normal), start time, end time, price, effective date, and expiration date, which are used as segmented billing dimension tables for subsequent analysis of energy consumption data.

[0110] In this way, based on equipment data and business data, a corresponding task scheduling model architecture can be constructed to analyze and process the energy consumption data monitored by the instrument equipment.

[0111] In some embodiments, after obtaining the energy consumption data monitored by each of the at least two instrument devices in the target area in S201 above, the method further includes: determining whether there is a data table corresponding to each of the at least two instrument devices in the database; if there is no data table corresponding to any instrument device in the database, creating a data table corresponding to any instrument device; and storing the energy consumption data monitored by each instrument device into the corresponding data table.

[0112] In this embodiment of the application, since the acquired energy consumption data needs to be stored in the database of the task scheduling model architecture for use, it is necessary to determine whether there is a data table corresponding to each instrument device in the database. If a data table corresponding to each instrument device is created, the energy consumption data monitored by each instrument device is stored in the corresponding data table.

[0113] Optionally, the electronic device can also perform ETL processing on the energy consumption data. In this application, the ETL scheme includes real-time ETL and offline ETL. For the real-time ETL task targeting the Kafka data source, the object model interface is called during the initialization phase, and a data table is created based on the response result. During the task execution, in order to ensure that no newly added instruments are missed and that the energy consumption data monitored by all instruments are stored in the database, whenever an object model is added or modified, the electronic device sends the object model data to another specified topic in Kafka. After receiving the object model data, the ETL adds or modifies the corresponding table structure in the database (ClickHouse) to store the energy consumption data in the corresponding table.

[0114] Specifically, such as Figure 4 As shown, the real-time ETL process with Kafka as the data source is as follows:

[0115] 1. During the task initialization phase, ETL calls the object model interface and returns a list of object models, which contains the fields and types of all instrument and device attributes.

[0116] 2. ETL sends an HTTP request to ClickHouse to retrieve the existing table structure information in the database and returns the table structure.

[0117] 3. Compare the object model with the table structure. For tables that do not exist, create them based on the object model. For existing tables, further compare their structures. If the table structure is inconsistent with the object model, modify the table structure; otherwise, no processing is required. Then return the execution result.

[0118] 4. Consume data from two Kafka topics: device data topic_1 and object model data topic_2. The consumption of device data and object model data are two parallel processes with no explicit order; operations are performed solely based on the data flow.

[0119] 5. Parse the data and insert it into the corresponding table.

[0120] 6. Parse the object model data, compare the object model with the table structure. If the table does not exist, create it; if the table already exists, compare the table fields and types. If they are inconsistent, modify the table structure; if they are consistent, no further processing is needed. Then return the execution result.

[0121] Optionally, offline ETL involves periodically synchronizing all dimension table data from PostgreSQL to ClickHouse for subsequent data analysis. Offline ETL with PostgreSQL as the data source is relatively simple; it only requires clearing the tables in ClickHouse and then fully synchronizing the data from PostgreSQL each time, which will not be elaborated upon here.

[0122] In some embodiments, energy consumption data is used to indicate the energy consumption data of energy-consuming devices within the monitoring area per unit time. In S201 above, obtaining the energy consumption data monitored by each of at least two instrument devices within the target area includes: obtaining basic data monitored by each of the at least two instrument devices, where the basic data is the total energy consumption of energy-consuming devices within the monitoring area, determined in real time at preset time intervals; and then, determining the energy consumption data monitored by each instrument device based on the basic data.

[0123] In the embodiments of this application, a unit of time refers to a time period of fixed duration, such as half an hour, 20 minutes, or an hour.

[0124] It should be noted that since the energy consumption data obtained from the instrument equipment is the total consumption determined in real time by the instrument equipment at preset intervals, it is necessary to calculate the energy consumption data per unit time based on the total consumption obtained at different time points.

[0125] Optional, such as Figure 5 As shown, after the task flow begins, the basic data monitored by each instrument needs to be acquired first. Then, the data is labeled with time periods (i.e., determining the time period to which each data point belongs, for example, 7:15 belongs to the 7:00-7:30 time period), and the earliest data corresponding to each time period is determined by grouping by time period (i.e., unit time). Then, by calculating the difference between the earliest data corresponding to two adjacent time periods, the energy consumption data corresponding to the earlier time period between the two adjacent time periods can be determined. This yields an energy consumption detail table. Then, by associating the time-of-use billing rules (rate configuration table, rate time-of-use price table, rate time-of-use detail table), the energy consumption data monitored by each instrument can be calculated, resulting in an energy cost detail table.

[0126] Specifically, first, query the data table reported by energy-related meters (i.e., basic data, such as electricity, water, and gas meters). Then, based on the data reporting time, mark it into a time period of half an hour, adding the start time (start_half_hour) and end time (end_half_hour) fields. The corresponding time period is: [start_half_hour, end_half_hour) with and without the left side containing the right side, as shown in Table 3. Taking the data reported by electricity meter EM0100000000000001 as an example, each data entry includes the device identifier (sn), data reporting time (time), start_half_hour, and end_half_hour.

[0127] Table 3

[0128] sn time start_half_hour end_half_hour EM0100000000000001 8:40 8:30 9:00 EM0100000000000001 9:00 9:00 9:30 EM0100000000000001 9:10 9:00 9:30 EM0100000000000001 9:30 9:30 10:00

[0129] Furthermore, the data is grouped by time period. The earliest data in each group is taken, and the reported value is subtracted from the reported value to obtain the energy consumption for the previous time period. That is, in Table 3, the value for 9:30 is the earliest data in the [9:30, 10:00) segment, and the value for 9:00 is the earliest data in the [9:00, 9:30) segment. Subtracting these two values ​​determines the energy consumption for the 9:00-9:30 time period. As shown in Table 4, this calculation method yields a detailed energy consumption table for each instrument. Each data entry includes the date (event_date), energy consumption, start_half_hour, and end_half_hour.

[0130] Table 4

[0131] event_date consumption start_half_hour end_half_hour 2022-03-30 20 07:00 07:30 2022-03-30 10 23:30 24:00 2022-03-31 8 00:00 00:30

[0132] Furthermore, based on the above data, the energy consumption cost of each monitoring area (corresponding node) can be calculated using the spatial tree model. Specifically, a spatial tree model can be established first, then associated with the equipment dimension table to determine the list of child nodes for each node. Useless nodes are then removed, either because no node corresponds to a monitoring area that does not include instruments or equipment, or because the monitoring areas corresponding to the node's child nodes do not include instruments or equipment. This yields the processed spatial tree model. The processed spatial tree model is then associated with the aforementioned data table to determine the energy consumption corresponding to the monitoring area for each node in the processed spatial tree model, and a detailed energy consumption cost table for each node's monitoring area can be calculated for system use. The specific implementation method is described in the following steps.

[0133] S202. Based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the electronic equipment determines the energy consumption data of the energy-consuming equipment in the target monitoring area of ​​multiple monitoring areas.

[0134] The target space tree model includes multiple first nodes, each of which indicates a target monitoring area. The multiple first nodes include: root node, child nodes, and leaf nodes (a node without child nodes is called a leaf node). The root node and each child node correspond to at least one child node. The target monitoring area indicated by at least one of the multiple first nodes is where instrumentation equipment is deployed, and / or the target monitoring area indicated by any child node corresponding to at least one first node is where instrumentation equipment is deployed.

[0135] It should be noted that for each of the multiple first nodes included in the target space tree model, either the target monitoring area indicated by the first node is equipped with instruments, or the target monitoring area indicated by any child node corresponding to the first node is equipped with instruments; or, both the target monitoring area indicated by the first node and the target monitoring area indicated by any child node corresponding to the first node are equipped with instruments. That is, at least one of the first node and all its corresponding child nodes indicates a target monitoring area equipped with instruments.

[0136] This application provides an electronic device that can acquire energy consumption data monitored by each instrument within a target area. Based on the energy consumption data monitored by each instrument and a target spatial tree model indicating the hierarchical relationship between multiple monitoring areas included in the target area, the device can determine the energy consumption data of energy-consuming devices within the target monitoring area, including those deployed within the monitoring area and / or those deployed in sub-areas within the monitoring area. Thus, according to the hierarchical relationship between multiple monitoring areas indicated by the target spatial tree model, and the monitoring areas where instrumentation is deployed, the energy consumption data of energy-consuming devices within each target monitoring area can be determined using the acquired energy consumption data monitored by each instrument. This improves the efficiency of statistical analysis of energy consumption data within the target area.

[0137] In some embodiments, before the electronic device acquires energy consumption data monitored by each of at least two instrument devices within a target area, it can be done through methods such as... Figure 6 The steps S601-S603 shown are used to construct the target space tree model.

[0138] S601, Electronic equipment acquires the hierarchical relationship between multiple monitoring areas and the deployment information of each instrument device.

[0139] The deployment information is used to indicate the correspondence between the instruments and the monitoring area.

[0140] In this embodiment of the application, the energy consumption cost details for each time period corresponding to the instrument equipment obtained through the above steps, combined with the spatial hierarchy table and the instrument equipment information table, can be used to calculate the energy consumption cost corresponding to each level of monitoring area.

[0141] Specifically, as shown in Table 5, information on multiple monitoring areas within the target area is first obtained to form a monitoring area information table. Each data entry includes: monitoring area identifier (code), the identifier of the parent area of ​​the monitoring area (parent_code), the name of the monitoring area (full_name), the area level (level), and the name of the area level (name).

[0142] Table 5

[0143]

[0144]

[0145] S602. Electronic devices construct a basic spatial tree model based on hierarchical relationships and deployment information.

[0146] The basic spatial tree model includes multiple second nodes, each indicating a monitoring area. These second nodes consist of a root node and child nodes. The root node indicates the target area, and the child nodes indicate monitoring areas other than the target area. The second nodes corresponding to the monitoring areas where instruments are deployed are associated with the instruments. Child nodes may include leaf nodes.

[0147] It should be noted that the target area is a general area, while multiple monitoring areas are multiple sub-areas obtained by dividing the target area. The target monitoring area is the monitoring area in the multiple monitoring areas where instrumentation equipment is deployed.

[0148] Furthermore, referring to Table 5, such as Figure 7 As shown, a basic spatial tree model corresponding to the monitoring area can be constructed. Then, by combining the deployment information of each instrument, the correspondence between each node in the basic spatial tree model and the instrument is determined.

[0149] Then, as Figure 8 As shown, the code field in the spatial hierarchy table is associated with the monitoring area field (space_code) of the instrument equipment installation in the instrument equipment information table as shown in Table 6 to determine the correspondence between the instrument equipment and the node.

[0150] Each data entry in the instrument and equipment information table shown in Table 6 includes: the unique identifier (sn) of the instrument and equipment, the name of the instrument and equipment (device_name), the category of the instrument and equipment (category_no), and the monitoring area where the instrument and equipment is installed (space_code).

[0151] Table 6

[0152] sn device_name category_no space_code EM010000000000000001 Electricity meter 1 EM01 001 EM01000000000000002 Electricity meter 2 EM01 001001003 EM010000000000000003 Electricity meter 3 EM01 001001001001 EM01000000000000004 Electricity meter 4 EM01 001001001003 EM010000000000000005 Electricity meter 5 EM01 001001002001001 EM010000000000000006 Electricity meter 6 EM01 001001002001002 EM010000000000000007 Electricity meter 7 EM01 001001002001001001

[0153] S603. The electronic device is based on the second node in the basic spatial tree model that corresponds to the indicator and instrument device, and the basic spatial tree model is adjusted to obtain the target spatial tree model.

[0154] In some embodiments, the electronic device adjusts the basic spatial tree model to obtain the target spatial tree model based on the second node in the basic spatial tree model that indicates a corresponding relationship with the instrument device. This can be achieved through the following methods.

[0155] The electronic device determines the child node corresponding to each of the multiple second nodes, and then deletes the third node in the basic spatial tree model to obtain the target spatial tree model. The third node is the second node among the multiple second nodes that does not have a corresponding relationship with the instrument device, and each of its corresponding child nodes does not have a corresponding relationship with the instrument device.

[0156] The first implementation method, based on the above basic spatial tree model, as shown in Table 7, determines the child nodes of each node in the basic spatial tree model. Each data (corresponding to a monitoring area) includes: the identifier of the monitoring area (code), the identifier of the upper-level area of ​​the monitoring area (parent_code), the category of the instrument (category_no), the monitoring area where the instrument is installed (space_code), the identifier of the instrument corresponding to the monitoring area (sn), and the child nodes of the node corresponding to the monitoring area (child_nodes).

[0157] Table 7

[0158]

[0159]

[0160] In this context, [] indicates that the node has no child nodes. In this application, the next node of a node is its child node, and a node without child nodes is called a leaf node.

[0161] In the embodiments of this application, combined with Figure 7As shown, some leaf nodes in the basic spatial tree model do not have corresponding instruments. Therefore, it is necessary to delete the second node in the basic spatial tree model that does not have a corresponding relationship with the instruments and that each of its corresponding child nodes does not have a corresponding relationship with the instruments, and then redetermine the child nodes of each node.

[0162] It should be noted that deleting the second node in the basic spatial tree model that has no corresponding relationship with the instrument or equipment, and whose corresponding child nodes also have no corresponding relationship with the instrument or equipment, specifically involves deleting the leaf nodes in the basic spatial tree model that have no corresponding relationship with the instrument or equipment. Since the resulting spatial tree model after deleting the leaf nodes that have no corresponding relationship with the instrument or equipment may still contain leaf nodes that do not have a corresponding relationship, multiple iterative deletions of these leaf nodes are required to achieve the goal of deleting all nodes in the basic spatial tree model that have no corresponding relationship with the instrument or equipment, and whose corresponding child nodes also have no corresponding relationship with the instrument or equipment.

[0163] For example, such as Figure 9 As shown, this is for Figure 7 The spatial tree model shown is obtained by deleting leaf nodes that do not correspond to the instruments and equipment in the basic spatial tree model. Then, it needs to be re-based on... Figure 9 The spatial tree model shown is further modified by deleting leaf nodes that do not correspond to the instruments and equipment, resulting in the following: Figure 10 The spatial tree model shown is the target spatial tree model.

[0164] Thus, based on Figure 10 The target space tree model shown in Table 8 determines the child nodes of each node in the target space tree model. Each data (corresponding to a monitoring area) includes: the identifier of the monitoring area (code), the identifier of the upper-level area of ​​the monitoring area (parent_code), the identifier of the instrument device corresponding to the monitoring area (sn), and the child nodes of the node corresponding to the monitoring area (child_nodes).

[0165] Table 8

[0166]

[0167] Furthermore, the target space tree model can be associated with the energy consumption cost details table to obtain the data shown in Table 9. Each data entry (corresponding to a monitoring area) includes: the identifier (code) of the monitoring area, the identifier (sn) of the instrument equipment corresponding to the monitoring area, the child nodes (child_nodes) of the node corresponding to the monitoring area, the date (event_date), the start time of the time period (start_half_hour), and the energy consumption (consumption).

[0168] Table 9

[0169]

[0170]

[0171] In some embodiments, based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas is determined, including: determining the energy consumption data corresponding to the target monitoring area where the instrument is deployed based on the energy consumption data monitored by each instrument; determining at least one fourth node from multiple first nodes, and determining the child nodes of each fourth node, wherein the at least one fourth node is a node among the multiple first nodes that does not have a corresponding relationship with the instrument; and determining the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node.

[0172] For example, referring to the data shown in Table 9, it can be seen that nodes corresponding to the instrument equipment have date (event_date), start time (start_half_hour), and energy consumption (consumption) fields. Therefore, as shown in Table 10, based on the data information of the nodes corresponding to the instrument equipment, the energy consumption information corresponding to the parent node of that node can be directly determined (if multiple nodes correspond to one parent node, they can be summed), and the date (event_date), start time (start_half_hour), and energy consumption (consumption) can be completed.

[0173] Correspondingly, such as Figure 11 As shown, this is the spatial tree model corresponding to the data shown in Table 10.

[0174] Table 10

[0175]

[0176] The second implementation method, based on the above basic spatial tree model, as shown in Table 11, determines the leaf nodes of each node in the basic spatial tree model.

[0177] Each data entry in Table 11 (corresponding to a monitoring area) includes: the identifier of the monitoring area (code), the identifier of the parent area of ​​the monitoring area (parent_code), the category of the instrument (category_no), the monitoring area where the instrument is installed (space_code), the identifier of the instrument corresponding to the monitoring area (sn), and the leaf nodes of the node corresponding to the monitoring area.

[0178] In this context, [] indicates that the node has no leaf nodes.

[0179] Table 11

[0180]

[0181]

[0182] In the embodiments of this application, after obtaining Figure 7 In the case of the basic spatial tree model shown, the same method as the first implementation is used to obtain... Figure 9 and Figure 10 The processed spatial tree model shown is (i.e., nodes that do not correspond to instruments or equipment, and whose child nodes do not correspond to instruments or equipment). Then based on... Figure 10 The target spatial tree model shown in Table 12 determines the leaf nodes of each node in the target spatial tree model. Each data (corresponding to a monitoring area) includes: the identifier of the monitoring area (code), the identifier of the upper-level area of ​​the monitoring area (parent_code), the identifier of the instrument device corresponding to the monitoring area (sn), and the leaf nodes of the node corresponding to the monitoring area (leaf_nodes).

[0183] Table 12

[0184]

[0185]

[0186] Furthermore, the target space tree model can be associated with the energy consumption cost details table to obtain the data shown in Table 13. Each data entry (corresponding to a monitoring area) includes: the identifier (code) of the monitoring area, the identifier (sn) of the instrument equipment corresponding to the monitoring area, the leaf node (leaf_nodes) of the node corresponding to the monitoring area, the date (event_date), the start time of the time period (start_half_hour), and the energy consumption (consumption).

[0187] Table Thirteen

[0188]

[0189]

[0190] In some embodiments, based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas is determined, including: determining the energy consumption data corresponding to the target monitoring area where the instrument is deployed based on the energy consumption data monitored by each instrument; determining at least one fourth node from multiple first nodes, and determining the leaf node of each fourth node, wherein the at least one fourth node is a node among the multiple first nodes that does not have a corresponding relationship with the instrument; and determining the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the leaf node of each fourth node.

[0191] Furthermore, combining the data shown in Table 13, it can be seen that the nodes corresponding to the instrument equipment have corresponding date (event_date), start time (start_half_hour), and energy consumption (consumption) fields. Therefore, as shown in Table 14, based on the data information of the nodes corresponding to the instrument equipment, the energy consumption information of each node can be determined by identifying the energy consumption information corresponding to the leaf nodes of each node (if a node corresponds to multiple leaf nodes, the information can be summed), and the date (event_date), start time (start_half_hour), and energy consumption (consumption) can be completed.

[0192] Table 14

[0193]

[0194]

[0195] Correspondingly, such as Figure 12 As shown, this is the spatial tree model corresponding to the data shown in Table 14.

[0196] In summary, comparing the analysis results obtained from the first and second implementation methods reveals the following: In the first method, for child nodes corresponding to instruments, the consumption data for that node is equal to the data detected by the corresponding instrument. For child nodes not corresponding to instruments, the consumption data is determined based on the data detected by the instruments of its child nodes (equal to the sum of the data detected by the instruments of its child nodes). In the second implementation method, the consumption data for a node is determined based on the data detected by the instruments of its leaf nodes (equal to the sum of the data detected by the instruments of its leaf nodes), which ignores the data detected by the instrument corresponding to the node itself.

[0197] In some embodiments, after determining the energy consumption data of the energy-consuming devices in the target monitoring area within multiple monitoring areas based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to multiple monitoring areas, the electronic device can further determine the value of energy consumption by the energy-consuming devices in the target monitoring area based on energy value.

[0198] Specifically, electronic devices can acquire energy value information, which indicates the value of a unit of energy in different time periods. Then, based on the energy value information and the energy consumption data of energy-consuming devices in the target monitoring area, the value of energy consumption by the energy-consuming devices in the target monitoring area in each time period is determined.

[0199] For example, since energy prices are pre-set for different time periods (i.e., time-of-use billing rules), based on the data shown in Tables 3 and 4, taking the cost of electricity as an example: the price from 07:30 to 08:30 is 0.8, and the price from 08:30 to 11:30 is 1.2. In order to calculate the energy consumption cost during this period, it is necessary to know the energy consumption from 07:30 to 08:30. Based on this consideration, the data is processed into the consumption for time periods such as 07:30-08:00, 08:00-08:30, 08:30-09:00, etc. Then, the sum of the consumption from 07:30 to 08:30 is multiplied by 0.8, and the sum of the consumption from 08:30 to 11:30 is multiplied by 1.2 to obtain the total energy consumption cost from 07:30 to 11:30.

[0200] Furthermore, in order to obtain a detailed energy consumption cost statement, it is necessary to link the detailed energy consumption statement with the time-of-use billing rules (i.e., rate configuration table, rate time-of-use price table, and rate time-of-use detailed table) and calculate the cost corresponding to the energy consumption in each time period.

[0201] It should be noted that attention needs to be paid to determining the relationship between the start and end times of the energy consumption details table and the start and end times of the rate time period details table. For example, the rate time period details table is shown in Table 15. Each data entry includes: effective date (start_date), end date (end_date), rate period start time (start_time), rate period end time (end_time), and price (price).

[0202] Table 15

[0203] start_date end_date start_time end_time price 2022-03-01 2099-01-01 06:00 08:00 0.8 2022-03-01 2099-01-01 23:00 07:00 0.6

[0204] Among them, 2099-01-01 represents that there is no expiration date, it is always in the effective stage, and the business stipulates that when setting time-based rates, the time periods are added together to form 24 hours (i.e., one day). The examples in the table only refer to representative data and do not list all data.

[0205] Therefore, when calculating the above costs, first determine that event_date is greater than start_date and less than end_date; then determine that start_half_hour is greater than start_time and end_half_hour is less than end_time, and then multiply the price by the energy consumption to get the cost for that period, i.e., the cost for [07:00, 07:30) is 20*0.8.

[0206] However, it's important to note that when the time period is set to 23:00-07:00 and the price is 0.6, both [23:30, 24:00) and [00:00, 00:30) fall within the 23:00-07:00 range. However, in [23:30, 24:00), 24:00 > 07:00, meaning end_half_hour is greater than end_time. In [00:00, 00:30), 00:00 < 23:00, meaning start_half_hour is less than start_time. This involves cross-day issues, making the above calculation inappropriate. Therefore, it's necessary to split 23:00-07:00 into [23:00, 24:00) and [00:00, 07:00), both with a price of 0.6, as shown in Table 16.

[0207] Table 16

[0208] start_date end_date start_time end_time price 2022-03-01 2099-01-01 23:00 24:00 0.6 2022-03-01 2099-01-01 00:00 07:00 0.6

[0209] Therefore, the cost corresponding to the time period [23:30, 00:30) should be the sum of the cost of [23:30, 24:00) (10 * 0.6) and the cost of [00:00, 00:30) (8 * 0.6). Based on the data shown in Tables 3 and 4, the final energy consumption cost details are shown in Table 17.

[0210] Table 17

[0211] sn event_date start_half_hour end_half_hour consumption fee EM0100000000000001 2022-03-30 07:00 07:30 20 18 EM0100000000000001 2022-03-30 23:30 24:00 10 6 EM0100000000000001 2022-03-31 00:00 00:30 8 4.8

[0212] In the embodiments of this application, based on the above method, such as Figure 13 As shown, after the client sends a scheduling request to the server, the server needs to parse the request message, as there are two possible types. When the request message contains a date, such as "2023-07-10", it is considered that data from 2023-07-10 to the present needs to be recalculated. When the message is an empty string, it is considered a periodic scheduling task, and there is no need to delete historical calculation data; only the data for the current time period needs to be calculated. A table (using the table name "record" as an example) records the status of task execution in the database. When the server receives a scheduling request, it needs to query the database to check the status of the last record in the "record" table. If the status is "running", the scheduling request is ignored; if the status is "completed", the scheduling task continues to be executed. Furthermore, it determines whether the message contains a start time (i.e., date). If the message data contains a start time, a request is sent to the data table to delete all data calculated after the start time; otherwise, the calculation task is executed directly. When a scheduled task begins, a running status (i.e., a "running" record) is first inserted into the record table. Then, the calculation process is executed and the results are output to the database. After the calculation is completed, the running status is updated in the database to change the "running" status in the record table to the "completed" status.

[0213] This application embodiment, through multi-dimensional analysis, grasps the real-time dynamics of energy use in the park (i.e., the target area), thereby providing effective data support for energy decision-making. It integrates on-site metering instruments (i.e., instrumentation equipment) distributed across buildings and floors within the park with the internet, establishing an enterprise energy management system through technologies such as the Internet of Things and big data. This system enables the collection, transmission, storage, and analysis of data on energy consumption processes within the park's enterprises. Through refined energy management, it achieves integrated operation and centralized management of the energy system, implements effective energy management and energy data analysis, establishes an objective, data-driven energy consumption evaluation system, grasps the overall energy efficiency level of buildings, tracks the effectiveness of emission reduction strategies, and showcases low-carbon achievements.

[0214] This application primarily introduces the ETL and data analysis process for energy consumption data in the industrial park, integrating abstract and scattered data to obtain intuitive analysis results for user viewing and decision-making. Regarding data ETL, this application uses PostgreSQL as the business database, ClickHouse as the data warehouse, and IoT platforms report equipment data to Kafka at a certain frequency. This application aggregates equipment data and business data into the raw data layer (ODS) of the ClickHouse data warehouse for subsequent data analysis. In terms of data analysis, it filters out energy efficiency-related equipment data tables (such as water meters, electricity meters, gas meters, etc.) to calculate energy consumption values, calculates energy costs based on user-defined time-of-use rates, and calculates energy consumption values ​​for each node based on the park's spatial tree structure, providing data for report filtering and spatial node display. Simultaneously, the data analysis task scheduling supports two methods: scheduled timeouts for periodic data calculations, and inputting a start date to trigger recalculation.

[0215] Regarding data ETL, this application integrates data reported by devices with data from business systems, resolving issues such as dynamic addition of device models and data synchronization delays. This aggregates data for subsequent analysis. In terms of data analysis, it addresses the complexities of time-of-use billing, the difficulty in calculating energy consumption due to discontinuous device data, and the problems of complex spatial structures and redundant calculations in the master and sub-tables, ultimately achieving high accuracy. Based on park energy efficiency management, this application presents a reusable and scalable data warehouse construction method suitable for scenarios involving multi-source data fusion, real-time data sources, complex computational logic, and high precision requirements for data analysis results. Through data ETL and data analysis pipelines, it enables multi-dimensional analysis of business lines, providing data support for visualization and business analysis, and offering effective data basis for subsequent business decisions.

[0216] It should be noted that the various embodiments of this application can be referenced or learned from each other. For example, the same or similar steps, method embodiments, system embodiments and device embodiments can be referenced from each other without limitation.

[0217] This application embodiment can divide the data analysis device into functional modules or functional units according to the above method examples. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation.

[0218] like Figure 14The diagram shown is a structural schematic of a data analysis device provided in an embodiment of this application. The device is applied to an electronic device, which includes a communication interface and a processor. The device includes a communication unit 1401 and a processing unit 1402.

[0219] The communication unit 1401 is configured to acquire energy consumption data monitored by each of at least two instrument devices in a target area. The target area includes multiple monitoring areas with a hierarchical relationship between them. One instrument device is used to monitor the energy consumption data of an energy-consuming device in one monitoring area.

[0220] The processing unit 1402 is configured to determine the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to the multiple monitoring areas. The target spatial tree model includes multiple first nodes, each first node is used to indicate a target monitoring area, and at least one of the multiple first nodes indicates that the target monitoring area is where the instrument is deployed, and / or at least one of the first nodes indicates that the target monitoring area is where the instrument is deployed.

[0221] In one possible implementation, the communication unit 1401 is further configured to acquire the hierarchical relationship between multiple monitoring areas and the deployment information of each instrument, the deployment information being used to indicate the correspondence between the instrument and the monitoring area.

[0222] The processing unit 1402 is also configured to construct a basic spatial tree model based on hierarchical relationships and deployment information. The basic spatial tree model includes multiple second nodes, each of which indicates a monitoring area. The multiple second nodes include a root node and child nodes. The root node indicates the target area, and the child nodes indicate the monitoring areas other than the target area. The second nodes corresponding to the monitoring areas where instruments are deployed have an association relationship with the instruments. Based on the second nodes in the basic spatial tree model that indicate the corresponding relationship with the instruments, the basic spatial tree model is adjusted to obtain the target spatial tree model.

[0223] In one possible implementation, the processing unit 1402 is specifically configured to determine the child node corresponding to each of the multiple second nodes; and delete the third node in the basic spatial tree model to obtain the target spatial tree model, wherein the third node is the second node among the multiple second nodes that does not have a corresponding relationship with the instrument equipment, and each of its corresponding child nodes does not have a corresponding relationship with the instrument equipment.

[0224] In one possible implementation, the communication unit 1401 is further configured to acquire energy value information, which indicates the value of a unit of energy at different time periods.

[0225] The processing unit 1402 is also configured to determine the value of energy consumption by energy-consuming devices in the target monitoring area for each time period based on energy value information and energy consumption data of energy-consuming devices in the target monitoring area.

[0226] In one possible implementation, the processing unit 1402 is specifically configured to: determine the energy consumption data corresponding to the target monitoring area where the instrument equipment is deployed based on the energy consumption data monitored by each instrument equipment; determine at least one fourth node from a plurality of first nodes, and determine the child nodes of each fourth node, wherein the at least one fourth node is a node among the plurality of first nodes that does not have a corresponding relationship with the instrument equipment; and determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node.

[0227] In one possible implementation, the processing unit 1402 is specifically configured to: determine the energy consumption data corresponding to the target monitoring area where the instrument equipment is deployed, based on the energy consumption data monitored by each instrument equipment; determine at least one fourth node from a plurality of first nodes, and determine the leaf node of each fourth node, wherein the at least one fourth node includes a leaf node, and the at least one fourth node is a node among the plurality of first nodes that does not have a corresponding relationship with the instrument equipment; and determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node, based on the energy consumption data corresponding to the target monitoring area indicated by the leaf node of each fourth node.

[0228] In one possible implementation, the processing unit 1402 is further configured to determine whether a data table exists in the database for each of the at least two instrument devices; if no data table exists in the database for any instrument device, create a data table for any instrument device; and store the energy consumption data monitored by each instrument device into the corresponding data table.

[0229] In one possible implementation, energy consumption data is used to indicate the energy consumption data of energy-consuming devices in the monitoring area per unit time; the communication unit 1401 is specifically configured to acquire basic data monitored by each of at least two instrument devices, the basic data being the total energy consumption of energy-consuming devices in the monitoring area determined in real time at preset intervals.

[0230] The processing unit 1002 is specifically configured to determine the energy consumption data monitored by each instrument based on the basic data.

[0231] When implemented in hardware, the communication unit 1401 in this embodiment can be integrated onto the communication interface, and the processing unit 1402 can be integrated onto the processor. Specific implementation methods are as follows: Figure 15As shown.

[0232] Figure 15 A schematic diagram of another possible structure of the data analysis apparatus involved in the above embodiments is shown. The data analysis apparatus includes a processor 1502 and a communication interface 1503. The processor 1502 is used to control and manage the operation of the apparatus, for example, executing the steps performed by the processing unit 1402, and / or performing other processes of the technology described herein. The communication interface 1503 is used to support communication between the apparatus and other network entities, for example, executing the steps performed by the communication unit 1401. The apparatus may also include a memory 1501 and a bus 1504, the memory 1501 being used to store the apparatus's program code and data.

[0233] The memory 1501 may be a memory in the device, and the memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state drive; the memory may also include a combination of the above types of memory.

[0234] The processor 1502 described above can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0235] The 1504 bus can be an extended industry standard architecture (EISA) bus, etc. The 1504 bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0236] Figure 15 The device in the middle can also be a chip. The chip includes one or more processors 1502 and a communication interface 1503.

[0237] Optionally, the chip also includes a memory 1505, which may include read-only memory and random access memory, and provides operation instructions and data to the processor 1502. A portion of the memory 1505 may also include non-volatile random access memory (NVRAM).

[0238] In some implementations, memory 1505 stores elements such as execution modules or data structures, or subsets thereof, or extended sets thereof.

[0239] In this embodiment of the application, the corresponding operation is executed by calling the operation instructions stored in the memory 1505 (the operation instructions can be stored in the operating system).

[0240] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer (e.g., a receiving node), cause the computer to perform a synchronization method as described in any of the above embodiments.

[0241] Exemplary examples of computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in this disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0242] Some embodiments of this disclosure also provide a computer program product, for example, stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions that, when executed on a computer (e.g., a receiving node), cause the computer to perform the synchronization method as described in the above embodiments.

[0243] Some embodiments of this disclosure also provide a computer program. When executed on a computer (e.g., a receiving node), the computer program causes the computer to perform the synchronization method as described in the above embodiments.

[0244] The beneficial effects of the computer-readable storage medium, computer program product, and computer program described above are the same as the beneficial effects of the synchronization methods in some of the above embodiments, and will not be repeated here.

[0245] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0246] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0247] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0248] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. An electronic device, characterized in that, The electronic device includes a communication interface and a processor; The communication interface is configured to acquire energy consumption data monitored by each of at least two instrument devices in a target area. The target area includes multiple monitoring areas with a hierarchical relationship between them. One instrument device is used to monitor the energy consumption data of an energy-consuming device in one monitoring area. The processor is configured to: determine the energy consumption data of energy-consuming devices in the target monitoring area of ​​the multiple monitoring areas based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to the multiple monitoring areas. The target spatial tree model includes multiple first nodes, each first node is used to indicate a target monitoring area, and at least one of the multiple first nodes indicates that the target monitoring area is where the instrument is deployed, and / or any child node corresponding to the at least one first node indicates that the target monitoring area is where the instrument is deployed.

2. The electronic device according to claim 1, characterized in that, The communication interface is also configured as follows: Obtain the hierarchical relationship between the multiple monitoring areas and the deployment information of each instrument device, wherein the deployment information is used to indicate the correspondence between the instrument devices and the monitoring areas; The processor is further configured to: construct a basic spatial tree model based on the hierarchical relationship and the deployment information. The basic spatial tree model includes multiple second nodes, each second node being used to indicate a monitoring area. The multiple second nodes include: a root node and child nodes. The root node is used to indicate the target area, and the child nodes are used to indicate monitoring areas other than the target area among the multiple monitoring areas. The second node corresponding to the monitoring area where the instrument equipment is deployed has an association relationship with the instrument equipment. Based on the second node in the basic spatial tree model that indicates a corresponding relationship with the instrumentation equipment, the basic spatial tree model is adjusted to obtain the target spatial tree model.

3. The electronic device according to claim 2, characterized in that, The processor is specifically configured as follows: Determine the child node corresponding to each of the plurality of second nodes; The target spatial tree model is obtained by deleting the third node in the basic spatial tree model. The third node is the second node among the plurality of second nodes that does not have a corresponding relationship with the instrument or equipment, and each of its corresponding child nodes does not have a corresponding relationship with the instrument or equipment.

4. The electronic device according to claim 1, characterized in that, The communication interface is also configured as follows: Obtain energy value information, which is used to indicate the value of a unit of energy at different time periods; The processor is further configured to: determine the value of energy consumption by energy-consuming devices in the target monitoring area in each time period based on the energy value information and the energy consumption data of energy-consuming devices in the target monitoring area.

5. The electronic device according to any one of claims 1-4, characterized in that, The processor is specifically configured as follows: Based on the energy consumption data monitored by each instrument, determine the energy consumption data corresponding to the target monitoring area where the instruments are deployed; At least one fourth node is determined from the plurality of first nodes, and child nodes of each fourth node are determined, wherein the at least one fourth node is a node among the plurality of first nodes that does not have a corresponding relationship with the instrument or equipment; Based on the energy consumption data corresponding to the target monitoring area indicated by the child nodes of each fourth node, determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node.

6. The electronic device according to any one of claims 1-4, characterized in that, The processor is specifically configured as follows: Based on the energy consumption data monitored by each instrument, determine the energy consumption data corresponding to the target monitoring area where the instruments are deployed; At least one fourth node is determined from the plurality of first nodes, and leaf nodes are determined for each fourth node. The at least one fourth node includes leaf nodes, and the at least one fourth node is a node among the plurality of first nodes that does not have a corresponding relationship with the instrument or equipment. Based on the energy consumption data corresponding to the target monitoring area indicated by the leaf node of each fourth node, determine the energy consumption data corresponding to the target monitoring area indicated by each fourth node.

7. The electronic device according to any one of claims 1-4, characterized in that, The processor is also configured to: Determine whether a data table exists in the database for each of the at least two instrument devices; If no data table exists for any instrument or device in the database, create a data table for that instrument or device. The energy consumption data monitored by each instrument is stored in the corresponding data table.

8. The electronic device according to any one of claims 1-4, characterized in that, The energy consumption data is used to indicate the energy consumption data of energy-consuming devices within the monitoring area per unit time; the communication interface is specifically configured as follows: The basic data monitored by each of the at least two instruments is obtained, wherein the basic data is the total energy consumption of the energy-consuming devices in the monitoring area, which is determined in real time at each preset time interval. The processor is specifically configured to: determine the energy consumption data monitored by each instrument device based on the basic data.

9. A data analysis method, characterized in that, The method includes: Acquire energy consumption data monitored by each of at least two instruments within a target area. The target area includes multiple monitoring areas with a hierarchical relationship between them. One instrument is used to monitor the energy consumption data of an energy-consuming device within a monitoring area. Based on the energy consumption data monitored by each instrument and the target spatial tree model corresponding to the multiple monitoring areas, the energy consumption data of the energy-consuming devices in the target monitoring areas of the multiple monitoring areas are determined. The target spatial tree model includes multiple first nodes, each first node is used to indicate a target monitoring area, and at least one of the multiple first nodes indicates that the target monitoring area is equipped with instrument, and / or any child node corresponding to the at least one first node indicates that the target monitoring area is equipped with instrument.

10. The data analysis method according to claim 9, characterized in that, Before acquiring the energy consumption data monitored by each of at least two instruments within the target area, the method further includes: Obtain the hierarchical relationship between the multiple monitoring areas and the deployment information of each instrument device. The deployment information is used to indicate the correspondence between the instrument devices and the monitoring areas. Based on the hierarchical relationship and the deployment information, a basic spatial tree model is constructed. The basic spatial tree model includes multiple second nodes, each of which is used to indicate a monitoring area. The multiple second nodes include: a root node and child nodes. The root node is used to indicate the target area, and the child nodes are used to indicate the monitoring areas other than the target area among the multiple monitoring areas. The second nodes corresponding to the monitoring areas where instruments are deployed have an association relationship with the instruments. Based on the second node in the basic spatial tree model that indicates a corresponding relationship with the instrumentation equipment, the basic spatial tree model is adjusted to obtain the target spatial tree model.

11. The data analysis method according to claim 10, characterized in that, The step of adjusting the basic spatial tree model to obtain the target spatial tree model based on the second node in the basic spatial tree model that indicates a correspondence with the instrumentation equipment includes: Determine the child node corresponding to each of the plurality of second nodes; The target spatial tree model is obtained by deleting the third node in the basic spatial tree model. The third node is the second node among the plurality of second nodes that does not have a corresponding relationship with the instrument or equipment, and each of its corresponding child nodes does not have a corresponding relationship with the instrument or equipment.

12. A data analysis device, characterized in that, include: Processor and memory; The memory stores a computer program, and the processor runs the computer program to implement the data analysis method as described in any one of claims 9-11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform the data analysis method according to any one of claims 9-11.

14. A computer program product, characterized in that, The computer program product includes instructions that, when executed on a computer, enable the computer to perform the data analysis method as described in any one of claims 9-11.