CN116930608A - Energy consumption allocation and statistics method, system and medium - Google Patents
Energy consumption allocation and statistics method, system and medium Download PDFInfo
- Publication number
- CN116930608A CN116930608A CN202311205345.6A CN202311205345A CN116930608A CN 116930608 A CN116930608 A CN 116930608A CN 202311205345 A CN202311205345 A CN 202311205345A CN 116930608 A CN116930608 A CN 116930608A
- Authority
- CN
- China
- Prior art keywords
- energy consumption
- energy
- unit
- mode
- current
- 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.)
- Granted
Links
- 238000005265 energy consumption Methods 0.000 title claims abstract description 360
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004364 calculation method Methods 0.000 claims abstract description 109
- 230000005611 electricity Effects 0.000 claims abstract description 31
- 230000008878 coupling Effects 0.000 abstract description 8
- 238000010168 coupling process Methods 0.000 abstract description 8
- 238000005859 coupling reaction Methods 0.000 abstract description 8
- 230000006870 function Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000004134 energy conservation Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R22/00—Arrangements for measuring time integral of electric power or current, e.g. electricity meters
- G01R22/06—Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Water Supply & Treatment (AREA)
- Power Engineering (AREA)
- Computational Linguistics (AREA)
- Public Health (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses an energy consumption allocation and statistics method, a system and a medium, wherein the method comprises the following steps: obtaining energy consumption configuration information of an electricity consumption object, generating an energy consumption unit structure tree of the electricity consumption object according to the association relation between each electricity consumption unit and an electricity 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 application 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
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 application aims 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 codes related to energy consumption statistics and improve development efficiency.
The application provides an energy consumption allocation and statistics method, which comprises the following steps:
obtaining energy consumption configuration information of a power consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one electricity utilization unit and the ammeter;
generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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 type of the mode preset by the energy utilization unit is a direct unit 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.
In a second aspect, 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 a power consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one electricity utilization unit and the ammeter;
generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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 having embodied therein an energy consumption allocation and statistics method program, which 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 application acquire the calculation modes of different energy types under each energy consumption unit by constructing the 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.
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 can 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 by an embodiment of the 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 method for 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 accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application 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 application, as presented in the figures, 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 a person skilled in the art 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 flow chart of an energy consumption allocation and statistics method according to some embodiments of the application is shown. The energy consumption allocation and statistics method is used for an electric energy allocation and statistics system, and the application 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 electricity consumption object is obtained, wherein the energy consumption configuration information comprises: the association relation between at least one electricity utilization unit and the ammeter;
s102, generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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 application 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 application 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 application, 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 application 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 application, 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 application 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 application, 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 application, 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 type of the mode preset by the energy utilization unit is a direct unit 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 application, 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.
In a second aspect, 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 electricity consumption object is obtained, wherein the energy consumption configuration information comprises: the association relation between at least one electricity utilization unit and the ammeter;
s102, generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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 application 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 application 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 application, 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 application 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 application, 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 application 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 application, 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 application, 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 type of the mode preset by the energy utilization unit is a direct unit 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 application, 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 having embodied therein an energy consumption allocation and statistics method program, which 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 provided by the application are used for obtaining the 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 by the present 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 application 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 application 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 application 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 application. 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 (9)
1. A method of energy consumption apportionment and statistics, the method comprising:
obtaining energy consumption configuration information of a power consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one electricity utilization unit and the ammeter;
generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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; 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;
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.
2. The energy consumption apportionment and statistics method according to claim 1, wherein the energy consumption calculation method of different energy source types comprises: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
3. The energy consumption apportionment and statistics method according to claim 1, wherein the final mode of energy consumption calculation corresponding to the single energy source of the energy unit is obtained by adopting a recursive algorithm.
4. The energy consumption apportionment and statistics method according to claim 1, wherein the method is characterized by judging whether the energy consumption calculation of the current energy consumption unit is completed, if not, determining the final energy consumption calculation mode of the current energy consumption unit according to the type of the energy source configuration mode preset by the energy consumption unit, and specifically comprising 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 type of the mode preset by the energy utilization unit is a direct unit 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.
5. The energy consumption apportionment and statistics method according to claim 1, wherein the calculating the energy consumption of the energy consumption unit in the final manner according to the energy consumption of the current energy consumption unit specifically comprises:
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.
6. 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 a power consumption object, wherein the energy consumption configuration information comprises the following components: the association relation between at least one electricity utilization unit and the ammeter;
generating an energy consumption unit structure tree of the electricity object according to the association relation between each electricity consumption unit and the electricity 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; 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;
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.
7. The energy consumption apportionment and statistics system of claim 6 wherein the means for calculating the different energy categories comprises: and directly calculating the table, calculating the custom table and directly calculating the energy utilization unit.
8. An energy consumption apportionment and statistics system according to claim 6, wherein the final manner of energy consumption calculation corresponding to the individual energy sources of the energy units is obtained by means of a recursive algorithm.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises an energy consumption allocation and statistics method program, which, when executed by a processor, implements the steps of the energy consumption allocation and statistics method according to any of claims 1 to 5.
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 true CN116930608A (en) | 2023-10-24 |
CN116930608B 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 (11)
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 |
US20200050984A1 (en) * | 2018-08-07 | 2020-02-13 | Xactly Corporation, | Automatic computer prediction of resource attrition |
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 |
-
2023
- 2023-09-19 CN CN202311205345.6A patent/CN116930608B/en active Active
Patent Citations (11)
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 |
US20200050984A1 (en) * | 2018-08-07 | 2020-02-13 | Xactly Corporation, | Automatic computer prediction of resource attrition |
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)
Title |
---|
WEN-KUANG KUO等: "Study on Energy Conservation for Cellular Systems: A Global Optimization Approach", 《IEEE SYSTEMS JOURNAL 》, vol. 12, no. 1, XP011680005, DOI: 10.1109/JSYST.2015.2500263 * |
聂涛,等: "火电机组在线能耗监测模型的分析研究", 《湖南电力》, vol. 43, no. 2 * |
魏立明,等: "基于平均电量数据的网损分摊方案研究", 《哈尔滨工业大学学报》, vol. 37, no. 10 * |
Also Published As
Publication number | Publication date |
---|---|
CN116930608B (en) | 2023-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chen et al. | An optimal sample allocation strategy for partition-based random search | |
CN113128932B (en) | Warehouse stock processing method and device, storage medium and electronic equipment | |
Karabulut et al. | Long term energy consumption forecasting using genetic programming | |
CN107622102A (en) | Entity card number generation method and terminal device | |
CN115423386A (en) | Method, device, equipment and medium for determining power carbon emission factor | |
CN116930608B (en) | Energy consumption allocation and statistics method, system and medium | |
CN108197347B (en) | method for detecting geographic space distribution uniformity of continuous irregular area sampling points | |
Hurley | Taskgraph mapping using a genetic algorithm: a comparison of fitness functions | |
CN116664368A (en) | Carbon footprint acquisition method, device, computer equipment and storage medium | |
CN116628534A (en) | Method for dividing energy dynamic images for park based on electric power big data | |
CN109190997B (en) | Chinese address hierarchical analysis and standard processing method and system | |
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 | |
CN113780630B (en) | Method for realizing form code prediction based on historical electricity consumption data of electricity consumption customer | |
CN109902851A (en) | A kind of the determination method and device of production plan | |
CN116207864B (en) | Method and system for controlling power equipment in low-voltage area based on Internet of things | |
CN113361960B (en) | Method, medium, device and equipment for quantifying large-scale demand response capacity | |
CN117196696B (en) | Electricity price prediction method based on market supply and demand relation and unit behavior | |
CN116703645A (en) | Filling method, device, equipment and storage medium for terminal acquisition data missing | |
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 | |
CN117056086A (en) | Fault detection method, system, terminal and storage medium based on permutation entropy algorithm | |
CN117744985A (en) | Bypass job data processing method, device, computer equipment and storage medium | |
CN115481022A (en) | Test method and device based on data number making | |
CN118336687A (en) | Bus load system based on cloud edge cooperation |
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 |