A concentrator with data storage and backup capabilities

By analyzing the frequency and periodicity of changes in power data sequences, adjusting backup intervals, and combining historical backups and fault scenarios, the backup strategy of power concentrators was optimized, solving the balance problem between full backup and incremental backup time, and improving the integrity and recovery efficiency of data storage backup.

CN121233399BActive Publication Date: 2026-04-03SHANDONG DEYUAN POWER TECHNOLOGY CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

How to balance full backup time and incremental backup time to improve the integrity and recovery efficiency of data storage backup in power concentrators.

Method used

By analyzing the frequency and periodicity of power data sequence changes, the incremental and full backup intervals are adjusted. Combined with the historical backup and fault conditions of the power concentrator, the optimal combination of incremental and full backups is obtained to optimize the backup strategy.

Benefits of technology

It achieves a balance between full backup time and incremental backup time in power concentrators, improving the integrity of data backup and recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233399B_ABST
    Figure CN121233399B_ABST
Patent Text Reader

Abstract

This invention relates to the field of data processing technology, and more particularly to a power concentrator with data storage and backup functions. The system includes a processor and a memory. The processor executes a computer program in the memory to perform the following steps: obtaining an initial incremental backup interval based on the frequency of data changes in the power data sequence of the power concentrator during the current backup cycle; dividing the power data sequence into subsequences using different seed periods, and obtaining an initial full backup interval based on the periodic variation pattern of each subsequence under each sub-cycle; adjusting the initial incremental backup interval and the initial full backup interval to obtain at least one incremental full backup combination; obtaining the backup recovery risk coefficient for each incremental full backup combination, and then obtaining the optimal incremental full backup combination for storing and backing up the power concentrator's data in future backup cycles, thereby improving backup data integrity and data recovery efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a concentrator with data storage and backup functions. Background Technology

[0002] As a key node in the power communication network, the power concentrator undertakes the core functions of terminal data aggregation, protocol conversion, and interaction with the master station. Traditional concentrators can connect up to 255 data collectors via RS485 interface or power line carrier technology to achieve timed collection and storage backup of basic data such as electricity consumption, voltage, and current.

[0003] In traditional methods, power concentrators are used as nodes to build a distributed network. Data replicas are distributed to other nodes using a consistent hashing algorithm to achieve redundant storage. In case of damage, data is recovered from other nodes through backups. Backups typically employ either full or incremental backups. Full backups offer high data integrity and a simple recovery process, but they have high redundancy and consume significant storage space. Incremental backups offer high storage efficiency and fast backup speeds, but recovery is complex, requiring the merging of multiple backup sets when data is corrupted, resulting in a low recovery success rate. Therefore, in practical applications, a backup strategy combining full and incremental backups is usually chosen to improve backup data integrity and data recovery efficiency. However, the choice of backup timing for full and incremental backups directly impacts data recovery efficiency, storage costs, system performance, and data security.

[0004] Therefore, how to balance full backup time and incremental backup time to store and back up data in power concentrators, thereby improving the integrity of backup data and the efficiency of data recovery, has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a concentrator with data storage backup function to solve the problem of how to balance full backup time and incremental backup time to store and back up data in the power concentrator, thereby improving the integrity of backup data and data recovery efficiency.

[0006] This invention provides a concentrator with data storage and backup functionality, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the computer program to perform the following steps:

[0007] The target power data of the power concentrator at each sampling time within the current backup cycle is composed into a power data sequence;

[0008] The initial incremental backup interval is obtained based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator; the power data sequence is divided into subsequences using different seed periods, and the initial full backup interval is obtained based on the periodic change pattern of each subsequence under each sub-period.

[0009] The initial incremental backup interval and the initial full backup interval are adjusted respectively to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval. Based on the initial incremental backup interval and the initial full backup interval, as well as all the adjusted incremental backup intervals and adjusted full backup intervals, at least one incremental full backup combination is obtained.

[0010] Based on the historical incremental backup and historical full backup of the power concentrator, as well as the historical failure status of the power concentrator, the backup recovery risk coefficient is obtained when storing and backing up the power data sequence using each incremental and full backup combination. Based on all backup recovery risk coefficients, the optimal incremental and full backup combination is obtained. Based on the optimal incremental and full backup combination, the data of the power concentrator is stored and backed up in the future backup cycle.

[0011] Preferably, obtaining the initial incremental backup interval based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator includes:

[0012] For any preset window size within a preset window size range, the power data sequence is divided into at least two subsequences according to the preset window size. The coefficient of variation of each subsequence is calculated, the mean of the coefficients of variation of all subsequences is calculated, the average coefficient of variation under the preset window size is obtained, the average coefficient of variation under each preset window size within the preset window size range is obtained, the average of all average coefficients of variation is calculated, and the frequency of data change of the power data sequence is obtained.

[0013] The number of failures of the power concentrator within a preset number of historical backup cycles is obtained. The number of failures is divided by the number of historical backup cycles to obtain the failure rate. The frequency of data changes, the failure rate, and the number of all electricity meters connected to the power concentrator are multiplied together to obtain the cumulative result.

[0014] Calculate the reciprocal of the sum between constant 1 and the product result, and subtract the reciprocal from constant 1 to obtain the data variation coefficient of the power data sequence;

[0015] Calculate the difference between constant 1 and the data change coefficient, and use the product of the current backup cycle duration and the difference as the initial incremental backup interval.

[0016] Preferably, if the period length of the sub-period is greater than the initial incremental backup interval, then the step of dividing the power data sequence into sub-sequences using different seed periods, and obtaining the initial full backup interval based on the periodic variation pattern of each sub-sequence under each sub-period, includes:

[0017] For any seed period, the power data sequence is divided into at least two sub-period sequences according to the seed period. In all sub-period sequences, data with the same position are grouped into sub-sequences to obtain at least two sub-sequences under the seed period.

[0018] Based on the periodic variation pattern of each subsequence under any seed period, obtain the electricity consumption pattern coefficient under any seed period;

[0019] Obtain the power consumption pattern coefficient for each sub-cycle. Among all power consumption pattern coefficients, take the cycle length of the sub-cycle corresponding to the maximum value as the initial full backup interval.

[0020] Preferably, obtaining the electricity consumption pattern coefficient for any seed period based on the periodic variation pattern of each subsequence under any seed period includes:

[0021] Calculate the coefficient of variation for each subsequence under any given seed period, and use the mean of all coefficients of variation as the data periodicity index under any given seed period.

[0022] For any subsequence, obtain the rated value of the target power data, and linearly normalize the absolute value of the difference between each data in the subsequence and the rated value to obtain the fluctuation value of each data in the subsequence. Calculate the mean of the fluctuation values ​​of all data in the subsequence to obtain the degree of fluctuation of the subsequence.

[0023] Calculate the average fluctuation of all subsequences under any given seed period, calculate the reciprocal of the sum of the average and constant 1, and subtract the reciprocal from constant 1 to obtain the reliability of the pattern under any given seed period.

[0024] Calculate the product between the data periodicity index and the reliability of the pattern to obtain the electricity consumption pattern coefficient under any seed period.

[0025] Preferably, adjusting the initial incremental backup interval and the initial full backup interval respectively to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval includes:

[0026] Based on the initial incremental backup interval, a first interval is obtained according to a preset ratio. Based on the initial full backup interval, a second interval is obtained according to a preset ratio. The minimum value between the first interval and the second interval is obtained to obtain the unit time used to adjust the initial incremental backup interval and the initial full backup interval.

[0027] The fault time interval between two consecutive faults of the power concentrator within a preset historical period is obtained. The average value of all fault time intervals is taken as the maximum incremental backup interval. The sum between the initial incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval. The adjusted incremental backup interval is taken as the new incremental backup interval. The sum between the new incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval. This process is repeated until the adjusted incremental backup interval is greater than or equal to the maximum incremental backup interval, thus obtaining all adjusted incremental backup intervals.

[0028] The current backup cycle length is used as the maximum full backup interval. The sum between the initial full backup interval and the unit time is calculated to obtain the first full backup interval. The first full backup interval is used as the first new full backup interval. The sum between the first new full backup interval and the unit time is calculated to obtain the first full backup interval. This process continues until the first new full backup interval is greater than or equal to the maximum full backup interval, resulting in all first full backup intervals.

[0029] Calculate the difference between the initial full backup interval and the unit time to obtain the second full backup interval. Use the second full backup interval as the second new full backup interval. Calculate the difference between the second new full backup interval and the unit time to obtain the second full backup interval. Continue until the second new full backup interval is less than or equal to the initial incremental backup interval to obtain all second full backup intervals. Record all first full backup intervals and all second full backup intervals as the adjusted full backup intervals.

[0030] Preferably, the step of obtaining at least one incremental full backup combination based on the initial incremental backup interval and the initial full backup interval, as well as all adjusted incremental backup intervals and adjusted full backup intervals, includes:

[0031] All adjusted incremental backup intervals and the initial incremental backup interval are denoted as incremental intervals, and all adjusted full backup intervals and the initial full backup interval are denoted as full intervals. All incremental intervals and all full intervals are combined in pairs to obtain at least one incremental full backup combination, wherein the full interval is greater than the incremental interval in the incremental full backup combination.

[0032] Preferably, the step of obtaining the backup recovery risk coefficient when storing and backing up the power data sequence using each incremental and full backup combination based on the historical incremental backup and historical full backup status of the power concentrator, as well as the historical fault status of the power concentrator, includes:

[0033] Obtain the historical full backup time of the last full backup of the power concentrator, and the historical incremental backup time of the last incremental backup.

[0034] For any incremental full backup combination, the full interval and incremental interval in the incremental full backup combination are respectively denoted as the target full interval and the target incremental interval. The sum between the historical full backup time and the target full interval is calculated to obtain the new full backup time.

[0035] Obtain the storage read / write speed of the power concentrator, and the amount of data between the historical full backup time and the new full backup time. Calculate the ratio between the amount of data and the storage read / write speed to obtain the time required for a full backup. Calculate the reciprocal of the sum between the time required for a full backup and a constant 1. Subtract the reciprocal from the constant 1 to obtain the full risk coefficient of the target full backup interval.

[0036] Based on the target incremental interval, as well as the historical incremental backup and historical fault conditions of the power concentrator, the incremental risk coefficient of the target incremental interval is obtained.

[0037] Calculate the product between the full risk coefficient and the incremental risk coefficient to obtain the backup recovery risk coefficient when storing and backing up the power data sequence using any of the incremental full backup combinations.

[0038] Preferably, obtaining the incremental risk coefficient of the target incremental interval based on the target incremental interval and the historical incremental backup and historical fault conditions of the power concentrator includes:

[0039] Obtain the backup chain at the time of the last data recovery failure in the power concentrator, count the number of all incremental backup files in the backup chain and the number of all damaged incremental backup files, calculate the proportion of the number of all damaged incremental backup files in the total number of incremental backup files, obtain the historical incremental backup damage probability, calculate the product between the preset retry cost multiple and the historical incremental backup damage probability, and use the sum of the constant 1 and the product as the first risk coefficient.

[0040] The second risk coefficient is obtained based on the number of failures of the power concentrator within a preset historical period and the target incremental interval.

[0041] Calculate the quotient of the target incremental interval divided by the target full interval to obtain the number of incremental backups when performing incremental backups on the data between the historical full backup time and the new full backup time. Calculate the product of the number of incremental backups, the first risk coefficient, and the second risk coefficient to obtain the incremental risk coefficient of the target incremental interval.

[0042] Preferably, the step of obtaining the second risk coefficient based on the number of faults that occurred in the power concentrator within a preset historical period and the target incremental interval includes:

[0043] The number of faults of the power concentrator within a preset historical period is obtained, and the fault rate is obtained based on the number of faults. The fault rate is used as a parameter in the Poisson distribution to obtain the Poisson distribution formula. Based on the Poisson distribution formula, the probability of a single fault of the power concentrator occurring once within the target incremental interval is obtained.

[0044] The ratio between the target incremental interval and the target full interval is rounded up to obtain the number of incremental backups when performing incremental backups on the data between the historical full backup time and the new full backup time. The product of the number of incremental backups, the probability of damage to the historical incremental backups, and the probability of a single failure of the concentrator is calculated to obtain the first total probability.

[0045] If the number of failures is less than 2, then the first total probability is used as the second risk coefficient;

[0046] If the number of faults is greater than or equal to 2, the time interval between every two adjacent faults of the power concentrator within a preset historical period is calculated, and the minimum value among all time intervals is recorded as the minimum fault interval. Based on the minimum fault interval, the target incremental interval, and the first total probability, a second risk coefficient is obtained, wherein the formula for calculating the second risk coefficient is:

[0047]

[0048] Among them, P loss T represents the second risk factor. fail Let represent the minimum fault interval, Δt represent the target incremental interval, P1 represent the first total probability, y represent the rounded-up result of the ratio between the minimum fault interval and the target incremental interval, denoted as the possible number of faults within the target incremental interval, λ represent the fault rate of the power concentrator within a preset historical period, e represent the natural constant, and P fail,1 This represents the probability of a single failure of the power concentrator, and n represents the number of failures that the power concentrator will experience within a preset historical period.

[0049] Preferably, obtaining the optimal incremental full backup combination based on the recovery risk coefficients of all backups includes:

[0050] Among all backup and recovery risk coefficients, the incremental full backup combination corresponding to the minimum value is obtained. If the incremental full backup combination corresponding to the minimum value is unique, then the incremental full backup combination corresponding to the minimum value is taken as the best incremental full backup combination.

[0051] If the incremental full backup combination corresponding to the minimum value is not unique, then the incremental full backup combination corresponding to the minimum value is recorded as the target incremental full backup combination. The time difference between the full interval and the incremental interval in each target incremental full backup combination is calculated, and the target incremental full backup combination with the smallest time difference is selected as the best incremental full backup combination.

[0052] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0053] This invention assembles target power data from a power concentrator at each sampling moment within the current backup cycle into a power data sequence. Based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator, an initial incremental backup interval is obtained. Using different seed periods, the power data sequence is divided into subsequences, and based on the periodic variation of each subsequence within each sub-period, an initial full backup interval is obtained. The initial incremental backup interval and the initial full backup interval are adjusted to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval. Based on the initial incremental backup interval, the initial full backup interval, and all adjusted incremental and full backup intervals, at least one incremental full backup combination is obtained. Based on the power concentrator's historical incremental backup and historical full backup data, as well as its historical fault data, a backup recovery risk coefficient is obtained when storing and backing up the power data sequence using each incremental full backup combination. Based on all backup recovery risk coefficients, the optimal incremental full backup combination is obtained. Based on the optimal incremental full backup combination, the power concentrator's data is stored and backed up in future backup cycles. The process involves obtaining the initial incremental backup time based on the frequency of power data changes, and the initial full backup time based on the periodic change pattern of the data. The initial full backup time and the initial incremental backup time are then adjusted to obtain at least one incremental full backup combination. Based on the historical fault conditions of the power concentrator, the backup recovery risk coefficient for each incremental full backup combination is obtained to find the optimal incremental full backup combination. This balances the full backup time and incremental backup time, thereby improving the integrity of backup data and the efficiency of data recovery. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a flowchart of a data storage and backup method for a concentrator provided in Embodiment 1 of the present invention. Detailed Implementation

[0056] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0057] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0058] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0059] See Figure 1 This is a flowchart of a data storage and backup method for a concentrator provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the method may include:

[0060] Step S101: The target power data of the power concentrator at each sampling time in the current backup cycle is combined into a power data sequence.

[0061] Incremental backup is suitable for scenarios where data changes frequently, the data volume is large, and backups can be performed quickly within a short period of time without affecting the normal operation of other system modules; while full backup is suitable for scenarios where data changes infrequently, the data volume is small, backups are not required quickly within a short period of time, and the operation of other system modules can be appropriately affected.

[0062] The data changes of power concentrators are mainly related to electricity consumption behavior. For example, electricity consumption in commercial buildings is generally concentrated during the weekdays and daytime. Therefore, electricity data changes more frequently during the daytime on weekdays. Incremental backup can be used at this time to ensure data backup efficiency, reduce system operating costs, and improve storage space efficiency and the operating efficiency of other system modules. On weekends, electricity consumption is usually low, especially at night, with almost no electricity consumption. At this time, the usage frequency of other system modules is relatively low, so full backup can be used to perform a full backup of the data to ensure data integrity.

[0063] Therefore, the full backup time and incremental backup time can be balanced according to the data changes in the power concentrator to store and back up the data in the power concentrator, thereby improving the integrity of backup data and the efficiency of data recovery.

[0064] Since users' electricity consumption behavior is regular, that is, the data in the power concentrator changes in stages, in this embodiment of the invention, the time range of the data in the power concentrator that changes in stages is first obtained, and then the duration of the time range is used as the cycle length of the backup period to analyze the data changes of the power concentrator in the current backup period, thereby balancing the full backup time and the incremental backup time to find the optimal full backup time and the optimal incremental backup time.

[0065] The data in the power concentrator includes current data, voltage data, electrical load data, power data, etc. Since there are correlations between these data, any one of them can be selected as the object of analysis. In this embodiment of the invention, taking current data as an example, within one year prior to the current moment, based on the data sampling frequency of the power concentrator (e.g., once per second), the average current data of all meters connected to the power concentrator at each sampling moment within one year is obtained, resulting in a historical data sequence. The time range of phased changes in the data in the historical data sequence is obtained using the autocorrelation coefficient. The general steps are as follows: (1) Calculate the autocorrelation coefficient of the historical data sequence under different lag orders. In this embodiment of the invention, the lag orders are set to 1 hour, 4 hours, 8 hours, 24 hours, 72 hours, one week, one month, and one quarter, respectively. There are no restrictions here, and the implementer can set them according to the user situation corresponding to the power concentrator; (2) Construct an autocorrelation graph (ACF graph) based on the autocorrelation coefficients of different lag orders. The horizontal axis of the autocorrelation graph represents the lag order, and the vertical axis represents the autocorrelation coefficient; (3) Obtain the first significant peak in the autocorrelation graph. The lag order corresponding to the first significant peak is recorded as the time range of phased changes in the data in the historical data sequence. Using the autocorrelation coefficient to obtain the time range of phased changes in the data in the historical data sequence is existing technology and will not be elaborated here.

[0066] Assuming that the time range for the phased changes in the obtained historical data sequence is one month, then the month before the current moment is taken as the current backup period. The average current data of all the electricity meters connected to the power concentrator at each sampling moment in the current backup period is obtained to obtain the power data sequence. In order to analyze the data changes in the power data sequence, balance the full backup time and the incremental backup time, and find the optimal full backup time and the optimal incremental backup time.

[0067] Step S102: Based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator, obtain the initial incremental backup interval; using different seed periods, divide the power data sequence into subsequences respectively, and obtain the initial full backup interval based on the periodic change pattern of each subsequence under each sub-period.

[0068] Incremental backup is suitable for scenarios with frequent data changes and large data volumes. That is, the more frequently the data changes, the shorter the time interval between two adjacent incremental backups should be. Therefore, the initial incremental backup interval is obtained based on the frequency of data changes in the power data sequence. The specific steps are as follows:

[0069] (1) Obtain the data change coefficient of the power data sequence based on the frequency of data changes in the power data sequence.

[0070] Specifically: At least three different window sizes should be set according to the power usage, such as 1 hour, 4 hours, and 8 hours. However, to ensure sufficient data for analysis, the minimum window size must be greater than 3 (if the power concentrator's data sampling frequency is once per second, the window size cannot be less than or equal to 3 seconds, meaning the amount of data within the window cannot be less than or equal to 3). Simultaneously, the maximum window size must be less than the duration of the current backup cycle. There are no restrictions here. Implementers can set different window sizes and maximum window sizes according to specific scenarios, so as to divide the power data sequence into at least two subsequences according to different window sizes, and then analyze the data changes of power data in different time periods.

[0071] Taking the i-th window size as an example, the power data sequence is divided into at least two subsequences according to the i-th window size. For example, assuming the power data sequence is (1, 2, 3, 4, 5, 6, 7, 8, 9) and the i-th window size is 5, the subsequences are (1, 2, 3, 4, 5) and (6, 7, 8, 9). The coefficient of variation of each subsequence is calculated, the mean of the coefficients of variation of all subsequences is calculated, the average coefficient of variation under the i-th window size is obtained, the average coefficient of variation under each window size is obtained, the average of all average coefficients of variation is calculated, and the frequency of data change of the power data sequence is obtained.

[0072] The number of failures of the power concentrator in the year prior to the current backup cycle is obtained. There is no limit to this; the implementer can set it according to the specific scenario. Assuming the backup cycle is one month, the number of historical backup cycles is 12. That is, the number of failures of the power concentrator in 12 historical backup cycles is obtained. The number of failures is divided by the number of historical backup cycles to obtain the failure rate. If the number of failures of the power concentrator in the year prior to the current backup cycle is 3, the failure rate is 0.25. The frequency of data changes, the failure rate, and the number of all electricity meters connected to the power concentrator are multiplied together to obtain the cumulative result.

[0073] Calculate the reciprocal of the sum between constant 1 and the product result, and subtract the reciprocal from constant 1 to obtain the data variation coefficient of the power data sequence.

[0074] In one embodiment, the formula for calculating the data variation coefficient of the power data sequence is:

[0075]

[0076] Where α represents the data variation coefficient of the power data sequence, and n represents the number of different window sizes. Let represent the average coefficient of variation under the i-th window size, Gu represent the failure rate of the power concentrator, and El represent the number of all electricity meters connected to the power concentrator.

[0077] It should be noted that, Used to characterize the frequency of changes in power data under different window sizes. The larger α is, the greater the fluctuation of the power data during the current backup cycle, meaning the power data changes frequently. Consequently, the larger α is, the greater the data change coefficient of the power data sequence. The larger Gu is, the more times the power concentrator fails. In this case, the backup frequency needs to be increased to reduce the possibility of data loss. Consequently, the larger α is, the greater the data change coefficient of the power data sequence. The larger El is, the more meters connected to the power concentrator, the greater the amount of data that changes. The power concentrator needs to store and back up a larger amount of data. Consequently, the larger α is, the greater the data change coefficient of the power data sequence.

[0078] (2) Obtain the initial incremental backup interval based on the duration of the current backup cycle and the data change coefficient of the power data sequence.

[0079] Specifically: calculate the difference between constant 1 and the data change coefficient, and use the product of the current backup cycle duration and the difference as the initial incremental backup interval.

[0080] In one implementation, the initial incremental backup interval is calculated using the following formula:

[0081] ZT=(1―α)×T

[0082] Where ZT represents the initial incremental backup interval, α represents the data change coefficient of the power data sequence, and T represents the duration of the current backup cycle.

[0083] It should be noted that the larger α is, the greater the fluctuation of power data in the current backup cycle, that is, the more frequently the power data changes and the more times the power concentrator fails. The larger the amount of data that the power concentrator needs to store for backup, the more necessary it is to increase the backup frequency to reduce the possibility of data loss. Consequently, the smaller ZT is, the shorter the initial incremental backup interval.

[0084] At this point, the initial incremental backup interval has been obtained. Next, the initial full backup interval is obtained.

[0085] Full backups typically require storing complete data. However, excessively large data volumes can lead to lengthy backup times and impact system resource scheduling. Therefore, it is possible to analyze the data variation patterns in power data sequences, identify nodes with strong regularity, and thus obtain the initial full backup interval.

[0086] In this embodiment of the invention, at least three sub-periods are set, such as 1 hour, 4 hours, 8 hours, 24 hours, 1 week, etc., without limitation. Implementers can set them according to specific scenarios, but the period length of the sub-period must be greater than the initial incremental backup interval and less than the period length of the current backup period. Taking the u-th seed period as an example, according to the u-th seed period, the power data sequence is divided into at least two sub-period sequences. In all sub-period sequences, data with the same position are grouped into sub-sequences to obtain at least two sub-sequences of the u-th seed period. This allows analysis of the periodic change pattern of each sub-sequence under the u-th seed period, obtaining the power consumption pattern coefficient under the u-th seed period, which is used to characterize the regularity of data changes under the u-th seed period. Similarly, the power consumption pattern coefficient under each sub-period is obtained, and then the sub-period with the larger power consumption pattern coefficient is found, which is the node with stronger regularity, and then the initial full backup interval is obtained.

[0087] The specific steps for obtaining the electricity consumption coefficient under the u-th seed period are as follows:

[0088] Calculate the coefficient of variation for each subsequence under the u-th seed period, and use the mean of all coefficients of variation as the data periodicity index under the u-th seed period;

[0089] For any subsequence, obtain the rated value of the target power data (in this embodiment of the invention, the target power data is current), and linearly normalize the absolute value of the difference between each data in the subsequence and the rated value to obtain the fluctuation value of each data in the subsequence. Calculate the mean of the fluctuation values ​​of all data in the subsequence to obtain the degree of fluctuation of the subsequence.

[0090] Calculate the average fluctuation of all subsequences under the u-th seed period, calculate the reciprocal of the sum of the average and the constant 1, and subtract the reciprocal from the constant 1 to obtain the regularity confidence under any seed period;

[0091] The product of the data periodicity index and the reliability of the pattern is calculated to obtain the electricity consumption pattern coefficient under the u-th seed period.

[0092] In one embodiment, the formula for calculating the electricity consumption pattern coefficient under the u-th seed period is:

[0093]

[0094] Where, β u N represents the electricity consumption pattern coefficient under the u-th seed period. u CV represents the number of subsequences in the u-th seed period. u,j H represents the coefficient of variation of the j-th subsequence under the u-th seed period. j I represents the number of data points in the j-th subsequence under the u-th seed period. h Let In represent the h-th data in the j-th subsequence under the u-th seed period, In represent the rated value of the target power data. In this embodiment of the invention, the target power data is current, so In represents the rated current, || represents the sign of the absolute value of the difference, and norm() represents the linear normalization function.

[0095] It should be noted that CV u,j The smaller the value, the smaller the data difference in the j-th subsequence under the u-th seed period, and the stronger the regularity of data changes, thus increasing β. u The larger the value, the greater the electricity consumption regularity coefficient under the u-th seed period; |I h —In| The smaller, The smaller the value, the more stable the electricity consumption data. This means that the electricity data itself changes relatively steadily within the current backup period. However, this makes it difficult to reflect the regularity of data changes, resulting in lower reliability of the regularity of data changes, which is equivalent to a lower CV (Continuous Value). u,j The lower the credibility, the less credible it is.

[0096] Similarly, obtain the power consumption pattern coefficient for each sub-cycle, and among all power consumption pattern coefficients, take the cycle length of the sub-cycle corresponding to the maximum value as the initial full backup interval.

[0097] Thus, the initial incremental backup interval and the initial full backup interval were obtained.

[0098] Step S103: Adjust the initial incremental backup interval and the initial full backup interval respectively to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval. Based on the initial incremental backup interval and the initial full backup interval, as well as all the adjusted incremental backup intervals and adjusted full backup intervals, obtain at least one incremental full backup combination.

[0099] Because incremental backups require merging all incremental backup files during data recovery, if the interval between incremental backups is short, the number of incremental backup files will be greater, meaning more files need to be merged. This results in longer data recovery time and increases the probability of a single point of failure (the probability that any incremental backup file will be corrupted, making data recovery impossible). On the other hand, if the interval between full backups is too long, the amount of data that needs to be backed up will increase, the backup time will grow, and the amount of data lost in a single backup will be larger.

[0100] Therefore, after obtaining the initial incremental backup interval and the initial full backup interval through step S102, it is necessary to adjust the initial incremental backup interval and the initial full backup interval to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval. Then, different incremental backup intervals and full backup intervals are combined in pairs to obtain different incremental full backup combinations. This is to obtain the backup recovery risk coefficient when using each incremental full backup combination to store and back up the power data sequence, and then obtain the optimal incremental full backup combination for storing and backing up the data in the power concentrator in the future period.

[0101] The steps for adjusting the initial incremental backup interval and the initial full backup interval to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval are as follows:

[0102] Based on the initial incremental backup interval, a first interval is obtained according to a preset ratio. Based on the initial full backup interval, a second interval is obtained according to a preset ratio. In this embodiment of the invention, the preset ratio is set to 10:1. This is not a limitation and the implementer can set it according to the specific scenario. The preset ratio corresponding to the initial incremental backup interval can be different from the preset ratio corresponding to the initial full backup interval. Assuming that the initial incremental backup interval is 1 hour and the initial full backup interval is 2 hours, then the first interval is 0.1 hours and the second interval is 0.2 hours. The minimum value between the first interval and the second interval is obtained to get the unit time used to adjust the initial incremental backup interval and the initial full backup interval.

[0103] Since the number of incremental backup files should not be too large, i.e., the interval between incremental backups should not be too short, the incremental backup interval should only be appropriately increased based on the initial incremental backup interval, while the initial full backup interval should be appropriately increased or decreased. That is, the fault interval between every two adjacent faults of the power concentrator within a preset historical period is obtained, the average of all fault intervals is taken as the maximum incremental backup interval, the sum between the initial incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval, the adjusted incremental backup interval is taken as the new incremental backup interval, the sum between the new incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval, until the adjusted incremental backup interval is greater than or equal to the maximum incremental backup interval, and all adjusted incremental backup intervals are obtained.

[0104] The current backup cycle length is used as the maximum full backup interval. The sum between the initial full backup interval and the unit time is calculated to obtain the first full backup interval. The first full backup interval is used as the first new full backup interval. The sum between the first new full backup interval and the unit time is calculated to obtain the first full backup interval. This process continues until the first new full backup interval is greater than or equal to the maximum full backup interval, resulting in all first full backup intervals.

[0105] Calculate the difference between the initial full backup interval and the unit time to obtain the second full backup interval. Use the second full backup interval as the second new full backup interval. Calculate the difference between the second new full backup interval and the unit time to obtain the second full backup interval. Continue until the second new full backup interval is less than or equal to the initial incremental backup interval to obtain all second full backup intervals. Record all first full backup intervals and all second full backup intervals as the adjusted full backup intervals.

[0106] For example, assuming the initial incremental backup interval is 1 hour, the initial full backup interval is 2 hours, the unit time is 0.1 hours, the maximum incremental backup interval is 1.5 hours, and the maximum full backup interval is 8 hours, then the adjusted incremental backup intervals are 1.1 hours, 1.2 hours, 1.3 hours, and 1.4 hours respectively; the first full backup intervals are 2.1 hours, 2.2 hours, and 2.3 hours respectively, and so on, up to 7.9 hours; the second full backup intervals are 1.9 hours, 1.8 hours, and 1.7 hours respectively, and so on, up to 1.1 hours. All first full backup intervals and all second full backup intervals are recorded as adjusted full backup intervals.

[0107] At this point, we have obtained all the adjusted incremental backup intervals and all the adjusted full backup intervals.

[0108] Furthermore, all adjusted incremental backup intervals and the initial incremental backup interval are denoted as incremental intervals, and all adjusted full backup intervals and the initial full backup interval are denoted as full intervals. All incremental intervals and all full intervals are combined in pairs to obtain at least one incremental full backup combination. In the incremental full backup combination, the full interval is greater than the incremental interval.

[0109] For example: If the incremental intervals are 1.0 hour and 1.1 hours, and the full backup intervals are 1.9 hours, 2.0 hours, and 2.1 hours, then the incremental and full backup combinations are (incremental interval 1.0 hour, full backup 1.9 hours), (incremental interval 1.0 hour, full backup 2.0 hours), (incremental interval 1.0 hour, full backup 2.1 hours), (incremental interval 1.1 hour, full backup 1.9 hours), (incremental interval 1.1 hour, full backup 2.0 hours), and (incremental interval 1.1 hour, full backup 2.1 hours).

[0110] This completes the combination of all incremental full backups.

[0111] Step S104: Based on the historical incremental backup and historical full backup of the power concentrator, as well as the historical fault situation of the power concentrator, obtain the backup recovery risk coefficient when storing and backing up the power data sequence using each incremental full backup combination. Based on all backup recovery risk coefficients, obtain the optimal incremental full backup combination. Based on the optimal incremental full backup combination, store and back up the data of the power concentrator in the future backup cycle.

[0112] After obtaining all incremental full backup combinations in step S103, based on the historical incremental backup and historical full backup status of the power concentrator, as well as the historical fault status of the power concentrator, the backup recovery risk coefficient when using each incremental full backup combination to store and back up the power data sequence is obtained, thereby obtaining the optimal incremental full backup combination, which is used to store and back up the data in the power concentrator in the future period.

[0113] Taking the r-th incremental full backup combination as an example, let the full interval and incremental interval in the r-th incremental full backup combination be denoted as the target full interval and the target incremental interval, respectively. Then, the steps to obtain the r-th incremental full backup combination are as follows:

[0114] (1) Obtain the historical full backup time of the last full backup of the power concentrator, calculate the sum between the historical full backup time and the target full backup interval, obtain the new full backup time, and obtain the full risk coefficient of the target full backup interval based on the amount of data between the historical full backup time and the new full backup time.

[0115] Because longer full backup intervals require more data to be backed up, increasing backup time and potentially leading to greater data loss in a single backup, thus increasing risk, it's necessary to determine the full backup risk coefficient for the target full backup interval based on the amount of data between historical full backup times and the new full backup time. Specifically:

[0116] Obtain the storage read / write speed of the power concentrator, and the amount of data between the historical full backup time and the new full backup time. It's important to note that the data amount and storage read / write speed must be in the same unit. Assuming the storage read / write speed is in MB / s, the data amount must be in MB. Assuming the full backup interval is 2 hours and the data sampling frequency in the power concentrator is once per second, there are 7200 data points between the historical full backup time and the new full backup time. Assuming each data point is 1 byte, then 7200 data points... Calculate the ratio between the data volume and the storage read / write speed to obtain the time required for a full backup. Calculate the reciprocal of the sum of the time required for a full backup and a constant 1. Subtract the reciprocal from the constant 1 to obtain the full risk coefficient for the target full backup interval.

[0117] In one embodiment, the formula for calculating the full-scale risk coefficient of the target full-scale interval is:

[0118]

[0119] Where, μQ r T represents the full risk coefficient of the target full interval (the full interval in the r-th incremental full backup combination). v This indicates the time required for a full backup.

[0120] It should be noted that the larger the target full backup interval, the more data needs to be backed up, T. v The larger the value, the greater the amount of data lost in a single instance, and the greater the storage resources required, thus increasing μQ. r The larger the value, the higher the risk of data recovery.

[0121] (2) Based on the target incremental interval, as well as the historical incremental backup and historical fault status of the power concentrator, the incremental risk coefficient of the target incremental interval is obtained.

[0122] For incremental backups, if the interval between incremental backups is short, the number of incremental backup files is large, meaning more files need to be merged. This results in longer data recovery times and increases the probability of single points of failure. Conversely, if the interval between incremental backups is long, a failure of the power concentrator can lead to increased data loss. For example, if the power concentrator experiences a data-loss-causing failure every hour within a 3-hour period, a 1-hour interval would result in the loss of 3 hours of data, while a 0.5-hour interval would result in a maximum loss of 1.5 hours. Therefore, it is necessary to obtain the incremental risk coefficient for the target incremental interval based on the power concentrator's failure history and historical incremental backup data. The steps for obtaining this coefficient are as follows:

[0123] (a) Obtain the first risk factor based on the historical incremental backup of the power concentrator.

[0124] Specifically: In the log records of the power concentrator, the backup chain at the time of the last data recovery failure in the power concentrator is obtained. The number of all incremental backup files in the backup chain and the number of all damaged incremental backup files are counted. The proportion of the number of damaged incremental backup files in the total number of incremental backup files is calculated to obtain the historical incremental backup corruption probability. The product between the preset retry cost multiple and the historical incremental backup corruption probability is calculated. The sum of the constant 1 and the product is used as the first risk coefficient, denoted as ω, i.e., ω = 1 + R × M, where R represents the historical incremental backup corruption probability and M represents the preset retry cost multiple. The larger R is, the higher the probability of incremental backup file corruption and the larger the first risk coefficient. In this embodiment of the invention, M = 2 is set. There is no limitation here, and the implementer can set it according to the specific scenario.

[0125] (b) A second risk coefficient is obtained based on the number of failures of the power concentrator within a preset historical period and the target incremental interval.

[0126] Specifically: Obtain the number of failures of the power concentrator within one year prior to the current backup cycle (this is not limited and can be set by the implementer according to the specific scenario). Calculate the failure rate based on the number of failures. Since the failure occurrence time follows a Poisson distribution, use the failure rate as a parameter in the Poisson distribution to obtain the Poisson distribution formula. Based on the Poisson distribution formula, obtain the probability of a single failure of the power concentrator occurring once within the target incremental interval, denoted as P. fail,1 That is, P fail,1 =λ×Δt×e ―λ×Δt , where Δt represents the target incremental interval, λ represents the failure rate of the power concentrator within the preset historical period (i.e., within one year before the current backup cycle), and e represents the natural constant;

[0127] The ratio between the target incremental interval and the target full interval is rounded up to obtain the number of incremental backups when performing incremental backups on data between the historical full backup time and the new full backup time. The product of the number of incremental backups, the probability of historical incremental backup corruption, and the probability of a single concentrator failure is calculated to obtain the first total probability, denoted as P1, i.e., P1 = L. r ×R×P fail,1 , where L r P represents the number of incremental backups corresponding to the target incremental interval (the incremental interval in the r-th incremental full backup combination), R represents the probability of historical incremental backup corruption, and P represents the number of incremental backups corresponding to the target incremental interval (the incremental interval in the r-th incremental full backup combination). fail,1 This indicates the probability of a single failure of the concentrator;

[0128] If the number of failures is less than 2, then the first total probability is used as the second risk coefficient;

[0129] If the number of faults is greater than or equal to 2, the time interval between every two adjacent faults of the power concentrator within a preset historical period is calculated, and the minimum value among all time intervals is recorded as the minimum fault interval. Based on the minimum fault interval, the target incremental interval, and the first total probability, a second risk coefficient is obtained. The formula for calculating the second risk coefficient is as follows:

[0130]

[0131] Among them, P loss T represents the second risk factor. fail Let represent the minimum fault interval, Δt represent the target incremental interval, P1 represent the first total probability, y represent the rounded-up result of the ratio between the minimum fault interval and the target incremental interval, denoted as the possible number of faults within the target incremental interval, λ represent the fault rate of the power concentrator within a preset historical period, e represent the natural constant, and P fail,1This represents the probability of a single failure of the power concentrator, and n represents the number of failures that the power concentrator will experience within a preset historical period.

[0132] It should be noted that the larger Δt is, i.e., the longer the incremental backup interval, the greater the probability of data loss when the power concentrator fails, i.e., P loss The larger; This represents the probability of the power concentrator experiencing k failures within Δt. Since a power concentrator failure does not necessarily lead to data loss (e.g., soft failures, software crashes, momentary power outages, etc.), data can be recovered through restarting or log rollback without data loss, it is also necessary to calculate the probability of data loss due to power concentrator failure within Δt, i.e., [1―(1―P fail,1 ) n ] k , which represents the probability that at least one data loss will occur due to a power concentrator failure within Δt. The two probabilities are combined to comprehensively reflect the risk of the target incremental interval.

[0133] For example: Suppose a power concentrator experiences 5 failures during 1000 hours of operation, with a failure rate of 0.005 failures / hour (λ = 0.005). The target incremental interval Δt = 2 (in hours). The number of incremental backups L corresponding to the target incremental interval (the incremental interval in the r-th incremental full backup combination) is... r =1000, historical incremental backup failure probability R = 0.01, then the concentrator single failure probability P fail,1 =λ×Δt×e ―λ×Δt =0.005×2×e ―0.005×2 If ≈0.00995, then the first total probability P1 = L r ×R×P fail,1 =1000×0.01×0.00995≈0.0995;

[0134] If T fail If ≥Δt, then P loss =P1=0.0995;

[0135] If T fail <Δt, assuming y = 2, then [1―(1―P fail,1 ) n ] k =[1―(1―0.00995)] 5 ] 2 ≈0.0488 2 ,

[0136] (c) Calculate the incremental risk coefficient of the target incremental interval based on the target incremental interval, the first risk coefficient, and the second risk coefficient.

[0137] Specifically: Calculate the quotient of the target incremental interval divided by the target full interval to obtain the number of incremental backups when performing incremental backups on the data between the historical full backup time and the new full backup time; calculate the product of the number of incremental backups, the first risk coefficient, and the second risk coefficient to obtain the incremental risk coefficient of the target incremental interval.

[0138] In one embodiment, the formula for calculating the incremental risk coefficient of the target incremental interval is:

[0139] μZ r =L r ×ω×P loss

[0140] Where, μZ r L represents the incremental risk coefficient of the target incremental interval (the incremental interval in the r-th incremental full backup combination). r P represents the number of incremental backups corresponding to the target incremental interval (the incremental interval in the r-th incremental full backup combination), ω represents the first risk coefficient, and P represents the number of incremental backups. loss This indicates the second risk factor.

[0141] It should be noted that the larger the target increment interval, the more L r The smaller, but at the same time P loss The risk factor increases with the increase of the target incremental interval. That is, the probability of data loss due to power concentrator failure within the target incremental interval increases with the increase of the target incremental interval. Therefore, it is necessary to calculate the second risk factor for different incremental intervals, that is, to calculate the backup recovery risk factor for different incremental full backup combinations, so as to find the best incremental full backup combination with the smallest backup recovery risk factor and balance the incremental backup time and the full backup time.

[0142] (3) Calculate the total risk coefficient μQ r With incremental risk coefficient μZ r The product of the two is used to obtain the backup and recovery risk coefficient when storing and backing up the power data sequence using the r-th incremental full backup combination.

[0143] Thus, the backup and recovery risk coefficient when storing and backing up the power data sequence using the r-th incremental full backup combination was obtained. Similarly, the risk coefficients corresponding to all incremental full backup combinations were obtained.

[0144] Among all backup and recovery risk coefficients, the incremental full backup combination corresponding to the minimum value is obtained. If the incremental full backup combination corresponding to the minimum value is unique, then the incremental full backup combination corresponding to the minimum value is taken as the best incremental full backup combination.

[0145] If the incremental full backup combination corresponding to the minimum value is not unique, then the incremental full backup combination corresponding to the minimum value is recorded as the target incremental full backup combination. Since the number of incremental backup files should not be too large, the incremental full backup combination with fewer incremental backup files should be selected. Therefore, the time difference between the full interval and the incremental interval in each target incremental full backup combination is calculated. The smaller the time difference, the fewer the incremental backup files. That is, the target incremental full backup combination with the smallest time difference is selected as the optimal incremental full backup combination. The incremental interval and the full interval in the optimal incremental full backup combination are the optimal full backup time and the optimal incremental backup time. Based on the optimal incremental full backup combination, the data of the power concentrator in the future backup cycle is stored and backed up. At the same time, based on the power data sequence in the future backup cycle, the optimal incremental full backup combination is re-acquired to improve the integrity of the backup data and the efficiency of data storage and recovery.

[0146] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A concentrator with data storage and backup function, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: The target power data of the power concentrator at each sampling time within the current backup cycle is composed into a power data sequence; The initial incremental backup interval is obtained based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator. Using different seed periods, the power data sequence is divided into subsequences. Based on the periodic variation pattern of each subsequence under each sub-period, the initial full backup interval is obtained. The initial incremental backup interval and the initial full backup interval are adjusted respectively to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval. Based on the initial incremental backup interval and the initial full backup interval, as well as all the adjusted incremental backup intervals and adjusted full backup intervals, at least one incremental full backup combination is obtained. Based on the historical incremental backup and historical full backup of the power concentrator, as well as the historical failure of the power concentrator, the backup recovery risk coefficient is obtained when storing and backing up the power data sequence using each incremental and full backup combination. Based on all backup recovery risk coefficients, the optimal incremental and full backup combination is obtained. Based on the optimal incremental and full backup combination, the data of the power concentrator is stored and backed up in the future backup cycle. The process of obtaining at least one incremental-to-full backup combination based on the initial incremental backup interval and the initial full backup interval, as well as all adjusted incremental backup intervals and adjusted full backup intervals, includes: All adjusted incremental backup intervals and the initial incremental backup interval are denoted as incremental intervals, and all adjusted full backup intervals and the initial full backup interval are denoted as full intervals. All incremental intervals and all full intervals are combined in pairs to obtain at least one incremental full backup combination. In the incremental full backup combination, the full interval is greater than the incremental interval. The process of obtaining the optimal incremental full backup combination based on the recovery risk coefficients of all backups includes: Among all backup and recovery risk coefficients, the incremental full backup combination corresponding to the minimum value is obtained. If the incremental full backup combination corresponding to the minimum value is unique, then the incremental full backup combination corresponding to the minimum value is taken as the best incremental full backup combination. If the incremental full backup combination corresponding to the minimum value is not unique, then the incremental full backup combination corresponding to the minimum value is recorded as the target incremental full backup combination. The time difference between the full interval and the incremental interval in each target incremental full backup combination is calculated, and the target incremental full backup combination with the smallest time difference is selected as the best incremental full backup combination.

2. A concentrator with data storage and backup function according to claim 1, characterized in that, The process of obtaining the initial incremental backup interval based on the frequency of data changes in the power data sequence and the number of meters connected to the power concentrator includes: For any preset window size within a preset window size range, the power data sequence is divided into at least two subsequences according to the preset window size. The coefficient of variation of each subsequence is calculated, the mean of the coefficients of variation of all subsequences is calculated, the average coefficient of variation under the preset window size is obtained, the average coefficient of variation under each preset window size within the preset window size range is obtained, the average of all average coefficients of variation is calculated, and the frequency of data change of the power data sequence is obtained. The number of failures of the power concentrator within a preset number of historical backup cycles is obtained. The number of failures is divided by the number of historical backup cycles to obtain the failure rate. The frequency of data changes, the failure rate, and the number of all electricity meters connected to the power concentrator are multiplied together to obtain the cumulative result. Calculate the reciprocal of the sum between constant 1 and the product result, and subtract the reciprocal from constant 1 to obtain the data variation coefficient of the power data sequence; Calculate the difference between constant 1 and the data change coefficient, and use the product of the current backup cycle duration and the difference as the initial incremental backup interval.

3. A concentrator with data storage and backup function according to claim 1, characterized in that, If the period length of the sub-period is greater than the initial incremental backup interval, then the process of dividing the power data sequence into sub-sequences using different seed periods, and obtaining the initial full backup interval based on the periodic variation pattern of each sub-sequence under each sub-period, includes: For any seed period, the power data sequence is divided into at least two sub-period sequences according to the seed period. In all sub-period sequences, data with the same position are grouped into sub-sequences to obtain at least two sub-sequences under the seed period. Based on the periodic variation pattern of each subsequence under any seed period, obtain the electricity consumption pattern coefficient under any seed period; Obtain the power consumption pattern coefficient for each sub-cycle. Among all power consumption pattern coefficients, take the cycle length of the sub-cycle corresponding to the maximum value as the initial full backup interval.

4. A concentrator with data storage and backup function according to claim 3, characterized in that, The step of obtaining the electricity consumption pattern coefficient under any seed period based on the periodic variation pattern of each subsequence under any seed period includes: Calculate the coefficient of variation for each subsequence under any given seed period, and use the mean of all coefficients of variation as the data periodicity index under any given seed period. For any subsequence, obtain the rated value of the target power data, and linearly normalize the absolute value of the difference between each data in the subsequence and the rated value to obtain the fluctuation value of each data in the subsequence. Calculate the mean of the fluctuation values ​​of all data in the subsequence to obtain the degree of fluctuation of the subsequence. Calculate the average fluctuation of all subsequences under any given seed period, calculate the reciprocal of the sum of the average and constant 1, and subtract the reciprocal from constant 1 to obtain the reliability of the pattern under any given seed period. Calculate the product between the data periodicity index and the reliability of the pattern to obtain the electricity consumption pattern coefficient under any seed period.

5. A concentrator with data storage and backup function according to claim 1, characterized in that, The step of adjusting the initial incremental backup interval and the initial full backup interval respectively to obtain at least one adjusted incremental backup interval and at least one adjusted full backup interval includes: Based on the initial incremental backup interval, a first interval is obtained according to a preset ratio. Based on the initial full backup interval, a second interval is obtained according to a preset ratio. The minimum value between the first interval and the second interval is obtained to obtain the unit time used to adjust the initial incremental backup interval and the initial full backup interval. The fault time interval between two consecutive faults of the power concentrator within a preset historical period is obtained. The average value of all fault time intervals is taken as the maximum incremental backup interval. The sum between the initial incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval. The adjusted incremental backup interval is taken as the new incremental backup interval. The sum between the new incremental backup interval and the unit time is calculated to obtain the adjusted incremental backup interval. This process is repeated until the adjusted incremental backup interval is greater than or equal to the maximum incremental backup interval, thus obtaining all adjusted incremental backup intervals. The current backup cycle length is used as the maximum full backup interval. The sum between the initial full backup interval and the unit time is calculated to obtain the first full backup interval. The first full backup interval is used as the first new full backup interval. The sum between the first new full backup interval and the unit time is calculated to obtain the first full backup interval. This process continues until the first new full backup interval is greater than or equal to the maximum full backup interval, resulting in all first full backup intervals. Calculate the difference between the initial full backup interval and the unit time to obtain the second full backup interval. Use the second full backup interval as the second new full backup interval. Calculate the difference between the second new full backup interval and the unit time to obtain the second full backup interval. Continue until the second new full backup interval is less than or equal to the initial incremental backup interval to obtain all second full backup intervals. Record all first full backup intervals and all second full backup intervals as the adjusted full backup intervals.

6. A concentrator with data storage and backup function according to claim 1, characterized in that, The backup recovery risk coefficient is obtained based on the historical incremental backup and historical full backup of the power concentrator, as well as the historical fault situation of the power concentrator, when storing and backing up the power data sequence using each incremental full backup combination, including: Obtain the historical full backup time of the last full backup of the power concentrator, and the historical incremental backup time of the last incremental backup. For any incremental full backup combination, the full interval and incremental interval in the incremental full backup combination are respectively denoted as the target full interval and the target incremental interval. The sum between the historical full backup time and the target full interval is calculated to obtain the new full backup time. Obtain the storage read / write speed of the power concentrator, and the amount of data between the historical full backup time and the new full backup time. Calculate the ratio between the amount of data and the storage read / write speed to obtain the time required for a full backup. Calculate the reciprocal of the sum between the time required for a full backup and a constant 1. Subtract the reciprocal from the constant 1 to obtain the full risk coefficient of the target full backup interval. Based on the target incremental interval, as well as the historical incremental backup and historical fault conditions of the power concentrator, the incremental risk coefficient of the target incremental interval is obtained. Calculate the product between the full risk coefficient and the incremental risk coefficient to obtain the backup recovery risk coefficient when storing and backing up the power data sequence using any of the incremental full backup combinations.

7. A concentrator with data storage and backup function according to claim 6, characterized in that, The step of obtaining the incremental risk coefficient of the target incremental interval based on the target incremental interval, as well as the historical incremental backup and historical fault conditions of the power concentrator, includes: Obtain the backup chain at the time of the last data recovery failure in the power concentrator, count the number of all incremental backup files in the backup chain and the number of all damaged incremental backup files, calculate the proportion of the number of all damaged incremental backup files in the total number of incremental backup files, obtain the historical incremental backup damage probability, calculate the product between the preset retry cost multiple and the historical incremental backup damage probability, and use the sum of the constant 1 and the product as the first risk coefficient. The second risk coefficient is obtained based on the number of failures of the power concentrator within a preset historical period and the target incremental interval. Calculate the quotient of the target incremental interval divided by the target full interval to obtain the number of incremental backups when performing incremental backups on the data between the historical full backup time and the new full backup time. Calculate the product of the number of incremental backups, the first risk coefficient, and the second risk coefficient to obtain the incremental risk coefficient of the target incremental interval.

8. A concentrator with data storage and backup function according to claim 7, characterized in that, The second risk coefficient is obtained based on the number of faults that occurred in the power concentrator within a preset historical period and the target incremental interval, including: The number of faults of the power concentrator within a preset historical period is obtained, and the fault rate is obtained based on the number of faults. The fault rate is used as a parameter in the Poisson distribution to obtain the Poisson distribution formula. Based on the Poisson distribution formula, the probability of a single fault of the power concentrator occurring once within the target incremental interval is obtained. The ratio between the target incremental interval and the target full interval is rounded up to obtain the number of incremental backups when performing incremental backups on the data between the historical full backup time and the new full backup time. The product of the number of incremental backups, the probability of damage to the historical incremental backups, and the probability of a single failure of the concentrator is calculated to obtain the first total probability. If the number of failures is less than 2, then the first total probability is used as the second risk coefficient; If the number of faults is greater than or equal to 2, the time interval between every two adjacent faults of the power concentrator within a preset historical period is calculated, and the minimum value among all time intervals is recorded as the minimum fault interval. Based on the minimum fault interval, the target incremental interval, and the first total probability, a second risk coefficient is obtained, wherein the formula for calculating the second risk coefficient is: ; in, This indicates the second risk factor. Indicates the minimum fault interval. Indicates the target increment interval. Let represent the first total probability, and y represent the result of rounding up the ratio between the minimum fault interval and the target incremental interval, denoted as the number of possible faults within the target incremental interval. This represents the failure rate of the power concentrator within a preset historical period, where e represents the natural constant. This represents the probability of a single failure of the power concentrator, and n represents the number of failures that the power concentrator will experience within a preset historical period.

Citation Information

Patent Citations

  • Intelligent multi-analog acquisition electric power concentrator

    CN109410553A

  • Database recovery method of embedded device, electronic device and medium

    CN112698984A