Method for realizing cloud time-phased electric energy metering
Through cloud technology, the power consumption and electricity bills are accumulated according to the time period type, and the existing electricity meter cannot achieve dynamic power consumption strategies and refined management, and efficient and flexible time-divided power metering is achieved, which improves the economy and reliability of the power system.
Patent Information
- Application Number
- CN202411935595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-30
AI Technical Summary
Existing electricity meters cannot achieve dynamic adjustment of power consumption strategies, refined management of power consumption, convenient data transmission and intelligent analysis and decision-making support, resulting in insufficient economics, reliability and sustainability of the power system.
The cloud-based MQTT server receives real-time data of on-site electricity meter, calculates the change in the meter degree, and accumulates electricity consumption and electricity bills according to different time period types (sharp period, peak period, regular period, valley period, deep valley period), to realize the aggregation and storage of data, so as to conduct multi-time dimension query.
The time-divided power metering of time-sharing electricity without time-sharing billing meter is realized, which reduces production costs, improves management efficiency, provides real-time data transmission and reasonable power consumption suggestions, and improves the economic benefits and operating efficiency of the smart grid.
Smart Images

Figure CN120069978A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for realizing time - segmented electric energy metering in the cloud, belonging to the field of power equipment. Background Art
[0002] With the in - depth development of the marketization of the power industry, the exchange of electricity quantities at the grid connection of power generation, cross - regional power transmission, cross - provincial power transmission, and provincial power supply is increasing day by day, and power enterprises begin to pay more attention to the maintenance of their own economic interests.
[0003] The accuracy of the metering result of the electric meter is crucial for the economic and efficient operation of the smart grid. At the same time, as the basis for the calculation of electricity charges among power generation enterprises, power transmission and distribution enterprises, and power users, the accuracy of smart meters is directly related to the economic interests of the three parties. The data of the electricity metering result is related to the reliability of the operation of the electric meter. Currently, most of them complete data statistics and electricity charge calculations through electric meters. Therefore, how to improve the convenience of data transmission and use cloud technology to measure and control the data of smart meters is the main problem to be solved at present.
[0004] The disadvantages existing in current electric energy metering are as follows: 1) It is impossible to dynamically adjust the electricity - using strategy: Traditional electric meters usually collect data and calculate electricity charges based on preset fixed billing methods, and cannot make flexible adjustments according to real - time electricity - using data and load conditions. 2) It is impossible to manage the consumption of electric energy in a refined manner: The metering results of traditional electric meters are mainly statistically analyzed in relatively long periods such as monthly and quarterly, without refined data records by hour or time period, lacking cloud - based data analysis, and unable to provide multi - dimensional electricity - using trends and cost predictions in real time. This makes it impossible for power users to timely understand the energy - efficiency differences in different electricity - using periods and optimize the electricity - using time according to the load demand. 3) Inconvenient data transmission: Most traditional electric meters transmit data to local devices or remote monitoring platforms through physical data interfaces (such as RS485). This method has the risks of poor real - time performance, unstable transmission, and data loss, and it is difficult to ensure the stability and accuracy of the system. In addition, the data transmission methods of these electric meters usually lack intelligent processing and cannot realize the centralized management and remote monitoring of electric meter data. Especially for distributed and cross - regional electricity - using scenarios, traditional electric meters cannot provide a unified and real - time electricity quantity data stream, and the convenience of data transmission and analysis is poor. 4) Lack of intelligent analysis and decision - making support: Existing electric meters usually only have simple metering and data - recording functions and cannot perform in - depth data analysis. Power enterprises and users cannot obtain insights into electricity - using behaviors in real time through these electric meters and cannot make effective energy - management decisions based on the data.
[0005] Therefore, how to improve the data transmission efficiency of electric meters through cloud technology and use cloud big data analysis to accurately measure and control smart meters in real time is a key issue that needs to be solved urgently. By integrating smart grid and time-divided electricity metering technology in the cloud, dynamic management of user electricity consumption can be achieved, further improving the economy, reliability and sustainability of the power system. Summary of the invention
[0006] In order to overcome the defects of the prior art, the present invention provides a method for realizing time-divided electric energy metering in the cloud. The technical solution of the present invention is:
[0007] A method for realizing time-divided electric energy metering in the cloud, characterized in that it comprises the following steps:
[0008] S1, the cloud MQTT server receives the real-time data of the on-site electric meter, and the cloud MQTT server extracts the electric meter reading E based on the real-time received data stream;
[0009] S2, calculate the meter reading change ΔE, then determine whether the current time period is a peak time period, a normal time period, a valley time period or a deep valley time period, and accumulate the power consumption and electricity charges in combination with the corresponding time periods;
[0010] S3, aggregate and store the data so as to perform multi-time dimension query on the client; the step S1 is specifically as follows:
[0011] 1-1 The on-site electric meter transmits real-time electric energy data to the MQTT server in the cloud through wireless communication; the electric meter uploads the electric energy data in real time, and the MQTT server receives the data once per second; 1-2 Based on the received data stream, the MQTT server parses the data packet in real time and extracts the electric meter reading E, which is the accumulated electric energy consumption value;
[0012] The detailed steps of step S2 are as follows:
[0013] 2-1. When calculating the change in the meter reading, compare the reading E at the previous time point with the reading E at the current time point to obtain the change in reading ΔE. The formula is as follows:
[0014] ΔE=E current -E previous
[0015] Among them, E current is the current meter reading, E previous The electric meter reading at the last time data was collected.
[0016] For the set time period rules of 2-2, namely the peak time period, the peak period, the normal period, the valley period, and the deep valley period, based on the electricity demand of the equipment or environment, determine the current time period; map the current change in electricity consumption ΔE to the corresponding time period, and apply different electricity prices according to different time period types; 2-3 Each time period corresponds to a different electricity price. Calculate the electricity bill for that time period based on the calculated change in electricity consumption ΔE. The cumulative calculation formula for each time period is:
[0017] 1) When in the peak time period, accumulate the power consumption in the peak time period:
[0018] When the system enters the peak time period, we need to accumulate the newly added power consumption ΔE on the basis of the original power consumption in the peak time period, that is: Et = Et′ + ΔE
[0019] Among them, Et′ is the accumulated power consumption in the peak time period in the previous time period, and ΔE is the newly measured power consumption;
[0020] Accumulate the electricity bill for the peak time period:
[0021] The calculation of the electricity bill is based on the electricity price UPt in the current peak time period, and add the previously calculated electricity bill Ct′ to the newly consumed electricity bill: Ct = Ct′ + ΔE × UPt
[0022] Among them, Ct is the cumulative electricity bill for the current peak time period, Ct′ is the cumulative electricity bill for the peak time period measured in the previous time period, and UPt is the electricity price in the current peak time period;
[0023] 2) When in the peak period, accumulate the power consumption in the peak period:
[0024] When entering the peak period, accumulate the newly added power consumption ΔE on the basis of the original power consumption in the peak period. The formula is as follows: Ep = Ep′ + ΔE;
[0025] Among them: Ep′ is the accumulated power consumption in the peak period in the previous time period, and ΔE is the newly measured power consumption;
[0026] Accumulate the electricity bill for the peak period:
[0027] The calculation of the electricity bill is based on the electricity price UPp in the current peak period, and add the previously calculated electricity bill Cp′ to the newly consumed electricity bill, and accumulate it into the total electricity bill Cp:
[0028] Cp = Cp′ + ΔE × UPp
[0029] Among them: Cp is the cumulative electricity bill for the current peak period, Cp′ is the cumulative electricity bill for the peak period measured in the previous time period, and UPp is the electricity price in the current peak period;
[0030] 3) When in the normal period, accumulate the power consumption in the normal period:
[0031] When entering the normal period, the newly added power consumption ΔE is accumulated on the basis of the power consumption in the original normal period. The formula is as follows:
[0032] En = En′ + ΔE
[0033] Where: En′ is the power consumption in the normal period that has been accumulated in the previous time period, and ΔE is the newly measured power consumption;
[0034] Accumulate the electricity bill for the normal period: The calculation of the electricity bill is based on the electricity price UPn in the current normal period, and the previously calculated electricity bill Cn′ is added to the newly consumed electricity bill and accumulated into the total electricity bill Cn:
[0035] Cn = Cn′ + ΔE × UPn
[0036] Where: Cn is the cumulative electricity bill in the current normal period, Cn′ is the cumulative electricity bill in the normal period measured in the previous time period, and UPn is the electricity price in the current normal period;
[0037] 4) When entering the valley period, accumulate the power consumption in the valley period:
[0038] When entering the valley period, the newly added power consumption ΔE is accumulated on the basis of the power consumption in the original valley period. The formula is as follows: Ev = Ev′ + ΔE
[0039] Where: Ev′ is the power consumption in the valley period that has been accumulated in the previous time period, and ΔE is the newly measured power consumption;
[0040] Accumulate the electricity bill for the valley period:
[0041] The calculation of the electricity bill is based on the electricity price UPv in the current valley period, and the previously calculated electricity bill Cv′ is added to the newly consumed electricity bill and accumulated into the total electricity bill Cv:
[0042] Cv = Cv′ + ΔE × UPv
[0043] Where: Cv is the cumulative electricity bill in the current valley period, Cv′ is the cumulative electricity bill in the valley period measured in the previous time period, and UPv is the electricity price in the current valley period;
[0044] 5) When entering the deep valley period, accumulate the power consumption in the deep valley period:
[0045] When entering the deep valley period, the newly added power consumption ΔE is accumulated on the basis of the power consumption in the original deep valley period. The formula is as follows: Ed = Ed′ + ΔE
[0046] Where: Ed′ is the power consumption in the deep valley period that has been accumulated in the previous time period, and ΔE is the newly measured power consumption;
[0047] Accumulate the electricity bill for the deep valley period:
[0048] The calculation of the electricity fee is based on the electricity price UPd during the current deep valley period, and the previously calculated electricity fee Cd′ is added to the electricity fee consumed newly, and then accumulated into the total electricity fee Cd:
[0049] Cd = Cd′ + ΔE × UPd
[0050] Where: Cd is the accumulated electricity fee during the current deep valley period, Cd′ is the accumulated electricity fee during the deep valley period measured in the previous period, and UPv is the electricity price during the current deep valley period;
[0051] The specific content of step 3 is as follows:
[0052] 3-1 The electricity meter regularly uploads the electricity energy data to the cloud MQTT server, and these data are aggregated according to different time dimensions for subsequent query, analysis, and report generation; the core goal of data aggregation is to summarize the original data by time period, calculate the total electricity energy consumption and electricity fee for each time period, so as to meet the user's query requirements for historical data;
[0053] 3-2 Aggregation strategy design: The aggregation strategy needs to be configured according to different requirements and scenarios.
[0054] In step S2, it also includes regularly reading the announcements of the grid company's rates, and updating the rates to the database of the cloud MQTT server in real time to obtain the division rules and rates for the peak period and the valley period.
[0055] To implement a cloud-based time-of-use electricity metering system, including:
[0056] A cloud data collection module, which is used to receive the real-time data of the on-site electricity meter through the cloud MQTT server, and this cloud MQTT server extracts the electricity meter reading E based on the real-time received data stream;
[0057] A cloud computing module, which is used to calculate the change amount ΔE of the electricity meter reading, and then judge whether the current period is the peak period, the valley period, the normal period, the valley period or the deep valley period, and accumulate the electricity consumption and electricity fee in combination with the corresponding period;
[0058] A data aggregation and storage module, which is used to aggregate and store the data for multi-time dimension query on the client side.
[0059] An electronic device, including: one or more processors; a storage device, on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method.
[0060] A computer-readable medium, on which a computer program is stored, wherein when the program is executed by a processor, the method is implemented.
[0061] The advantages of the present invention are as follows: The acquisition and calculation of electricity meter data are completed in real time in the cloud, enabling electricity meters without time-of-use billing functions to also complete time-of-use electricity metering in the cloud, reducing production costs, eliminating the need to arrange meter readers to conduct meter reading work regularly, receiving electricity meter data based on the cloud server, and providing reasonable suggestions for electricity consumption through electricity usage data, greatly improving the economic benefits and efficient operation of the smart grid.
[0062] The present invention performs real-time acquisition and calculation of electricity meter data through cloud technology, solves the limitation that traditional electricity meters cannot provide time-of-use electricity metering, and significantly improves the flexibility and accuracy of electricity metering. Its main advantages and implementation effects are as follows:
[0063] 1) Realize time-of-use electricity metering for electricity meters without time-of-use billing: The present invention performs real-time processing and analysis of electricity meter data through cloud technology to realize the time-of-use electricity metering function. This enables even electricity meters that originally do not have time-of-use billing functions to provide detailed electricity usage statistics and electricity bill calculations for multiple time periods such as peak time periods, peak hours, normal time periods, and valley time periods in the cloud, greatly expanding the functions of the original electricity meter.
[0064] 2) Reduce production costs and improve management efficiency: Through real-time data acquisition and calculation in the cloud, the cumbersome process of arranging manual meter readers for regular inspections in the traditional method is avoided. The electricity meter data is automatically uploaded to the cloud server remotely, reducing the costs brought by manual operations and manual meter reading. At the same time, since the data can be updated in real time and remotely monitored, users and power enterprises can view the electricity usage situation through the cloud platform at any time, avoiding information delays caused by manual meter reading and data lag.
[0065] 3) Real-time data transmission and reasonable suggestions for electricity consumption: The cloud server can receive and analyze data from multiple electricity meters in real time, and predict and optimize the electricity usage situation through intelligent algorithms. The cloud system can analyze the electricity usage characteristics of users in each time period based on real-time electricity consumption data, and provide energy-saving suggestions or adjust the electricity usage plan for users according to the changes in electricity prices and the grid load situation. This personalized suggestion can help users reasonably plan their electricity usage behavior, avoid excessive electricity consumption during peak time periods, and achieve the effect of energy conservation and cost reduction.
[0066] 4) Improve the economic benefits and efficient operation of the smart grid: The present invention, through the time-of-use electricity metering and intelligent data analysis functions integrated in the cloud, not only improves the refined management ability of electricity usage, but also promotes the efficient operation of the power grid. Through accurate electricity usage data analysis, power enterprises can monitor the grid load in real time, conduct load forecasting and scheduling, and avoid efficiency losses and equipment failures caused by overloading or load fluctuations in the power system. In addition, based on remote monitoring and optimization strategies in the cloud, the pressure on the power grid can be effectively reduced, the utilization efficiency of power resources can be improved, two-way optimization of power supply and consumption can be achieved, and the economic benefits of the smart grid can be enhanced.
[0067] 5) Improve user participation and electricity consumption transparency: Cloud-based time-of-use electricity metering can also provide users with more electricity consumption transparency. Users can view the electricity consumption and corresponding electricity bills for each time period in real time through the cloud platform. In this way, users can intuitively understand the electricity consumption costs and energy-saving potential for each time period, thereby adjusting their electricity consumption habits, reducing unnecessary peak electricity consumption, and further reducing electricity costs.
[0068] In summary, the present invention realizes efficient, flexible, and real-time time-of-use electricity metering through cloud technology. It can not only significantly reduce production costs and simplify electricity meter management, but also provide electricity consumption optimization suggestions through intelligent data analysis, thereby enhancing the economic benefits and operating efficiency of the smart grid and promoting the development of the power system towards a more intelligent, refined, and energy-saving direction. Description of the Drawings
[0069] Figure 1 is a schematic flow diagram of the present invention.
[0070] Figure 2 is a schematic system structure diagram of the present invention.
[0071] Figure 3 is a schematic electronic device structure diagram of the present invention. Detailed Embodiments
[0072] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description progresses. However, these embodiments are merely exemplary and do not constitute any limitation to the scope of the present invention. Those skilled in the art should understand that the details and forms of the technical solutions of the present invention can be modified or replaced without departing from the spirit and scope of the present invention, but such modifications and replacements all fall within the protection scope of the present invention.
[0073] See Figures 1 to 3 , the present invention relates to a method for realizing cloud-based time-of-use electricity metering
[0074] A method for realizing cloud-based time-of-use electricity metering, characterized by comprising the following steps:
[0075] S1. The cloud MQTT server receives real-time data from on-site electricity meters, and the cloud MQTT server extracts the electricity meter reading E based on the real-time received data stream;
[0076] S2. Calculate the change in electricity meter readings ΔE, then determine whether the current time period is a peak period, a peak period, a normal period, a valley period, or a deep valley period, and accumulate the electricity consumption and electricity bills in combination with the corresponding time periods;
[0077] S3. Aggregate and store the data for multi-time dimension query on the client side.
[0078] The specific steps of step S1 are as follows:
[0079] 1-1 The on-site electricity meter transmits real-time power data to the MQTT server in the cloud through wireless communication; the electricity meter uploads power data in real time, and the MQTT server receives data once per second; 1-2 Based on the received data stream, the MQTT server parses the data packet in real time and extracts the electricity meter reading E. The electricity meter reading E is the cumulative power consumption value;
[0080] The detailed steps of step S2 are as follows:
[0081] 2-1 When calculating the change in the electricity meter reading, compare the reading E at the previous time point with the reading E at the current time point to obtain the change in reading ΔE. The formula is as follows:
[0082] ΔE = E - E current -E previous
[0083] where E current is the electricity meter reading at the current moment, and E previous is the electricity meter reading at the previous collection time.
[0084] 2-2 Set time period rules for peak time, peak period, normal period, valley period, and deep valley period. Based on the electricity consumption demand of the equipment or environment, determine the current time period; map the current change in reading ΔE to the corresponding time period and apply different electricity prices according to different time period types;
[0085] 2-3 Each time period corresponds to a different electricity price. Calculate the electricity bill for this time period based on the calculated change in reading ΔE. The cumulative calculation formula for each time period is as follows:
[0086] 1) Accumulate the power consumption during the peak time period:
[0087] When the system enters the peak time period, we need to accumulate the newly added power consumption ΔE on the basis of the previous power consumption during the peak time period, that is: Et = Et'+ΔE
[0088] where Et' is the accumulated power consumption during the peak time period in the previous time period, and ΔE is the newly measured power consumption;
[0089] Accumulate the electricity bill for the peak time period:
[0090] The calculation of the electricity bill is based on the electricity price UPt for the current peak time period, and add the previously calculated electricity bill Ct' to the newly consumed electricity bill: Ct = Ct'+ΔE×UPt
[0091] where Ct is the cumulative electricity bill for the current peak time period, Ct' is the cumulative electricity bill for the peak time period measured in the previous time period, and UPt is the electricity price for the current peak time period;
[0092] 2) During the peak period
[0093] Accumulate the power consumption during the peak period:
[0094] When entering the peak period, on the basis of the power consumption during the original peak period, add the newly increased power consumption ΔE. The formula is as follows: Ep = Ep′ + ΔE;
[0095] Where: Ep′ is the accumulated power consumption during the peak period in the previous time period, and ΔE is the newly measured power consumption;
[0096] Accumulate the electricity fee during the peak period:
[0097] The calculation of the electricity fee is based on the electricity price UPp during the current peak period, and add the previously calculated electricity fee Cp′ to the newly consumed electricity fee, and accumulate it into the total electricity fee Cp:
[0098] Cp = Cp′ + ΔE × UPp
[0099] Where: Cp is the accumulated electricity fee during the current peak period, Cp′ is the accumulated electricity fee during the peak period measured in the previous time period, and UPp is the electricity price during the current peak period;
[0100] 3) During the normal period, accumulate the power consumption during the normal period:
[0101] When entering the normal period, on the basis of the power consumption during the original normal period, add the newly increased power consumption ΔE. The formula is as follows: En = En′ + ΔE
[0102] Where: En′ is the accumulated power consumption during the normal period in the previous time period, and ΔE is the newly measured power consumption;
[0103] Accumulate the electricity fee during the normal period: The calculation of the electricity fee is based on the electricity price UPn during the current normal period, and add the previously calculated electricity fee Cn′ to the newly consumed electricity fee, and accumulate it into the total electricity fee Cn:
[0104] Cn = Cn′ + ΔE × UPn
[0105] Where: Cn is the accumulated electricity fee during the current normal period, Cn′ is the accumulated electricity fee during the normal period measured in the previous time period, and UPn is the electricity price during the current normal period;
[0106] 4) During the valley period, accumulate the power consumption during the valley period:
[0107] When entering the valley period, on the basis of the power consumption during the original valley period, add the newly increased power consumption ΔE. The formula is as follows: Ev = Ev′ + ΔE;
[0108] Where: Ev′ is the accumulated power consumption during the valley period in the previous time period, and ΔE is the newly measured power consumption;
[0109] Accumulated valley period electricity fee:
[0110] The calculation of the electricity fee is based on the electricity price UPv of the current valley period, and the previously calculated electricity fee Cv′ is added to the newly consumed electricity fee and accumulated into the total electricity fee Cv:
[0111] Cv = Cv′ + ΔE × UPv
[0112] Where: Cv is the accumulated electricity fee of the current valley period, Cv′ is the accumulated electricity fee of the measured valley period in the previous period, and UPv is the electricity price of the current valley period;
[0113] 5) Accumulate the power consumption during the deep valley period:
[0114] When entering the deep valley period, the newly added power consumption ΔE is accumulated on the basis of the power consumption during the original deep valley period. The formula is as follows: Ed = Ed′ + ΔE
[0115] Where: Ed′ is the accumulated power consumption during the deep valley period in the previous time period, and ΔE is the newly measured power consumption;
[0116] Accumulate the electricity fee during the deep valley period:
[0117] The calculation of the electricity fee is based on the electricity price UPd of the current deep valley period, and the previously calculated electricity fee Cd′ is added to the newly consumed electricity fee and accumulated into the total electricity fee Cd: Cd = Cd′ + ΔE × UPd; where: Cd is the accumulated electricity fee of the current deep valley period, Cd′ is the accumulated electricity fee of the measured deep valley period in the previous period, and UPv is the electricity price of the current deep valley period;
[0118] The specific content of step S3 is as follows:
[0119] 3-1 The electric meter regularly uploads the power data to the cloud MQTT server, and these data are aggregated according to different time dimensions for subsequent query, analysis and report generation; the core goal of data aggregation is to summarize the original data by time period, calculate the total power consumption and electricity fee for each time period, so as to meet the user's query requirements for historical data;
[0120] 3-2 Aggregation strategy design: The aggregation strategy needs to be configured according to different requirements and scenarios, specifically one of the following aggregation methods:
[0121] 1) Aggregate by time period: According to the time stamp attached to the data recorded by the electric meter, the power data within the same time period are accumulated;
[0122] 2) Aggregate by hour: Calculate the power consumption and electricity fee within each hour to obtain the total power consumption and electricity fee for each hour.
[0123] 3) Aggregation by day, month, quarter, and year: Aggregate the data of the same day, month, quarter, and year to obtain the total power consumption and total electricity charges for long-term trend analysis.
[0124] The aggregation results of the stored design data will be stored according to the time dimension. The following is the specific storage design:
[0125] 1) Storage by time period: After each data aggregation, save the aggregation results by time period for convenient query and analysis based on the time period;
[0126] 2) Storage by time dimension: In addition to the time period, the system also needs to consider storing data with time granularity (such as by hour, day, month) so that when subsequent users query, they can obtain detailed data through different time scale dimensions;
[0127] 3) Regular update: The data storage should adopt a regular update mechanism. The aggregated data can be stored as independent data tables or views by dimensions such as hour, day, and month.
[0128] 4) Time index: Each storage record should carry a timestamp field for convenient query according to the time period. For example: The power consumption records of each device can be stored by day or month and indexed through timestamps to improve query efficiency.
[0129] Efficient query is also supported:
[0130] 1) The stored power data is pre-optimized for indexing and a flexible query interface is provided. Users can select query dimensions (such as device ID, time range, time period type, etc.) according to their needs to quickly obtain the required information from the aggregation results.
[0131] 2) Query by time period: According to user needs, query the total power consumption and electricity charges within a certain time period.
[0132] 3) Query by time range: Users can select to query the power consumption and electricity charges within a certain time period (such as a certain day, a certain month).
[0133] 4) Historical trend analysis: Support querying the power consumption trends of devices by granularity such as month, quarter, and year.
[0134] In the step S2 described above, it also includes regularly reviewing the announcements of the grid company's rates, and updating the rates to the database of the cloud MQTT server in real time to obtain the division rules and rates for peak and off-peak periods.
[0135] The present invention also relates to implementing a cloud-based time-of-use power metering system, including:
[0136] The cloud data acquisition module 1 is used to receive the real-time data of on-site electric meters through the cloud MQTT server. The cloud MQTT server extracts the electric meter reading E based on the real-time received data stream;
[0137] The cloud computing module 2 is used to calculate the change amount ΔE of the electric meter reading, then determine the current time period as the peak period, peak period, normal period, valley period or deep valley period, and accumulate the power consumption and electricity charges in combination with the corresponding time periods;
[0138] The data aggregation and storage module 3 is used to aggregate and store the data for multi-time dimension query on the client side.
[0139] As Figure 3 shown, the present invention also relates to an electronic device, including: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method of cloud-based time-of-use power metering.
[0140] The electronic device 9 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10.
[0141] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as: SD or DX
[0142] memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 9 in some embodiments, such as the mobile hard disk of the electronic device 9. The memory 11 may also be an external storage device of the electronic device 9 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 9. Further, the memory 11 may also include both the internal storage unit and the external storage device of the electronic device 9. The memory 11 can be used not only to store the application software and various data installed in the electronic device 9, but also to temporarily store the data that has been output or will be output.
[0143] The processor 10 may be composed of integrated circuits in some embodiments. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors
[0144] And combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits, and by running or executing programs or modules stored in the memory 11 (such as a data resource scheduling method program based on priority relationships, etc.), and calling data stored in the memory 11, to execute various functions of the electronic device 9 and process data.
[0145] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is set to realize the connection and communication between the memory 11 and at least one processor 10, etc.
[0146] Figure 3 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 3 The shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0147] For example, although not shown, the electronic device may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to realize functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device may also include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0148] Furthermore, the electronic device 9 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the electronic device 9 and other electronic devices.
[0149] The present invention also provides a computer-readable storage medium. The readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement a method for cloud-based time-segment power metering.
[0150] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes, shall be covered by the protection scope of the present invention.
Claims
1. A method for realizing time-divided electric energy metering in the cloud, characterized in that: The following steps are involved: S1, the cloud MQTT server receives the real-time data of the on-site electric meter, and the cloud MQTT server extracts the electric meter reading E based on the real-time received data stream; S2, calculate the meter reading change ΔE, then determine whether the current time period is a peak time period, a normal time period, a valley time period or a deep valley time period, and accumulate the power consumption and electricity charges in combination with the corresponding time periods; S3, aggregates and stores data so that clients can query it in multiple time dimensions; The step S1 is specifically as follows: 1-1 The on-site electric meter transmits real-time electric energy data to the MQTT server in the cloud through wireless communication; the electric meter uploads the electric energy data in real time, and the MQTT server receives the data once per second; 1-2 Based on the received data stream, the MQTT server parses the data packet in real time and extracts the electric meter reading E, which is the accumulated electric energy consumption value.
2. The method for realizing time-divided energy metering in the cloud according to claim 1, characterized in that: In the step S2, it also includes regularly reading the announcement of the power grid company's rates, and updating the rates to the database of the cloud MQTT server in real time to obtain the division rules and rates of the peak time periods and peak time periods.
3. The method for realizing time-divided energy metering in the cloud according to claim 1 or 2, characterized in that: The detailed steps of step S2 are as follows: 2-1. When calculating the change in the meter reading, compare the reading E at the previous time point with the reading E at the current time point to obtain the change in reading ΔE. The formula is as follows: ΔE = E current -E previous Among them, E current is the current meter reading, E previous The meter reading at the last time of data collection; 2-2 Set the time period rules for peak time period, normal time period, valley time period and deep valley time period. Determine the current time period based on the power demand of the equipment or environment; map the current degree change ΔE to the corresponding time period, and apply different electricity prices according to different time period types; 2-3 Each time period corresponds to a different electricity price. The electricity fee in that time period is calculated based on the calculated change in degree ΔE. The cumulative calculation formula for each time period is: 1) During the peak period Accumulated peak power consumption: When the system enters the peak period, we need to add the additional energy consumption ΔE to the original peak period power consumption, that is: Et = Et' + ΔE Among them, Et′ is the accumulated peak power consumption in the previous time period, and ΔE is the newly measured power consumption; Accumulated peak-time electricity charges: The calculation of electricity charges is based on the current peak electricity price UPt, and the previously calculated electricity charge Ct' is added to the newly consumed electricity charge: Ct = Ct' + ΔE × UPt Among them, Ct is the accumulated electricity fee during the current peak period, Ct′ is the accumulated electricity fee during the previous peak period, and UPt is the electricity price during the current peak period; 2) During peak hours Accumulated peak power consumption: When entering the peak period, the additional power consumption ΔE is accumulated on the basis of the power consumption in the original peak period, and the formula is as follows: Ep=Ep′+ΔE; Where: Ep′ is the accumulated peak power consumption in the previous time period, ΔE is the newly measured power consumption; Accumulated peak electricity charges: The calculation of electricity charges is based on the electricity price UPp of the current peak period, and the previously calculated electricity charge Cp′ is added to the newly consumed electricity charge, and the total electricity charge Cp is accumulated: Cp = Cp′ + ΔE×UPp; where: Cp is the accumulated electricity charge of the current peak period, Cp′ is the accumulated electricity charge of the peak period of the previous period, and UPp is the electricity price of the current peak period; 3) In normal period Accumulated power consumption during normal period: When entering the normal period, the additional power consumption ΔE is accumulated on the basis of the power consumption in the original normal period. The formula is as follows: En=En′+ΔE Where: En′ is the accumulated power consumption in the previous period, ΔE is the newly measured power consumption; Accumulate the electricity charges during normal hours: The electricity charges are calculated based on the current normal hour electricity price UPn, and the previously calculated electricity charges Cn′ are added to the newly consumed electricity charges and accumulated to the total electricity charges Cn: Cn=Cn′+ΔE×UPn Where: Cn is the current accumulated electricity fee during normal hours, Cn′ is the accumulated electricity fee during normal hours of the previous period, and UPn is the electricity price during normal hours of the current period; 4) In the valley period Accumulated off-peak power consumption: When entering the valley period, the additional energy consumption ΔE is accumulated on the basis of the power consumption in the original valley period. The formula is as follows: Ev = Ev′ + ΔE Where: Ev′ is the accumulated off-peak power consumption in the previous time period, and ΔE is the newly measured power consumption; Accumulated off-peak electricity charges: The calculation of electricity charges is based on the current off-peak electricity price UPv, and the previously calculated electricity charge Cv′ is added to the newly consumed electricity charge and accumulated to the total electricity charge Cv: Cv=Cv′+ΔE×UPv Where: Cv is the accumulated electricity cost during the current off-peak period, Cv′ is the accumulated electricity cost during the previous off-peak period, and UPv is the electricity price during the current off-peak period; 5) Deep valley period Accumulated power consumption during valley hours: When entering the valley period, the additional energy consumption ΔE is accumulated on the basis of the power consumption in the original valley period. The formula is as follows: Ed = Ed' + ΔE Where: Ed′ is the accumulated power consumption during the valley period of the previous time period, and ΔE is the newly measured power consumption; Accumulated off-peak electricity charges: The calculation of electricity charges is based on the current off-peak electricity price UPd, and the previously calculated electricity charge Cd′ is added to the newly consumed electricity charge and accumulated to the total electricity charge Cd: Cd=Cd′+ΔE×UPd Among them: Cd is the accumulated electricity fee during the current valley period, Cd′ is the accumulated electricity fee during the valley period of the previous period, and UPv is the electricity price during the current valley period.
4. The method for realizing time-divided energy metering in the cloud according to claim 1 or 2, characterized in that: The step 3 is specifically as follows: 3-1 The electric meter regularly uploads the electric energy data to the cloud MQTT server. The data is aggregated according to different time dimensions to facilitate subsequent query, analysis and report generation; The core goal of data aggregation is to aggregate the original data by time period and calculate the total energy consumption and electricity cost for each time period, so as to meet the user's query needs for historical data; 3-2 Aggregation strategy design: Aggregation strategy needs to be configured according to different requirements and scenarios.
5. Implement a cloud-based time-divided electricity metering system, characterized in that: include: A cloud data acquisition module, used for receiving real-time data of the on-site electric meter through a cloud MQTT server, and the cloud MQTT server extracts the electric meter reading E based on the real-time received data stream; The cloud computing module is used to calculate the change in the meter reading ΔE, and then determine whether the current time period is a peak period, a normal period, a valley period or a deep valley period, and accumulate the power consumption and electricity charges in accordance with the corresponding time period; The data aggregation storage module is used to aggregate and store data so that multi-time dimension queries can be performed on the client side.
6. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.