CN116930608B - Energy consumption allocation and statistics method, system and medium - Google Patents

Energy consumption allocation and statistics method, system and medium Download PDF

Info

Publication number
CN116930608B
CN116930608B CN202311205345.6A CN202311205345A CN116930608B CN 116930608 B CN116930608 B CN 116930608B CN 202311205345 A CN202311205345 A CN 202311205345A CN 116930608 B CN116930608 B CN 116930608B
Authority
CN
China
Prior art keywords
energy consumption
energy
unit
mode
calculation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311205345.6A
Other languages
Chinese (zh)
Other versions
CN116930608A (en
Inventor
周冬冬
王中乐
单炯翔
郑烽华
董秋影
潘超
庄仁杯
徐斐虹
许科益
李政德
唐瑜
何佳红
吴涛
汪鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Zhenghua Electronic Science And Technology Co ltd
Original Assignee
Hangzhou Zhenghua Electronic Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Zhenghua Electronic Science And Technology Co ltd filed Critical Hangzhou Zhenghua Electronic Science And Technology Co ltd
Priority to CN202311205345.6A priority Critical patent/CN116930608B/en
Publication of CN116930608A publication Critical patent/CN116930608A/en
Application granted granted Critical
Publication of CN116930608B publication Critical patent/CN116930608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application discloses an energy consumption allocation and statistics method, system and medium, wherein the method comprises the following steps: obtaining energy consumption configuration information of an energy consumption object, generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and a meter, determining calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes; traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit; and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit. The invention solves the problem of energy consumption allocation in fixed proportion; meanwhile, the problem of high logic complexity coupling degree of the code related to the energy consumption statistics is solved, and the development efficiency is improved.

Description

Energy consumption allocation and statistics method, system and medium
Technical Field
The application relates to the technical field of electric energy metering, in particular to an energy consumption allocation and statistics method, an energy consumption allocation and statistics system and an energy consumption statistics medium.
Background
The energy consumption configuration mode of the energy consumption unit of the existing platform adopts a direct list meter accumulation mode, namely, the list meter is hung under the energy consumption unit directly, or a direct list unit accumulation mode, namely, the energy consumption of the unit is accumulated by the unit of the next stage. The energy consumption statistics of the meter cannot be configured, namely the energy consumption allocation function cannot be completed.
The following user scenarios exist: a certain workshop of the factory is concentrated in a floor, the lighting electricity of the floor is measured by an ammeter, five pipelines exist in the workshop, and the lighting level is required to be equally distributed on the pipelines. The prior art scheme cannot meet the requirements, and an energy consumption configuration and statistics method supporting fixed proportion energy consumption allocation is needed.
Disclosure of Invention
The purpose of the application is to provide an energy consumption allocation and statistics method, system and medium, which solve the problem of fixed proportion energy consumption allocation, solve the problem of high logic complex coupling degree of the code related to energy consumption statistics, and improve the development efficiency.
The application provides an energy consumption allocation and statistics method, which comprises the following steps:
obtaining energy consumption configuration information of an energy consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit;
judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit;
and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
In this scheme, the calculation mode of different energy categories includes: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
In the scheme, a final mode of energy consumption calculation corresponding to a single energy source of the energy unit is obtained by adopting a recursion algorithm.
In the scheme, all energy consumption units on the structural tree are traversed to obtain the final energy consumption calculation mode of all energy source types of each energy consumption unit, and the method specifically comprises the following steps:
judging whether all the energy utilization units are traversed, if so, ending the traversal;
if not, the energy using unit is not traversed, the current energy using unit is obtained, and whether the energy source type of the current energy using unit is traversed is judged;
if the current energy source type of the energy using unit is not traversed, acquiring the current energy source type, and if yes, returning to judge whether all the energy using units are traversed;
and determining the energy consumption calculation final mode of the current energy source type of the current energy source unit.
In the scheme, whether the energy consumption calculation of the current energy consumption unit is completed is judged, if not, the final energy consumption calculation mode of the current energy consumption unit is determined according to the type of the energy configuration mode preset by the energy consumption unit, and the method specifically comprises the following steps:
judging whether the energy consumption calculation of the current energy source of the current energy utilization unit is completed or not, if so, ending to avoid repeated calculation, and if not, determining an energy consumption calculation final mode according to the mode type of the current energy source of the current energy utilization unit;
if the type of the mode preset by the energy unit is a direct table meter, creating an energy consumption calculation final mode, and setting the table meter coefficient as 1;
if the type of the mode preset by the energy unit is the directly affiliated unit, traversing the directly affiliated unit, firstly calculating the final mode of the current energy type energy consumption of the directly affiliated unit, merging the directly affiliated unit into the current unit, and setting the merging coefficient to be 1;
if the mode type preset by the energy utilization unit is a self-defining mode, firstly, creating a final mode according to a self-defining meter, wherein the meter coefficient is a configured coefficient; then traversing the self-defining unit, firstly calculating the final energy consumption mode of the current energy type of the self-defining unit, and merging the energy consumption mode into the current unit, wherein the merging coefficient is a coefficient configured by the self-defining unit;
and merging the final mode of energy consumption calculation, wherein the merged meter coefficient=meter coefficient of the merging target energy unit+meter coefficient of the merged energy unit.
In this scheme, calculate the energy consumption of the final mode calculation energy consumption of the unit according to the energy consumption of the unit of the present energy consumption, specifically include:
and selecting a statistical starting time and a statistical ending time, obtaining meter readings of a meter corresponding to the starting time and the ending time related to a final energy consumption calculation mode of the energy utilization unit, multiplying the meter reading difference by a corresponding meter coefficient, and adding to obtain the energy consumption of the energy utilization unit.
A second aspect of the present application provides an energy consumption apportionment and statistics system, the system comprising: the system comprises a memory and a processor, wherein the memory comprises an energy consumption allocation and statistics method program, and the energy consumption allocation and statistics method program realizes the following steps when being executed by the processor:
obtaining energy consumption configuration information of an energy consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit;
judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit;
and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
In this scheme, the calculation mode of different energy categories includes: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
In the scheme, a final mode of energy consumption calculation corresponding to a single energy source of the energy unit is obtained by adopting a recursion algorithm.
A third aspect of the present application provides a computer readable storage medium, where the computer readable storage medium includes an energy consumption allocation and statistics method program, where the energy consumption allocation and statistics method program, when executed by a processor, implements the steps of the energy consumption allocation and statistics method.
As can be seen from the above, the energy consumption allocation and statistics method, system and medium provided by the present application obtain the calculation modes of different energy types under each energy consumption unit by constructing an energy consumption unit structure tree, where the energy consumption unit structure tree includes a plurality of energy consumption units and uses the energy consumption units as nodes; traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit; and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit. The method solves the problems of fixed proportion energy consumption allocation and statistics, and meanwhile solves the problem of high logic complexity and coupling degree of the codes related to the energy consumption statistics, and improves the development efficiency.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an energy consumption allocation and statistics method provided in an embodiment of the present application;
FIG. 2 is a flow chart of a final mode of obtaining all energy types of the energy using unit according to the embodiment of the present application;
FIG. 3 is a flowchart of a final manner of determining a current energy consumption unit according to an embodiment of the present application;
fig. 4 is a block diagram of an energy consumption allocation and statistics system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, a flowchart of an energy consumption allocation and statistics method in some embodiments of the present application is shown. The energy consumption allocation and statistics method is used for an electric energy allocation and statistics system, and the invention is not limited to specific use scenes, such as workshops, factories or office buildings. The energy consumption allocation and statistics method comprises the following steps:
s101, energy consumption configuration information of an energy consumption object is obtained, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
s102, generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
s103, traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit;
s104, judging whether the energy consumption calculation of the current energy utilization unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy utilization unit according to the type of the energy configuration mode preset by the energy utilization unit;
s105, calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
It should be noted that the technical purpose of the present invention is to construct an energy-using unit structure tree, and obtain calculation modes of different energy types under each energy-using unit, where the energy-using unit structure tree includes a plurality of energy-using units and uses the energy-using units as nodes; traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit; and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
It should be noted that in many scenarios, energy consumption is commonly contributed by multiple devices or systems. The apportionment of energy consumption is the distribution of total energy consumption to individual devices or systems according to certain rules or algorithms to understand their respective energy contributions. The method can help us to know the energy use condition of each device or system, find out the device or system with higher energy consumption, and take corresponding measures to optimize energy conservation. The statistics of the energy consumption refers to the process of recording and summarizing the energy consumption. By counting the energy consumption, the energy consumption data of each device or system can be obtained, wherein the energy consumption data comprise information such as total energy consumption, energy consumption trend, energy consumption duty ratio and the like. This helps us evaluate energy usage efficiency, formulate energy conservation goals, monitor energy consumption changes, and make energy management and optimization decisions.
The invention can solve the problem of fixed proportion energy consumption allocation, and simultaneously solves the problem of high logic complex coupling degree of the code related to energy consumption statistics, thereby improving the development efficiency, further reducing the time for responding to the business demands of clients and improving the maintainability of the code.
According to the embodiment of the invention, the calculation modes of different energy types comprise: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
The invention expands the energy consumption configuration mode of the energy consumption unit of the existing platform and supports the energy consumption of the meter or the unit to be apportioned according to a fixed proportion. The user-defined mode configuration mode is added, and the user-defined meter and the user-defined unit are supported simultaneously, so that the function of configuring the coefficient is provided, and the coefficient can be a negative value.
According to the embodiment of the invention, the final mode of energy consumption calculation corresponding to the single energy source of the energy unit is obtained by adopting a recursion algorithm.
It should be noted that, because the configuration mode increases the custom mode, the complexity of the tree structure is greatly improved, and the direct traversal of the tree structure for statistics leads to complex code logic, difficult maintenance, high coupling degree and reduced code complexity. The system recursively attributes the node energy consumption mode into meter coefficients during energy consumption statistics; and multiplying the start-stop meter code difference value of the meter related to the energy unit by a corresponding meter coefficient, and obtaining the energy consumption after adding.
It should be noted that the present invention employs a recursive algorithm that solves a problem by decomposing a large problem into one or more similar, smaller-scale sub-problems. Each sub-problem can be solved by recursively invoking the same algorithm until the basic condition or boundary condition is reached, and then returning the results layer by layer, finally obtaining the solution of the original problem.
The recursive algorithm has the following effects or benefits:
conciseness: recursive algorithms can describe problems and solutions in a more concise and intuitive way. It can break down complex problems into simple basic cases, thereby reducing the complexity of the problem.
Readability: the code structure of the recursive algorithm is clear and easy to understand and read. The solution idea of the problem can be expressed more naturally by recursively calling the method.
Problem resolution: the recursive algorithm can divide a large problem into sub-problems of smaller scale, making the problem solving process more modular and manageable. Such decomposition may simplify the handling of the problem and help extract a general solution.
Solves the complex problems: the recursive algorithm is suitable for solving complex problems that have a recursive structure or require multiple levels of nested processing. These problems can be handled more easily by recursion and a clear way of thinking is provided.
Code reuse: the recursive algorithm may enable reuse of code by calling itself. When solving the problem of different scales, the same recursive function can be shared, thereby reducing redundancy of codes and the work of repeated writing.
A final pattern flow diagram for obtaining all energy categories of the energy usage unit is shown in fig. 2.
According to the embodiment of the invention, all energy consumption units on the structural tree are traversed to obtain the final energy consumption calculation mode of all energy source types of each energy consumption unit, which is specifically as follows:
judging whether all the energy utilization units are traversed, if so, ending the traversal;
if not, the energy using unit is not traversed, the current energy using unit is obtained, and whether the energy source type of the current energy using unit is traversed is judged;
if the current energy source type of the energy using unit is not traversed, acquiring the current energy source type, and if yes, returning to judge whether all the energy using units are traversed;
and determining the energy consumption calculation final mode of the current energy source type of the current energy source unit.
As shown in fig. 3, a final mode flowchart of the current energy usage unit is determined.
According to the embodiment of the invention, whether the energy consumption calculation of the current energy consumption unit is completed is judged, if not, the final energy consumption calculation mode of the current energy consumption unit is determined according to the type of the energy configuration mode preset by the energy consumption unit, and the method specifically comprises the following steps:
judging whether the energy consumption calculation of the current energy source of the current energy utilization unit is completed or not, if so, ending to avoid repeated calculation, and if not, determining an energy consumption calculation final mode according to the mode type of the current energy source of the current energy utilization unit;
if the type of the mode preset by the energy unit is a direct table meter, creating an energy consumption calculation final mode, and setting the table meter coefficient as 1;
if the type of the mode preset by the energy unit is the directly affiliated unit, traversing the directly affiliated unit, firstly calculating the final mode of the current energy type energy consumption of the directly affiliated unit, merging the directly affiliated unit into the current unit, and setting the merging coefficient to be 1;
if the mode type preset by the energy utilization unit is a self-defining mode, firstly, creating a final mode according to a self-defining meter, wherein the meter coefficient is a configured coefficient; then traversing the self-defining unit, firstly calculating the final energy consumption mode of the current energy type of the self-defining unit, and merging the energy consumption mode into the current unit, wherein the merging coefficient is a coefficient configured by the self-defining unit;
and merging the final mode of energy consumption calculation, wherein the merged meter coefficient=meter coefficient of the merging target energy unit+meter coefficient of the merged energy unit.
According to the embodiment of the invention, the energy consumption of the energy consumption unit is calculated according to the final mode of the energy consumption calculation of the current energy consumption unit, and the method specifically comprises the following steps:
and selecting a statistical starting time and a statistical ending time, obtaining meter readings of a meter corresponding to the starting time and the ending time related to a final energy consumption calculation mode of the energy utilization unit, multiplying the meter reading difference by a corresponding meter coefficient, and adding to obtain the energy consumption of the energy utilization unit.
Fig. 4 shows a block diagram of an energy consumption apportionment and statistics system.
A second aspect of the present application provides an energy consumption apportionment and statistics system, the system comprising: the system comprises a memory 401 and a processor 402, wherein the memory 401 comprises an energy consumption allocation and statistics method program, and the energy consumption allocation and statistics method program realizes the following steps when being executed by the processor 402:
s101, energy consumption configuration information of an energy consumption object is obtained, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
s102, generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
s103, traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit;
s104, judging whether the energy consumption calculation of the current energy utilization unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy utilization unit according to the type of the energy configuration mode preset by the energy utilization unit;
s105, calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
It should be noted that the technical purpose of the present invention is to construct an energy-using unit structure tree, and obtain calculation modes of different energy types under each energy-using unit, where the energy-using unit structure tree includes a plurality of energy-using units and uses the energy-using units as nodes; traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit; and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
It should be noted that in many scenarios, energy consumption is commonly contributed by multiple devices or systems. The apportionment of energy consumption is the distribution of total energy consumption to individual devices or systems according to certain rules or algorithms to understand their respective energy contributions. The method can help us to know the energy use condition of each device or system, find out the device or system with higher energy consumption, and take corresponding measures to optimize energy conservation. The statistics of the energy consumption refers to the process of recording and summarizing the energy consumption. By counting the energy consumption, the energy consumption data of each device or system can be obtained, wherein the energy consumption data comprise information such as total energy consumption, energy consumption trend, energy consumption duty ratio and the like. This helps us evaluate energy usage efficiency, formulate energy conservation goals, monitor energy consumption changes, and make energy management and optimization decisions.
The invention can solve the problem of fixed proportion energy consumption allocation, and simultaneously solves the problem of high logic complex coupling degree of the code related to energy consumption statistics, thereby improving the development efficiency, further reducing the time for responding to the business demands of clients and improving the maintainability of the code.
According to the embodiment of the invention, the calculation modes of different energy types comprise: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
The invention expands the energy consumption configuration mode of the existing energy consumption unit of the platform and supports the energy consumption of the meter or the unit to be apportioned according to a fixed proportion. The user-defined mode configuration mode is added, and the user-defined meter and the user-defined unit are supported simultaneously, so that the function of configuring the coefficient is provided, and the coefficient can be a negative value.
According to the embodiment of the invention, the final mode of energy consumption calculation corresponding to the single energy source of the energy unit is obtained by adopting a recursion algorithm.
It should be noted that, because the configuration mode increases the custom mode, the complexity of the tree structure is greatly improved, and the direct traversal of the tree structure for statistics leads to complex code logic, difficult maintenance, high coupling degree and reduced code complexity. The system recursively attributes the node energy consumption mode into meter coefficients during energy consumption statistics; and multiplying the start-stop meter code difference value of the meter related to the energy unit by a corresponding meter coefficient, and obtaining the energy consumption after adding.
It should be noted that the present invention employs a recursive algorithm that solves a problem by decomposing a large problem into one or more similar, smaller-scale sub-problems. Each sub-problem can be solved by recursively invoking the same algorithm until the basic condition or boundary condition is reached, and then returning the results layer by layer, finally obtaining the solution of the original problem.
The recursive algorithm has the following effects or benefits:
conciseness: recursive algorithms can describe problems and solutions in a more concise and intuitive way. It can break down complex problems into simple basic cases, thereby reducing the complexity of the problem.
Readability: the code structure of the recursive algorithm is clear and easy to understand and read. The solution idea of the problem can be expressed more naturally by recursively calling the method.
Problem resolution: the recursive algorithm can divide a large problem into sub-problems of smaller scale, making the problem solving process more modular and manageable. Such decomposition may simplify the handling of the problem and help extract a general solution.
Solves the complex problems: the recursive algorithm is suitable for solving complex problems that have a recursive structure or require multiple levels of nested processing. These problems can be handled more easily by recursion and a clear way of thinking is provided.
Code reuse: the recursive algorithm may enable reuse of code by calling itself. When solving the problem of different scales, the same recursive function can be shared, thereby reducing redundancy of codes and the work of repeated writing.
A final pattern flow diagram for obtaining all energy categories of the energy usage unit is shown in fig. 2.
According to the embodiment of the invention, all energy consumption units on the structural tree are traversed to obtain the final energy consumption calculation mode of all energy source types of each energy consumption unit, which is specifically as follows:
judging whether all the energy utilization units are traversed, if so, ending the traversal;
if not, the energy using unit is not traversed, the current energy using unit is obtained, and whether the energy source type of the current energy using unit is traversed is judged;
if the current energy source type of the energy using unit is not traversed, acquiring the current energy source type, and if yes, returning to judge whether all the energy using units are traversed;
and determining the energy consumption calculation final mode of the current energy source type of the current energy source unit.
As shown in fig. 3, a final mode flowchart of the current energy usage unit is determined.
According to the embodiment of the invention, whether the energy consumption calculation of the current energy consumption unit is completed is judged, if not, the final energy consumption calculation mode of the current energy consumption unit is determined according to the type of the energy configuration mode preset by the energy consumption unit, and the method specifically comprises the following steps:
judging whether the energy consumption calculation of the current energy source of the current energy utilization unit is completed or not, if so, ending to avoid repeated calculation, and if not, determining an energy consumption calculation final mode according to the mode type of the current energy source of the current energy utilization unit;
if the type of the mode preset by the energy unit is a direct table meter, creating an energy consumption calculation final mode, and setting the table meter coefficient as 1;
if the type of the mode preset by the energy unit is the directly affiliated unit, traversing the directly affiliated unit, firstly calculating the final mode of the current energy type energy consumption of the directly affiliated unit, merging the directly affiliated unit into the current unit, and setting the merging coefficient to be 1;
if the mode type preset by the energy utilization unit is a self-defining mode, firstly, creating a final mode according to a self-defining meter, wherein the meter coefficient is a configured coefficient; then traversing the self-defining unit, firstly calculating the final energy consumption mode of the current energy type of the self-defining unit, and merging the energy consumption mode into the current unit, wherein the merging coefficient is a coefficient configured by the self-defining unit;
and merging the final mode of energy consumption calculation, wherein the merged meter coefficient=meter coefficient of the merging target energy unit+meter coefficient of the merged energy unit.
According to the embodiment of the invention, the energy consumption of the energy consumption unit is calculated according to the final mode of the energy consumption calculation of the current energy consumption unit, and the method specifically comprises the following steps:
and selecting a statistical starting time and a statistical ending time, obtaining meter readings of a meter corresponding to the starting time and the ending time related to a final energy consumption calculation mode of the energy utilization unit, multiplying the meter reading difference by a corresponding meter coefficient, and adding to obtain the energy consumption of the energy utilization unit.
A third aspect of the present application provides a computer readable storage medium, where the computer readable storage medium includes an energy consumption allocation and statistics method program, where the energy consumption allocation and statistics method program, when executed by a processor, implements the steps of the energy consumption allocation and statistics method.
The energy consumption allocation and statistics method, the energy consumption allocation and statistics system and the energy consumption statistics medium are used for obtaining calculation modes of different energy types under each energy consumption unit by constructing an energy consumption unit structure tree, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes; traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit; and calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit.
The method solves the problems of fixed proportion energy consumption allocation and statistics, and meanwhile solves the problem of high logic complexity and coupling degree of the codes related to the energy consumption statistics, and improves the development efficiency.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present invention may be stored in a readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.

Claims (3)

1. A method of energy consumption apportionment and statistics, the method comprising:
obtaining energy consumption configuration information of an energy consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
the energy consumption calculation modes of different energy source types comprise: direct list calculation, custom list calculation and direct energy consumption unit calculation; the final mode of energy consumption calculation corresponding to the single energy source of the energy unit is obtained by adopting a recursion algorithm;
traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; the method comprises the following steps:
judging whether all the energy utilization units are traversed, if so, ending the traversal;
if not, the energy using unit is not traversed, the current energy using unit is obtained, and whether the energy source type of the current energy using unit is traversed is judged;
if the current energy source type of the energy using unit is not traversed, acquiring the current energy source type, and if yes, returning to judge whether all the energy using units are traversed;
determining an energy consumption calculation final mode of the current energy source type of the current energy source unit;
judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit;
the method comprises the following steps:
judging whether the energy consumption calculation of the current energy source of the current energy utilization unit is completed or not, if so, ending to avoid repeated calculation, and if not, determining an energy consumption calculation final mode according to the mode type of the current energy source of the current energy utilization unit;
if the type of the mode preset by the energy unit is a direct table meter, creating an energy consumption calculation final mode, and setting the table meter coefficient as 1;
if the type of the mode preset by the energy unit is the directly affiliated unit, traversing the directly affiliated unit, firstly calculating the final mode of the current energy type energy consumption of the directly affiliated unit, merging the directly affiliated unit into the current unit, and setting the merging coefficient to be 1;
if the mode type preset by the energy utilization unit is a self-defining mode, firstly, creating a final mode according to a self-defining meter, wherein the meter coefficient is a configured coefficient; then traversing the self-defining unit, firstly calculating the final energy consumption mode of the current energy type of the self-defining unit, and merging the energy consumption mode into the current unit, wherein the merging coefficient is a coefficient configured by the self-defining unit;
merging energy consumption calculation final mode, merging meter coefficient=meter coefficient of merging target energy consumption unit+meter coefficient of merging energy consumption unit;
calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit;
the method specifically comprises the following steps:
and selecting a statistical starting time and a statistical ending time, obtaining meter readings of a meter corresponding to the starting time and the ending time related to a final energy consumption calculation mode of the energy utilization unit, multiplying the meter reading difference by a corresponding meter coefficient, and adding to obtain the energy consumption of the energy utilization unit.
2. An energy consumption apportionment and statistics system, comprising: the system comprises a memory and a processor, wherein the memory comprises an energy consumption allocation and statistics method program, and the energy consumption allocation and statistics method program realizes the following steps when being executed by the processor:
obtaining energy consumption configuration information of an energy consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one energy utilization unit and the meter;
generating an energy consumption unit structure tree of the energy consumption object according to the association relation between each energy consumption unit and the meter, and determining energy consumption calculation modes of different energy types under each energy consumption unit, wherein the energy consumption unit structure tree comprises a plurality of energy consumption units and takes the energy consumption units as nodes;
the energy consumption calculation modes of different energy source types comprise: direct list calculation, custom list calculation and direct energy consumption unit calculation; the final mode of energy consumption calculation corresponding to the single energy source of the energy unit is obtained by adopting a recursion algorithm;
traversing all energy utilization units on the structural tree to obtain an energy consumption calculation final mode of all energy source types of each energy utilization unit; the method comprises the following steps:
judging whether all the energy utilization units are traversed, if so, ending the traversal;
if not, the energy using unit is not traversed, the current energy using unit is obtained, and whether the energy source type of the current energy using unit is traversed is judged;
if the current energy source type of the energy using unit is not traversed, acquiring the current energy source type, and if yes, returning to judge whether all the energy using units are traversed;
determining an energy consumption calculation final mode of the current energy source type of the current energy source unit;
judging whether the energy consumption calculation of the current energy consumption unit is completed or not, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy configuration mode preset by the energy consumption unit;
the method comprises the following steps:
judging whether the energy consumption calculation of the current energy source of the current energy utilization unit is completed or not, if so, ending to avoid repeated calculation, and if not, determining an energy consumption calculation final mode according to the mode type of the current energy source of the current energy utilization unit;
if the type of the mode preset by the energy unit is a direct table meter, creating an energy consumption calculation final mode, and setting the table meter coefficient as 1;
if the type of the mode preset by the energy unit is the directly affiliated unit, traversing the directly affiliated unit, firstly calculating the final mode of the current energy type energy consumption of the directly affiliated unit, merging the directly affiliated unit into the current unit, and setting the merging coefficient to be 1;
if the mode type preset by the energy utilization unit is a self-defining mode, firstly, creating a final mode according to a self-defining meter, wherein the meter coefficient is a configured coefficient; then traversing the self-defining unit, firstly calculating the final energy consumption mode of the current energy type of the self-defining unit, and merging the energy consumption mode into the current unit, wherein the merging coefficient is a coefficient configured by the self-defining unit;
merging energy consumption calculation final mode, merging meter coefficient=meter coefficient of merging target energy consumption unit+meter coefficient of merging energy consumption unit;
calculating the energy consumption of the energy consumption unit according to the final mode of the energy consumption calculation of the current energy consumption unit;
the method specifically comprises the following steps:
and selecting a statistical starting time and a statistical ending time, obtaining meter readings of a meter corresponding to the starting time and the ending time related to a final energy consumption calculation mode of the energy utilization unit, multiplying the meter reading difference by a corresponding meter coefficient, and adding to obtain the energy consumption of the energy utilization unit.
3. A computer readable storage medium, wherein the computer readable storage medium comprises an energy consumption allocation and statistics method program, and the energy consumption allocation and statistics method program, when executed by a processor, implements the steps of the energy consumption allocation and statistics method according to claim 1.
CN202311205345.6A 2023-09-19 2023-09-19 Energy consumption allocation and statistics method, system and medium Active CN116930608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311205345.6A CN116930608B (en) 2023-09-19 2023-09-19 Energy consumption allocation and statistics method, system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311205345.6A CN116930608B (en) 2023-09-19 2023-09-19 Energy consumption allocation and statistics method, system and medium

Publications (2)

Publication Number Publication Date
CN116930608A CN116930608A (en) 2023-10-24
CN116930608B true CN116930608B (en) 2023-12-26

Family

ID=88390931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311205345.6A Active CN116930608B (en) 2023-09-19 2023-09-19 Energy consumption allocation and statistics method, system and medium

Country Status (1)

Country Link
CN (1) CN116930608B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001001156A1 (en) * 1999-06-30 2001-01-04 General Electric Company Methods and apparatus for metering energy consumption
US6778920B1 (en) * 1999-06-30 2004-08-17 General Electric Company Methods and apparatus for metering energy consumption
CN107274063A (en) * 2017-05-14 2017-10-20 浙江志杰电力科技有限公司 A kind of ammeter energy consumption assessment system and method
CN107402976A (en) * 2017-07-03 2017-11-28 国网山东省电力公司经济技术研究院 Power grid multi-source data fusion method and system based on multi-element heterogeneous model
CN110009252A (en) * 2019-04-15 2019-07-12 科斯睿智能信息系统(常州)有限公司 Wisdom electricity consumption analysis method and system
CN111967784A (en) * 2020-08-25 2020-11-20 广东韶钢松山股份有限公司 Energy consumption management method and device, management equipment and readable storage medium
CN113538063A (en) * 2021-07-28 2021-10-22 广东电网有限责任公司 Electricity charge abnormal data analysis method, device, equipment and medium based on decision tree
CN113868821A (en) * 2021-11-08 2021-12-31 国网山东省电力公司胶州市供电公司 Distribution network loss reduction method based on marketing and distribution big data fusion and terminal
CN115757002A (en) * 2021-09-02 2023-03-07 中移(苏州)软件技术有限公司 Energy consumption determination method, device and equipment and computer readable storage medium
CN116662412A (en) * 2023-07-24 2023-08-29 云南电网能源投资有限责任公司 Data mining method for big data of power grid distribution and utilization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10860961B2 (en) * 2018-08-07 2020-12-08 Xactly Corporation Automatic computer prediction of resource attrition

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001001156A1 (en) * 1999-06-30 2001-01-04 General Electric Company Methods and apparatus for metering energy consumption
US6778920B1 (en) * 1999-06-30 2004-08-17 General Electric Company Methods and apparatus for metering energy consumption
CN107274063A (en) * 2017-05-14 2017-10-20 浙江志杰电力科技有限公司 A kind of ammeter energy consumption assessment system and method
CN107402976A (en) * 2017-07-03 2017-11-28 国网山东省电力公司经济技术研究院 Power grid multi-source data fusion method and system based on multi-element heterogeneous model
CN110009252A (en) * 2019-04-15 2019-07-12 科斯睿智能信息系统(常州)有限公司 Wisdom electricity consumption analysis method and system
CN111967784A (en) * 2020-08-25 2020-11-20 广东韶钢松山股份有限公司 Energy consumption management method and device, management equipment and readable storage medium
CN113538063A (en) * 2021-07-28 2021-10-22 广东电网有限责任公司 Electricity charge abnormal data analysis method, device, equipment and medium based on decision tree
CN115757002A (en) * 2021-09-02 2023-03-07 中移(苏州)软件技术有限公司 Energy consumption determination method, device and equipment and computer readable storage medium
CN113868821A (en) * 2021-11-08 2021-12-31 国网山东省电力公司胶州市供电公司 Distribution network loss reduction method based on marketing and distribution big data fusion and terminal
CN116662412A (en) * 2023-07-24 2023-08-29 云南电网能源投资有限责任公司 Data mining method for big data of power grid distribution and utilization

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Study on Energy Conservation for Cellular Systems: A Global Optimization Approach;Wen-Kuang Kuo等;《IEEE Systems Journal 》;第12卷(第1期);全文 *
基于平均电量数据的网损分摊方案研究;魏立明,等;《哈尔滨工业大学学报》;第37卷(第10期);全文 *
火电机组在线能耗监测模型的分析研究;聂涛,等;《湖南电力》;第43卷(第2期);全文 *

Also Published As

Publication number Publication date
CN116930608A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
Chen et al. An optimal sample allocation strategy for partition-based random search
US8423195B2 (en) Power consumption projection
CN113128932B (en) Warehouse stock processing method and device, storage medium and electronic equipment
CN115423386A (en) Method, device, equipment and medium for determining power carbon emission factor
CN116930608B (en) Energy consumption allocation and statistics method, system and medium
CN114781688A (en) Method, device, equipment and storage medium for identifying abnormal data of business expansion project
Hurley Taskgraph mapping using a genetic algorithm: a comparison of fitness functions
EP3407212A1 (en) Method and device for use in analyzing data table
CN114757448B (en) Manufacturing inter-link optimal value chain construction method based on data space model
CN116249186A (en) Data processing method and device of wireless network equipment, storage medium and electronic equipment
CN113642248A (en) Method and device for evaluating remaining service time of positioning equipment
CN114862282A (en) Business and financial cooperative management method and system based on data analysis
CN112070548B (en) User layering method, device, equipment and storage medium
CN114118608A (en) Power grid business matching optimization method and device, terminal and storage medium
Romauch et al. Dynamic facility location with stochastic demands
CN111783487A (en) Fault early warning method and device for card reader equipment
CN117291401B (en) Ordered power utilization control method and system for power utilization peak period
CN109723610A (en) Generating set rate of load condensate lacks value complement and recruits method and device
CN113361960B (en) Method, medium, device and equipment for quantifying large-scale demand response capacity
CN116207864B (en) Method and system for controlling power equipment in low-voltage area based on Internet of things
CN111460775B (en) Method and device for generating trade characteristic grid graph
CN116703645A (en) Filling method, device, equipment and storage medium for terminal acquisition data missing
CN108664326A (en) Information processing equipment and information processing system
CN117649311A (en) Industry expansion quantity affected analysis method, electronic equipment and storage medium
CN116646923A (en) Method, device, terminal and storage medium for predicting medium and long term power load

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant