Arbitrary data source second-level backup algorithm and system

By dynamically analyzing and predicting the update frequency of data source and adjusting the backup strategy, the problem of resource waste in the high-frequency change data source scenarios is solved, and real-time backup and data timeliness are guaranteed.

CN119537099AInactive Publication Date: 2025-02-28NANJING DUANSHI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411617506.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing second-level backup technologies are difficult to accurately capture and analyze the volatility of data source update frequency, resulting in waste of resources and unnecessary backup overhead in high-frequency variation or unstable data source scenarios.

Method used

By obtaining the timestamp of the data source, calculating the update frequency and frequency volatility between adjacent timestamps, predicting future update frequency, dynamically adjusting the backup frequency and interval, real-time backup of the data source under high-frequency updates.

Benefits of technology

Real-time backup of data sources under high frequency updates is realized, unnecessary backup operations are reduced, system resource consumption is reduced, and data integrity and timeliness are guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537099A_ABST
    Figure CN119537099A_ABST
Patent Text Reader

Abstract

The invention discloses a second-level backup algorithm and system for any data source, and belongs to the technical field of second-level backup. Obtaining timestamps of a data source to be backed up, and calculating an updating frequency of the data source between two adjacent timestamps based on the timestamps; calculating the update frequency volatility of the data source based on the update frequency; predicting a future update frequency of the data source based on the update frequency volatility; calculating a backup frequency of the data source based on the future update frequency; calculating a backup interval of the data source based on the backup frequency; after the backup is finished, the backup frequency and the backup interval of the next backup are automatically corrected; according to the method, the updating frequency volatility is analyzed, the future updating frequency is predicted, and the backup frequency and interval are dynamically set, so that an intelligent data backup strategy with high adaptability is formed; and timely backup is ensured under the condition that the data source changes frequently, so that the data integrity and timeliness are guaranteed, and the resource consumption is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of second-level backup, and in particular to a second-level backup algorithm and system for any data source. Background Art

[0002] In today's data-driven technological environment, data backup technology plays a key role in information management and protection. With the acceleration of enterprise digitalization and the improvement of data real-time performance, traditional scheduled backup solutions are difficult to meet the needs of frequent updates, especially in application scenarios that process unstructured big data. Traditional methods are often unable to quickly and flexibly adapt to changes in data sources, resulting in potential data loss or redundant backups. In recent years, second-level backup technology has gradually emerged to respond to the need for higher-frequency data changes. However, existing second-level backup technology usually lacks accurate capture of data source update frequency and in-depth analysis of volatility, and is prone to show shortcomings in scenarios with high-frequency changes or unstable data sources, resulting in waste of system resources and unnecessary backup overhead.

[0003] Existing technologies mainly rely on fixed-frequency backup solutions, ignoring the dynamic change characteristics of different data sources in the time dimension, resulting in significant resource occupation problems in high-frequency backup scenarios; especially when the update frequency of multiple data sources fluctuates greatly at the same time, fixed backup solutions are difficult to effectively respond to frequent update needs, which can easily lead to a decrease in data integrity and timeliness. Summary of the invention

[0004] The purpose of the present invention is to provide a second-level backup algorithm and system for any data source to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] A second-level backup algorithm for any data source, the algorithm comprising the following steps: obtaining the timestamp of the data source to be backed up, and based on the timestamp, calculating the update frequency of the data source between two adjacent timestamps; based on the update frequency, calculating the update frequency volatility of the data source; based on the update frequency volatility, predicting the future update frequency of the data source; based on the future update frequency, calculating the backup frequency of the data source; based on the backup frequency, calculating the backup interval of the data source; after the backup is completed, automatically correcting the backup frequency and backup interval of the next backup.

[0007] As a preferred solution of the algorithm for backing up any data source in seconds described in the present invention, the timestamp of each update of the data source to be backed up is obtained, and the timestamp is recorded in the data log of the data source; based on the current time, the past N consecutive timestamps of the data source are obtained, and the time interval between two adjacent timestamps is calculated. The calculation formula is as follows:

[0008] Δt=t n+1 -t n ;

[0009] Among them, Δt represents the time interval between two adjacent pairs of timestamps, t n+1 Indicates the n+1th timestamp, t n Indicates the nth timestamp.

[0010] Based on the time interval Δt between two adjacent timestamps, the update frequency of the data source within the time interval Δt between two adjacent timestamps is calculated. The calculation formula is as follows:

[0011]

[0012] Among them, f a Indicates the update frequency of the a-th data source within the time interval Δt between two adjacent timestamps.

[0013] In the present invention, the time interval provides a time scale for data updates, which can reflect the update cycle of the data source; for example, a smaller time interval indicates that the data source is updated frequently and the data source changes quickly; while a larger time interval indicates that the data is updated less frequently; this information directly provides the necessary time basis for subsequent update frequency calculations, ensuring the accuracy of the update frequency calculations; by calculating the intervals between adjacent timestamps, the system can monitor the changes in the data source in real time, providing an accurate reference for dynamically adjusting the backup strategy.

[0014] As a preferred solution of the second-level backup algorithm for any data source described in the present invention, based on the update frequency f of the a-th data source within the time interval Δt between two adjacent timestamps, a , traverse the past N consecutive timestamps and calculate the update frequency f within the time interval Δt between all adjacent timestamps a , the update frequency calculated for the i-th time is recorded as f ai .

[0015] According to the update frequency of the a-th data source, the update frequency volatility of the a-th data source is calculated as follows:

[0016]

[0017] in, represents the update frequency volatility of the a-th data source, f ai represents the update frequency of the ath data source calculated for the i-th time, Indicates the average update frequency.

[0018] In the present invention, the formula is used to calculate the volatility of the data source update frequency to quantify the instability of the data source update; the volatility of the update frequency can help understand the regularity or stability of the data source update; if the volatility is large, it means that the update frequency changes unpredictably, and the backup frequency of the data source needs to be adjusted more flexibly; if the volatility is small, it means that the data update is relatively stable, and a more fixed backup frequency scheme can be adopted; when the volatility is high, a more flexible backup scheme can be adopted to cope with the uncertainty of data update; through volatility analysis, the data source update regularity can be better identified, ensuring that the backup frequency is increased during periods of high uncertainty and reducing the risk of data loss.

[0019] As a preferred solution of the second-level backup algorithm for any data source described in the present invention, based on the update frequency volatility of the a-th data source Predict the future update frequency of the a-th data source as follows:

[0020]

[0021] Among them, f a,pred represents the future update frequency of the a-th data source, f a,now represents the update frequency of the ath data source at the current time, and k represents the preset dynamic adjustment coefficient.

[0022] In the present invention, the formula predicts the future data source update frequency through the current frequency and frequency volatility; the future frequency prediction enables the system to estimate the update status of the data source in advance and prepare for the subsequent backup frequency adjustment; for example, when the future update frequency is high, the system will increase the backup frequency to adapt to the data change requirements; when the future update frequency is low, the system will appropriately reduce the backup frequency; based on the future frequency prediction, the system can pre-set the backup frequency to better match the data source changes; the update frequency predicted in advance helps the system respond to future changes of the data source in real time and reduce the lag of the backup operation.

[0023] Based on the future update frequency f of the ath data source a,pred , set the backup frequency for the ath data source as follows:

[0024]

[0025] Among them, B a It represents the backup frequency of the ath data source, R represents the preset backup ratio factor, and max() represents the maximum value function.

[0026] In the present invention, the backup frequency is set by the ratio of the future update frequency and the backup ratio factor; this formula ensures that the backup frequency can be dynamically adjusted according to the expected future update situation; when the future update frequency is high, the backup frequency increases, thereby shortening the backup interval; when the future update frequency is low, the backup frequency decreases, and the backup interval is relatively long; through this adaptive method, the adverse effects caused by too high or too low backup frequency can be avoided; the dynamic backup frequency based on the future frequency can ensure that there are appropriate backup arrangements under high and low update frequencies; the backup frequency is automatically reduced when the update frequency is low, reducing unnecessary backup operations and reducing storage overhead.

[0027] As a preferred solution of the second-level backup algorithm for any data source described in the present invention, the backup frequency B of the a-th data source is a , calculate the backup interval of the ath data source, the calculation formula is:

[0028]

[0029] Among them, I a Indicates the backup interval of the ath data source.

[0030] In the present invention, when the update frequency is high (i.e., f a,pred When the backup frequency is B a will increase, thus making the backup interval I a shortened to ensure that the interval between each backup can adapt to the rapid update of the data source; when the update frequency is low (i.e., f a,pred When the backup frequency is smaller, a Relatively small, backup interval I a It will be appropriately extended to reduce unnecessary backup operations; assuming that in a period of high update frequency, the update frequency f is predicted a,pred The backup frequency is 20 times / second, and the backup ratio factor R = 2. According to the backup frequency formula, the backup frequency B can be obtained. a =max(1,10)=10, then the backup interval I a = 0.1 seconds, therefore, during this high-frequency update period, the backup interval I a = 0.1 seconds, ensuring that backup is performed every 0.1 seconds, so that it can respond to high data changes in seconds and ensure data integrity and timeliness.

[0031] After the backup is completed, the update frequency of the data source is re-obtained, and the backup frequency and backup interval of the next backup are automatically corrected.

[0032] As a preferred solution of the second-level backup algorithm for any data source described in the present invention, the specific implementation process of automatically correcting the backup frequency and backup interval of the next backup includes:

[0033] Set the initial dynamic adjustment coefficient k0 and update frequency volatility threshold range [σ low ,σ high ], where σ low represents the minimum value within the update frequency volatility threshold range, σ high Indicates the maximum value within the update frequency volatility threshold range.

[0034] Get the backup interval of different data sources and preset the interval threshold τ. If |I a -I b |≤τ, then the a-th data source is judged to be similar to the b-th data source, where I b Indicates the backup interval of the b-th data source, where b≠a.

[0035] Get the update frequency volatility of all data sources similar to the a-th data source, and calculate the comprehensive volatility of the a-th data source, as follows:

[0036]

[0037] Among them, σ a,coh represents the comprehensive volatility of the a-th data source, λ represents the preset impact factor, Represents the average update frequency volatility of all data sources similar to the a-th data source.

[0038] In the present invention, the formula forms a comprehensive volatility index by calculating the average update frequency volatility of the a-th data source and similar data sources, thereby reflecting the overall stability and change trend of the data source in the update frequency. The greater the volatility, the stronger the update instability, and vice versa. According to the comprehensive volatility value, the change trend of the future update frequency can be judged, and the dynamic adjustment coefficient k can be adjusted. For the adjustment of the dynamic adjustment coefficient k value, the present invention adopts a segmented judgment method: 1. If the comprehensive volatility is low, it means that the update tends to be stable, and the dynamic adjustment coefficient k can be reduced to reduce the backup frequency; 2. If the volatility remains within a stable range, the dynamic adjustment coefficient k remains unchanged and the current backup frequency is maintained; 3. If the volatility increases, the dynamic adjustment coefficient k is increased, and the backup frequency is increased to respond to frequent update needs more quickly; by calculating the comprehensive volatility and adjusting the dynamic adjustment coefficient k, the backup frequency can be automatically adjusted when the data source update frequency changes to adapt to the real-time change needs of the data source; by predicting the future update frequency, the backup strategy is adjusted in advance to avoid the problem of excessive backup or insufficient backup, thereby reducing the waste of system resources while ensuring the timeliness of data.

[0039] According to the comprehensive volatility σ of the a-th data source a,coh Determine the adjustment direction of the dynamic adjustment coefficient k, as follows:

[0040] If σ a,coh ≤σ low , it is determined that the update frequency volatility of the a-th data source is reduced in the next backup, and the value of the dynamic adjustment coefficient k is reduced. The formula is: k=k0×(1-α), where α represents the preset reduction ratio coefficient.

[0041] If σ low <σ a,coh <σ high , then it is determined that the update frequency volatility of the a-th data source remains within a stable range in the next backup, and k=k0 is kept unchanged.

[0042] If σ a,coh ≥σ high , it is determined that the update frequency volatility of the a-th data source increases in the next backup, and the value of the dynamic adjustment coefficient k is increased, and the formula is: k=k0×(1+β), where β represents the preset increase ratio coefficient.

[0043] A second-level backup system for any data source includes: a data source timestamp processing module, an update frequency volatility processing module, an update frequency prediction and backup frequency calculation module, and a backup interval calculation and dynamic adjustment module.

[0044] The data source timestamp processing module is configured to obtain the timestamp of the data source to be backed up, and calculate the update frequency of the data source between two adjacent timestamps based on the timestamp.

[0045] The update frequency volatility processing module calculates the update frequency volatility of the data source based on the update frequency.

[0046] The update frequency prediction and backup frequency calculation module predicts the future update frequency of the data source based on the update frequency volatility; and calculates the backup frequency of the data source based on the future update frequency.

[0047] The backup interval calculation and dynamic adjustment module calculates the backup interval of the data source based on the backup frequency; and automatically corrects the backup frequency and backup interval of the next backup after the backup is completed.

[0048] Furthermore, the data source timestamp processing module also includes a time interval calculation unit and an update frequency calculation unit.

[0049] The time interval calculation unit obtains the timestamp of each update of the data source to be backed up, and the timestamp is recorded in the data log of the data source; based on the current time, obtains the past continuous timestamps of the data source, and calculates the time interval between two adjacent timestamps.

[0050] The update frequency calculation unit calculates the update frequency of the data source within the time interval between two adjacent time stamps based on the time interval between two adjacent time stamps.

[0051] Furthermore, the update frequency volatility processing module also includes an update frequency volatility calculation unit.

[0052] The update frequency volatility calculation unit calculates the update frequency volatility of the data source according to the update frequency of the data source.

[0053] Furthermore, the update frequency prediction and backup frequency calculation module also includes a future update frequency calculation unit and a backup frequency calculation unit.

[0054] The future update frequency calculation unit predicts the future update frequency of the data source based on the update frequency volatility of the data source.

[0055] The backup frequency calculation unit sets a backup frequency for the data source based on the future update frequency of the data source.

[0056] Furthermore, the backup interval calculation and dynamic adjustment module also includes a backup interval calculation unit and a dynamic adjustment unit.

[0057] The backup interval calculation unit calculates the backup interval of the data source based on the backup frequency of the data source.

[0058] The dynamic adjustment unit: after the backup is completed, re-acquires the update frequency of the data source, and automatically corrects the backup frequency and backup interval of the next backup.

[0059] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: in the algorithm and system for backing up any data source in seconds provided by the present invention, the real-time backup of the data source under high-frequency update conditions is realized through the coordination of various steps; firstly, a timestamp is obtained each time the data source is updated, and the time interval between adjacent timestamps is calculated. This information provides an accurate time basis for the update frequency, so that the system can monitor the update status of the data source in real time, and provide a reference basis for dynamically adjusting the backup strategy; on this basis, by analyzing the volatility of the update frequency, the uncertainty of the data source update is identified, thereby increasing the backup frequency for the high volatility period and avoiding the risk of data loss; in the frequency prediction step, the system predicts the frequency of the data source according to the current update frequency and the volatility. It dynamically predicts future update trends and pre-sets appropriate backup frequencies to better match data changes and avoid backup lags. Then, it dynamically adjusts backup frequencies and intervals to achieve adaptive backup arrangements under high and low update frequencies, reducing unnecessary backup operations and lowering system storage overhead. In the final automatic correction step, the system introduces a comprehensive volatility index, takes the average volatility of similar data sources as the basis for adjustment, and adjusts the dynamic adjustment coefficient in segments to adapt to real-time changes in the update frequency of the data source. Overall, the invention ensures timely backup when the data source changes frequently, thereby achieving the beneficial effect of ensuring data integrity and timeliness, and effectively reducing resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0061] Figure 1 It is a schematic diagram of the steps of an algorithm for backing up any data source in seconds according to the present invention;

[0062] Figure 2 It is a structural schematic diagram of a second-level backup system for any data source of the present invention. DETAILED DESCRIPTION

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

[0064] See also Figure 1 In the first embodiment, a second-level backup algorithm for any data source is provided, and the algorithm includes the following steps:

[0065] Step S1: obtaining the timestamp of the data source to be backed up, and based on the timestamp, calculating the update frequency of the data source between two adjacent timestamps.

[0066] Specifically, obtain the timestamp of each update of the data source to be backed up, which is recorded in the data log of the data source; take the current time as the reference, obtain the past N consecutive timestamps of the data source, and calculate the time interval between two adjacent timestamps. The calculation formula is as follows:

[0067] Δt=t n+1 -t n ;

[0068] Among them, Δt represents the time interval between two adjacent pairs of timestamps, t n+1 Indicates the n+1th timestamp, t n Indicates the nth timestamp.

[0069] For example, suppose the n+1th timestamp t n+1 is 3, the nth timestamp t n is 0, and the time interval between two adjacent pairs of timestamps is obtained by substituting it into the formula to obtain Δt=3.

[0070] Furthermore, based on the time interval Δt between two adjacent timestamps, the update frequency of the data source within the time interval Δt between two adjacent timestamps is calculated, and the calculation formula is as follows:

[0071]

[0072] Among them, f a Indicates the update frequency of the a-th data source within the time interval Δt between two adjacent timestamps.

[0073] For example, if Δt=3 is known, we can substitute it into the formula to calculate the update frequency of the ath data source within the time interval Δt between two adjacent timestamps:

[0074] Step S2: Based on the update frequency, calculate the update frequency volatility of the data source.

[0075] Specifically, based on the update frequency f of the ath data source within the time interval Δt between two adjacent timestamps a , traverse the past N consecutive timestamps and calculate the update frequency f within the time interval Δt between all adjacent timestamps a , the update frequency calculated for the i-th time is recorded as f ai .

[0076] Furthermore, according to the update frequency of the a-th data source, the update frequency volatility of the a-th data source is calculated as follows:

[0077]

[0078] in, represents the update frequency volatility of the a-th data source, f ai represents the update frequency of the ath data source calculated for the i-th time, Indicates the average update frequency.

[0079] For example, suppose N is 5, f a1 =3, f a2 =3, f a3 =4, f a4 =5,

[0080] Step S3: Based on the update frequency volatility, predict the future update frequency of the data source; based on the future update frequency, calculate the backup frequency of the data source.

[0081] Specifically, based on the update frequency volatility of the ath data source Predict the future update frequency of the a-th data source as follows:

[0082]

[0083] Among them, f a,pred represents the future update frequency of the a-th data source, f a,now represents the update frequency of the ath data source at the current time, and k represents the preset dynamic adjustment coefficient.

[0084] For example, assuming k is 0.5, the update frequency of the ath data source at the current time is f a,now =0.28, substitute into the formula to get f a,pred =0.28+0.1*0.0372=0.2986.

[0085] Furthermore, based on the future update frequency f of the ath data source a,pred , set the backup frequency for the ath data source as follows:

[0086]

[0087] Among them, B a It represents the backup frequency of the ath data source, R represents the preset backup ratio factor, and max() represents the maximum value function.

[0088] For example, assuming R = 0.2,

[0089] Step S4: Based on the backup frequency, the backup interval of the data source is calculated; after the backup is completed, the backup frequency and backup interval of the next backup are automatically corrected.

[0090] Specifically, based on the backup frequency B of the ath data source a , calculate the backup interval of the ath data source, the calculation formula is:

[0091]

[0092] Among them, I a Indicates the backup interval of the ath data source.

[0093] For example, it is known that B a =1.493, substitute into the formula to get

[0094] After the backup is completed, the update frequency of the data source is re-obtained, and the backup frequency and backup interval of the next backup are automatically corrected.

[0095] Furthermore, the specific implementation process of automatically correcting the backup frequency and backup interval of the next backup includes:

[0096] Set the initial dynamic adjustment coefficient k0 and update frequency volatility threshold range [σ low ,σ high ], where σ low represents the minimum value within the update frequency volatility threshold range, σ high Indicates the maximum value within the update frequency volatility threshold range.

[0097] Get the backup interval of different data sources and preset the interval threshold τ. If |I a -I b |≤τ, then the a-th data source is judged to be similar to the b-th data source, where I b Indicates the backup interval of the b-th data source, where b≠a.

[0098] Get the update frequency volatility of all data sources similar to the a-th data source, and calculate the comprehensive volatility of the a-th data source, as follows:

[0099]

[0100] Among them, σ a,coh represents the comprehensive volatility of the a-th data source, λ represents the preset impact factor, Represents the average update frequency volatility of all data sources similar to the a-th data source.

[0101] For example, assuming the impact factor

[0102] According to the comprehensive volatility σ of the a-th data source a,coh Determine the adjustment direction of the dynamic adjustment coefficient k, as follows:

[0103] If σ a,coh ≤σ low , it is determined that the update frequency volatility of the a-th data source is reduced in the next backup, and the value of the dynamic adjustment coefficient k is reduced. The formula is: k=k0×(1-α), where α represents the preset reduction ratio coefficient.

[0104] If σ low <σ a,coh <σ high , then it is determined that the update frequency volatility of the a-th data source remains within a stable range in the next backup, and k=k0 is kept unchanged.

[0105] If σ a,coh ≥σ high , it is determined that the update frequency volatility of the a-th data source increases in the next backup, and the value of the dynamic adjustment coefficient k is increased, and the formula is: k=k0×(1+β), where β represents the preset increase ratio coefficient.

[0106] For example, assuming that σ low =0.02,σ high =0.03, k0=0.5, β=0.5, given σ a,coh =0.0386, then σ a,coh ≥σ high , it is determined that the update frequency volatility of the a-th data source increases in the next backup, and the value of the dynamic adjustment coefficient k is increased, k=0.5*1.5=0.75.

[0107] See also Figure 2 In the second embodiment of the present invention, a second-level backup system for any data source is provided, the system comprising: a data source timestamp processing module, an update frequency volatility processing module, an update frequency prediction and backup frequency calculation module, and a backup interval calculation and dynamic adjustment module.

[0108] The data source timestamp processing module is configured to obtain the timestamp of the data source to be backed up, and calculate the update frequency of the data source between two adjacent timestamps based on the timestamp.

[0109] The update frequency volatility processing module calculates the update frequency volatility of the data source based on the update frequency.

[0110] The update frequency prediction and backup frequency calculation module predicts the future update frequency of the data source based on the update frequency volatility; and calculates the backup frequency of the data source based on the future update frequency.

[0111] The backup interval calculation and dynamic adjustment module calculates the backup interval of the data source based on the backup frequency; and automatically corrects the backup frequency and backup interval of the next backup after the backup is completed.

[0112] Furthermore, the data source timestamp processing module also includes a time interval calculation unit and an update frequency calculation unit.

[0113] The time interval calculation unit obtains the timestamp of each update of the data source to be backed up, and the timestamp is recorded in the data log of the data source; based on the current time, obtains the past continuous timestamps of the data source, and calculates the time interval between two adjacent timestamps.

[0114] The update frequency calculation unit calculates the update frequency of the data source within the time interval between two adjacent time stamps based on the time interval between two adjacent time stamps.

[0115] Furthermore, the update frequency volatility processing module also includes an update frequency volatility calculation unit.

[0116] The update frequency volatility calculation unit calculates the update frequency volatility of the data source according to the update frequency of the data source.

[0117] Furthermore, the update frequency prediction and backup frequency calculation module also includes a future update frequency calculation unit and a backup frequency calculation unit.

[0118] The future update frequency calculation unit predicts the future update frequency of the data source based on the update frequency volatility of the data source.

[0119] The backup frequency calculation unit sets a backup frequency for the data source based on the future update frequency of the data source.

[0120] Furthermore, the backup interval calculation and dynamic adjustment module also includes a backup interval calculation unit and a dynamic adjustment unit.

[0121] The backup interval calculation unit calculates the backup interval of the data source based on the backup frequency of the data source.

[0122] The dynamic adjustment unit: after the backup is completed, re-acquires the update frequency of the data source, and automatically corrects the backup frequency and backup interval of the next backup.

[0123] It should be noted that, in this article, 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 "include", "comprise" 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.

[0124] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A second-level backup algorithm for any data source, characterized in that: The algorithm consists of the following steps: Step S1: obtaining the timestamp of the data source to be backed up, and based on the timestamp, calculating the update frequency of the data source between two adjacent timestamps; Step S2: Based on the update frequency, calculating the update frequency volatility of the data source; Step S3: based on the update frequency volatility, predicting the future update frequency of the data source; based on the future update frequency, calculating the backup frequency of the data source; Step S4: Based on the backup frequency, the backup interval of the data source is calculated; after the backup is completed, the backup frequency and backup interval of the next backup are automatically corrected.

2. The second-level backup algorithm for any data source according to claim 1, characterized in that: The specific implementation process of step S1 includes: Get the timestamp of each update of the data source to be backed up, which is recorded in the data log of the data source; take the current time as the reference, get the past N consecutive timestamps of the data source, and calculate the time interval between two adjacent timestamps. The calculation formula is as follows: Δt=t n+1 -t n ; Among them, Δt represents the time interval between two adjacent pairs of timestamps, t n+1 Indicates the n+1th timestamp, t n Indicates the nth timestamp; Based on the time interval Δt between two adjacent timestamps, the update frequency of the data source within the time interval Δt between two adjacent timestamps is calculated. The calculation formula is as follows: Among them, f a Indicates the update frequency of the a-th data source within the time interval Δt between two adjacent timestamps.

3. The second-level backup algorithm for any data source according to claim 2 is characterized in that: The specific implementation process of step S2 includes: Based on the update frequency f of the a-th data source within the time interval Δt between two adjacent timestamps a , traverse the past N consecutive timestamps and calculate the update frequency f within the time interval Δt between all adjacent timestamps a , the update frequency calculated for the i-th time is recorded as f ai ; According to the update frequency of the a-th data source, the update frequency volatility of the a-th data source is calculated as follows: in, represents the update frequency volatility of the a-th data source, f ai represents the update frequency of the ath data source calculated for the i-th time, Indicates the average update frequency.

4. The second-level backup algorithm for any data source according to claim 3 is characterized in that: The specific implementation process of step S3 includes: Update frequency volatility based on the ath data source Predict the future update frequency of the a-th data source as follows: Among them, f a,pred represents the future update frequency of the a-th data source, f a,now represents the update frequency of the ath data source at the current time, and k represents the preset dynamic adjustment coefficient; Based on the future update frequency f of the ath data source a,pred , set the backup frequency for the ath data source as follows: Among them, B a It represents the backup frequency of the ath data source, R represents the preset backup ratio factor, and max() represents the maximum value function.

5. The second-level backup algorithm for any data source according to claim 4 is characterized in that: The specific implementation process of step S4 includes: Backup frequency B based on the ath data source a , calculate the backup interval of the ath data source, the calculation formula is: Among them, I a Indicates the backup interval of the ath data source; After the backup is completed, the update frequency of the data source is re-obtained, and the backup frequency and backup interval of the next backup are automatically corrected.

6. The second-level backup algorithm for any data source according to claim 5, characterized in that: The specific implementation process of automatically correcting the backup frequency and backup interval of the next backup includes: Set the initial dynamic adjustment coefficient k0 and update frequency volatility threshold range [σ low ,σ high ], where σ low represents the minimum value within the update frequency volatility threshold range, σ high Indicates the maximum value within the update frequency volatility threshold range; Get the backup interval of different data sources and preset the interval threshold τ. If |I a -I b |≤τ, then the a-th data source is judged to be similar to the b-th data source, where I b represents the backup interval of the bth data source, and b≠a; Get the update frequency volatility of all data sources similar to the a-th data source, and calculate the comprehensive volatility of the a-th data source, as follows: Among them, σ a,coh represents the comprehensive volatility of the a-th data source, λ represents the preset impact factor, represents the average update frequency volatility of all data sources similar to the a-th data source; According to the comprehensive volatility σ of the a-th data source a,coh Determine the adjustment direction of the dynamic adjustment coefficient k, as follows: If σ a,coh ≤σ low , it is determined that the update frequency volatility of the a-th data source is reduced in the next backup, and the value of the dynamic adjustment coefficient k is reduced, the formula is: k = k0 × (1-α), where α represents the preset reduction ratio coefficient; If σ low <σ a,coh <σ high , then it is determined that the update frequency volatility of the a-th data source remains within a stable range in the next backup, and k=k0 remains unchanged; If σ a,coh ≥σ high , it is determined that the update frequency volatility of the a-th data source increases in the next backup, and the value of the dynamic adjustment coefficient k is increased, and the formula is: k=k0×(1+β), where β represents the preset increase ratio coefficient.

7. A system for backing up any data source in seconds, executing an algorithm for backing up any data source in seconds as claimed in any one of claims 1 to 6, characterized in that: The system includes: a data source timestamp processing module, an update frequency volatility processing module, an update frequency prediction and backup frequency calculation module, and a backup interval calculation and dynamic adjustment module; The data source timestamp processing module is configured to obtain the timestamp of the data source to be backed up, and calculate the update frequency of the data source between two adjacent timestamps based on the timestamp; The update frequency volatility processing module is used to calculate the update frequency volatility of the data source based on the update frequency; The update frequency prediction and backup frequency calculation module: based on the update frequency volatility, predicts the future update frequency of the data source; based on the future update frequency, calculates the backup frequency of the data source; The backup interval calculation and dynamic adjustment module: calculates the backup interval of the data source based on the backup frequency; after the backup is completed, automatically corrects the backup frequency and backup interval of the next backup; The data source timestamp processing module also includes a time interval calculation unit and an update frequency calculation unit; The time interval calculation unit: obtains the timestamp of each update of the data source to be backed up, and the timestamp is recorded in the data log of the data source; takes the current time as a reference, obtains the past continuous timestamps of the data source, and calculates the time interval between two adjacent timestamps; The update frequency calculation unit calculates the update frequency of the data source within the time interval between two adjacent time stamps based on the time interval between two adjacent time stamps.

8. The system for backing up any data source in seconds according to claim 7, characterized in that: The update frequency volatility processing module also includes an update frequency volatility calculation unit; The update frequency volatility calculation unit calculates the update frequency volatility of the data source according to the update frequency of the data source.

9. The system for backing up any data source in seconds according to claim 8, characterized in that: The update frequency prediction and backup frequency calculation module also includes a future update frequency calculation unit and a backup frequency calculation unit; The future update frequency calculation unit is configured to predict the future update frequency of the data source based on the update frequency volatility of the data source; The backup frequency calculation unit sets a backup frequency for the data source based on the future update frequency of the data source.

10. The system for backing up any data source in seconds according to claim 9, characterized in that: The backup interval calculation and dynamic adjustment module also includes a backup interval calculation unit and a dynamic adjustment unit; The backup interval calculation unit calculates the backup interval of the data source based on the backup frequency of the data source; The dynamic adjustment unit: after the backup is completed, re-acquires the update frequency of the data source, and automatically corrects the backup frequency and backup interval of the next backup.