Method for setting potential on load curve of electric energy meter and related device
Patent Information
- Application Number
- CN202310938437.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-07-27
AI Technical Summary
[0004]有鉴于此,本申请的目的在于提供一种电能表负荷曲线上电位的置位方法及相关装置,以解决现有技术中存在的补存的负荷曲线和之后形成的负荷曲线均会对上电位置位,从而导致用户无法准确确定上电发生在哪个捕获周期,也无法区分当前的掉电情况为长掉电还是短掉电
[0032] The method and related apparatus for setting the potential on the load curve of an electricity meter provided in this application embodiment, when the electricity meter is in the initialization state and there are electricity data types to be added among the various electricity data types, adds the load curve corresponding to the electricity data type to be added within the power outage capture cycle and clears the add-in flag. After the electricity meter exits the initialization state, sets the power-on flag of the load curve corresponding to each electricity data type within the current capture cycle and clears the power-on flag. In this application, the electricity data type to be added can be determined by whether the add-in flag is set, and the load curve corresponding to the electricity data type to be added is added without setting the power-on flag of the corresponding load curve. For each electricity data type after the add-in flag is cleared, the power-on flag of the corresponding load curve can be set normally. Therefore, it can avoid the situation where both the added load curve and the subsequently formed load curve set the power-on flag, so that the user can accurately determine which capture cycle the power-on occurs in and accurately distinguish whether the current power outage is a long power outage or a short power outage.
Smart Images

Figure CN116861140B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electricity meter technology, and more specifically, to a method and related apparatus for setting the potential on the load curve of an electricity meter. Background Technology
[0002] Currently, electricity meters can record data on electricity load changes over a specific period (such as a day, a week, or a month) to form a load curve. This curve reflects changes in electricity load within different capture cycles and is crucial for the rational planning of electricity production, transmission, and distribution. The load curve of an electricity meter typically reserves one byte for setting the load curve status word, which indicates the current load data status information. One of these bits is the upper potential, indicating that the electricity meter has experienced power-on during the capture cycle.
[0003] In the existing technology, in the case of a long power outage, after the power supply is powered on, the load curve of the capture cycle in which the power outage occurred is replenished and then the load curve of the current capture cycle is generated. Both the replenished load curve and the load curve generated afterward will be set to the power-on position. Therefore, users cannot accurately determine which capture cycle the power-on occurred in, nor can they distinguish whether the current power outage is a long power outage or a short power outage. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method and related device for setting the potential on the load curve of an electricity meter, so as to solve the problem that in the prior art, both the replenished load curve and the load curve formed afterward will set the power-on position, which makes it impossible for users to accurately determine which capture cycle the power-on occurs in, and also impossible to distinguish whether the current power outage is a long power outage or a short power outage.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, the present invention provides a method for setting the potential on the load curve of an electricity meter, the method comprising:
[0007] When the electricity meter is in the initialization state and there are power data types to be replenished among the various power data types, the load curve of the power outage capture cycle corresponding to the power data type to be replenished is replenished, and the replenishment flag of the power data type to be replenished is cleared.
[0008] Wherein, the power-on flag and the replenishment flag of the power data type to be replenished are both set, and the power failure capture period is the capture period at the time of power failure.
[0009] After the energy meter exits the initialization state, for each of the power data types, the power-on flag is set for the load curve of the current capture cycle corresponding to the power data type, and the power-on flag is cleared.
[0010] In an optional implementation, the method further includes:
[0011] When the electricity meter is powered on, the power-on flags of each of the electricity data types are set, and the electricity meter is controlled to enter the initialization state.
[0012] The power outage time and power-on time are obtained, and based on the power outage time, the power-on time and the capture duration of each pre-stored power data type, it is determined whether the power outage situation corresponding to each power data type is a long power outage situation;
[0013] If the power loss condition of the power data type is a long power loss condition, then the replenishment flag of the power data type is set.
[0014] In an optional implementation, determining whether the power outage condition corresponding to each power data type is a long power outage condition based on the power outage time, the power-on time, and the capture duration of each power data type includes:
[0015] The capture time of each power data type is determined based on its capture duration.
[0016] For each of the power data types, based on the power outage time, the power-on time, and the capture time, it is determined whether the power outage time and the power-on time are within the same capture cycle;
[0017] If they are not in the same capture cycle, the power outage situation corresponding to the power data type is determined to be a long power outage situation.
[0018] In an optional implementation, the load curve of the power outage capture cycle corresponding to the power data type to be replenished is replenished, and the replenishment flag of the power data type to be replenished is cleared, including:
[0019] Obtain the power data of the power data type to be replenished within the corresponding power outage capture period;
[0020] The load curve corresponding to the power outage capture cycle is generated based on the power data, so as to replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished;
[0021] Clear the replenishment flag corresponding to the power data type to be replenished.
[0022] In an optional implementation, after setting the power-on flag for the load curve of the current capture cycle corresponding to each of the power data types and clearing the power-on flag, the method further includes:
[0023] For each of the aforementioned power data types, record the power data of that power data type within the corresponding current capture period;
[0024] At the recording time of the current capture period corresponding to each of the power data types, a load curve corresponding to the power data type is generated based on the power data corresponding to the power data type.
[0025] Secondly, the present invention provides a device for setting the potential on the load curve of an electricity meter, the device comprising:
[0026] The replenishment module is used to replenish the load curve of the power outage capture cycle corresponding to the power outage capture cycle of the power data type to be replenished when the power meter is in the initialization state and there is a power data type to be replenished among the various power data types, and to clear the replenishment flag of the power data type to be replenished; wherein, the power-on flag and the replenishment flag of the power data type to be replenished are both in the set state, and the power outage capture cycle is the capture cycle at the time of power outage;
[0027] The power-on setting module is used to set the power-on flag for the load curve of the current capture period corresponding to each power data type after the energy meter exits the initialization state, and to clear the power-on flag.
[0028] In an optional implementation, the replenishment module is further configured to, when the energy meter is powered on, set the power-on flag of each of the power data types and control the energy meter to enter the initialization state; acquire the power-off time and the power-on time, and determine whether the power-off condition corresponding to each power data type is a long power-off condition based on the power-off time, the power-on time and the pre-stored capture duration of each of the power data types; if the power-off condition of the power data type is a long power-off condition, then set the replenishment flag of the power data type.
[0029] In an optional implementation, the replenishment module is further configured to determine the capture time of the power data type based on the capture duration of each power data type; for each power data type, determine whether the power outage time and the power-on time are in the same capture cycle based on the power outage time, the power-on time and the capture time; if they are not in the same capture cycle, then determine that the power outage situation corresponding to the power data type is a long power outage situation.
[0030] Thirdly, the present invention provides an electricity meter, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the method described in any of the foregoing embodiments.
[0031] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the foregoing embodiments.
[0032] The method and related apparatus for setting the potential on the load curve of an electricity meter provided in this application embodiment, when the electricity meter is in the initialization state and there are electricity data types to be added among the various electricity data types, adds the load curve corresponding to the electricity data type to be added within the power outage capture cycle and clears the add-in flag. After the electricity meter exits the initialization state, sets the power-on flag of the load curve corresponding to each electricity data type within the current capture cycle and clears the power-on flag. In this application, the electricity data type to be added can be determined by whether the add-in flag is set, and the load curve corresponding to the electricity data type to be added is added without setting the power-on flag of the corresponding load curve. For each electricity data type after the add-in flag is cleared, the power-on flag of the corresponding load curve can be set normally. Therefore, it can avoid the situation where both the added load curve and the subsequently formed load curve set the power-on flag, so that the user can accurately determine which capture cycle the power-on occurs in and accurately distinguish whether the current power outage is a long power outage or a short power outage.
[0033] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A block diagram of an energy meter provided in an embodiment of this application is shown;
[0036] Figure 2 This paper illustrates a flowchart of a method for setting the potential on the load curve of an electricity meter according to an embodiment of this application.
[0037] Figure 3This paper illustrates another flowchart of the method for setting the potential on the load curve of an electricity meter according to an embodiment of this application.
[0038] Figure 4 This paper illustrates a functional block diagram of a potential setting device on the load curve of an electricity meter according to an embodiment of this application.
[0039] Icons: 10-Electricity meter; 100-Memory; 110-Processor; 120-Communication module; 200-Replenishment module; 210-Power-on position module. Detailed Implementation
[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations.
[0041] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0042] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0043] Currently, electricity meters can record data on electricity load changes over a certain period (such as a day, a week, or a month) to form a load curve. This curve is a clear record of the changes in electricity load within a certain time range and is used to reflect the changes in electricity load within different capture cycles.
[0044] Understandably, this load curve is of great significance for the rational arrangement of electricity production, transmission and distribution. Users can analyze the load curve of the electricity meter to determine the occurrence time of load peaks, the trend of load curve changes, and the difference between load peaks and valleys, thereby providing a basis for the dispatching decisions of power companies to ensure the normal operation of the power system and the quality of power supply.
[0045] The load curve typically uses one byte to represent the load curve status word, which can be used to identify the status information of the current electricity meter's load data.
[0046] Common status words include PDN (Power Down), PUP (Power Up), CAD (Clock Adjust), DST (Daylight Saving), DNV (Data NotValid), CIV (Clock Invalid), and ERR (Critical Error). Additionally, there are reserved bits indicating that the status of that bit is not currently in use; these are reserved values.
[0047] Understandably, one of the bits in this byte is the upper potential, which is used to indicate whether the power supply has been turned on during this capture cycle. Since the energy meter needs to be re-energized after a power outage, the upper potential of the load curve needs to be set after the power is turned on again.
[0048] Currently, power outages of electricity meters fall into two categories: short power outages and long power outages. A short power outage occurs when the power outage and power-on times are within the same capture cycle, in which case load curve replenishment is not required. A long power outage occurs when the power outage and power-on times are not within the same capture cycle, in which case load curve replenishment is required.
[0049] In the existing technology, after the electricity meter is powered on again, the power-on flag is set. The electricity meter first replenishes the load curve that needs to be replenished. After replenishment, it records the corresponding load curve for the current capture cycle. After the load curve corresponding to the current capture cycle is recorded, the power-on flag is cleared. Since the power-on flag is always set during this process, the electricity meter not only sets the potential for the replenished load curve when replenishing the load curve, but also sets the potential when recording the load curve corresponding to the current capture cycle.
[0050] Understandably, in this situation, the upper potential of both the replenished load curve and the load curve corresponding to the current capture cycle is in the set state. Therefore, when analyzing the load curve, the user cannot accurately determine which capture cycle the power-on of the energy meter occurred in. Similarly, since the upper potential of both load curves is in the set state, the user cannot accurately distinguish whether the power outage that occurs at this time is a long power outage or a short power outage.
[0051] Based on this, embodiments of this application provide a method and related apparatus for setting the potential on the load curve of an electricity meter to solve the above problems.
[0052] Specifically, Figure 1 Please refer to the block diagram of the electricity meter 10 provided in the embodiment of this application. Figure 1 The electricity meter 10 includes a memory 100, a processor 110, and a communication module 120. The memory 100, processor 110, and communication module 120 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0053] The memory 100 is used to store programs or data. The memory 100 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0054] The processor 110 is used to read / write data or programs stored in memory and to perform corresponding functions.
[0055] The communication module 120 is used to establish a communication connection between the electricity meter 10 and other communication terminals through the network, and to send and receive data through the network.
[0056] It should be understood that, Figure 1 The structure shown is only a schematic diagram of the electricity meter 10. The electricity meter 10 may also include a ratio Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0057] The following is based on the above. Figure 1 The electricity meter 10 in this application is the executing entity. The method for setting the potential on the load curve of the electricity meter provided in this embodiment is illustrated with a flowchart. Specifically, Figure 2 For a flowchart illustrating a method for setting the potential on the load curve of an electricity meter according to an embodiment of this application, please refer to [link / reference]. Figure 2 The method includes:
[0058] Step S20: When the energy meter is in the initialization state and there are power data types to be replenished among the various power data types, replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished, and clear the replenishment flag of the power data type to be replenished.
[0059] In this case, the power-on flag and the replenishment flag of the power data type to be replenished are both set, and the power failure capture period is the capture period at the time of power failure.
[0060] Optionally, the electricity meter can collect electricity data corresponding to multiple electricity data types, and a load curve can be generated for each electricity data type.
[0061] Optionally, the power data type can be defined by the user.
[0062] In one possible implementation, the user can define an electricity data type as a single type of electricity data, such as defining active power data as an electricity data type. In another possible implementation, the user can define an electricity data type as a collection of several types of electricity data, such as defining an electricity data type as a collection of active power data, reactive power data, apparent power data, and meter information data (user ID, username, etc.).
[0063] In this embodiment, the load curve refers to a data set. The electricity meter can also send the load curve to the host computer to generate an actual curve for user analysis.
[0064] Optionally, the electricity meter can obtain the power-on flag and replenishment flag corresponding to each power data type in the initialization state, and determine the power data type to be replenished from multiple power data types based on the power-on flag and replenishment flag.
[0065] Optionally, the electricity meter can determine the type of electricity data to be added from multiple electricity data types by traversing each electricity data type.
[0066] In this embodiment, the electricity meter can store the load curve of the power outage capture cycle corresponding to the power data type to be stored, and after storage, clear the storage flag of the power data type to be stored, so that the storage flag of the power data type to be stored is in a non-set state.
[0067] Optionally, the capture period for each power data type may be different, and therefore the power outage capture period for different power data types to be replenished may also be different.
[0068] For example, if the power outage occurs at 0:40, the power outage capture period corresponding to the first power data type to be replenished may be from 0:30 to 1:00, while the power outage capture period corresponding to the second power data type to be replenished may be from 0:00 to 1:00.
[0069] Step S21: After the energy meter exits the initialization state, for each power data type, set the power-on position of the load curve corresponding to the current capture cycle of the power data type and clear the power-on flag.
[0070] Optionally, for any power data type, the corresponding current capture period refers to the capture period at the current moment. It can be understood that the power-on moment should belong to the current capture period.
[0071] Optionally, the current capture period corresponding to each power data type may be different. For example, if there is a first power data type and a second power data type, and the power-on time is 2:40, then there may be a situation where the current capture period corresponding to the first power data type is from 2:00 to 3:00, while the current capture period corresponding to the second power data type is from 2:30 to 3:00.
[0072] Optionally, since the energy meter performs load curve replenishment for the power data types to be replenished among multiple power data types in the initialization state, after the energy meter exits the initialization state, all power data types to be replenished have completed load curve replenishment. At this time, the power-on setting of the load curve corresponding to each power data type in the current capture cycle can be directly set, and the power-on flag corresponding to the power data type can be cleared after setting the power-on setting.
[0073] In this embodiment, since the energy meter clears the replenishment flag after replenishing the load curve of the power data type to be replenished, after the energy meter exits the initialization state, the power-on flag of each power data type is in the set state, while the replenishment flag is in the deset state. That is, the energy meter can set the power-on flag of the load curve corresponding to the power data type in the current capture cycle where the power-on flag is in the set state and the replenishment flag is in the deset state.
[0074] It is understood that the method for setting the potential on the load curve of the electricity meter provided in this application embodiment can determine whether to set the power-on position of the load curve based on the power-on flag and the replenishment flag.
[0075] In this embodiment, for power data types to be supplemented where both the power-on flag and the supplementation flag are set, the energy meter can supplement the load curve corresponding to the power data type. Since both the power-on flag and the supplementation flag are set at this time, the energy meter does not set the power-on flag for the supplemented load curve. However, for power data types where the power-on flag is set and the supplementation flag is not set, since only the power-on flag is set at this time, the energy meter can set the power-on flag for the load curve of the current capture cycle.
[0076] The method for setting the potential on the load curve of an electricity meter provided in this application embodiment, when the electricity meter is in the initialization state and there are electricity data types to be added among the various electricity data types, adds the load curve corresponding to the electricity data type to be added within the power outage capture cycle and clears the add-in flag. After the electricity meter exits the initialization state, sets the power-on flag for the load curves corresponding to each electricity data type within the current capture cycle and clears the power-on flag. In this application, the electricity data type to be added can be determined by whether the add-in flag is set, and the load curve corresponding to the electricity data type to be added is added, but the power-on flag for the corresponding load curve is not set at this time; however, for each electricity data type after the add-in flag is cleared, the power-on flag for the corresponding load curve can be set normally. Therefore, it can avoid the situation where both the added load curve and the subsequently formed load curve have the power-on flag set, so that the user can accurately determine which capture cycle the power-on occurs in and accurately distinguish whether the current power outage is a long power outage or a short power outage.
[0077] In this embodiment, the electricity meter can set the power-on position of the load curve for the current capture period corresponding to each power data type, clear the power-on flag, and then execute the normal load curve generation process.
[0078] In one possible implementation, the electricity meter can record the electricity data of each electricity data type within the corresponding current capture period; at the recording time of the current capture period corresponding to each electricity data type, a load curve corresponding to that electricity data type is generated based on the electricity data corresponding to that electricity data type.
[0079] Optionally, the recording time of the current capture cycle refers to the moment when the current capture cycle ends and the next capture cycle begins.
[0080] For example, if the current capture period for a certain power data type is from 1 to 2 o'clock, and the next capture period is from 2 to 3 o'clock, then 2 o'clock is the recording time of the current capture period.
[0081] Optionally, since the power-on time of the electricity meter may be a moment within the current capture cycle, and the electricity meter cannot record power data when the power is off, the electricity meter can record the power data within the time period from the power-on time to the recording time, and use the power data within this time period as the complete power data corresponding to the current capture cycle to generate the load curve corresponding to the power data type within the current capture cycle.
[0082] For example, if the current capture period for a certain power data type is from 1:00 to 2:00, and the power-on time is 1:20, the power meter can collect the power data during the time period from 1:20 to 2:00, and use the power data during the time period from 1:20 to 2:00 as the complete power data corresponding to the current capture period from 1:00 to 2:00, and generate the load curve corresponding to the power data type within the capture period from 1:00 to 2:00.
[0083] Optionally, the electricity meter can clear the power-on flag corresponding to the power data type after setting the power-on position of the load curve corresponding to the power data type in the current capture period, or it can clear the power-on flag corresponding to the power data type after generating the load curve of the power data type in the current capture period.
[0084] Optionally, when the electricity meter is first powered on, it will only set the power-on flag for each power data type. At this time, the replenishment flag for each current data type is in an unset state. In order to facilitate the electricity meter to directly determine the power data type to be replenished based on the replenishment flag, the electricity meter can also set the replenishment flag for the power data type that needs to be replenished for load curve after setting the power-on flag.
[0085] Specifically, in Figure 2 On this basis, Figure 3 For another flowchart illustrating the method for setting the potential on the load curve of an electricity meter provided in this application embodiment, please refer to [link / reference]. Figure 3 The method also includes:
[0086] Step S10: When the electricity meter is powered on, set the power-on flags for each type of electricity data and control the electricity meter to enter the initialization state.
[0087] Step S11: Obtain the power outage time and power-on time, and determine whether the power outage situation corresponding to each power data type is a long power outage situation based on the power outage time, power-on time and the capture duration of each pre-stored power data type.
[0088] Optionally, the capture duration can be determined in advance for each type of power data and stored in the energy meter. This capture duration can characterize the duration of the capture cycle for each type of power data.
[0089] For example, if the capture duration of the first power data type is 30 minutes, then the capture period of the first power data type can be 0:00 to 0:30, 0:30 to 1:00, 1:00 to 1:30, and so on.
[0090] Optionally, the capture duration for each power data type can be the same or different, which can be set by the user according to actual needs. Understandably, if the capture durations for different power data types are different, the capture periods for each power data type will also be different.
[0091] Step S12: If the power loss condition of the power data type is a long power loss condition, then set the power data type replenishment flag.
[0092] Optionally, in this embodiment, the electricity meter can determine whether the power outage situation corresponding to each power data type is a long power outage situation based on the power outage time, the power-on time, and the capture duration of each pre-stored power data type.
[0093] Understandably, if a power data type experiences a prolonged power outage, then the load curve for that power data type needs to be replenished. Therefore, the replenishment flag for that power data type can be set.
[0094] Furthermore, for a given power data type, the energy meter can determine whether the power outage is a prolonged outage by checking whether the power outage and power-on times fall within the same capture cycle for that power data type.
[0095] In one possible implementation, the electricity meter can determine the capture time of each power data type based on the capture duration of each power data type. Then, for each power data type, it can determine whether the power outage time and power-on time are within the same capture cycle based on the power outage time, power-on time, and capture time.
[0096] Understandably, if the power outage and power-on times are not in the same capture cycle, then the power outage situation corresponding to the power data type is determined to be a long power outage situation.
[0097] In this embodiment, the electricity meter can determine the capture time based on the capture duration. For example, if the capture duration is 1 hour, the capture time is the hour, such as 0 o'clock, 1 o'clock, 2 o'clock, etc.
[0098] Optionally, after determining the capture time corresponding to the power data type, the electricity meter determines whether the power outage time and the power-on time are in the same capture cycle based on the power outage time, the power-on time, and the capture time.
[0099] In one possible implementation, if the power-down time is before a certain capture time and the power-on time is after that capture time, it can be determined that the power-down time and the power-on time are not in the same capture cycle.
[0100] For example, if the capture time is at the hour, while the power-off time is 0:40 and the power-on time is 1:20, then since the power-off time is before 1:00 and the power-on time is after 1:00, it can be determined that the power-off time and the power-on time are not in the same capture cycle.
[0101] In another possible implementation, the acquisition period can be determined based on the acquisition time, and then the acquisition period at the power-down time and the acquisition period at the power-on time can be determined separately, thereby determining whether the power-down time and the power-on time are in the same acquisition period.
[0102] For example, if the capture time is on the hour, then the capture period should be from 0 to 1, 1 to 2, 2 to 3, and so on. Based on this, if the power-off time is 0:40 and the power-on time is 1:20, then the capture period of the power-off time is from 0 to 1, and the capture period of the power-on time is from 1 to 2. Therefore, it can be determined that the power-off time and the power-on time are not in the same capture period.
[0103] Optionally, for some types of power data to be replenished, the power outage capture period and the current capture period may be two adjacent capture periods or two non-adjacent capture periods.
[0104] Understandably, if the power outage capture cycle and the current capture cycle are two non-adjacent cycles, then after the load curve is supplemented for the power outage capture cycle, there will be no load curve for the capture cycles between the power outage capture cycle and the current capture cycle.
[0105] Please continue to refer to the example above. If the power outage capture cycle is from 0 to 1, and the current capture cycle after power-on is from 3 to 4, the energy meter will replenish the load curve corresponding to 0 to 1, generate the load curve corresponding to 3 to 4, and set the power-on position of the load curve corresponding to 3 to 4. The load curves for the capture cycles of 1 to 2 and 2 to 3 will be empty.
[0106] Optionally, when performing power data replenishment, the electricity meter can obtain the power data of the power data type to be replenished within the corresponding power outage capture cycle, and generate the load curve corresponding to the power outage capture cycle based on the power data, so as to replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished; and clear the replenishment flag corresponding to the power data type to be replenished.
[0107] Optionally, since the electricity meter cannot record power data after a power outage, the power data to be stored by the electricity meter in the corresponding power outage capture period is actually the power data from the start of the power outage capture period to the time of the power outage.
[0108] Optionally, the electricity meter can use the power data from the start of the power outage capture cycle to the time of the power outage as the complete power data of the power outage capture cycle to generate a load curve, so as to replenish the load curve corresponding to the power data type to be replenished.
[0109] For example, if the capture period for a certain power data type is from 0:00 to 1:00, from 1:00 to 2:00, from 2:00 to 3:00, and so on, and the power outage time is 0:40, then the power outage capture period can be determined to be from 0:00 to 1:00. Therefore, the electricity meter can obtain the power data within the time period from 0:00 to 0:40, and generate the load curve corresponding to the power outage capture period from 0:00 to 1:00 based on the power data within this time period, so as to perform load curve supplementation for the power outage capture period from 0:00 to 1:00.
[0110] Optionally, the electricity meter can clear the replenishment flag corresponding to the data type of electricity to be replenished after the replenishment is completed, to indicate that the data type of electricity to be replenished has been replenished and normal load curve generation can then proceed.
[0111] Optionally, since the process of replenishing the load curve is similar to that of generating the normal load curve, both of which generate the corresponding load curve based on the power data collected during the capture period, in order to reduce the amount of code, a piece of code can be set up that can be called by both the replenishment operation and the normal load curve generation operation.
[0112] In this scenario, to ensure the smooth execution of both the load curve replenishment and normal load curve generation operations, the code can be configured as follows: if both the power-on flag and the replenishment flag are set, the load curve is replenished, and both flags are cleared; if the power-on flag is set and the replenishment flag is de-set, the load curve power-on flag is set, the flag is cleared, and the load curve is generated; if both flags are de-set, the load curve is generated. Based on this, the energy meter can call this code during initialization to replenish the load curve for the power outage capture period corresponding to the power data type to be replenished, and then clear the power-on flag and the replenishment flag after replenishment.
[0113] Since the electricity meter is still in the initialization state at this time, and the power-on flag for the load curve of each power data type in the current capture period has not yet been set, it is necessary to reset the power-on flag again and perform other initialization operations.
[0114] After the electricity meter completes the initialization operation, the code can be called again to set the power-on flag of the load curve for the current capture period corresponding to the electricity data type, clear the power-on flag, and generate the load curve.
[0115] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a potential setting device on the load curve of an electricity meter is given below. Further, please refer to... Figure 4 , Figure 4 This is a functional block diagram of a potential setting device on the load curve of an electricity meter provided in this embodiment. It should be noted that the basic principle and technical effects of the potential setting device on the load curve of the electricity meter provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The potential setting device on the load curve of the electricity meter includes: a storage module 200 and a power-on setting module 210.
[0116] The replenishment module 200 is used to replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished when the energy meter is in the initialization state and there is a power data type to be replenished among the various power data types, and to clear the replenishment flag of the power data type to be replenished; wherein, the power-on flag and the replenishment flag of the power data type to be replenished are both in the set state, and the power outage capture cycle is the capture cycle at the time of power outage.
[0117] Understandably, the replenishment module 200 can also be used to perform the above step S20.
[0118] The power-on setting module 210 is used to set the power-on flag for the load curve of the current capture period corresponding to each power data type and clear the power-on flag after the energy meter exits the initialization state.
[0119] Understandably, the power-on position module 210 can also be used to perform the above step S21.
[0120] Optionally, the replenishment module 200 is further configured to, when the energy meter is powered on, set the power-on flag of each power data type and control the energy meter to enter the initialization state; obtain the power-off time and power-on time, and determine whether the power-off condition corresponding to each power data type is a long power-off condition based on the power-off time, power-on time and the pre-stored capture duration of each power data type; if the power-off condition of the power data type is a long power-off condition, then set the replenishment flag of the power data type.
[0121] Understandably, the replenishment module 200 can also be used to perform the above steps S10 to S12.
[0122] Optionally, the replenishment module 200 is also used to determine the capture time of each power data type based on the capture duration of each power data type; for each power data type, it determines whether the power outage time and power-on time are in the same capture cycle based on the power outage time, power-on time and capture time; if they are not in the same capture cycle, it determines that the power outage situation corresponding to the power data type is a long power outage situation.
[0123] Optionally, the replenishment module 200 is further configured to acquire power data of the power data type to be replenished within the corresponding power outage capture period; generate a load curve corresponding to the power outage capture period based on the power data, so as to replenish the load curve of the power data type to be replenished within the corresponding power outage capture period; and clear the replenishment flag corresponding to the power data type to be replenished.
[0124] Optionally, the power-on position module 210 is also used to record the power data of each power data type in the corresponding current capture period; and to generate the load curve corresponding to each power data type based on the power data of each power data type at the recording time of the current capture period corresponding to each power data type.
[0125] The voltage setting device on the load curve of the electricity meter provided in this application embodiment, through the replenishment module, replenishes the load curve of the power outage capture cycle corresponding to the power data type to be replenished when the electricity meter is in the initialization state and there is a power data type to be replenished among the various power data types, and clears the replenishment flag; wherein, the power-on flag and the replenishment flag of the power data type to be replenished are both in the set state, and the power outage capture cycle is the capture cycle in which the power outage occurs; through the power-on setting module, after the electricity meter exits the initialization state, for each power data type, the power-on setting is set on the load curve of the current capture cycle corresponding to the power data type and the power-on flag is cleared, which can avoid the situation where the replenished load curve and the load curve formed afterward both have the power-on setting set, so that the user can accurately determine which capture cycle the power-on occurs in, and accurately distinguish whether the current power outage is a long power outage or a short power outage.
[0126] Optionally, the above modules can be stored in the form of software or firmware. Figure 2 The memory shown may be stored in or embedded in the operating system (OS) of the energy meter, and can be accessed by... Figure 1 The processor executes the commands. Meanwhile, the data and program code required to execute these modules can be stored in memory.
[0127] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, can implement the method for setting the potential on the load curve of an electricity meter provided in this application.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0129] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0130] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0131] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for setting the potential on the load curve of an electricity meter, characterized in that, The method includes: When the electricity meter is in the initialization state and there is a power data type to be replenished among the various power data types, the load curve of the power outage capture cycle corresponding to the power data type to be replenished is replenished, and the upper potential of the load curve is not set during the replenishment process, and the replenishment flag of the power data type to be replenished is cleared. Wherein, the power-on flag and the replenishment flag of the power data type to be replenished are both set, and the power failure capture period is the capture period at the time of power failure. After the energy meter exits the initialization state, for each of the power data types, the potential on the load curve of the current capture cycle corresponding to the power data type is set, and the power-on flag is cleared. The method further includes: When the electricity meter is powered on, the power-on flags of each of the electricity data types are set, and the electricity meter is controlled to enter the initialization state. The power outage time and power-on time are obtained, and based on the power outage time, the power-on time and the capture duration of each pre-stored power data type, it is determined whether the power outage situation corresponding to each power data type is a long power outage situation; If the power loss condition of the power data type is a long power loss condition, then the replenishment flag of the power data type is set.
2. The method according to claim 1, characterized in that, The step of determining whether the power outage situation corresponding to each power data type is a long power outage situation based on the power outage time, the power-on time, and the capture duration of each power data type includes: The capture time of each power data type is determined based on its capture duration; wherein the capture time is the boundary time of the capture cycle. For each of the power data types, based on the power outage time, the power-on time, and the capture time, it is determined whether the power outage time and the power-on time are within the same capture cycle; If they are not in the same capture cycle, the power outage situation corresponding to the power data type is determined to be a long power outage situation.
3. The method according to claim 1, characterized in that, The process includes: storing the load curve for the power outage capture cycle corresponding to the power data type to be replenished, and clearing the replenishment flag for the power data type to be replenished, including: Obtain the power data of the power data type to be replenished within the corresponding power outage capture period; The load curve corresponding to the power outage capture cycle is generated based on the power data, so as to replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished; Clear the replenishment flag corresponding to the power data type to be replenished.
4. The method according to claim 1, characterized in that, After setting the power-on flag for the load curve of the current capture period corresponding to each of the power data types and clearing the power-on flag, the method further includes: For each of the aforementioned power data types, record the power data of that power data type within the corresponding current capture period; At the recording time of the current capture cycle corresponding to each of the aforementioned power data types, a load curve corresponding to the power data type is generated based on the power data corresponding to the power data type; the recording time of the current capture cycle is the time when the current capture cycle ends and the next capture cycle begins.
5. A device for setting the potential on the load curve of an electricity meter, characterized in that, The device includes: The replenishment module is used to replenish the load curve of the power outage capture cycle corresponding to the power data type to be replenished when the energy meter is in the initialization state and there is a power data type to be replenished among the various power data types. During the replenishment process, the upper potential of the load curve is not set, and the replenishment flag of the power data type to be replenished is cleared. The power-on flag and the replenishment flag of the power data type to be replenished are both set, and the power outage capture cycle is the capture cycle at the time of power outage. The power-on setting module is used to set the potential on the load curve of the current capture cycle corresponding to each power data type and clear the power-on flag after the energy meter exits the initialization state. The replenishment module is further configured to, when the energy meter is powered on, set the power-on flag of each of the power data types and control the energy meter to enter the initialization state; acquire the power-off time and power-on time, and determine whether the power-off condition corresponding to each power data type is a long power-off condition based on the power-off time, the power-on time and the pre-stored capture duration of each of the power data types; if the power-off condition of the power data type is a long power-off condition, then set the replenishment flag of the power data type.
6. The apparatus according to claim 5, characterized in that, The replenishment module is further configured to determine the capture time of each power data type based on the capture duration of each power data type; and for each power data type, determine whether the power outage time and the power-on time are in the same capture cycle based on the power outage time, the power-on time, and the capture time. If they are not in the same capture cycle, the power outage situation corresponding to the power data type is determined to be a long power outage situation, wherein the capture time is the boundary time of the capture cycle.
7. An electricity meter, characterized in that, It includes a processor and a memory, the memory storing a computer program executable by the processor, the processor being able to execute the computer program to implement the method of any one of claims 1-4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-4.