A power synchronization method, management device and power meter
By implementing the power synchronization method in the power meter, the problem that the power meter cannot be synchronized when the management device is replaced is solved, and accurate calculation and automated synchronization of the power used by the user are achieved.
Patent Information
- Application Number
- CN202111641905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-12-29
AI Technical Summary
When the existing power meter is replaced, the total power and rate power backed up in the metering device cannot be effectively synchronized, resulting in the inability to calculate the power used by the user before the management device is disconnected.
Provide a power synchronization method, by determining the time point and historical total rate power of the last rate period backup in the metering device, obtaining the total power of the current time point, and calculating the total to be backed up based on the preset rate-time correspondence relationship. Rate power, accumulated to the historical total rate power, updated the new total rate power and backed up to the metering module.
When the management device is connected to the metering device, it is realized that the total power recorded after the metering device is disconnected, and the power of each rate used by the user is accurately calculated, avoiding the necessity of manual calculation.
Smart Images

Figure CN114325083B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric quantity measurement, and in particular to an electric quantity synchronization method, a management device and an electric quantity meter. Background Art
[0002] As the society's demand for electricity grows, the gap in electricity consumption between different time periods is also getting bigger. In order to rationally utilize and save electricity resources, in the prior art, an electricity meter is usually used to bill the user's electricity consumption by time period. The electricity meter includes a management device and a metering device. The metering device is used to record the total electricity used by the user. The management device can periodically obtain the total electricity corresponding to each time point in the current backup cycle, and then determine the rate electricity corresponding to each rate in the current backup cycle based on the total electricity corresponding to each time point in the current backup cycle, and add the rate electricity of each rate to the total rate electricity of each rate obtained in the previous backup cycle to obtain a new total rate electricity of each rate, and back up the new total rate electricity of each rate to the metering device as the total rate electricity of each rate backed up in the current backup cycle. Since the management device will age or be damaged as the usage time increases, it needs to be replaced with a new management device regularly. Moreover, when the metering device is disconnected from the old management device, the metering device will continue to record the total power consumption. When the metering device is connected to the new management device, the new management device can only obtain the total power consumption recorded by the metering device after being connected to the new management device and the rate power backed up in the metering device by the old management device. The power consumption of the user recorded during the period after the metering device is disconnected from the old management device and before being connected to the new management device is not taken into account, and therefore the rate power consumption during this period cannot be calculated based on the power consumption during this period. Summary of the invention
[0003] The object of the present invention is to provide a method and device for synchronizing the electricity quantity of an electricity meter, which can synchronize the total electricity quantity and rate electricity quantity backed up in the metering device and the total electricity quantity recorded after the management device is disconnected to the management device. In addition, there is no need for manual calculation of the total electricity quantity and rate electricity quantity.
[0004] In order to solve the above technical problems, the present invention provides an electric quantity synchronization method, which is applied to a management device in the electric quantity meter, wherein the electric quantity meter also includes a metering device, and the electric quantity synchronization method includes:
[0005] When the synchronization condition between the management device and the metering device is met, determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate;
[0006] Obtaining the total power consumption at each time point in the metering device from the time point of the last rate period backup to the current time point;
[0007] Determine the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship;
[0008] The total rate electricity to be backed up corresponding to each rate period is accumulated to the historical total rate electricity of the rate corresponding to each rate period to obtain a new total rate electricity corresponding to each rate, and the new total rate electricity corresponding to each rate and the current time point are backed up to the metering module.
[0009] Preferably, based on the total power and the preset rate-time correspondence relationship, the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point is determined, and the total rate power to be backed up corresponding to each rate period is accumulated to the historical total rate power of the rate corresponding to each rate period, to obtain a new total rate power corresponding to each rate, including:
[0010] S21: Determine the rate period in which the time point of the last rate period backup is located among the rate periods within the time period from the time point of the last rate period backup to the current time point as the current rate period;
[0011] S22: Determine the time point of the last rate period backup as the time point of the current rate period start;
[0012] S23: Determine the total rate power to be backed up in the time period from the start time point to the end time point of the current rate period based on the total power and the preset rate-time correspondence relationship;
[0013] S24: adding the total rate electricity to be backed up to the historical total rate electricity of the rate corresponding to the current rate period to obtain a new total rate electricity of the rate corresponding to the current rate period;
[0014] S25: Determine whether the end time point of the current rate period and the start time point of the rate period where the current time point is located are the same period start time point; if so, proceed to S26; if not, proceed to S27;
[0015] S26: Entering the step of backing up the new total rate electricity of each rate and the current time point to the metering module;
[0016] S27: taking the next rate period of the current rate period as the new current rate period, taking the period end time point of the current rate period as the period start time point of the new current rate period, and returning to S23.
[0017] Preferably, the preset rate-time correspondence is different for different usage time zones;
[0018] Before determining the total rate power to be backed up in the time period from the time period start time point to the time period end time point of the current rate period based on the total power and the preset rate-time correspondence relationship, the method further includes:
[0019] Determine whether a switching time point between a currently used preset rate-time correspondence and a next preset rate-time correspondence of the currently used preset rate-time correspondence exists within the current rate period;
[0020] If yes, the time period table switching time point is used as the new time period end time point of the current rate period and the new time period start time point of the next rate period of the current rate period;
[0021] After determining the total rate power to be backed up in the time period from the time period start time point to the time period end time point of the current rate period based on the total power and the preset rate-time correspondence relationship, the method further includes:
[0022] Taking the next preset rate-time correspondence of the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence;
[0023] If not, the step of determining the total rate electricity to be backed up within the time period from the start time point to the end time point of the current rate period based on the total electricity and the preset rate-time correspondence relationship is entered.
[0024] Preferably, the preset rate-time correspondence is different for different usage time zones;
[0025] Before determining the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship, the method further includes:
[0026] Determine whether there is an adjacent switching time point between the preset rate-time correspondences within the time period from the last rate period backup time point to the current time point;
[0027] If so, determine all preset rate-time correspondences to be used within the time period from the time point of the last rate period backup to the current time point;
[0028] Before S23, it also included:
[0029] Determine the preset rate-time correspondence to be used corresponding to the use time zone where the time point of the last rate period backup is located as the preset rate-time correspondence currently used;
[0030] After S27, it also includes:
[0031] Determine whether the start time point of the current rate period is in the usage time zone corresponding to the currently used preset rate-time correspondence. If so, enter S23; otherwise, use the next preset rate-time correspondence to be used of the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence and enter S23.
[0032] Preferably, the process of determining the synchronization condition between the management device and the metering device is:
[0033] Obtaining a first table number corresponding to the metering device;
[0034] If the first table number and the second table number stored in the management device are inconsistent, it is determined that the synchronization condition between the management device and the metering device is satisfied.
[0035] Preferably, when the synchronization condition between the management device and the metering device is met, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, it also includes:
[0036] The first table number is used as the new second table number, and the historical total rate electricity corresponding to each rate stored in the management device is cleared.
[0037] Preferably, the process of determining the synchronization condition between the management device and the metering device is:
[0038] If the total power difference between the second total power recorded by the metering device at the current time point and the first total power stored in the management device is greater than the preset total power difference, it is determined that the synchronization condition between the management device and the metering device is met.
[0039] Preferably, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, the method further includes:
[0040] Determine whether the sum of the electricity obtained by adding the historical total rate electricity corresponding to all the rates backed up during the last rate period is less than the total electricity recorded by the metering device at the time of the last rate period backup, and whether the absolute value of the difference between the sum of electricity and the total electricity recorded at the time of the last rate period backup is less than a preset difference, and whether the time of the last rate period backup is before the current time point;
[0041] If yes, then proceed to the step of determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate;
[0042] Otherwise, determine the time point stored when the management device last received the power-off protection signal and the historical total rate electricity corresponding to each rate as the new time point of the last rate period backup and the historical total rate electricity corresponding to each rate.
[0043] The present invention also provides a management device, comprising:
[0044] Memory for storing computer programs;
[0045] A processor is used to implement the steps of the above-mentioned power synchronization method when executing the computer program.
[0046] The present invention also provides an electricity meter, comprising a metering device and a management device as described above;
[0047] The metering device and the management device are connected in sequence.
[0048] The present invention provides an electricity synchronization method, device and electricity meter, which are applied to a management device in an electricity meter. In addition, the electricity meter also includes a metering device. When the synchronization condition between the management device and the metering device is met, the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate are determined, and then the total electricity at each time point in the time period from the time point of the last rate period backup to the current time point is obtained. Based on these total electricity and a preset rate-time correspondence relationship, the total rate electricity to be backed up corresponding to each rate period in this time period can be determined, and then the total rate electricity to be backed up in each rate period is accumulated to the corresponding total rate electricity of each rate period. The new total rate electricity corresponding to each rate can be obtained from the historical total rate electricity of the rate, and finally the new total rate electricity corresponding to each rate and the current time point are backed up to the metering device as the time point of the new last rate period backup and the historical total rate electricity corresponding to each rate. When the new management device is connected to the metering device, not only the historical total rate electricity of each rate backed up by the old management device in the metering device can be obtained, but also the total electricity recorded by the metering device after it is disconnected from the old management device and before it is connected to the new management device. Then, the electricity used by the user at each rate during this period can be calculated based on the total electricity during this period. In addition, there is no need to manually calculate the total electricity and rate electricity. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 A flow chart of a power synchronization method provided by the present invention;
[0051] Figure 2 A schematic diagram of the structure of a management device provided by the present invention;
[0052] Figure 3 The present invention provides a schematic structural diagram of an electricity meter. DETAILED DESCRIPTION
[0053] The core of the present invention is to provide a method and device for synchronizing the electricity of an electricity meter, which can synchronize the total electricity and rate electricity backed up in the metering device and the total electricity recorded after the management device is disconnected to the management device. In addition, there is no need for manual calculation of the total electricity and rate electricity.
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Please refer to Figure 1 , Figure 1 A flow chart of an electric quantity synchronization method provided by the present invention is applied to a management device in an electric quantity meter, wherein the electric quantity meter also includes a metering device, and the electric quantity synchronization method includes:
[0056] S11: When the synchronization condition between the management device and the metering device is met, determine the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate;
[0057] In order to obtain the amount of electricity used by the user in the previous time period simply and quickly, in the present application, during normal operation, the management device will periodically back up the historical total rate electricity corresponding to each rate currently stored in the management device and the current time point to the metering device. The time point when the management device last backs up the historical total rate electricity corresponding to each rate in the metering device is called the time point of the last rate period backup, which can facilitate the replacement of the management device. The new management device only needs to obtain the historical total rate electricity corresponding to each rate last backed up in the metering device by the old management device, and can more accurately synchronize the historical total rate electricity corresponding to each rate stored in the old management device, without the need for the new management device to recalculate the historical total rate electricity corresponding to each rate. Among them, the rate period refers to the period of time that belongs to a rate, and the rate corresponding to each kilowatt-hour used by the user during this period is the same, while the electricity charges corresponding to each kilowatt-hour used by the user in the rate period of different rates are different. For example, the electricity charges corresponding to each kilowatt-hour used by the user during the peak period of electricity consumption and the normal period are different, and the rate electricity corresponding to each rate is also the electricity used by the user in each rate.
[0058] S12: Obtaining the total power consumption at each time point in the time period from the time point of the last rate period backup to the current time point in the metering device;
[0059] The metering device will save the total electricity corresponding to each minute, which is called minute frozen electricity, until the total electricity recorded in the metering device is manually cleared or the metering device is damaged. For example, the total electricity recorded by the metering device at 12:00 on the same day is 100 degrees, while the total electricity recorded at 12:01 on the same day may be 101 degrees. Taking into account that the metering device will still record the amount of electricity used by the user during the period after it is disconnected from the old management device and before it is connected to the new management device, it is necessary to obtain the amount of electricity recorded by the metering device during this period. This period is from the time point of the last rate period backup of the old management device to the current time point. When calculating the amount of electricity used by the user during the period from the time point of the last rate period backup to the current time point, different errors are caused due to the different processing capabilities of different management devices. Therefore, according to the processing capability of the management device actually used, multiple time points can be preset during this period or an acquisition cycle of a management device can be preset to obtain the total amount of electricity at each time point in the period from the time point of the last rate period backup to the current time point. The sum of the electricity obtained by adding the absolute values of the differences in electricity between all two adjacent time points during this period is the amount of electricity used by the user during this period. The more time points are preset during this period or the shorter the acquisition cycle interval of the management device is, the faster the management device calculates the total amount of electricity, which improves the efficiency of electricity synchronization and requires a higher processing capability of the management device.
[0060] S13: Determine the total rate power to be backed up corresponding to each rate period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship;
[0061] The preset rate-time relationship defines the rates corresponding to the time periods between all two adjacent time points in a period of time. When the management device obtains the total power corresponding to the metering device at two adjacent time points, it calculates the absolute value of the power difference between the two total power, and then uses the absolute value and the preset rate-time relationship to calculate the rate power corresponding to the time period between the two adjacent time points. Finally, the rate power corresponding to the time period between all two adjacent time points in the same rate period is added together to obtain the total rate power to be backed up for the rate corresponding to the rate period. In addition, the preset rate-time correspondence is the correspondence between each time period and the rate within a preset time period time zone. For example, different rate-time correspondences can be set according to the actual season, or different rate-time correspondences can be set according to different months. The time period time zone from January 1 to March 1 can be set as a preset rate-time relationship, and the time period from March 2 to June 1 can be set as the next preset rate-time correspondence, etc. In a preset rate-time correspondence, the rates for the same time periods on different dates can be the same. For example, if the time period from January 1 to March 1 is defined as the usage time zone of the preset rate-time correspondence, the rate corresponding to 12:00 to 13:00 on January 1 can be the same as the rate corresponding to 12:00 to 13:00 on January 2. This application does not limit how to set the rate time period.
[0062] S14: Add the total rate electricity to be backed up corresponding to each rate period to the historical total rate electricity of the rate corresponding to each rate period to obtain a new total rate electricity corresponding to each rate, and back up the new total rate electricity corresponding to each rate and the current time point to the metering module.
[0063] The total rate electricity to be backed up corresponding to each rate period obtained represents the electricity used by the user in each rate period recorded during the period after the metering device is disconnected from the old management device and before it is connected to the new management device. The total rate electricity to be backed up corresponding to each rate period is added to the historical total rate electricity corresponding to each rate, and the new total rate electricity corresponding to each rate is obtained, that is, the total rate electricity used by the user in each rate at the current time point. Finally, the new total rate electricity corresponding to each rate and the current time point are backed up to the metering device for convenient use when electricity synchronization needs to be performed again in the future.
[0064] In summary, when the synchronization conditions between the management device and the metering device are met, the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate are determined, and then the total electricity at each time point in the time period from the time point of the last rate period backup to the current time point is obtained. The total rate electricity to be backed up corresponding to each rate period in this time period can be determined based on these total electricity and the preset rate-time correspondence relationship, and then the total rate electricity to be backed up of each rate period is accumulated to the historical total rate electricity corresponding to each rate, and the new total rate electricity corresponding to each rate can be obtained. Finally, the new total rate electricity corresponding to each rate and the current time point are backed up to the metering device as the new time point of the last rate period backup and the historical total rate electricity corresponding to each rate. When the new management device is connected to the metering device, not only the historical total rate electricity of each rate backed up in the metering device by the old management device can be obtained, but also the total electricity recorded by the metering device during the period after being disconnected from the old management device and before being connected to the new management device can be obtained, and then the electricity used by the user at each rate during this period can be calculated based on the total electricity during this period. In addition, there is no need for manual calculation of total electricity consumption and rate electricity consumption.
[0065] Based on the above embodiments:
[0066] As a preferred embodiment, based on the total power and the preset rate-time correspondence relationship, the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point is determined, and the total rate power to be backed up corresponding to each rate period is accumulated to the historical total rate power of the rate corresponding to each rate period, and a new total rate power corresponding to each rate is obtained, including:
[0067] S21: Determine the rate period in which the time point of the last rate period backup is located in each rate period within the time period from the time point of the last rate period backup to the current time point as the current rate period;
[0068] S22: Determine the time point of the last rate period backup as the time point of the current rate period start;
[0069] S23: Determine the total rate power to be backed up in the time period from the start time point of the current rate period to the end time point of the period based on the total power and the preset rate-time correspondence relationship;
[0070] S24: adding the total rate electricity to be backed up to the historical total rate electricity of the rate corresponding to the current rate period to obtain a new total rate electricity of the rate corresponding to the current rate period;
[0071] S25: Determine whether the end time point of the current rate period and the start time point of the rate period where the current time point is located are the same period start time point; if so, proceed to S26, if not, proceed to S27;
[0072] S26: Entering the step of backing up the new total rate electricity of each rate and the current time point to the metering module;
[0073] S27: The next rate period of the current rate period is used as the new current rate period, and the period end time point of the current rate period is used as the period start time point of the new current rate period, and the process returns to S23.
[0074] In order to enable the new management device to determine the amount of electricity used by the user in each rate period from the time point of the last rate period backup to the current time point, in this application, the rate period in which the time point of the last rate period backup is located is first taken as the current rate period, so as to determine the rate electricity corresponding to each rate period in sequence starting from the time point of the last rate period backup. Since the time point of the last rate period backup may be any time point before the current time point, it is usually in a rate period, and there is no need to determine the rate electricity corresponding to the period before the time point of the last rate period backup in the rate period. Therefore, the time point of the last rate period backup is taken as the time point of the current rate period, and then the total rate electricity to be backed up in the time period from the time point of the period start to the time point of the period end of the current rate period is determined. For example, the total electricity recorded by the metering device at the time point of the period start and the time point of the period end is obtained respectively, and then the absolute value of the electricity difference between the two total electricity values is determined, that is, the total rate electricity to be backed up corresponding to the current rate period. Of course, the total electricity corresponding to each time point in the current rate period can also be obtained to determine the total rate electricity to be backed up corresponding to the current rate period. The total rate electricity to be backed up corresponding to the rate period is added to the historical total rate electricity of the rate corresponding to the current rate period to obtain the new total rate electricity of the rate corresponding to the current rate period, and then it is determined whether the time period start point of the next rate period of the current rate period and the time period start point of the rate period where the current time point is located are the same time point, that is, it is determined whether the next rate period of the current rate period and the rate period where the current time point is located are the same rate period. If so, it means that the total rate electricity to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point has been accumulated to each rate period. The historical total electricity of the rate corresponding to the rate period, that is, the new management device determines the electricity used by the user at each rate during this period, and finally enters the step of backing up the new total rate electricity of each rate and the current time point to the metering module. If the next rate period of the current rate period and the rate period at the current time point are not the same rate period, the next rate period will be used as the new current rate period, and the end time point of the current rate period will be used as the start time point of the new current rate period, and then return to the step of determining the total rate electricity to be backed up in the time period from the start time point to the end time point of the current rate period.
[0075] In addition, in order to speed up the power synchronization of the management device, the total rate power to be backed up for each rate period in multiple time periods can be simultaneously determined based on the processing capacity of the management device actually used. For example, the time period from the time point of the last rate period backup to the current time point can be divided into multiple small time periods, and then the current time point is set in each small time period to start determining the total rate power to be backed up for each rate period in each small time period. The present application does not limit how the management device simultaneously determines the total rate power to be backed up for each rate period in multiple time periods.
[0076] In summary, by determining the total rate electricity to be backed up for each rate period in the time period from the time point of the last rate period backup to the current time point, the amount of electricity to be backed up for each rate period is added to the historical total rate electricity of the rate corresponding to each rate period, and a new total rate electricity for each rate is obtained. This allows the new management device to determine the amount of electricity used by the user at each rate in the time period from the time point of the last rate period backup to the current time point.
[0077] As a preferred embodiment, the preset rate-time correspondence is different for different usage time zones;
[0078] Before determining the total rate power to be backed up in the time period from the start time point of the current rate period to the end time point of the period based on the total power and the preset rate-time correspondence relationship, the method further includes:
[0079] Determine whether a switching time point between a currently used preset rate-time correspondence and a next preset rate-time correspondence of the currently used preset rate-time correspondence exists within the current rate period;
[0080] If yes, the time period table switching time point is used as the new time period end time point of the current rate period and the new time period start time point of the next rate period of the current rate period;
[0081] After determining the total rate power to be backed up in the time period from the start time point of the current rate period to the end time point of the period based on the total power and the preset rate-time correspondence relationship, the method further includes:
[0082] The next preset rate-time correspondence of the currently used preset rate-time correspondence is used as the new currently used preset rate-time correspondence;
[0083] If not, the step of determining the total rate electricity to be backed up within the time period from the start time point to the end time point of the current rate period based on the total electricity and the preset rate-time correspondence relationship is entered.
[0084] Taking into account that in actual scenarios, it may be that the metering device is disconnected from the old management device and it takes several months to connect to the new management device, and there may be multiple preset rate-time correspondences during this period. In order to accurately determine the total rate electricity to be backed up corresponding to each rate period, in this application, before determining the total rate electricity to be backed up corresponding to the current rate period, it is necessary to first determine whether the correspondence switching time point between the currently used preset rate-time correspondence and the next preset rate-time correspondence of the currently used preset rate-time correspondence exists in the current rate period. If so, it means that the period start time point and the period end time point of the current rate period are not in the same correspondence. In order to accurately determine the electricity corresponding to each rate, it is necessary to use the correspondence switching time point as the new period end point of the current period and the new period start time point of the next rate period of the current rate period, that is, to split the original current rate period into two rate periods, and the new current rate period The time period is the time period from the original start time point of the current rate period to the corresponding relationship switching time point, and the time period of the new next rate period is the time period from the corresponding relationship switching time point to the original end time point of the current rate period. Then, after determining the total rate power to be backed up corresponding to the new current rate period, the next preset rate-time correspondence of the currently used preset rate-time correspondence is used as the new currently used preset rate-time correspondence; if it does not exist, it means that the start time point and the end time point of the current rate period are in the same correspondence, that is, it will be executed according to the original steps, and then enter the step of determining the total rate power to be backed up in the time period from the start time point to the end time point of the current rate period based on the total power and the preset rate-time correspondence.
[0085] In summary, when the correspondence switching time point between the currently used preset rate-time correspondence and the next preset rate-time correspondence of the currently used preset rate-time correspondence exists within the current rate period, the correspondence switching time point is used as the new period end point of the current period and the new period start time point of the next rate period of the current rate period, so that different time periods within the current rate period can be corresponded to the preset rate-time correspondence of the time period, and the total rate electricity to be backed up corresponding to each rate period can be accurately determined, so that the total rate electricity to be backed up can be added to the historical total rate electricity of each rate.
[0086] As a preferred embodiment, the preset rate-time correspondence is different for different usage time zones;
[0087] Before determining the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship, it also includes:
[0088] Determine whether there is an adjacent switching time point between the preset rate-time correspondence relationship within the time period from the last rate period backup time point to the current time point;
[0089] If so, determine all preset rate-time correspondences to be used within the time period from the time point of the last rate period backup to the current time point;
[0090] Before S23, it also included:
[0091] Determine the preset rate-time correspondence to be used corresponding to the use time zone where the time point of the last rate period backup is located as the preset rate-time correspondence currently used;
[0092] After S27, it also includes:
[0093] Determine whether the start time point of the current rate period is in the usage time zone corresponding to the currently used preset rate-time correspondence. If so, enter S23; otherwise, use the next preset rate-time correspondence to be used of the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence and enter S23.
[0094] Taking into account that in actual scenarios, it may be that the metering device is disconnected from the old management device and it takes several months to connect to the new management device, and there may be multiple preset rate-time correspondences during this period of time. In order to accurately determine the total rate electricity to be backed up corresponding to each rate period, in this application, before determining the total rate electricity to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point, it is necessary to first determine whether there is a corresponding relationship switching time point between adjacent preset rate-time correspondences between the time point of the last rate period backup and the current time point. If there is, it means that there are at least two preset rate-time correspondences in the time period from the time point of the last rate period backup to the current time point. At this time, it is necessary to determine all the preset rate-time correspondences to be used in this time period. For example, if the time period from the time point of the last rate period backup to the current time point is January 1 to March 1, and the time period from January 1 to February 1 corresponds to the first preset rate-time correspondence, and the time period from February 2 to March 3 corresponds to the first preset rate-time correspondence. The time period of January 1 corresponds to the second preset rate-time correspondence, then the rate corresponding to the usage time zone from January 1 to February 1 in the first preset rate-time correspondence and the rate corresponding to the usage time zone from February 2 to March 1 in the second preset rate-time correspondence are determined. After determining the total rate power to be backed up in the current rate period, the next rate period of the current rate period is used as the new current rate period, and then it is determined whether the time period start point of the new current rate period is in the usage time zone corresponding to the currently used preset rate-time correspondence. If so, continue to use the currently used preset rate-time correspondence, and if not, use the next preset rate-time correspondence to be used of the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence.
[0095] In summary, when there is a switching time point between adjacent preset rate-time correspondences between the time point of the last rate period backup and the current time point, all preset rate-time correspondences to be used in this time period are determined, and the total rate electricity to be backed up corresponding to each rate period can be accurately determined.
[0096] As a preferred embodiment, the process of determining the synchronization condition between the management device and the metering device is as follows:
[0097] Obtaining a first table number corresponding to the metering device;
[0098] If the first table number and the second table number stored in the management device are inconsistent, it is determined that the synchronization condition between the management device and the metering device is satisfied.
[0099] In order to simply and quickly determine the synchronization condition between the management device and the metering device, in the present application, the synchronization condition between the management device and the metering device can be that the table number corresponding to the metering device is consistent with the table number stored in the management device. The specific determination process is as follows: since each metering device has a corresponding and unique table number, such as (FF10101010), the management device can obtain the table number corresponding to the metering device. Each management device will store a default table number when it leaves the factory, such as (FF00000000). When the management device is connected to the metering device, the management device will compare the table number corresponding to the metering device with the table number stored in itself. By comparison, if they are inconsistent, it means that the metering device that the management device may have been connected to last is not the metering device, that is, the historical total rate electricity corresponding to each rate period stored in the management device is different from the electricity actually recorded by the metering device. At this time, the synchronization condition between the management device and the metering device is met. If they are consistent, it may mean that the metering device that the management device may have been connected to last is the metering device. At this time, it can be determined whether the synchronization condition between the management device and the metering device is met by whether the total electricity difference between the first total electricity stored in the management device and the second total electricity recorded by the metering device at the current time point is greater than the preset total electricity difference. By setting the synchronization condition between the management device and the metering device to be consistent with the table number corresponding to the metering device and the table number stored in the management device, the synchronization condition between the management device and the metering device can be simply and quickly determined.
[0100] As a preferred embodiment, when the synchronization condition between the management device and the metering device is met, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, it also includes:
[0101] The first meter number is used as a new second meter number, and the historical total rate electricity corresponding to each rate stored in the management device is cleared.
[0102] In order to enable the new management device to accurately determine the electricity recorded in the metering device after it is connected to the metering device, in this application, it is taken into account that in actual situations, after the metering device is disconnected from the old management device, the management device originally connected to other metering devices is used as the new management device, but the new management device stores the electricity recorded in other metering devices. If the new management device is used directly, the management device will add the electricity recorded in the metering device to the electricity of other metering devices stored in itself, resulting in the inability to accurately determine the electricity recorded in the metering device. Therefore, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, the first table number corresponding to the metering device is first used as the new second table number in the management device, and the historical total rate electricity corresponding to each rate originally stored in the management device is cleared, which can avoid accumulating the electricity recorded in the metering device to the electricity of other metering devices stored in the management device itself, and can accurately determine the electricity recorded in the metering device.
[0103] As a preferred embodiment, the process of determining the synchronization condition between the management device and the metering device is as follows:
[0104] If the total power difference between the second total power recorded by the metering device at the current time point and the first total power stored in the management device is greater than the preset total power difference, it is determined that the synchronization condition between the management device and the metering device is met.
[0105] Taking into account that in actual situations, when the management device obtains the total power recorded in the metering device, there may be errors in the total power obtained due to different processing capabilities of the management device. In order to avoid the situation where the power difference between the total power stored in the management device and the total power recorded by the metering device is too large, resulting in inaccurate power synchronization, in the present application, the synchronization condition between the management device and the metering device may be that the power difference between the first total power recorded in the management device and the second total power recorded by the metering device at the current time point is greater than the preset total power difference. Specifically, the management device may periodically obtain the total power recorded by the metering device at the current time point, and then subtract the total power from the total power stored in itself to determine whether the absolute value of the power difference is greater than the preset total power difference. If it is greater than, it means that the power stored in the management device at this time does not conform to the actual situation of the total power recorded in the metering device, and power synchronization is required. When the power difference between the total power stored in the management device and the total power recorded by the metering device is too large, power synchronization can be performed, thereby ensuring that there is no excessive power error between the management device and the metering device.
[0106] As a preferred embodiment, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, it also includes:
[0107] Determine whether the sum of the electricity obtained by adding the historical total rate electricity corresponding to all the rates backed up during the last rate period is less than the total electricity recorded by the metering device at the time point of the last rate period backup, and whether the absolute value of the difference between the sum of electricity and the total electricity recorded at the time point of the last rate period backup is less than the preset difference, and whether the time point of the last rate period backup is before the current time point;
[0108] If yes, proceed to determine the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate;
[0109] Otherwise, determine that the time point stored when the management device last received the power-off protection signal and the historical total rate electricity corresponding to each rate are used as the time point of the new last rate period backup and the historical total rate electricity corresponding to each rate.
[0110] Taking into account that in actual situations, when the management device backs up the historical total rate electricity corresponding to each rate to the metering device, there may be errors in the backed-up historical total rate electricity due to different processing capabilities of the management device, and there may also be errors in the backed-up current time point, in order to avoid inaccurate electricity synchronization due to inaccurate backed-up electricity or inaccurate current time point, in this application, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, it is first determined whether the sum of the historical total rate electricity corresponding to all rates backed up in the last rate period is smaller than the total electricity recorded by the metering device at the time point of the last rate period backup, and the difference between the two is smaller. The absolute value of the difference in electricity consumption between the two needs to be smaller than the preset difference, that is, the sum of the electricity consumption cannot be too small, and whether the time point of the last rate period backup is before the current time period. Only when all three are yes, it means that the management device backs up the historical total rate electricity consumption and time points corresponding to each rate in the metering device more accurately. Otherwise, it means that the time point of the last rate period backup may be inaccurate, or the historical total rate electricity consumption corresponding to each backed up rate may be inaccurate. At this time, the time point stored in the management device when the management device last received the power-off protection signal and the historical total rate electricity consumption corresponding to each rate need to be used as the new time point of the last rate period backup and the historical total rate electricity consumption corresponding to each rate.
[0111] In addition, the power-off protection signal is a signal sent to the management device when it is detected that the power supply to the management device is disconnected. When the management device receives the power-off protection signal, it can save the historical total rate electricity corresponding to each rate stored in itself at this time and the time point when the power-off protection signal is received. Considering that the power supply to the management device is usually disconnected less frequently in actual situations, the historical total rate electricity corresponding to each rate at the time of power off protection stored when the management device last received the power-off protection signal and the time point when the power-off protection signal was received are usually relatively old. If they are used as backup time points and the historical total rate electricity corresponding to each backup rate, the management device needs to spend a long time to synchronize the electricity. Therefore, the historical total rate electricity corresponding to each rate at the time of power off protection and the time point when the power-off protection signal is received are usually used as candidates.
[0112] In summary, when the time point of the last rate period backup in the metering device is after the current time point, or the sum of the historical total rate electricity corresponding to each rate is greater than the total electricity recorded by the metering device at the time point of the last rate period backup or the sum is too small, the time point stored in the management device when the management device last received the power-off protection signal and the historical total rate electricity corresponding to each rate will be used as the new time point of the last rate period backup and the historical total rate electricity corresponding to each rate, which can avoid inaccurate electricity synchronization due to inaccurate backup electricity or current time point.
[0113] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a management device provided by the present invention includes:
[0114] A memory 11, used for storing computer programs;
[0115] The processor 12 is used to implement the steps of the above-mentioned power synchronization method when executing a computer program.
[0116] For a detailed introduction to a management device provided in the present application, please refer to the above-mentioned embodiment of the power synchronization method, and the present application will not go into details here.
[0117] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of an electricity meter provided by the present invention includes a metering device 21 and a management device 22 as described above;
[0118] The measuring device 21 and the management device 22 are connected in sequence.
[0119] For a detailed introduction to an electricity meter provided in the present application, please refer to the above-mentioned embodiment of the electricity synchronization method, and the present application will not go into details here.
[0120] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0121] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for synchronizing electric quantity, characterized in that: A management device applied to an electricity meter, wherein the electricity meter further comprises a metering device, and the electricity synchronization method comprises: When the synchronization condition between the management device and the metering device is met, determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate; Obtaining the total power consumption at each time point in the metering device from the time point of the last rate period backup to the current time point; Determine the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship; The total rate electricity to be backed up corresponding to each rate period is accumulated to the historical total rate electricity of the rate corresponding to each rate period, to obtain a new total rate electricity corresponding to each rate, and the new total rate electricity corresponding to each rate and the current time point are backed up to the metering device; Among them, based on the total power and the preset rate-time correspondence relationship, the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point is determined, and the total rate power to be backed up corresponding to each rate period is accumulated to the historical total rate power of the rate corresponding to each rate period, and a new total rate power corresponding to each rate is obtained, including: S21: Determine the rate period in which the time point of the last rate period backup is located among the rate periods within the time period from the time point of the last rate period backup to the current time point as the current rate period; S22: Determine the time point of the last rate period backup as the time point of the current rate period start; S23: Determine the total rate power to be backed up in the time period from the start time point to the end time point of the current rate period based on the total power and the preset rate-time correspondence relationship; S24: adding the total rate electricity to be backed up to the historical total rate electricity of the rate corresponding to the current rate period to obtain a new total rate electricity of the rate corresponding to the current rate period; S25: Determine whether the end time point of the current rate period and the start time point of the rate period where the current time point is located are the same period start time point; if so, proceed to S26; if not, proceed to S27; S26: Entering the step of backing up the new total rate electricity of each rate and the current time point to the metering device; S27: taking the next rate period of the current rate period as the new current rate period, taking the period end time point of the current rate period as the period start time point of the new current rate period, and returning to S23.
2. The method for synchronizing electric quantity according to claim 1, characterized in that: The preset rate-time correspondence is different for different usage time zones; Before determining the total rate power to be backed up in the time period from the time period start time point to the time period end time point of the current rate period based on the total power and the preset rate-time correspondence relationship, the method further includes: Determine whether a switching time point between a currently used preset rate-time correspondence and a next preset rate-time correspondence of the currently used preset rate-time correspondence exists within the current rate period; If yes, the time period table switching time point is used as the new time period end time point of the current rate period and the new time period start time point of the next rate period of the current rate period; After determining the total rate power to be backed up in the time period from the time period start time point to the time period end time point of the current rate period based on the total power and the preset rate-time correspondence relationship, the method further includes: Taking the next preset rate-time correspondence of the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence; If not, the step of determining the total rate electricity to be backed up within the time period from the start time point to the end time point of the current rate period based on the total electricity and the preset rate-time correspondence relationship is entered.
3. The method for synchronizing electric quantity according to claim 1, characterized in that: The preset rate-time correspondence is different for different usage time zones; Before determining the total rate power to be backed up corresponding to each rate period in the time period from the time point of the last rate period backup to the current time point based on the total power and the preset rate-time correspondence relationship, the method further includes: Determine whether there is an adjacent switching time point between the preset rate-time correspondences within the time period from the last rate period backup time point to the current time point; If so, determine all preset rate-time correspondences to be used within the time period from the time point of the last rate period backup to the current time point; Before S23, it also included: Determine the preset rate-time correspondence to be used corresponding to the use time zone where the time point of the last rate period backup is located as the preset rate-time correspondence currently used; After S27, it also includes: Determine whether the start time point of the current rate period is in the usage time zone corresponding to the currently used preset rate-time correspondence. If so, enter S23; otherwise, use the next preset rate-time correspondence to be used after the currently used preset rate-time correspondence as the new currently used preset rate-time correspondence, and enter S23.
4. The method for synchronizing electric quantity according to claim 1, characterized in that: The process of determining the synchronization condition between the management device and the metering device is as follows: Obtaining a first table number corresponding to the metering device; If the first table number and the second table number stored in the management device are inconsistent, it is determined that the synchronization condition between the management device and the metering device is satisfied.
5. The method for synchronizing electric quantity according to claim 4, characterized in that: When the synchronization condition between the management device and the metering device is met, before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, the method further includes: The first table number is used as the new second table number, and the historical total rate electricity corresponding to each rate stored in the management device is cleared.
6. The method for synchronizing electric quantity according to claim 1, characterized in that: The process of determining the synchronization condition between the management device and the metering device is as follows: If the total power difference between the second total power recorded by the metering device at the current time point and the first total power stored in the management device is greater than the preset total power difference, it is determined that the synchronization condition between the management device and the metering device is met.
7. The method for synchronizing electric quantity according to any one of claims 1 to 6, characterized in that: Before determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate, the method further includes: Determine whether the sum of the electricity obtained by adding the historical total rate electricity corresponding to all the rates backed up during the last rate period is less than the total electricity recorded by the metering device at the time of the last rate period backup, and whether the absolute value of the difference between the sum of electricity and the total electricity recorded at the time of the last rate period backup is less than a preset difference, and whether the time of the last rate period backup is before the current time point; If yes, then proceed to the step of determining the time point of the last rate period backup in the metering device and the historical total rate electricity corresponding to each rate; Otherwise, determine the time point stored when the management device last received the power-off protection signal and the historical total rate electricity corresponding to each rate as the new time point of the last rate period backup and the historical total rate electricity corresponding to each rate.
8. A management device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the power synchronization method as described in any one of claims 1 to 7 when executing the computer program.
9. An electricity meter, characterized in that: comprising a metering device, and also comprising a management device as claimed in claim 8; The metering device and the management device are connected in sequence.
Citation Information
Patent Citations
Method and system for synchronization testing of electric quantity of double-core electric energy meter
CN106569164A