Index calculation method of energy system, medium and equipment

By constructing the indicator tree structure of the energy system and defining the dynamic formula, the problem of poor adaptability of the energy management software system in the existing technology in existing technologies has achieved more efficient index calculations and a wider adaptability.

CN119359116APending Publication Date: 2025-01-24CHANGSHA KELIANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411369806.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When developing a comprehensive energy management software system in the prior art, the complete computing logic and data source of the system cannot be known in advance, resulting in the inability to respond to changes in existing project calculation logic and adapt to different projects at the same time when multiple projects are managed.

Method used

By determine the connection relationship between the tree nodes and the nodes according to the index of the energy system and the relationship between the indicators, build an index tree -setting structure, and define the dynamic formula of each node The result of the formula.

Benefits of technology

It has improved the adaptability and implementation efficiency of the project, expanded the scope of the type of indicator parameter calculation, and solved the problem of poor adaptability in different projects, small scope of the indicator parameter calculation type, and low implementation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359116A_ABST
    Figure CN119359116A_ABST
Patent Text Reader

Abstract

The invention relates to an index calculation method for an energy system, a medium and equipment, and the method comprises the steps: determining tree nodes and a connection relation between the nodes according to indexes of the energy system and a relation between the indexes, constructing an index set tree structure, defining a dynamic formula of each node, carrying out the lexical analysis of each dynamic formula, obtaining a plurality of lexical units, and calculating the indexes of the energy system according to the lexical units. Comprising variables and operators, then data extraction is performed on a data source according to a set access logic to obtain values of all the variables, finally, the values of the variables and the operators are substituted into corresponding dynamic formulas according to an index set tree structure, and results of the dynamic formulas are obtained through calculation from bottom to top and are values of corresponding indexes. The problems that in the prior art, adaptability in different projects is poor, the range of index parameter calculation types is small, and implementation efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy system control, and in particular to an energy system index calculation method, medium and equipment. Background Art

[0002] The energy system includes multiple indicators such as energy consumption, energy efficiency, and carbon emissions. However, when developing a comprehensive energy management software system, it is not always possible to know the system's complete calculation logic and data source in advance. As a result, when managing multiple projects, it is impossible to simultaneously respond to changes in the calculation logic of existing projects and adapt to different projects.

[0003] In the existing technology, after the business personnel have prepared a complete calculation plan, the software developers will modify the calculation logic according to the plan, and the business personnel will check the data according to the modified program. After repeated modifications and checks, the demand scenario of a single project can finally be met.

[0004] Therefore, how to improve it is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0005] Based on this, the purpose of this application is to provide an indicator calculation method, medium and device for an energy system to solve at least one technical problem mentioned in the above background technology.

[0006] In a first aspect, the present application provides an index calculation method for an energy system, comprising:

[0007] According to the indicators of the energy system and the relationship between the indicators, determine the connection relationship between the tree nodes and the nodes, build the indicator set tree structure, and define the dynamic formula of each node;

[0008] Perform lexical analysis on each dynamic formula to obtain several lexical units, including variables and operators;

[0009] Extract data from the data source according to the established data acquisition logic to obtain the values ​​of all variables;

[0010] According to the indicator set tree structure, the variable values ​​and operators are substituted into the corresponding dynamic formulas, and the results of each dynamic formula are calculated from bottom to top, which are the values ​​of the corresponding indicators.

[0011] Furthermore, the steps of constructing the indicator set tree structure include:

[0012] Determine the tree nodes corresponding to each indicator;

[0013] First, the root node is determined, and then the tree branches are determined according to the parallel relationship between the tree nodes. The parent and child nodes are determined according to the subordinate relationship and formula relationship between the tree nodes to determine the connection relationship between the tree nodes and each node, and construct the indicator set tree structure.

[0014] Furthermore, the step of constructing the indicator set tree structure also includes:

[0015] For each tree node, determine a unique node identifier;

[0016] Determine the node level, parent node identification and node sorting according to the connection relationship of each node;

[0017] According to the node type, determine the node data type;

[0018] The tree structure table of the indicator set is determined according to the node identifier, node level, parent node identifier, node sorting and node data type.

[0019] Furthermore, after defining the dynamic formula of each node, it also includes:

[0020] For each dynamic formula, determine a unique formula identifier;

[0021] Determine the associated node identifier according to the connection relationship of each node and / or the dependent variable and independent variable of each formula;

[0022] Determine the value type based on the type of the dependent and independent variables of the formula;

[0023] A node dynamic formula table is constructed based on the formula identifier, associated node identifier, formula definition and value type.

[0024] Furthermore, the established data acquisition logic includes: configuring the data acquisition field for each variable, including: data acquisition identifier, data type, data source encoding, data offset, data length and data acquisition method.

[0025] Furthermore, the step of extracting data from the data source includes:

[0026] According to the corresponding data source code in each field, determine the data source corresponding to each variable;

[0027] Determine whether there is an available data extraction method in the field. If so, extract data from the data source corresponding to the variable according to the data extraction method and data type to obtain the value of the variable. If not, then:

[0028] The location information of the variable in the data source is determined according to the data access identifier, and then the value of each variable is extracted according to the data offset and data length.

[0029] Furthermore, the indicator set tree structure table, node dynamic formula table and data acquisition logic definition table:

[0030] Stored as field number, field name, and field type, where:

[0031] Field number, including any one or more of CODE, LEVEL, NAME, PARENT_CODE, WEIGHT, VALUE_TYPE, FORMULA_ID, CODE, FORMULA_BODY, FORMULA_TYPE, FIELD_ID, FIELD_NAME, FIELD_DATA_TYPE, FIELD_SOURCEID, FIELD_LEN, FIELD_OFFSET, FIELD_GETFUNC;

[0032] Field name, including any one or more of node number, node level, node name, parent node number, node order, value type, formula number, associated node number, formula definition, formula type, data acquisition code, data acquisition value type, data acquisition data source code, data acquisition data length, data acquisition offset, and data acquisition method;

[0033] Field type, including any one or more of INT and VARCHAR.

[0034] Furthermore, the step of calculating the results of each dynamic formula includes:

[0035] Construct a syntax tree structure according to the lexical units corresponding to each dynamic formula;

[0036] Traverse the syntax tree and calculate the value of each dynamic formula.

[0037] In a second aspect, the present application further provides a computer storage medium storing an executable program code; the executable program code is used to execute the energy system indicator calculation method described in any one of the first aspects.

[0038] In a third aspect, the present application also provides a terminal device, comprising a memory and a processor; the memory stores a program code that can be executed by the processor; the program code is used to execute the indicator calculation method of the energy system described in any one of the first aspects.

[0039] The present invention provides an index calculation method, medium and device for an energy system. According to the index of the energy system and the relationship between the indexes, the connection relationship between the tree nodes and the nodes is determined, the index set tree structure is constructed, and the dynamic formula of each node is defined. By configuring the index to be calculated in the project as a tree structure, and configuring the corresponding dynamic formula for each index corresponding node, the value of the index required to be calculated in different projects can be obtained by changing the dynamic formula corresponding to each node, thereby improving the adaptability of the project. Then, each dynamic formula is subjected to lexical analysis to obtain a plurality of lexical units, including variables and operators, and data is extracted from the data source according to the established data acquisition logic to obtain the values ​​of all variables. Through the established data acquisition logic, it is adapted to various types of input data, and the range of the index parameter calculation type is expanded. Finally, according to the index set tree structure, the value of the variable and the operator are substituted into the corresponding dynamic formula, and the result of each dynamic formula is calculated from bottom to top, which is the value of the corresponding index. Through the mutual reference between the nodes in the index set tree structure, complex formulas can be superimposed based on simple formulas, thereby improving the implementation efficiency of the project. The present invention solves the problems of poor adaptability of the prior art in different projects, small range of index parameter calculation types and low implementation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A flow chart of an index calculation method for an energy system according to an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of an indicator set tree structure of an energy system according to an embodiment of the present invention;

[0042] Figure 3 It is a schematic diagram of a syntax tree corresponding to a dynamic formula of an indicator corresponding to an active power node of a transformer according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] It should be noted that if the embodiments of the present invention involve directional indications, such as up, down, left, right, front, back, etc., then the directional indication is only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly. In addition, if the embodiments of the present invention involve descriptions of "first, second", "S1, S2", "step one, step two", etc., then such descriptions are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features or indicating the execution order of the method, etc. Those skilled in the art can understand that anything that does not violate the gist of the invention under the technical concept of the invention should be included in the protection scope of the present invention.

[0045] like Figure 1 As shown, the present invention provides an index calculation method for an energy system:

[0046] S1: According to the indicators of the energy system and the relationship between the indicators, determine the connection relationship between the tree nodes and the nodes, build the indicator set tree structure, and define the dynamic formula of each node;

[0047] Specifically, it is optional but not limited to indicators calculated by technical personnel in this field as needed, and the connection relationship between the tree nodes corresponding to each indicator is determined according to the classification and / or general hierarchical structure between each indicator and / or the independent variables and dependent variables of the corresponding dynamic formula, so as to construct an indicator set tree structure and define the specific dynamic formulas of the indicators involved in each node.

[0048] Preferably, the specific steps of constructing the indicator set tree structure may include but are not limited to:

[0049] S11: Determine the tree node corresponding to each indicator;

[0050] S12: First determine the root node, then determine the tree branches according to the parallel relationship between the tree nodes, determine the parent-child nodes according to the subordinate relationship and formula relationship between the tree nodes, so as to determine the connection relationship between the tree nodes and each node, and construct the indicator set tree structure.

[0051] Specifically, the number of tree nodes can be arbitrarily set according to the indicators, equipment, etc. involved in the specific comprehensive energy, and the connection relationship between each node is determined by its own parallel relationship, subordinate relationship, and formula relationship, and then stored in an indicator set tree structure table to construct the indicator set tree structure.

[0052] Taking the energy system as an example, since comprehensive energy efficiency is the core indicator in the energy system, Figure 2As shown, the comprehensive energy efficiency index can be selected as the root node; for the comprehensive energy efficiency index, it mainly includes two types of data, energy use index and energy consumption index, which are in parallel relationship and are two branches. Therefore, the child nodes of the comprehensive energy efficiency node in the index set tree structure can optionally include energy use index nodes and energy consumption index nodes, which are first-level child nodes. For the energy use index node, since the common equipment types in the energy system include gas supply equipment, power supply equipment, heating equipment, cooling equipment, etc., which are in parallel relationship and subordinate to the energy use index node, the child nodes of the energy use index node in the index set tree structure, that is, the second-level child nodes, can be selected but not limited to include the total gas supply node, the total power supply node, the total heating node, the total cooling node, etc., as the third-level node. Since the energy system includes two energy flow directions, namely, energy saving and total energy consumption, the child nodes of the energy consumption index node in the index set tree structure, namely, the second-level child nodes, can be selected but not limited to include energy saving nodes and total energy consumption nodes, etc., as the third-level nodes. Arrange each node in a tree structure to obtain a tree structure, which is represented by the index set tree structure table. Of course, this example is only an example of the adaptability of an energy system that includes some equipment types and is not limited to this. The specific structure of the indicator set tree structure should change according to the indicators that technical personnel in this field need to obtain and the number of equipment types included in the energy system.

[0053] Preferably, the step of constructing the indicator set tree structure may optionally include:

[0054] S121: Determine a unique node identifier for each tree node;

[0055] S122: Determine the node level, parent node identifier and node order according to the connection relationship of each node;

[0056] S123: Determine the node data type according to the node type;

[0057] S124: Determine the index set tree structure table according to the node identifier, node level, parent node identifier, node order, and node data type.

[0058] Specifically, it is optional but not limited to determining the node identifier, node level, parent node identifier, node sorting and node data type corresponding to each node according to the specific situation of each node, so as to determine the indicator set tree structure table, as shown in Table 1. Among them, the node identifier is optional but not limited to including the node number, node name, etc. The node number is stored in the INT field type; the node level is stored in the INT field type; the node name is stored in the VARCHAR word type; the parent node number is stored in the INT field type; the node sorting is stored in the INT field type; the node data type is stored in the INT field type, and the node data type optionally includes the value type.

[0059] Table 1: Index set tree structure table

[0060]

[0061] Preferably, after defining the dynamic formula of each node, the following may be optionally included but not limited to:

[0062] S13: Determine a unique formula identifier for each dynamic formula; specifically, each tree node may contain no formula, or may contain one or more formulas, so a unique formula identifier should be determined for each dynamic formula; the formula identifier may optionally include a formula number and a formula definition, and may be represented by a number such as a sequential number, or a name or a symbol. When represented by a number, a hierarchical relationship may be optionally involved. For example, the formula belonging to node 1 may be optionally identified as 1-1 or 1-2.

[0063] S14: Determine the associated node identifier according to the connection relationship of each node and / or the dependent variable and independent variable of each formula;

[0064] S15: Determine the value type according to the types of the dependent variable and the independent variable of the formula;

[0065] S16: Construct a node dynamic formula table according to the formula identifier, the associated node identifier, the formula definition and the value type.

[0066] Specifically, it is optional but not limited to constructing a node dynamic formula table according to the formula identifier, associated node identifier, formula definition and value type, as shown in Table 2. Among them, the formula identifier is optional but not limited to including the formula number and formula definition, the formula number is stored in the INT field type; the formula definition is stored in the VARCHAR word type; the associated node identifier is optional but not limited to including the associated node number, the associated node number is stored in the INT field type; the formula type is stored in the INT field type.

[0067] Table 2: Node dynamic formula table

[0068]

[0069] Preferably, since some indicators are only classification names, such as Figure 2 The energy consumption index node shown in the figure has sub-nodes including the total gas supply node, the total power supply node, the total heating node, and the total cooling node. However, the energy consumption index is only the classification name of each sub-node, not a comprehensive index item. Therefore, in the energy consumption index node, the values ​​of each sub-node are distributed in parallel; other indicators have corresponding dynamic formulas, such as Figure 2 The energy saving node shown, the indicator dynamic formula corresponding to the indicator node can be optionally expressed as formula 1-1:

[0070] Es=Pgl-Pt 1-1

[0071] Among them, Es is the energy saving, Pgl is the total active power of general load, and Pt is the active power of transformer.

[0072] The total active power of general load and transformer active power are indicators calculated by the dynamic formulas 1-2 and 1-3 corresponding to the lower-level indicator nodes:

[0073] Pgl=Pall*0.3 / 720 / 1000 1-2

[0074] Pt=S×PF 1-3

[0075] Among them, Pall is the total active power of all power equipment, Pt is the active power of the transformer, S is the rated capacity of the transformer, and PF is the rated capacity of the transformer.

[0076] S2: Perform lexical analysis on each dynamic formula to obtain several lexical units, including variables and operators;

[0077] Specifically, it is optional but not limited to performing lexical analysis on each dynamic formula, splitting each dynamic formula into several lexical units such as variables, operators, and number-taking flags; variables may be selected as independent variables, dependent variables, etc. involved in the formula; operators may be selected as addition, subtraction, multiplication, division, brackets, etc.; number-taking flags may be selected to correspond to subsequent number-taking logic.

[0078] For example, Figure 2 Take the dynamic formula of the indicator corresponding to the transformer active power node as an example:

[0079] Pt=S×PF 1-3

[0080] Among them, Pt is the active power of the transformer, S is the rated capacity of the transformer, and PF is the rated capacity of the transformer. After lexical analysis, we can get the lexical units including: "active power of transformer", "rated capacity of transformer", "×", "rated capacity of transformer".

[0081] S3: Extract data from the data source according to the established data acquisition logic to obtain the values ​​of all variables;

[0082] Specifically, the established data acquisition logic may include:

[0083] S31: For each variable, configure the data acquisition field, including: data acquisition identifier, data type, data source code, data offset, data length and data acquisition method;

[0084] More specifically, the specific steps for extracting data from a data source according to a predetermined data acquisition logic may include:

[0085] S32: Determine the data source corresponding to each variable according to the corresponding data source code in each field;

[0086] S33: Determine whether there is an available data extraction method in the field. If so, extract data from the data source corresponding to the variable according to the data extraction method and data type to obtain the value of the variable. If not, execute step S34;

[0087] S34: Determine the location information of the variable in the data source according to the data fetching identifier, and then extract the value of each variable according to the data offset and the data length.

[0088] Specifically, it is optional but not limited to determine the data acquisition logic corresponding to each variable according to the data acquisition identifier, data type, data source code, data length and data acquisition method of each variable, and then obtain the data source corresponding to the field according to the corresponding data source code in each field, and then match the field from the corresponding data source according to the field name, field type, data offset, field length and other information of each field, and obtain the matching value, so as to complete the data acquisition of the field; data acquisition identifier, including data acquisition code and data acquisition name; it is worth noting that the data source includes real-time monitoring data and historical monitoring data of various equipment in the energy system, which can be optionally expressed in the form of real-time network data stream, structured database table and data file.

[0089] For example, the data acquisition logic of each variable can be optionally represented as a data acquisition logic definition table:

[0090] Table 3: Data acquisition logic definition table

[0091]

[0092] Preferably, the indicator set tree structure table, node dynamic formula table and data acquisition logic definition table can be optionally stored in field number, field name and field type. For example, the field number includes any one or more of CODE, LEVEL, NAME, PARENT_CODE, WEIGHT, VALUE_TYPE, FORMULA_ID, CODE, FORMULA_BODY, FORMULA_TYPE, FIELD_ID, FIELD_NAME, FIELD_DATA_TYPE, FIELD_SOURCEID, FIELD_LEN, FIELD_OFFSET, and FIELD_GETFUNC; the field name includes any one or more of node number, node level, node name, parent node number, node sorting, value type, formula number, associated node number, formula definition, formula type, data acquisition code, data acquisition value type, data acquisition data source code, data acquisition data length, data acquisition offset, and data acquisition method; the field type includes any one or more of INT and VARCHAR.

[0093] Preferably, the indicator set tree structure table, the node dynamic formula table and the data acquisition logic definition table may also include storage with additional instructions.

[0094] For example, you can choose to get the data source corresponding to each field according to the corresponding data source code, and then match it according to the field name of the field in the corresponding data source. After the match is successful, the data source is trimmed, the correct parameters of the field are intercepted according to the data offset and field length, and the data is converted to the set format according to the field type corresponding to the field, so as to be substituted into the corresponding dynamic formula.

[0095] S4: According to the indicator set tree structure, the variable values ​​and operators are substituted into the corresponding dynamic formulas, and the results of each dynamic formula are calculated from bottom to top, which are the values ​​of the corresponding indicators.

[0096] Specifically, it is optional but not limited to substitute the values ​​of the variables and operators obtained in step S3 into the corresponding positions of each dynamic formula to calculate the value of the dynamic formula, which is the indicator corresponding to the indicator node.

[0097] For example, Figure 2 Take the dynamic formula of the indicator corresponding to the transformer active power node as an example:

[0098] Pt=S×PF 1-3

[0099] Among them, Pt is the active power of the transformer, S is the rated capacity of the transformer, and PF is the rated capacity of the transformer.

[0100] A lexical analysis is performed on it, and the lexical units obtained include: "transformer active power", "transformer rated capacity", "×", "transformer rated capacity". The value of the variable is obtained from the data source according to the variable acquisition logic, and the variable value and operator are substituted into the indicator dynamic formula to calculate the corresponding energy system indicator.

[0101] Preferably, the step of calculating the results of each dynamic formula may optionally include:

[0102] S41: constructing a syntax tree structure according to the lexical units corresponding to each dynamic formula;

[0103] S42: Traverse the syntax tree and calculate the value of each dynamic formula.

[0104] For example, Figure 2 Taking the dynamic indicator formula corresponding to the transformer active power node shown in the figure as an example, the constructed syntax tree structure is as follows Figure 3 shown.

[0105] Preferably, after the values ​​of the indicators are calculated, the values ​​of the indicators and the subordinate relationships between the indicators can be displayed in a visual manner.

[0106] Traversing the syntax tree and calculating the value of the dynamic formula, some key codes are as follows:

[0107]

[0108]

[0109] S5: Based on the subordinate relationship between nodes, the value of each indicator is displayed in an indicator set tree structure.

[0110] Specifically, after obtaining the value of the indicator corresponding to each node according to steps S1-S4, the value of the indicator corresponding to each node can be displayed in an indicator set tree structure according to the parallel relationship, subordinate relationship and formula relationship between the nodes in step S1.

[0111] In this embodiment, an index calculation method for an energy system of the present invention is provided. By determining the connection relationship between the tree node and each node according to the index of the energy system and the relationship between each index, the index set tree structure is constructed, and the dynamic formula of each node is defined. By configuring the index to be calculated in the project as a tree structure, and configuring the corresponding dynamic formula for each index corresponding node, the value of the index required to be calculated in different projects can be obtained by changing the dynamic formula corresponding to each node, thereby improving the adaptability of the project. Then, each dynamic formula is lexically analyzed to obtain a number of lexical units, including variables and operators, and data is extracted from the data source according to the established data acquisition logic to obtain the values ​​of all variables. Through the established data acquisition logic, it is adapted to various types of input data, and the range of the index parameter calculation type is expanded. Finally, according to the index set tree structure, the value of the variable and the operator are substituted into the corresponding dynamic formula, and the result of each dynamic formula is calculated from bottom to top, which is the value of the corresponding index. Through the mutual reference between the nodes in the index set tree structure, complex formulas can be superimposed based on simple formulas, thereby improving the implementation efficiency of the project. The problem of poor adaptability of the prior art in different projects, small range of index parameter calculation types and low implementation efficiency is solved.

[0112] On the other hand, the present invention further provides a computer storage medium storing executable program code; the executable program code is used to execute any of the above-mentioned energy system indicator calculation methods.

[0113] On the other hand, the present invention also provides a terminal device, including a memory and a processor; the memory stores program codes that can be executed by the processor; the program codes are used to execute any of the above-mentioned energy system indicator calculation methods.

[0114] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the terminal device.

[0115] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the terminal device may also include an input / output device, a network access device, a bus, etc.

[0116] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0117] The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used to store the program code and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.

[0118] The above-mentioned computer storage medium and terminal equipment are created based on the indicator calculation method of the above-mentioned energy system. Their technical functions and beneficial effects are not repeated here. The various technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for calculating an index of an energy system, characterized in that: include: According to the indicators of the energy system and the relationship between the indicators, determine the connection relationship between the tree nodes and the nodes, build the indicator set tree structure, and define the dynamic formula of each node; Perform lexical analysis on each dynamic formula to obtain several lexical units, including variables and operators; Extract data from the data source according to the established data acquisition logic to obtain the values ​​of all variables; According to the indicator set tree structure, the variable values ​​and operators are substituted into the corresponding dynamic formulas, and the results of each dynamic formula are calculated from bottom to top, which are the values ​​of the corresponding indicators.

2. The method according to claim 1, characterized in that: The steps to construct the indicator set tree structure include: Determine the tree nodes corresponding to each indicator; First, the root node is determined, and then the tree branches are determined according to the parallel relationship between the tree nodes. The parent and child nodes are determined according to the subordinate relationship and formula relationship between the tree nodes to determine the connection relationship between the tree nodes and each node, and construct the indicator set tree structure.

3. The method according to claim 2, characterized in that The steps of constructing the indicator set tree structure also include: For each tree node, determine a unique node identifier; Determine the node level, parent node identification and node sorting according to the connection relationship of each node; According to the node type, determine the node data type; The tree structure table of the indicator set is determined according to the node identifier, node level, parent node identifier, node sorting and node data type.

4. The method according to claim 1, characterized in that: After defining the dynamic formulas for each node, it also includes: For each dynamic formula, determine a unique formula identifier; Determine the associated node identifier according to the connection relationship of each node and / or the dependent variable and independent variable of each formula; Determine the value type based on the type of the dependent and independent variables of the formula; A node dynamic formula table is constructed based on the formula identifier, associated node identifier, formula definition and value type.

5. The method according to claim 1, characterized in that The established data acquisition logic includes: configuring the data acquisition field for each variable, including: data acquisition identifier, data type, data source encoding, data offset, data length and data acquisition method.

6. The method according to claim 1, characterized in that The steps to extract data from the data source include: According to the corresponding data source code in each field, determine the data source corresponding to each variable; Determine whether there is an available data extraction method in the field. If so, extract data from the data source corresponding to the variable according to the data extraction method and data type to obtain the value of the variable. If not, then: The location information of the variable in the data source is determined according to the data access identifier, and then the value of each variable is extracted according to the data offset and data length.

7. The method according to any one of claims 1 to 6, characterized in that: Index set tree structure table, node dynamic formula table and data acquisition logic definition table: Stored as field number, field name, and field type, where: Field number, including any one or more of CODE, LEVEL, NAME, PARENT_CODE, WEIGHT, VALUE_TYPE, FORMULA_ID, CODE, FORMULA_BODY, FORMULA_TYPE, FIELD_ID, FIELD_NAME, FIELD_DATA_TYPE, FIELD_SOURCEID, FIELD_LEN, FIELD_OFFSET, FIELD_GETFUNC; Field name, including any one or more of node number, node level, node name, parent node number, node order, value type, formula number, associated node number, formula definition, formula type, data acquisition code, data acquisition value type, data acquisition data source code, data acquisition data length, data acquisition offset, and data acquisition method; Field type, including any one or more of INT and VARCHAR.

8. The method according to claim 1, characterized in that The steps of calculating the results of each dynamic formula include: Construct a syntax tree structure according to the lexical units corresponding to each dynamic formula; Traverse the syntax tree and calculate the value of each dynamic formula.

9. A computer storage medium, characterized in that An executable program code is stored; the executable program code is used to execute the indicator calculation method of the energy system described in any one of claims 1-8.

10. A terminal device, characterized in that: It comprises a memory and a processor; the memory stores program codes executable by the processor; the program codes are used to execute the index calculation method of the energy system described in any one of claims 1-8.