Data backup method and electronic device

By performing incremental backups on cloud servers when the estimated data recovery time on edge servers exceeds a threshold, the problem of resource consumption and long recovery times caused by frequent backups is solved, and efficient data recovery is achieved.

CN115033426BActive Publication Date: 2026-02-17ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210673102.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2026-02-17
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

Frequent data backups cause resource consumption in IoT edge computing, and data recovery time is long.

Method used

By dynamically calculating the estimated data recovery time on the edge server for unbacked-up and backed-up data using the cloud server, incremental backups are only performed when the preset time threshold is exceeded, reducing the number of backups and recovery time.

Benefits of technology

While meeting the data recovery needs of edge servers, it reduces resource consumption caused by frequent backups and shortens data recovery time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033426B_ABST
    Figure CN115033426B_ABST
Patent Text Reader

Abstract

This application provides a data backup method and electronic device, relating to the field of cloud computing technology. The method includes: determining a first estimated data recovery time for unbacked-up data and backed-up data on an edge server; if the first estimated data recovery time exceeds a preset time threshold, acquiring and backing up the data to be backed up corresponding to the unbacked-up data to obtain incremental backup data; the incremental backup data and the backed-up data are used for data recovery on the edge server. In this embodiment, backing up the unbacked-up data when the first estimated data recovery time exceeds the preset time threshold satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a data backup method and electronic device. Background Technology

[0002] The Internet of Things (IoT) is an extension and expansion of the internet, forming a vast network that combines various devices with the network to achieve interconnectivity between people, machines, and things anytime, anywhere. IoT typically requires pushing data collected by various devices to the cloud for storage, analysis, and management.

[0003] IoT edge computing enables data processing and analysis at the internet edge via edge servers, bringing data closer to the data source. Edge servers push necessary information to the cloud instead of initial data, saving resources on internet and cloud infrastructure construction. However, when an edge server fails, it needs to retrieve data from the cloud for recovery. This requires cloud backups, and incomplete backups can hinder edge server recovery. Conversely, frequent backups can lead to resource consumption. Summary of the Invention

[0004] This application provides a data backup method and electronic device to avoid resource consumption caused by frequent data backups.

[0005] In a first aspect, embodiments of this application provide a data backup method, which is applied to a cloud server and includes:

[0006] Determine the first estimated data recovery time for both unbacked-up and backed-up data on the edge server;

[0007] If the estimated data recovery time exceeds the preset time threshold, the data to be backed up corresponding to the unbacked-up data is obtained and backed up to obtain incremental backup data. The incremental backup data and the backed-up data are used for data recovery on the edge server.

[0008] Secondly, embodiments of this application provide a data backup method, which is applied to an edge server and includes:

[0009] If the estimated recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, the data to be backed up corresponding to the unbacked-up data will be determined.

[0010] The data to be backed up is sent to the cloud server so that the cloud server can back up the data to obtain incremental backup data. The incremental backup data and the backed-up data are used by the edge server for data recovery.

[0011] Thirdly, embodiments of this application provide a data backup device, including:

[0012] The determination module is used to determine the first estimated data recovery time for unbacked-up and backed-up data on the edge server;

[0013] The backup module is used to obtain the data to be backed up corresponding to the unbacked data and back it up when the first estimated data recovery time exceeds a preset time threshold, so as to obtain incremental backup data. The incremental backup data and the backed-up data are used for data recovery on the edge server.

[0014] Fourthly, embodiments of this application provide a data backup device, including:

[0015] The determination module is used to determine the data to be backed up corresponding to the unbacked-up data when the estimated recovery time of both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold.

[0016] The sending module is used to send the data to be backed up to the cloud server so that the cloud server can back up the data to be backed up and obtain incremental backup data. The incremental backup data and the backed-up data are used by the edge server for data recovery.

[0017] Fifthly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method provided in any embodiment of this application when executing the computer program.

[0018] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method provided in any embodiment of this application.

[0019] Compared with the prior art, this application has the following advantages:

[0020] The data backup method and electronic device provided in this application embodiment, when the estimated data recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, allows the cloud server to retrieve the data to be backed up corresponding to the unbacked-up data from the edge server and perform backup. This satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups. Furthermore, using this application embodiment for data backup can reduce data recovery time.

[0021] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of this application will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description

[0022] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.

[0023] Figure 1 A schematic diagram illustrating an application scenario of the data backup method provided in an embodiment of this application;

[0024] Figure 2 A flowchart illustrating a data backup method provided in an embodiment of this application;

[0025] Figure 3 A flowchart illustrating a data backup method provided in an embodiment of this application;

[0026] Figure 4 A schematic diagram illustrating a data backup method provided in an embodiment of this application;

[0027] Figure 5 A schematic diagram of a data backup device provided in an embodiment of this application;

[0028] Figure 6 A schematic diagram of a data backup device provided in an embodiment of this application;

[0029] Figure 7 This is a block diagram of an electronic device used to implement embodiments of this application. Detailed Implementation

[0030] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0031] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and they all fall within the protection scope of the embodiments of this application.

[0032] To more clearly demonstrate the data backup method provided in the embodiments of this application, we first introduce the application scenarios that can be used to implement this method.

[0033] Figure 1 This is a schematic diagram illustrating an application scenario of the data backup method provided in an embodiment of this application. Figure 1 The cloud server shown can be a virtual server provided by a cloud computing platform, capable of performing corresponding storage and computing functions. It is a virtualized form of a physical server, running on the physical server. The cloud server receives and stores data sent by IoT devices, then distributes it to edge servers. Edge servers can be local servers that perform corresponding service functions. They receive the data from the cloud server, perform calculations, and upload the calculated data to the cloud server for backup. The timing of data backup can be determined by the cloud server. The cloud server periodically calculates the first estimated data recovery time for unbacked-up and backed-up data on the edge server. If the first estimated data recovery time exceeds a preset time threshold, the cloud server sends a data backup command to the edge server. The edge server determines the data to be backed up from the calculated data and sends it to the cloud server for backup. In the event of an edge server failure, the cloud server distributes the current backup data to the edge server, which then performs data recovery. If there is currently unbacked-up data, the edge server needs to perform calculations and storage for that data before recovery. Since the backed-up data is calculated by the edge server before being uploaded to the cloud server, it does not need to be calculated again and can be directly restored. After the edge server restores the data, it sends control commands to IoT devices to provide corresponding services to users.

[0034] For example, an edge server could be a property management all-in-one machine, providing services such as facial recognition access, QR code access, and card access for various business spaces like parks, communities, and campuses. Taking facial recognition as an example, IoT devices collect facial images, upload them to a cloud server, the cloud server stores them, and then distributes them to the property management all-in-one machine. The all-in-one machine extracts the feature data of the facial images and matches it with features in a database of accessible personnel. If a match is successful, it sends a control command to the IoT device to open the gate and allow passage. The cloud server periodically calculates the estimated data recovery time for both unbacked-up and backed-up facial images on the property management all-in-one machine. If the estimated recovery time exceeds a preset time threshold, it sends a data backup command to the all-in-one machine. The all-in-one machine then determines the data to be backed up from the calculated feature data of the facial images and sends it to the cloud server for backup. When a property management all-in-one machine malfunctions and needs to be replaced, the cloud server distributes the current backup data to the new all-in-one machine for data recovery.

[0035] This application provides a data backup method. Figure 2This is a flowchart of a data backup method according to an embodiment of this application. This method can be applied to a data backup device, which can be deployed on a cloud server or other processing device. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. For example... Figure 2 As shown, the method includes:

[0036] Step S201: Determine the first estimated data recovery time for unbacked-up data and backed-up data on the edge server.

[0037] The method in this embodiment can be deployed on a cloud server. The unbacked-up data refers to data received by the cloud server from IoT devices, which has been distributed to edge servers via the cloud server but has not yet been backed up on the cloud server. The backed-up data refers to data distributed by the cloud server to the edge server, processed by the edge server, and then uploaded to the cloud server for backup. The computations involved can be feature extraction or similar methods. For example, the cloud server distributes facial images to the edge server, the edge server performs feature extraction to obtain facial image feature data, and then uploads it to the cloud server for backup.

[0038] The cloud server determines the first estimated data recovery time according to a preset time period. The first estimated data recovery time includes the recovery time of unbacked-up data on the edge server and the recovery time of backed-up data on the edge server. The cloud server can determine the first estimated data recovery time of unbacked-up data and backed-up data on the edge server in various ways, and this embodiment does not limit this method.

[0039] In step S202, if the estimated data recovery time exceeds a preset time threshold, the data to be backed up corresponding to the unbacked-up data is obtained and backed up to obtain incremental backup data. The incremental backup data and the backed-up data are used for data recovery on the edge server.

[0040] The preset time threshold can be a user-defined Recovery Time Objective (RTO) for edge server data recovery. The estimated data recovery time is compared to this preset time threshold. If the estimated recovery time exceeds the preset time threshold (either greater than or equal to it), the cloud server sends a data backup command to the edge server. The edge server then determines the data to be backed up from its stored data. This data is calculated by the edge server from the unbacked-up data; for example, if the unbacked-up data is a facial image, the data to be backed up could be feature data extracted from the facial image. The edge server uploads the data to be backed up to the cloud server for backup. When the edge server fails or needs to be replaced, the cloud server sends the current backup data to the edge server for data recovery.

[0041] In related technologies, cloud servers store data sent by IoT devices. When an edge server fails, the cloud server sends all stored data to the edge server. The edge server then performs calculations on all the data before recovery can proceed. When the data volume is large, the calculation time is long, the edge server resource utilization is high, and data recovery is slow. For example, when a facial image is downloaded from the cloud, the edge server needs to perform extensive calculations to extract its feature values ​​before it can be used. For a medium-sized community, reconstructing the facial feature value database can take several hours.

[0042] The data backup method provided in this application embodiment addresses the situation where, if the estimated recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, the cloud server retrieves the data to be backed up corresponding to the unbacked-up data from the edge server and performs backup. This satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups. Furthermore, since the data to be backed up is calculated from the unbacked-up data rather than directly backing up the unbacked-up data, when performing data recovery on the edge server, it is no longer necessary to recalculate the data for the backup data sent by the cloud server; recovery can proceed directly, thereby reducing data recovery time.

[0043] The specific implementation method for determining the first estimated data recovery time is shown in the following example:

[0044] In one possible implementation, step S201, determining the first estimated data recovery time for unbacked-up data and backed-up data on the edge server, includes: step S2011, obtaining the estimated computation time, estimated storage time, and estimated network bandwidth of the unbacked-up data from the edge server; and step S2012, determining the first estimated data recovery time based on the estimated computation time, estimated storage time, estimated network bandwidth, and the amount of backed-up data.

[0045] Unbacked-up data requires computation and storage on edge servers for data recovery. Therefore, it's necessary to obtain the estimated computation and storage times for the unbacked-up data from the edge servers to determine the recovery time. The estimated computation and storage times can be calculated by the edge servers using a moving average method. The cloud server can then determine the recovery time for the unbacked-up data based on these estimated times. Based on the estimated network bandwidth and the amount of backed-up data, it can determine the recovery time for the backed-up data. Summing these two recovery times yields the first estimated data recovery time.

[0046] The specific implementation of step S2012 is shown in the following embodiment:

[0047] In one possible implementation, step S2012, determining the first estimated data recovery time based on the estimated computation time, estimated storage time, estimated network bandwidth, and the amount of backed-up data, further includes: determining the recovery time of unbacked-up data based on the estimated computation time, estimated storage time, and adjustment parameters; the adjustment parameters are determined based on whether multiple categories of data in the unbacked-up data need to be backed up; determining the recovery time of backed-up data based on the estimated network bandwidth and the amount of backed-up data; and determining the first estimated data recovery time based on the recovery time of unbacked-up data and the recovery time of backed-up data.

[0048] In this embodiment, the unbacked-up data may include multiple categories of data. Some categories of data need to be backed up, such as facial image feature data. Other types of data do not need to be backed up, such as real-time generated QR codes and verification codes. The cloud server determines whether to calculate the recovery time for each category of data using pre-set adjustment parameters.

[0049] In one example, the estimated data recovery time is calculated using the following formula:

[0050]

[0051] Where PredictTime represents the estimated time for first-order data recovery, i represents the data category, and α i This represents the adjustment parameter corresponding to the i-th category of data. For data in the unbacked-up data that needs to be backed up, α... i The initial value can be 1. For data in the unbacked-up data that does not need to be backed up, α i The initial value can be 0, ComputeCost iStoreCost represents the unit computation time for the i-th category of data. i NewDataCount represents the unit storage time for the i-th category of data. i OldDataCount represents the current total amount of data in the i-th category. i NewDataCount represents the total amount of data that has been backed up for the i-th category. i -OldDataCount i The total amount of data in category i that has not been backed up is obtained. BackupSize represents the amount of data that has been backed up, and bandwidth represents the estimated network bandwidth.

[0052] In one possible implementation, the method further includes:

[0053] The actual data recovery time is obtained from the edge server, and the actual data recovery time is compared with the first estimated data recovery time. The calculation results are used to update the adjustment parameters.

[0054] In practical applications, cloud servers can also update adjustment parameters by obtaining actual data recovery time from edge servers, making the first estimated data recovery time calculated using the updated adjustment parameters more accurate.

[0055] In one example, the updated adjustment parameters are calculated using the following formula:

[0056]

[0057] Where, α i ' represents the updated adjustment parameter, α i This indicates the adjustment parameters. ActualRecoveryTime represents the actual data recovery time, and PredictTime represents the first estimated data recovery time.

[0058] In one possible implementation, the method further includes:

[0059] Based on the amount of current backup data sent by the edge server and the estimated network bandwidth, a second estimated data recovery time on the edge server is determined. The current backup data includes incremental backup data and backed-up data. If the second estimated data recovery time exceeds a preset time threshold, an update prompt message for the preset time threshold is generated and sent to the edge server. The update prompt message includes the updated preset time threshold.

[0060] In this embodiment, after the backup of unbacked-up data is completed, there is no longer any unbacked-up data; all data is already backed up. Based on the current amount of backup data and the estimated network bandwidth, the current estimated data recovery time can be obtained. The second estimated data recovery time is the data recovery time under the condition that all data is already backed up. If the current estimated data recovery time still exceeds the preset time threshold, it indicates that the hardware environment of the edge server cannot meet the required data recovery time. In this case, the preset time threshold needs to be adjusted. The cloud server generates an update prompt message for the preset time threshold and sends it to the edge server to prompt for an update to the preset time threshold. The update prompt message includes the updated preset time threshold, which can be determined based on the second preset data recovery time. In this embodiment, by updating the preset time threshold, a more optimized preset time threshold can be obtained.

[0061] In one possible implementation, the method further includes:

[0062] In the event of a failure in the edge server, but without loss of the data stored on the edge server, the system receives the first failure event sent by the edge server; compares the current unbacked-up data with the data already sent to the edge server, and sends the difference data to the edge server so that the edge server can recover the data based on the difference data.

[0063] In practical applications, if an edge server malfunctions, the application on the edge server is restarted. The edge server verifies the integrity and validity of the stored data. In scenarios such as power failure or software anomaly, data is generally not lost. In such cases, a fault event is sent to the cloud server. The fault event can include information such as the fault type. The cloud server can determine that it is the first fault event based on the fault type. It then compares the current unbacked-up data with the data that has been sent to the edge server to obtain the difference data, i.e., the data that has not been sent to the edge server. Since the data stored on the edge server has not been lost at this time, the difference data can be sent to the edge server. The edge server calculates and stores the difference data to achieve data recovery. After data recovery, the corresponding functions can continue to be provided to users.

[0064] In one possible implementation, the method further includes:

[0065] In the event of a failure of the edge server and loss of data stored on the edge server, a second failure event is received from the edge server; the current unbacked-up data and the current backed-up data are sent to the edge server for data recovery based on the current unbacked-up data and the current backed-up data.

[0066] In practical applications, if an edge server malfunctions and data is lost during data verification (e.g., due to hardware failure), the cloud server can determine it's a secondary failure event based on the failure type. The cloud server then creates a data recovery task and sends it to the edge server. The edge server retrieves the backed-up data from the cloud server and stores it locally. The cloud server uses the backup timestamp to identify the currently unbacked-up data and distributes it to the edge server. The edge server then performs calculations and stores the unbacked-up data to achieve recovery. For already backed-up data, since it was previously calculated and uploaded to the cloud server for backup, no further calculations are needed, and it can be directly restored.

[0067] In related technologies, cloud servers directly back up data sent by IoT devices. When an edge server fails, the cloud server sends both unbacked-up and backed-up data to the edge server. The edge server then performs calculations on both the unbacked-up and backed-up data before recovery. This calculation is time-consuming, especially with large amounts of data, resulting in slow data recovery. In this embodiment, backed-up data is directly restored, reducing recovery time.

[0068] In one possible implementation, obtaining the backup-to-be-backed-up data corresponding to the unbacked-up data includes:

[0069] Send data backup instructions to the edge server so that the edge server can determine the data to be backed up corresponding to the unbacked-up data; receive the data to be backed up sent by the edge server.

[0070] In practical applications, if the estimated data recovery time exceeds a preset time threshold, the cloud server sends a data backup command to the edge server. The edge server then determines the data to be backed up from the stored data corresponding to the unbacked-up data. Specifically, the edge server uses a content-defined chunking (CDC) algorithm to determine the data to be backed up from the stored data, divides the data into chunks, calculates the fingerprint of each chunk, generates an index file for the data to be backed up, encrypts the data, and sends it to the cloud server for backup. The index file is then stored on the cloud server. In this embodiment, the CDC algorithm can calculate the data to be backed up from the unbacked-up data with high accuracy.

[0071] This application provides a data backup method. Figure 3This is a flowchart of a data backup method according to an embodiment of this application. This method can be applied to a data backup device, which can be deployed in an edge server or other processing device. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 3 As shown, the method includes:

[0072] Step S301: If the estimated recovery time of both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, determine the data to be backed up corresponding to the unbacked-up data.

[0073] The method in this embodiment can be deployed on an edge server. The unbacked-up data refers to data received by the cloud server from IoT devices; this data has been distributed from the cloud server to the edge server but has not yet been backed up on the cloud server. The backed-up data refers to data distributed from the cloud server to the edge server, processed by the edge server, and then uploaded to the cloud server for backup. The computations involved can be feature extraction or similar methods. For example, the cloud server distributes a facial image to the edge server, the edge server performs feature extraction to obtain facial image feature data, and then uploads it to the cloud server for backup.

[0074] The cloud server determines the first estimated data recovery time according to a preset time period. The first estimated data recovery time includes the recovery time of unbacked-up data on the edge server and the recovery time of backed-up data on the edge server.

[0075] The preset time threshold can be the recovery time objective (RTO) for edge server data recovery set by the user. The first estimated data recovery time is compared with the preset time threshold. If the first estimated data recovery time exceeds the preset time threshold, it can be greater than or equal to the preset time threshold. The cloud server sends a data backup instruction to the edge server. The edge server determines the data to be backed up from the stored data. The data to be backed up is the data obtained by the edge server from the unbacked-up data. For example, if the unbacked-up data is a facial image, the data to be backed up can be the feature data obtained by extracting features from the facial image.

[0076] Step S302: Send the data to be backed up to the cloud server so that the cloud server can back up the data to be backed up and obtain incremental backup data. The incremental backup data and the backed-up data are used by the edge server for data recovery.

[0077] If the estimated data recovery time exceeds a preset time threshold, the edge server receives a data backup command from the cloud server. The edge server then identifies the data to be backed up from the stored data, specifically by using a content-defined chunking (CDC) algorithm to divide the data into chunks, calculating the fingerprint of each chunk, generating an index file for the backed-up data, encrypting the data, and sending it to the cloud server for backup. The index file is then stored on the cloud server. When the edge server fails or needs to be replaced, the cloud server sends the current backup data to the edge server for data recovery.

[0078] The data backup method provided in this application, when the estimated data recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, determines the data to be backed up corresponding to the unbacked-up data and sends it to the cloud server for backup. This method satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups. Furthermore, using the technical solution of this application for data backup can reduce data recovery time.

[0079] In one possible implementation, the initial estimated data recovery time for both unbacked-up and backed-up data on the edge server is determined by the following method:

[0080] The estimated computation time, estimated storage time, and estimated network bandwidth of the unbacked-up data are obtained and sent to the cloud server, so that the cloud server can determine the first estimated data recovery time based on the estimated computation time, estimated storage time, estimated network bandwidth, and the amount of backed-up data.

[0081] Unbacked-up data requires computation and storage by the edge server for data recovery. Therefore, the edge server obtains the estimated computation time and estimated storage time for the unbacked-up data to determine the recovery time. The estimated computation time and estimated storage time can be calculated by the edge server using a moving average method. The edge server sends the estimated computation time, estimated storage time, and estimated network bandwidth to the cloud server. The cloud server uses the estimated computation time and estimated storage time to determine the recovery time for the unbacked-up data, and uses the estimated network bandwidth and the amount of backed-up data to determine the recovery time for the backed-up data. Summing the recovery times of the unbacked-up data and the backed-up data yields the first estimated data recovery time.

[0082] In one possible implementation, the method further includes:

[0083] The system obtains the current backup data volume and estimated network bandwidth, and sends them to the cloud server so that the cloud server can determine the second estimated data recovery time on the edge server. The current backup data includes incremental backup data and backed-up data. If the second estimated data recovery time exceeds a preset time threshold, the system receives an update prompt message from the cloud server that generates the preset time threshold. The update prompt message includes the updated preset time threshold.

[0084] In this embodiment, after the backup of unbacked-up data is completed, there is temporarily no unbacked-up data; all data is already backed up. The edge server obtains the current backup data volume and estimated network bandwidth, and sends them to the cloud server. Based on the current backup data volume and estimated network bandwidth, the cloud server can obtain the current estimated data recovery time. The second estimated data recovery time is the data recovery time assuming all data is already backed up. If the current estimated data recovery time still exceeds the preset time threshold, it indicates that the edge server's hardware environment cannot meet the required data recovery time. In this case, the preset time threshold needs to be adjusted. The cloud server generates an update prompt message for the preset time threshold and sends it to the edge server to prompt an update to the preset time threshold. The update prompt message includes the updated preset time threshold, which can be determined based on the second preset data recovery time. In this embodiment, by updating the preset time threshold, a more optimized preset time threshold can be obtained.

[0085] In one possible implementation, the method further includes:

[0086] If the edge server fails but the data stored on the edge server is not lost, a first failure event is sent to the cloud server; differential data is received from the cloud server, which is obtained by comparing the current unbacked-up data with the data that has been distributed; and data recovery is performed based on the differential data.

[0087] In practical applications, if an edge server malfunctions, the application on the edge server is restarted. The edge server verifies the integrity and validity of the stored data. In scenarios such as power failure or software anomaly, data is generally not lost. The edge server then sends a fault event to the cloud server, which can include information such as the fault type. The cloud server can determine that it is the first fault event based on the fault type. It then compares the current unbacked-up data with the data that has been sent to the edge server to obtain the difference data, i.e., the data that has not been sent to the edge server. Since the data stored on the edge server has not been lost at this time, the difference data can be sent to the edge server. The edge server calculates and stores the difference data to achieve data recovery. After data recovery, the corresponding functions can continue to be provided to users.

[0088] In one possible implementation, the method further includes:

[0089] In the event of a failure of the edge server and loss of the data stored on the edge server, a second failure event is sent to the cloud server; the current unbacked-up data and the current backed-up data are obtained from the cloud server, and data recovery is performed based on the current unbacked-up data and the current backed-up data.

[0090] In practical applications, if an edge server malfunctions and data is lost during data verification (e.g., due to hardware failure), the cloud server can determine it's a secondary failure event based on the failure type. The cloud server then creates a data recovery task and sends it to the edge server. The edge server retrieves the backed-up data from the cloud server and stores it locally. The cloud server uses the backup timestamp to identify the currently unbacked-up data and distributes it to the edge server. The edge server then performs calculations and stores the unbacked-up data to achieve recovery. For already backed-up data, since it was previously calculated and uploaded to the cloud server for backup, no further calculations are needed, and it can be directly restored.

[0091] Figure 4 This is a schematic diagram of a data backup method according to an embodiment of this application. In this embodiment, the edge server can be a property management all-in-one machine, and the permission data can be facial images, QR code data, access card data, etc. The cloud server obtains permission data from IoT devices through the permission management module, issues permissions, and pushes the permission data to the edge server through the permission push module. The access permission local authentication and management module writes the permission data sent by the cloud server into the local storage module. At the same time, it can also read permission data from the local storage module and perform calculations on the permission data through the local computing module, such as extracting feature values ​​from facial images. The extracted feature values ​​are used to determine whether to compare with feature values ​​in the existing database. If they match, access is granted. When the cloud server determines the first estimated data recovery time for unbacked-up data and backed-up data on the edge server, the backup task management module sends a data backup task to the edge server. The edge server determines the data to be backed up corresponding to the unbacked-up data through the data to be backed up module, divides the data to be backed up into blocks, generates fingerprints for the block data, generates an index file using the fingerprints, uploads the data to be backed up to the data storage module in the cloud server for backup, and stores the index file of the data to be backed up in the backup index management module.

[0092] In the event of a failure on the edge server, but without data loss, the cloud server receives a first failure event from the edge server. It then compares the current unbacked-up data with the data already distributed to the edge server using a permission difference comparison module. The difference is sent to the edge server via a permission push module, and the edge server performs data recovery based on the difference. If the data stored on the edge server is lost, the cloud server receives a second failure event from the edge server. The cloud server creates a data recovery task and sends it to the edge server. The edge server's backup pull module pulls the backed-up data from the cloud server and stores it locally. The cloud server determines the current unbacked-up data based on the backup timestamp and distributes it to the edge server. The edge server performs calculations and stores the unbacked-up data to achieve recovery. For already backed-up data, since the calculations were performed beforehand and the data was uploaded to the cloud server for backup, no further calculations are needed, and recovery can proceed directly.

[0093] In this embodiment, the expected data recovery time is dynamically calculated by the cloud server, which meets the user-defined fault data recovery time target while avoiding resource consumption caused by frequent periodic backups; incremental data backup based on coverage reduces the storage cost of backup and the network bandwidth requirements of backup tasks; and incremental data push based on cloud server and edge server ensures data consistency between the cloud and the edge.

[0094] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a data backup device. For example... Figure 5 As shown, the data backup device may include:

[0095] Module 501 is used to determine the first estimated data recovery time for unbacked-up data and backed-up data on the edge server;

[0096] The backup module 502 is used to obtain the data to be backed up corresponding to the unbacked data and back it up when the first estimated data recovery time exceeds a preset time threshold, so as to obtain incremental backup data. The incremental backup data and the backed-up data are used for data recovery on the edge server.

[0097] The data backup device provided in this application embodiment, when the estimated data recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, allows the cloud server to retrieve the data to be backed up corresponding to the unbacked-up data from the edge server and perform backup. This satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups. Furthermore, using the technical solution of this application for data backup can reduce data recovery time.

[0098] In one possible implementation, the determining module 501 includes an acquisition unit and a determining unit;

[0099] The acquisition unit is used to obtain the estimated computation time, estimated storage time, and estimated network bandwidth of the unbacked-up data from the edge server.

[0100] The determining unit is used to determine the first estimated data recovery time based on the estimated computation time, estimated storage time, estimated network bandwidth, and the amount of data already backed up.

[0101] In one possible implementation, the device further includes a threshold update module for:

[0102] Based on the amount of current backup data sent by the edge server and the estimated network bandwidth, determine the second estimated data recovery time of the current backup data on the edge server; the current backup data includes incremental backup data and backed-up data;

[0103] If the estimated time for data recovery exceeds a preset time threshold, an update notification message for the preset time threshold is generated and sent to the edge server. The update notification message includes the updated preset time threshold.

[0104] In one possible implementation, the device further includes a first receiving module, used for:

[0105] If the edge server fails but the data stored on the edge server is not lost, receive the first failure event sent by the edge server;

[0106] The system compares the current unbacked-up data with the data that has been sent to the edge server, and sends the difference data to the edge server so that the edge server can restore the data based on the difference data.

[0107] In one possible implementation, the device further includes a second receiving module for:

[0108] In the event that the edge server fails and the data stored on the edge server has been lost, receive a second failure event sent by the edge server;

[0109] The current unbacked-up data and the current backed-up data are sent to the edge server so that the edge server can perform data recovery based on the current unbacked-up data and the current backed-up data.

[0110] In one possible implementation, determining the unit is also used for:

[0111] The recovery time for unbacked-up data is determined based on the estimated computation time, estimated storage time, and adjusted parameters. The adjusted parameters are determined based on whether multiple categories of data in the unbacked-up data need to be backed up.

[0112] The recovery time of the backed-up data is determined based on the estimated network bandwidth and the amount of data already backed up;

[0113] The first estimated data recovery time is determined based on the recovery time of unbacked-up data and the recovery time of backed-up data.

[0114] In one possible implementation, the device further includes a parameter update module for:

[0115] The actual data recovery time is obtained from the edge server, and the actual data recovery time is compared with the first estimated data recovery time. The calculation results are used to update the adjustment parameters.

[0116] In one possible implementation, when the backup module 502 obtains the backup data corresponding to the unbacked-up data, it is used to:

[0117] Send a data backup command to the edge server so that the edge server can determine the data to be backed up corresponding to the unbacked-up data;

[0118] Receive backup data sent by the edge server.

[0119] The functions of each module in the various devices in the embodiments of this application can be found in the corresponding descriptions of the devices described above, and they have corresponding beneficial effects, which will not be repeated here.

[0120] Corresponding to the application scenarios and devices provided in the embodiments of this application, the embodiments of this application also provide a data backup device. For example... Figure 6 As shown, the data backup device may include:

[0121] The determination module 601 is used to determine the data to be backed up corresponding to the unbacked-up data when the estimated recovery time of the unbacked-up data and the backed-up data on the edge server exceeds a preset time threshold.

[0122] The sending module 602 is used to send the data to be backed up to the cloud server so that the cloud server can back up the data to be backed up and obtain incremental backup data. The incremental backup data and the backed-up data are used by the edge server for data recovery.

[0123] The data backup device provided in this application embodiment, when the estimated data recovery time for both unbacked-up data and backed-up data on the edge server exceeds a preset time threshold, determines the data to be backed up corresponding to the unbacked-up data on the edge server and sends it to the cloud server for backup. This satisfies the data recovery needs of the edge server while reducing the number of backups and minimizing resource consumption caused by frequent backups. Furthermore, using the technical solution of this application for data backup can reduce data recovery time.

[0124] In one possible implementation, the initial estimated data recovery time for both unbacked-up and backed-up data on the edge server is determined by the following method:

[0125] The estimated computation time, estimated storage time, and estimated network bandwidth of the unbacked-up data are obtained and sent to the cloud server, so that the cloud server can determine the first estimated data recovery time based on the estimated computation time, estimated storage time, estimated network bandwidth, and the amount of backed-up data.

[0126] In one possible implementation, the apparatus further includes an acquisition module for:

[0127] The system obtains the current backup data volume and estimated network bandwidth, and sends them to the cloud server so that the cloud server can determine the second estimated data recovery time on the edge server; the current backup data includes incremental backup data and already backed-up data;

[0128] If the estimated data recovery time exceeds a preset time threshold, the cloud server will generate an update notification message for the preset time threshold, which includes the updated preset time threshold.

[0129] In one possible implementation, the apparatus further includes a first transmitting module, used for:

[0130] If the edge server fails but the data stored on the edge server is not lost, send the first failure event to the cloud server.

[0131] Receive differential data sent by the cloud server. The differential data is obtained by the cloud server by comparing the current unbacked-up data with the data that has been sent.

[0132] Data recovery is performed based on differential data.

[0133] In one possible implementation, the device further includes a second transmitting module for:

[0134] In the event that the edge server fails and the data stored on the edge server has been lost, a second failure event is sent to the cloud server.

[0135] Retrieve the current unbacked-up data and the current backed-up data from the cloud server, and perform data recovery based on the current unbacked-up data and the current backed-up data.

[0136] The functions of each module in each device in the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.

[0137] Figure 7This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 7 As shown, the electronic device includes a memory 710 and a processor 720. The memory 710 stores a computer program that can run on the processor 720. When the processor 720 executes the computer program, it implements the method described in the above embodiments. The number of memories 710 and processors 720 can be one or more.

[0138] The electronic device also includes:

[0139] The communication interface 730 is used to communicate with external devices and perform data exchange and transmission.

[0140] If the memory 710, processor 720, and communication interface 730 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0141] Optionally, in a specific implementation, if the memory 710, processor 720, and communication interface 730 are integrated on a single chip, then the memory 710, processor 720, and communication interface 730 can communicate with each other through an internal interface.

[0142] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.

[0143] This application also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the method provided in this application.

[0144] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.

[0145] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0146] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0147] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0148] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0150] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.

[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0152] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.

[0153] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.

[0154] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data backup method characterized by, The method is applied to a cloud server, and the method comprises: determining a first estimated data recovery time consumption of unbacked-up data and backed-up data at an edge server; wherein the unbacked-up data comprises data sent by an Internet of Things device to the cloud server and not yet backed up at the cloud server, and the backed-up data comprises data issued by the cloud server to the edge server and uploaded to the cloud server for backup after being calculated by the edge server; in a case where the first estimated data recovery time consumption exceeds a preset time threshold, obtaining to-be-backed-up data corresponding to the unbacked-up data and backing up the to-be-backed-up data to obtain incremental backup data, the to-be-backed-up data being calculated by the edge server according to the unbacked-up data, and the incremental backup data and the backed-up data being used for data recovery at the edge server.

2. The method of claim 1, wherein, The determination of the first estimated data recovery time consumption of the unbacked-up data and the backed-up data at the edge server comprises: obtaining an estimated calculation time consumption, an estimated storage time consumption, and an estimated network bandwidth of the unbacked-up data from the edge server; determining the first estimated data recovery time consumption based on the estimated calculation time consumption, the estimated storage time consumption, the estimated network bandwidth, and a data amount of the backed-up data.

3. The method of claim 2, wherein, The method further comprises: determining a second estimated data recovery time consumption of current backup data at the edge server based on a data amount of the current backup data sent by the edge server and the estimated network bandwidth; the current backup data comprises the incremental backup data and the backed-up data; in a case where the second estimated data recovery time consumption exceeds the preset time threshold, generating an update prompt information of the preset time threshold and sending the update prompt information to the edge server, the update prompt information comprising an updated preset time threshold.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: in a case where a failure occurs at the edge server and data stored by the edge server is not lost, receiving a first failure event sent by the edge server; comparing current unbacked-up data with data issued to the edge server, and sending differential data to the edge server to enable the edge server to perform data recovery according to the differential data.

5. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: in a case where a failure occurs at the edge server and data stored by the edge server is lost, receiving a second failure event sent by the edge server; sending current unbacked-up data and current backed-up data to the edge server to enable the edge server to perform data recovery according to the current unbacked-up data and the current backed-up data.

6. The method of claim 2, wherein, The determination of the first estimated data recovery time consumption based on the estimated calculation time consumption, the estimated storage time consumption, the estimated network bandwidth, and the data amount of the backed-up data further comprises: determining a recovery time consumption of the unbacked-up data based on the estimated calculation time consumption, the estimated storage time consumption, and an adjustment parameter; the adjustment parameter is determined based on whether data of multiple categories in the unbacked-up data needs to be backed up. determine a recovery time consumption of the backed-up data based on the estimated network bandwidth and the data amount of the backed-up data; determine the first estimated data recovery time consumption based on the recovery time consumption of the non-backed-up data and the recovery time consumption of the backed-up data.

7. The method of claim 6, wherein, The method further comprises: acquiring an actual data recovery time consumption from the edge server, comparing the actual data recovery time consumption with the first estimated data recovery time consumption, and updating the adjustment parameter based on the comparison result.

8. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: sending a data backup instruction to the edge server to enable the edge server to determine the to-be-backed-up data corresponding to the non-backed-up data; receiving the to-be-backed-up data sent by the edge server.

9. A data backup method characterized by, The method is applied to an edge server, and the method comprises: determining to-be-backed-up data corresponding to non-backed-up data when a first estimated data recovery time consumption of the non-backed-up data and backed-up data at the edge server exceeds a preset time threshold; wherein the non-backed-up data comprises data sent by an Internet of Things device to a cloud server and not yet backed up at the cloud server, the backed-up data comprises data downloaded from the cloud server to the edge server and uploaded to the cloud server for backup after being calculated at the edge server, and the to-be-backed-up data is calculated by the edge server based on the non-backed-up data; sending the to-be-backed-up data to the cloud server to enable the cloud server to backup the to-be-backed-up data and obtain incremental backup data, wherein the incremental backup data and the backed-up data are used for data recovery at the edge server.

10. The method of claim 9, wherein, The first estimated data recovery time consumption of the non-backed-up data and the backed-up data at the edge server is determined by: acquiring an estimated calculation time consumption, an estimated storage time consumption, and an estimated network bandwidth of the non-backed-up data, and sending them to the cloud server to enable the cloud server to determine the first estimated data recovery time consumption based on the estimated calculation time consumption, the estimated storage time consumption, the estimated network bandwidth, and a data amount of the backed-up data.

11. The method of claim 10, wherein, The method further comprises: acquiring a current data amount of backup data and the estimated network bandwidth, and sending them to the cloud server to enable the cloud server to determine a second estimated data recovery time consumption of the current backup data at the edge server; wherein the current backup data comprises the incremental backup data and the backed-up data; receiving an update prompt information of the preset time threshold generated by the cloud server when the second estimated data recovery time consumption exceeds the preset time threshold, wherein the update prompt information comprises an updated preset time threshold.

12. The method according to any one of claims 9-11, characterized in that, The method further comprises: sending a first failure event to the cloud server when a failure occurs at the edge server and the data stored at the edge server is not lost; receiving difference data sent by the cloud server, wherein the difference data is obtained by comparing current non-backed-up data and already-downloaded data at the cloud server; performing data recovery based on the difference data.

13. The method according to any one of claims 9-11, characterized in that, The method further comprises: In a case where the edge server fails and data stored in the edge server is lost, a second failure event is sent to the cloud server; Current unbacked-up data and current backed-up data are obtained from the cloud server, and data recovery is performed according to the current unbacked-up data and the current backed-up data. 14.An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-13.

Citation Information

Patent Citations

  • Data backup method and device, storage medium and electronic equipment

    CN111880965A

  • Data center backup at the edge

    US20220083433A1