Service snapshot fault tolerance method and device, equipment and storage medium

By automatically processing snapshot tasks on the cloud platform, using preset rules and performance data to calculate task weights, the container cluster snapshot backup and recovery without human intervention is solved, and the failure recovery in the existing technology requires manual intervention and backup to affect business performance. Problem, improving the stability and fault tolerance of container clusters.

CN119248575APending Publication Date: 2025-01-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411382021.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The prior art requires manual intervention in container clusters to achieve failure recovery, and snapshot backup does not take into account the real-time changes and performance impact of business response, resulting in the inability to back up important services in a timely manner, reducing fault tolerance.

Method used

By generating a pending snapshot task list based on preset snapshot task timing trigger rules on the cloud platform, calculating target task weights based on service performance data and performance thresholds, automatically sorting and performing snapshot backups, and performing fault-tolerant recovery when a failure occurs, achieving no Snapshot backup and recovery of manual intervention.

Benefits of technology

It improves the fault tolerance of the cloud platform, reduces the business interruption time caused by failures, improves the stability and reliability of the container cluster, and ensures timely backup and recovery of services of different levels of importance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248575A_ABST
    Figure CN119248575A_ABST
Patent Text Reader

Abstract

The invention discloses a service snapshot fault tolerance method, device and equipment and a storage medium, is applied to a cloud platform, and relates to the technical field of cloud.The method comprises the steps that a to-be-processed snapshot task list is obtained based on a preset snapshot task timing triggering rule and by means of snapshot information recorded in a pre-configured snapshot record table; determining a target task weight based on a size relationship between the service performance data corresponding to each snapshot task to be processed in the list and a preset performance threshold, and obtaining a sorted list by using the target task weight; judging whether the snapshot historical record data of each to-be-processed snapshot task in the sorted list exceeds a preset snapshot data volume upper limit or not, and triggering snapshot backup according to a judgment result; and if fault tolerance occurs in the process of executing any snapshot backup operation, executing second environment recovery by performing snapshot record query on the target snapshot task after first environment recovery is completed based on the initial service mirror image, so as to complete snapshot recovery. And the fault-tolerant capability of the cloud platform is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud technology, and in particular to a business snapshot fault-tolerant method, device, equipment and storage medium. Background Art

[0002] In the existing implementation method, Kubernetes (container cluster management system) can use survival probes to detect whether the business Pod (i.e. container) is alive to monitor the status and health of the business. If the probe fails, Kubernetes will restart the Pod to avoid Pod crashes and exits due to hardware failures or business anomalies.

[0003] However, in actual operation, the fault recovery of this method requires manual intervention, which not only increases the recovery time, but also increases the complexity and error rate of the operation. In addition, in some large-scale container clusters, on the one hand, the snapshot does not take into account the real-time changes in business response and the impact of snapshot backup on business performance. On the other hand, when there are many business containers in the cluster that need snapshot backup, some important businesses cannot be backed up in time.

[0004] It can be seen that how to effectively and timely implement snapshot backup and recovery for services of different importance without manual intervention, thereby improving fault tolerance, is a problem that technical personnel in this field need to solve. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a business snapshot fault-tolerant method, apparatus, device and storage medium, which can effectively and timely realize the automation of snapshot backup and recovery for businesses of different importance without human intervention, thereby improving the fault tolerance capability of the cloud platform, and further improving the stability and reliability of the container cluster in the cloud platform, and reducing the business interruption time caused by failures.

[0006] In order to solve the above technical problems, an embodiment of the present invention provides a service snapshot fault tolerance method, which is applied to a cloud platform and includes:

[0007] Based on the preset snapshot task timing triggering rules and using the snapshot information recorded in the pre-configured snapshot record table, corresponding pending snapshot tasks are generated to obtain a pending snapshot task list;

[0008] Based on the relationship between the service performance data corresponding to each of the pending snapshot tasks in the pending snapshot task list and the preset performance threshold, determine the target task weight corresponding to each of the pending snapshot tasks, and sort the pending snapshot tasks using the target task weight to obtain a sorted list;

[0009] Determine whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and trigger a corresponding snapshot backup operation according to the obtained snapshot determination results;

[0010] If fault tolerance occurs during the execution of any snapshot backup operation, after the first environment recovery is completed based on the initial business image, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task, and a second environment recovery is performed based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

[0011] Optionally, the generating corresponding to-be-processed snapshot tasks based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a list of to-be-processed snapshot tasks includes:

[0012] Based on preset parameters and preset time information, periodically obtain records in the snapshot record table whose snapshot task status value is a first preset value to obtain a first target record; wherein the preset parameters include a snapshot task quantity threshold and a service window duration; the snapshot information in the first target record includes a service weight, a preset performance threshold, a service identifier, a preset performance expectation value, the snapshot task status value, an initial task weight, a record creation time, and a record update time, and when the snapshot task status value is the first preset value, it indicates that the snapshot task is in a pending execution state;

[0013] Corresponding to-be-processed snapshot tasks are determined based on each of the first target records to obtain a to-be-processed snapshot task list including a plurality of the to-be-processed snapshot tasks.

[0014] Optionally, determining the target task weight corresponding to each of the snapshot tasks to be processed based on the relationship between the service performance data corresponding to each of the snapshot tasks to be processed in the snapshot task list to be processed and a preset performance threshold includes:

[0015] Based on the service identifier corresponding to any pending snapshot task in the pending snapshot task list, obtaining service performance data of any pending snapshot task during the service window;

[0016] Comparing the service performance data with a preset performance threshold corresponding to any of the snapshot tasks to be processed to obtain a corresponding size relationship;

[0017] If the size relationship indicates that the service performance data is not greater than the preset performance threshold, then when the difference between the service performance data and the corresponding preset performance expectation value does not exceed the preset range, the target task weight corresponding to any pending snapshot task is determined based on the business weight corresponding to any pending snapshot task and the snapshot interval in the current pending snapshot task list;

[0018] Based on the principle of non-repetitive selection of snapshot tasks, jump again to the step of obtaining the service performance data of any pending snapshot task during the business window based on the business identifier corresponding to any pending snapshot task in the pending snapshot task list, until the traversal of the pending snapshot task list is completed.

[0019] Optionally, after obtaining the corresponding size relationship, the method further includes:

[0020] If the size relationship indicates that the service performance data is greater than the preset performance threshold, the snapshot interval in the pending snapshot task list is updated, and any pending snapshot task is deleted from the pending snapshot task list.

[0021] Optionally, the determining whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and triggering a corresponding snapshot backup operation according to the obtained determination results of each snapshot includes:

[0022] Acquire snapshot history record data corresponding to the first to-be-processed snapshot task with the largest weight of the target task in the sorted list based on the snapshot record table;

[0023] Determine whether the data volume of the snapshot historical record data has exceeded a preset snapshot data volume upper limit to obtain a corresponding data volume determination result;

[0024] When the data volume judgment result indicates that the preset snapshot data volume upper limit has been exceeded, the earliest historical snapshot record corresponding to the first pending snapshot task in the snapshot record table is deleted, and the snapshot task status and the snapshot address are updated based on the business operation status corresponding to the first pending snapshot task;

[0025] When the data volume judgment result indicates that the preset snapshot data volume upper limit is not exceeded, a snapshot backup is performed based on the business operation node and container information corresponding to the first to-be-processed snapshot task to obtain a corresponding backup result;

[0026] If the backup result indicates that the backup is successful, updating the snapshot task status value corresponding to the first snapshot task to be processed, and creating a new record in the snapshot record table with the snapshot task status value being the first preset value;

[0027] If the backup result indicates that the backup fails, the snapshot interval corresponding to the sorted list is updated, and a preset alarm component is called to trigger a corresponding snapshot backup alarm.

[0028] Optionally, after completing the first environment recovery based on the initial business image, performing a snapshot record query based on the business identifier corresponding to the target snapshot task, and performing a second environment recovery according to the query result to complete a corresponding snapshot recovery operation, includes:

[0029] After performing a first environment recovery based on a container cluster management system and an initial business image corresponding to the target snapshot task, querying the snapshot record table for a record whose snapshot task status value is a second preset value based on the business identifier corresponding to the target snapshot task, so as to obtain a corresponding query result; when the snapshot task status value is the second preset value, it indicates that the snapshot task is in a successfully executed state;

[0030] A snapshot address in the record with the latest update time is selected according to the query result, and the business environment restored by the first environment is upgraded to a snapshot environment corresponding to the snapshot address through a preset command to complete a corresponding snapshot recovery operation.

[0031] Optionally, the method further includes:

[0032] When a snapshot cleanup operation is triggered, a record whose snapshot task status value is the second preset value is obtained from the snapshot record table based on the target business identifier of the target snapshot task to be cleaned up, so as to obtain a corresponding second target record;

[0033] Deleting snapshot data according to the snapshot address in the second target record, and updating the corresponding snapshot task state value to a third preset value;

[0034] If the preset condition is currently met, the third target record in the snapshot record table whose snapshot task status value is the first preset value is deleted based on the target service identifier.

[0035] In a second aspect, an embodiment of the present invention provides a service snapshot fault-tolerant device, which is applied to a cloud platform, including:

[0036] The task list acquisition module is used to generate corresponding pending snapshot tasks based on the preset snapshot task timing triggering rules and using the snapshot information recorded in the pre-configured snapshot record table to obtain a pending snapshot task list;

[0037] A task sorting module is used to determine the target task weight corresponding to each of the pending snapshot tasks in the pending snapshot task list based on the size relationship between the service performance data corresponding to each of the pending snapshot tasks and the preset performance threshold, and sort the pending snapshot tasks using the target task weight to obtain a sorted list;

[0038] A snapshot backup module, used to determine whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and trigger a corresponding snapshot backup operation according to the obtained snapshot determination results;

[0039] A snapshot fault-tolerant module is used to query snapshot records based on the business identifier corresponding to the target snapshot task after completing the first environment recovery based on the initial business image if fault tolerance occurs during the execution of any snapshot backup operation, and to perform a second environment recovery based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

[0040] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0041] Memory, used to store computer programs;

[0042] The processor is used to execute the computer program to implement the steps of the aforementioned disclosed service snapshot fault tolerance.

[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed business snapshot fault tolerance are implemented.

[0044] It can be seen from the above technical scheme that the present invention generates corresponding pending snapshot tasks through a cloud platform based on preset snapshot task timing trigger rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a list of pending snapshot tasks; based on the size relationship between the service performance data corresponding to each pending snapshot task in the pending snapshot task list and the preset performance threshold, the target task weight corresponding to each pending snapshot task is determined, and the target task weight is used to sort each pending snapshot task to obtain a sorted list; it is determined whether the snapshot historical record data of each pending snapshot task in the sorted list exceeds the preset snapshot data volume upper limit, and the corresponding snapshot backup operation is triggered according to the obtained judgment results of each snapshot; if fault tolerance occurs during the execution of any snapshot backup operation, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task after the first environment recovery is completed based on the initial business image, and a second environment recovery is performed according to the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

[0045] Beneficial effects: The present invention first generates corresponding pending snapshot tasks based on preset snapshot task timing trigger rules and using snapshot information recorded in a pre-configured snapshot record table through a cloud platform to obtain a pending snapshot task list; based on the size relationship between the service performance data corresponding to each pending snapshot task in the pending snapshot task list and the preset performance threshold, the target task weight corresponding to each pending snapshot task is determined, and the target task weight is used to sort each pending snapshot task to obtain a sorted list; it is determined whether the snapshot history record data of each pending snapshot task in the sorted list exceeds the preset snapshot data volume upper limit, and the corresponding snapshot backup operation is triggered according to the obtained snapshot judgment results; if fault tolerance occurs during the execution of any snapshot backup operation, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task after the first environment recovery is completed based on the initial business image, and a second environment recovery is performed according to the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation. That is, the present invention triggers snapshot backup for the corresponding business based on the snapshot information recorded in the pre-configured snapshot record table. When a snapshot task is triggered, a weight calculation is first performed based on the service performance data and preset performance thresholds corresponding to each pending snapshot task in the pending snapshot task list, and the target task weights obtained are used to determine the list and order of snapshot tasks to be executed, i.e., a sorted list is obtained. Backup is then automatically performed according to the sorted list, and when fault tolerance occurs during the backup process, a second environment update is performed after the first environment is restored based on the initial business image to complete the snapshot recovery. In this way, snapshot backup and recovery automation can be effectively and timely implemented for businesses of different importance without manual intervention, thereby improving the fault tolerance of the cloud platform, and further improving the stability and reliability of the container cluster in the cloud platform, and reducing business interruption time due to failures. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A flow chart of a business snapshot fault tolerance method provided by an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of a specific business snapshot backup process provided by an embodiment of the present invention;

[0049] Figure 3 A code schematic diagram of a process control function provided by an embodiment of the present invention;

[0050] Figure 4 A code schematic diagram of a snapshot backup function provided by an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of a specific business snapshot fault tolerance and snapshot cleanup process provided by an embodiment of the present invention;

[0052] Figure 6 A code schematic diagram of a snapshot recovery function provided by an embodiment of the present invention;

[0053] Figure 7 A code schematic diagram of a snapshot cleanup function provided by an embodiment of the present invention;

[0054] Figure 8 A specific flow chart of a business snapshot fault tolerance method provided by an embodiment of the present invention;

[0055] Fig. 9 A schematic diagram of a device structure of a service snapshot fault-tolerant method disclosed in the present invention;

[0056] Fig.10 The present invention is a structural diagram of an electronic device disclosed in the present invention. DETAILED DESCRIPTION

[0057] 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.

[0058] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0059] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0060] In the existing implementation method, Kubernetes can monitor the status and health of the business through survival probes to detect whether the business Pod is alive. However, in actual operation, the fault recovery of this method requires manual intervention, which not only increases the recovery time, but also increases the complexity and error rate of the operation. In addition, in some larger container clusters, on the one hand, the snapshot does not take into account the real-time changes in business responses and the impact of snapshot backups on business performance. On the other hand, when there are more business containers in the cluster that require snapshot backups, some important businesses cannot be backed up in a timely manner. To this end, the embodiments of the present invention provide a business snapshot fault-tolerant method, device, equipment and storage medium, which can effectively and timely realize the automation of snapshot backup and recovery for businesses of different importance without manual intervention, thereby improving the fault tolerance of the cloud platform.

[0061] See also Figure 1 As shown, an embodiment of the present invention discloses a business snapshot fault tolerance method, which is applied to a cloud platform and includes:

[0062] Step S11: Generate corresponding snapshot tasks to be processed based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a list of snapshot tasks to be processed.

[0063] Combination Figure 2 As shown, in this embodiment, when a user creates a business, if the user specifies that a snapshot is required for the business, the cloud platform will insert a record in the t_busi_snapshot table of the database, that is, the snapshot record table, which includes: snapshot ID (Identity Document, identity identification), business ID (also known as business identification), business weight (busi_value), performance upper limit (perf_limit), performance expectation (perf_snap), snapshot task status (snap_status), task weight (task_weight), snapshot interval (gap_count), creation time (create time) and update time (update time). In other words, the snapshot record table contains task records corresponding to various created businesses.

[0064] Specifically, in this embodiment, the cloud platform process periodically controls the execution of the snapshot task. The specific code can be as follows: Figure 3As shown. That is, the method of generating corresponding pending snapshot tasks based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a pending snapshot task list includes: obtaining records in the snapshot record table whose snapshot task status value is a first preset value based on preset parameters and preset time information to obtain a first target record; wherein the preset parameters include a snapshot task quantity threshold and a business window duration; the snapshot information in the first target record includes a business weight (i.e., busi_value), a preset performance threshold (i.e., perf_limit), a business identifier, a preset performance expectation value (i.e., perf_snap), the snapshot task status value (i.e., snap_status), an initial task weight (i.e., task_weight), a record creation time (i.e., create time) and a record update time (i.e., update time), and when the snapshot task status value is the first preset value, it indicates that the snapshot task is in a pending execution state; and determining the corresponding pending snapshot tasks based on each of the first target records to obtain a pending snapshot task list including a plurality of the pending snapshot tasks. The snapshot task quantity threshold represents the maximum number of snapshot services that can be run simultaneously (to avoid excessive concurrency affecting the operation of the cloud platform); the service window duration represents the service performance collection duration, which is 30 minutes by default but can also be customized.

[0065] It is important to understand that, combined with Figure 2 As shown, in this embodiment, a zero value can be used as the first preset value, and the records with snap_state=0 are screened in the snapshot record table, and these records are used as snapshot tasks to be processed, and the corresponding snapshot task list to be processed (i.e. Figure 3 taskList in .

[0066] Step S12: Based on the relationship between the service performance data corresponding to each pending snapshot task in the pending snapshot task list and the preset performance threshold, determine the target task weight corresponding to each pending snapshot task, and use the target task weight to sort each pending snapshot task to obtain a sorted list.

[0067] In this embodiment, after obtaining the list of snapshot tasks to be processed, the list needs to be further sorted to obtain a list that better meets actual needs. The list is sorted in combination with the performance of the business, that is, based on the size relationship between the service performance data corresponding to each pending snapshot task in the pending snapshot task list and the preset performance threshold, the target task weight corresponding to each pending snapshot task is determined, including: based on the business identifier corresponding to any pending snapshot task in the pending snapshot task list, the service performance data of any pending snapshot task in the business window is obtained; the service performance data is compared with the preset performance threshold corresponding to any pending snapshot task to obtain the corresponding size relationship; if the size relationship indicates that the service performance data is not greater than the preset performance threshold, then when the difference between the service performance data and the corresponding preset performance expectation value does not exceed the preset range, the target task weight corresponding to any pending snapshot task is determined based on the business weight corresponding to any pending snapshot task and the snapshot interval in the current pending snapshot task list; based on the principle of non-repetitive selection of snapshot tasks, the step of obtaining the service performance data of any pending snapshot task in the business window based on the business identifier corresponding to any pending snapshot task in the pending snapshot task list is jumped again until the traversal of the pending snapshot task list is completed. That is, this embodiment calls a function to obtain service performance data (such as the average CPU utilization) of the service during the service window duration, and if the average is not higher than the performance upper limit, determines the target task weight.

[0068] At the same time, since the preset performance expectation value represents the average business performance that the user expects when creating a business snapshot, if the business performance fluctuates above or below the expected value (within the preset range), the cloud platform considers that a snapshot can be created for the task. If it is a positive deviation (performance is lower than the expected value), it means that the current idle time is more conducive to taking a snapshot, otherwise the priority of the task needs to be lowered. And, if the fluctuation exceeds the preset range, the task is skipped and not processed.

[0069] In addition, if the mean is higher than the performance upper limit, it is considered that the service is busy at this time, and the execution of the snapshot task will affect the service response, so the snapshot task is skipped, and the gap_count+1 of the record corresponding to the snapshot task in the snapshot record table is used as the cumulative weight for the next round of snapshot task execution. That is, after obtaining the corresponding size relationship, it also includes: if the size relationship indicates that the service performance data is greater than the preset performance threshold, the snapshot interval in the list of pending snapshot tasks is updated, and any pending snapshot task is deleted from the list of pending snapshot tasks. Among them, the weight calculation formula is: target task weight (task_weight) = business coefficient * business weight (busi_value) + (performance upper limit (perf_snap) - performance expectation (perf_value) * performance coefficient + snapshot interval (gap_count) * interval coefficient

[0070] In this way, dynamic weight allocation of snapshot tasks is achieved by comprehensively considering multiple dimensions such as business importance (importance is reflected through business weight), performance indicators and snapshot intervals. This strategy intelligently evaluates and sorts the pending snapshot tasks by defining parameters such as snapshot task quantity threshold, business window duration, performance upper limit and expected value, and corresponding weight coefficients, so that the corresponding business containers can be automatically backed up based on the sorted snapshot tasks. This weight calculation not only ensures that critical businesses are backed up first, but also optimizes the choice of backup timing by considering performance deviations and snapshot intervals, avoiding snapshot operations during business peaks, thereby reducing the impact on business operations.

[0071] Step S13: determining whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and triggering a corresponding snapshot backup operation according to the obtained snapshot determination results.

[0072] Specific, combined Figure 2 As shown, in this embodiment, when automatically backing up the service container based on the sorted list, first check the snapshot history of the current service, if the number of historical snapshots exceeds the preset snapshot data volume corresponding to the service (i.e. Figure 2), first call the API (Application Programming Interface) to delete the earliest snapshot record, and update the snapshot task status field snap_status=-1 (indicating that the snapshot task execution failed). On the contrary, if it does not exceed the preset snapshot data volume corresponding to the business, obtain the node and running container identifier of the current business according to the business operation status, create the business container as a new image through the docker command and upload it to the image repository, and then update the snapshot task status field snap_status=1, and update the snapshot address field and update time field in the record corresponding to the task. Finally, insert a new snapshot task and set the new record's snap_status=0 for the next cloud platform process to perform task traversal regularly. The specific code can be as follows Figure 4 shown.

[0073] Furthermore, in this embodiment, if the backup fails, the gap_count value is set to be updated plus 1, that is, the status field snap_status of the snapshot task is updated to 1. The alarm component on the cloud platform is called to generate a snapshot backup alarm to notify the system administrator to handle it in time.

[0074] It should be understood that when executing the pending snapshot tasks in the sorted list, multiple branches can be configured to process multiple pending snapshot tasks at the same time, but the number of branches needs to be less than the snapshot task number threshold. The pending snapshot tasks can also be processed sequentially. It depends on the current business operation status and the status of the central processor. Further, with regard to setting multiple branches to process snapshot tasks, the pending snapshot tasks in the sorted list can be divided based on the number of branches.

[0075] In a specific implementation, the pending snapshot tasks (ki) in the sorted list can be divided in order based on the number of branches n, for example, if n=3 (less than the snapshot task number threshold), i=15. Taking branch 1 as an example, the snapshot tasks in branch 1 are: k1, k2, k3, k4, k5. In this way, the snapshot tasks in branch 1 are all more important tasks. Branch 1 can be configured to have a higher priority than other branches, so that if an exception occurs during task execution and the number of tasks to be executed simultaneously needs to be reduced, the tasks in branch 1 are retained first. In another specific implementation, the pending snapshot tasks (ki) in the sorted list can be divided according to different magnitudes of the target weight value based on the number of branches n, for example, if n=3, i=15. Taking branch 1 as an example, the snapshot tasks in branch 1 are: k1, k4, k7, k10, k13. In this way, snapshot tasks of different magnitudes of the target task weight values ​​can be executed simultaneously through multiple branches.

[0076] Step S14: If fault tolerance occurs during the execution of any snapshot backup operation, after completing the first environment recovery based on the initial business image, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task, and a second environment recovery is performed based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

[0077] Specific, combined Figure 5 As shown, in this embodiment, when fault tolerance is triggered due to hardware failure or other situations, the cloud platform needs to further restore the environment based on the snapshot backup data after restoring the environment based on the container cluster management system (such as k8s) according to the original business image. That is, after completing the first environment recovery based on the initial business image, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task, and a second environment recovery is performed based on the query result to complete the corresponding snapshot recovery operation, including: after the first environment recovery is performed based on the container cluster management system and the initial business image corresponding to the target snapshot task, based on the business identifier corresponding to the target snapshot task, query the snapshot record table for the record whose snapshot task status value is the second preset value to obtain the corresponding query result; when the snapshot task status value is the second preset value, it indicates that the snapshot task is in a successfully executed state; according to the query result, the snapshot address in the record with the latest update time is selected, and the business environment restored after the first environment recovery is upgraded to the snapshot environment corresponding to the snapshot address through a preset command to complete the corresponding snapshot recovery operation. Among them, the preset command can be a kubectl set command. The specific code can be as follows Figure 6 shown.

[0078] In this way, without manual intervention, the latest backed-up container image can be retrieved from the image repository based on the snapshot to quickly restore the business environment to the most recent usage status, greatly improving fault tolerance and recovery speed.

[0079] Combination Figure 5 As shown, in this embodiment, the cloud platform can also perform snapshot cleaning. When the business is deleted or the user manually triggers the business snapshot cleaning, for the business to be cleaned up, the cloud platform obtains the records with the same business identifier and snap_status of the second preset value in the snapshot record table, and then deletes the data in the image warehouse according to the snapshot address in the record, and updates the snap_status in the record to the third preset value (which can be set to -1). At the same time, the image warehouse API will be called to delete the records with the same business identifier and snap_status of the first preset value in the snapshot record table, so as to avoid the cloud platform from obtaining the records of the business again for snapshot backup when the snapshot task is triggered regularly next time. That is, when the snapshot cleaning operation is triggered, the record with the snapshot task status value of the second preset value in the snapshot record table is obtained based on the target business identifier of the target snapshot task to be cleaned up, so as to obtain the corresponding second target record; the snapshot data is deleted according to the snapshot address in the second target record, and the corresponding snapshot task status value is updated to the third preset value; if the preset condition is currently met, the third target record with the snapshot task status value of the first preset value in the snapshot record table is deleted based on the target business identifier, so as to avoid the snapshot history data occupying extra space. If the current scenario is a business deletion scenario or a scenario where the user manually triggers the snapshot stop, the preset condition is met. Figure 7 shown.

[0080] As can be seen from the above, the present invention first generates corresponding pending snapshot tasks based on preset snapshot task timing trigger rules and using snapshot information recorded in a pre-configured snapshot record table through a cloud platform to obtain a pending snapshot task list; based on the size relationship between the service performance data corresponding to each pending snapshot task in the pending snapshot task list and the preset performance threshold, the target task weight corresponding to each pending snapshot task is determined, and the target task weight is used to sort each pending snapshot task to obtain a sorted list; it is determined whether the snapshot history record data of each pending snapshot task in the sorted list exceeds the preset snapshot data volume upper limit, and the corresponding snapshot backup operation is triggered according to the obtained snapshot judgment results; if fault tolerance occurs during the execution of any snapshot backup operation, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task after the first environment recovery is completed based on the initial business image, and a second environment recovery is performed according to the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation. That is, the present invention triggers snapshot backup for the corresponding business based on the snapshot information recorded in the pre-configured snapshot record table. When a snapshot task is triggered, a weight calculation is first performed based on the service performance data and preset performance thresholds corresponding to each pending snapshot task in the pending snapshot task list, and the target task weights obtained are used to determine the list and order of snapshot tasks to be executed, i.e., a sorted list is obtained. Backup is then automatically performed according to the sorted list, and when fault tolerance occurs during the backup process, a second environment update is performed after the first environment is restored based on the initial business image to complete the snapshot recovery. In this way, snapshot backup and recovery automation can be effectively and timely implemented for businesses of different importance without manual intervention, thereby improving the fault tolerance of the cloud platform, and further improving the stability and reliability of the container cluster in the cloud platform, and reducing business interruption time due to failures.

[0081] As can be seen from the previous embodiment, the present invention needs to determine whether the backed-up data exceeds the quota limit when backing up based on the sorted list, and trigger corresponding snapshot backup operations based on different judgment results. To this end, this embodiment will next describe in detail the process of processing each of the pending snapshot tasks in the sorted list.

[0082] See also Figure 8 As shown, an embodiment of the present invention discloses a business snapshot fault tolerance method, which is applied to a cloud platform and includes:

[0083] Step S21: based on the snapshot record table, obtaining snapshot history record data corresponding to the first to-be-processed snapshot task with the largest weight of the target task in the sorted list.

[0084] In this embodiment, first, the snapshot record table is searched for records whose business identifier is the same as that corresponding to the first pending snapshot task and whose snapshot task status values ​​are all the second preset values, and the data in the found records is obtained to obtain the snapshot history record data corresponding to the first pending snapshot task.

[0085] Step S22: determining whether the data volume of the snapshot historical record data exceeds a preset snapshot data volume upper limit, so as to obtain a corresponding data volume determination result.

[0086] In this embodiment, a preset snapshot data volume upper limit corresponding to the first snapshot task to be processed is obtained, and then it is determined whether the data volume of the snapshot historical record data exceeds the preset snapshot data volume upper limit.

[0087] Step S23: When the data volume judgment result indicates that the preset snapshot data volume upper limit, that is, the snapshot quota, is exceeded, the earliest historical snapshot record corresponding to the first pending snapshot task in the snapshot record table is deleted, and the snapshot task status and snapshot address are updated based on the business operation status corresponding to the first pending snapshot task.

[0088] In this embodiment, if the data volume judgment result indicates that the upper limit is exceeded, some data needs to be deleted to ensure the normal execution of the next round of the snapshot task. Therefore, the earliest record in the table is deleted and the image repository API is called to delete the backup data corresponding to the earliest record, and the snap_status in the record corresponding to the first pending snapshot task is updated to the third preset value, indicating that the first pending snapshot task in this round has not been successfully executed.

[0089] Step S24: When the data volume determination result indicates that the data volume does not exceed the preset snapshot data volume upper limit, a snapshot backup is performed based on the business operation node and container information corresponding to the first to-be-processed snapshot task to obtain a corresponding backup result.

[0090] In this embodiment, if the data volume judgment result indicates that it does not exceed the upper limit, the corresponding business operation node and container information (i.e., container ID) are obtained to create a container image, and the data of the container image is saved in the image repository to complete the snapshot backup, and the corresponding backup result is obtained.

[0091] Step S25: If the backup result indicates that the backup is successful, the snapshot task status value corresponding to the first snapshot task to be processed is updated, and a new record in the snapshot record table in which the snapshot task status value is the first preset value is created.

[0092] In this embodiment, if the backup is successful, the snapshot task status value corresponding to the first pending snapshot task is updated, and a new record is created so as to be executed when the cloud platform regularly triggers the next round of snapshot backup.

[0093] Step S26: If the backup result indicates that the backup fails, the snapshot interval corresponding to the sorted list is updated, and a preset alarm component is called to trigger a corresponding snapshot backup alarm.

[0094] As can be seen from the above, the present invention triggers the corresponding snapshot backup based on whether the historical snapshot data exceeds the snapshot quota, so as to complete the traversal of each of the pending snapshot tasks in the sorted list. In this way, the snapshot backup can be automatically implemented without manual intervention, and the efficiency and reliability of the snapshot backup are improved.

[0095] See also Fig. 9 As shown, the embodiment of the present application also discloses a service snapshot fault-tolerant device, which is applied to a cloud platform and includes:

[0096] The task list acquisition module 11 is used to generate corresponding pending snapshot tasks based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a pending snapshot task list;

[0097] The task sorting module 12 is used to determine the target task weight corresponding to each of the pending snapshot tasks in the pending snapshot task list based on the size relationship between the service performance data corresponding to each of the pending snapshot tasks and the preset performance threshold, and sort the pending snapshot tasks by using the target task weight to obtain a sorted list;

[0098] The snapshot backup module 13 is used to determine whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and trigger a corresponding snapshot backup operation according to the obtained snapshot determination results;

[0099] The snapshot fault tolerance module 14 is used to query the snapshot records based on the business identifier corresponding to the target snapshot task after completing the first environment recovery based on the initial business image if a fault tolerance occurs during the execution of any snapshot backup operation, and perform a second environment recovery based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

[0100] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0101] As can be seen from the above, the present invention triggers snapshot backups of corresponding services periodically based on the snapshot information recorded in the pre-configured snapshot record table through the cloud platform. And when triggering a snapshot task, firstly, a weight calculation is performed based on the service performance data and the preset performance threshold corresponding to each pending snapshot task in the pending snapshot task list, and the target task weight obtained is used to determine the list and order of the snapshot tasks to be executed in the end, that is, to obtain a sorted list. Then, backup is automatically performed according to the sorted list, and when fault tolerance occurs during the backup process, the second environment is updated after the first environment is restored based on the initial business image to complete the snapshot recovery. In this way, the automation of snapshot backup and recovery can be effectively and timely realized for businesses of different importance without human intervention, thereby improving the fault tolerance of the cloud platform, and then improving the stability and reliability of the container cluster in the cloud platform, and reducing the business interruption time caused by failures.

[0102] In some specific embodiments, the task list acquisition module 11 may specifically include:

[0103] A first record acquisition unit is used to periodically acquire records in a snapshot record table whose snapshot task status value is a first preset value based on preset parameters and preset time information to obtain a first target record; wherein the preset parameters include a snapshot task quantity threshold and a service window duration; the snapshot information in the first target record includes a service weight, a preset performance threshold, a service identifier, a preset performance expectation value, the snapshot task status value, an initial task weight, a record creation time, and a record update time, and when the snapshot task status value is the first preset value, it indicates that the snapshot task is in a pending execution state;

[0104] The task list determining unit is used to determine the corresponding to-be-processed snapshot tasks based on each of the first target records, so as to obtain a to-be-processed snapshot task list including a plurality of the to-be-processed snapshot tasks.

[0105] In some specific embodiments, the task sorting module 12 may specifically include:

[0106] A performance mean value acquisition unit, configured to acquire service performance data of any pending snapshot task in the pending snapshot task list during the service window based on the service identifier corresponding to the pending snapshot task in the pending snapshot task list;

[0107] A performance threshold comparison unit, configured to compare the service performance data with a preset performance threshold corresponding to any of the snapshot tasks to be processed, so as to obtain a corresponding size relationship;

[0108] a task weight determination unit, configured to determine, if the size relationship indicates that the service performance data is not greater than the preset performance threshold, a target task weight corresponding to any pending snapshot task based on the business weight corresponding to any pending snapshot task and the snapshot interval in the current pending snapshot task list when the difference between the service performance data and the corresponding preset performance expectation value does not exceed a preset range;

[0109] A list traversal unit is used to jump again to the step of obtaining the service performance data of any pending snapshot task in the pending snapshot task list during the business window based on the business identifier corresponding to any pending snapshot task in the pending snapshot task list based on the principle of non-repeated selection of snapshot tasks, until the traversal of the pending snapshot task list is completed.

[0110] In some specific embodiments, the service snapshot fault tolerance device may further include:

[0111] The task deleting unit is used to update the snapshot interval in the pending snapshot task list and delete any pending snapshot task from the pending snapshot task list if the size relationship indicates that the service performance data is greater than the preset performance threshold.

[0112] In some specific embodiments, the snapshot backup module 13 may specifically include:

[0113] A snapshot history acquisition unit, configured to acquire snapshot history record data corresponding to a first to-be-processed snapshot task having the largest weight of the target task in the sorted list based on the snapshot record table;

[0114] A snapshot data volume determination unit, used to determine whether the data volume of the snapshot historical record data has exceeded a preset snapshot data volume upper limit, so as to obtain a corresponding data volume determination result;

[0115] A first record deletion unit is used to delete the earliest historical snapshot record corresponding to the first pending snapshot task in the snapshot record table when the data volume judgment result indicates that the preset snapshot data volume upper limit has been exceeded, and update the snapshot task status and snapshot address based on the business operation status corresponding to the first pending snapshot task;

[0116] A snapshot backup unit, configured to perform a snapshot backup based on the business operation node and container information corresponding to the first to-be-processed snapshot task when the data volume judgment result indicates that the data volume does not exceed the preset snapshot data volume upper limit, so as to obtain a corresponding backup result;

[0117] A first backup result processing unit is configured to update the snapshot task status value corresponding to the first snapshot task to be processed, and create a new record in the snapshot record table with the snapshot task status value being the first preset value, if the backup result indicates that the backup is successful;

[0118] The second backup result processing unit is used to update the snapshot interval corresponding to the sorted list and call the preset alarm component to trigger a corresponding snapshot backup alarm if the backup result shows that the backup fails.

[0119] In some specific embodiments, the snapshot fault tolerance module 14 may specifically include:

[0120] A record query unit is used to query the record whose snapshot task status value is a second preset value in the snapshot record table based on the business identifier corresponding to the target snapshot task after performing a first environment recovery based on the container cluster management system and the initial business image corresponding to the target snapshot task, so as to obtain a corresponding query result; when the snapshot task status value is the second preset value, it indicates that the snapshot task is in a successfully executed state;

[0121] A snapshot recovery unit is used to select a snapshot address in the record with the latest update time according to the query result, and upgrade the business environment restored by the first environment to a snapshot environment corresponding to the snapshot address through a preset command to complete the corresponding snapshot recovery operation.

[0122] In some specific embodiments, the service snapshot fault tolerance device may further include:

[0123] A second record acquisition unit is used to acquire, when a snapshot cleanup operation is triggered, a record whose snapshot task status value is the second preset value in the snapshot record table based on the target business identifier of the target snapshot task to be cleaned up, so as to obtain a corresponding second target record;

[0124] a data deleting unit, configured to delete the snapshot data according to the snapshot address in the second target record, and update the corresponding snapshot task state value to a third preset value;

[0125] The second record deleting unit is configured to delete, based on the target service identifier, a third target record in the snapshot record table whose snapshot task status value is a first preset value if a preset condition is currently met.

[0126] Furthermore, the present application also discloses an electronic device. Fig.10This is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the diagram cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the business snapshot fault tolerance method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.

[0127] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0128] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0129] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the service snapshot fault tolerance method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0130] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed service snapshot fault tolerance method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0131] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0132] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0133] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0134] Finally, 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. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0135] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A business snapshot fault tolerance method, characterized in that: Applied to cloud platforms, including: Generate corresponding pending snapshot tasks based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a pending snapshot task list; Based on the relationship between the service performance data corresponding to each of the pending snapshot tasks in the pending snapshot task list and the preset performance threshold, determine the target task weight corresponding to each of the pending snapshot tasks, and sort the pending snapshot tasks using the target task weight to obtain a sorted list; Determine whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and trigger a corresponding snapshot backup operation according to the obtained snapshot determination results; If fault tolerance occurs during the execution of any snapshot backup operation, after the first environment recovery is completed based on the initial business image, a snapshot record query is performed based on the business identifier corresponding to the target snapshot task, and a second environment recovery is performed based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

2. The business snapshot fault tolerance method according to claim 1, characterized in that: The method of generating corresponding pending snapshot tasks based on preset snapshot task timing triggering rules and using snapshot information recorded in a pre-configured snapshot record table to obtain a pending snapshot task list includes: Based on preset parameters and preset time information, periodically obtain records in the snapshot record table whose snapshot task status value is a first preset value to obtain a first target record; wherein the preset parameters include a snapshot task quantity threshold and a service window duration; the snapshot information in the first target record includes a service weight, a preset performance threshold, a service identifier, a preset performance expectation value, the snapshot task status value, an initial task weight, a record creation time, and a record update time, and when the snapshot task status value is the first preset value, it indicates that the snapshot task is in a pending execution state; Corresponding to-be-processed snapshot tasks are determined based on each of the first target records to obtain a to-be-processed snapshot task list including a plurality of the to-be-processed snapshot tasks.

3. The service snapshot fault tolerance method according to claim 2, characterized in that: The determining of the target task weight corresponding to each of the snapshot tasks to be processed based on the relationship between the service performance data corresponding to each of the snapshot tasks to be processed in the snapshot task list to be processed and the preset performance threshold comprises: Based on the service identifier corresponding to any pending snapshot task in the pending snapshot task list, obtaining service performance data of any pending snapshot task during the service window; Comparing the service performance data with a preset performance threshold corresponding to any of the snapshot tasks to be processed to obtain a corresponding size relationship; If the size relationship indicates that the service performance data is not greater than the preset performance threshold, then when the difference between the service performance data and the corresponding preset performance expectation value does not exceed the preset range, the target task weight corresponding to any pending snapshot task is determined based on the business weight corresponding to any pending snapshot task and the snapshot interval in the current pending snapshot task list; Based on the principle of non-repetitive selection of snapshot tasks, jump again to the step of obtaining the service performance data of any pending snapshot task during the business window based on the business identifier corresponding to any pending snapshot task in the pending snapshot task list, until the traversal of the pending snapshot task list is completed.

4. The service snapshot fault tolerance method according to claim 3, characterized in that: After obtaining the corresponding size relationship, the method further includes: If the size relationship indicates that the service performance data is greater than the preset performance threshold, the snapshot interval in the pending snapshot task list is updated, and any pending snapshot task is deleted from the pending snapshot task list.

5. The service snapshot fault tolerance method according to claim 2, characterized in that: The determining whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and triggering a corresponding snapshot backup operation according to the obtained snapshot determination results, includes: Acquire snapshot history record data corresponding to the first to-be-processed snapshot task with the largest weight of the target task in the sorted list based on the snapshot record table; Determine whether the data volume of the snapshot historical record data has exceeded a preset snapshot data volume upper limit to obtain a corresponding data volume determination result; When the data volume judgment result indicates that the preset snapshot data volume upper limit has been exceeded, the earliest historical snapshot record corresponding to the first pending snapshot task in the snapshot record table is deleted, and the snapshot task status and the snapshot address are updated based on the business operation status corresponding to the first pending snapshot task; When the data volume judgment result indicates that the preset snapshot data volume upper limit is not exceeded, a snapshot backup is performed based on the business operation node and container information corresponding to the first to-be-processed snapshot task to obtain a corresponding backup result; If the backup result indicates that the backup is successful, updating the snapshot task status value corresponding to the first snapshot task to be processed, and creating a new record in the snapshot record table with the snapshot task status value being the first preset value; If the backup result indicates that the backup fails, the snapshot interval corresponding to the sorted list is updated, and a preset alarm component is called to trigger a corresponding snapshot backup alarm.

6. The service snapshot fault tolerance method according to any one of claims 1 to 5, characterized in that: After completing the first environment recovery based on the initial business image, performing a snapshot record query based on the business identifier corresponding to the target snapshot task, and performing a second environment recovery according to the query result to complete the corresponding snapshot recovery operation, including: After performing a first environment recovery based on a container cluster management system and an initial business image corresponding to the target snapshot task, querying the snapshot record table for a record whose snapshot task status value is a second preset value based on the business identifier corresponding to the target snapshot task, so as to obtain a corresponding query result; when the snapshot task status value is the second preset value, it indicates that the snapshot task is in a successfully executed state; A snapshot address in the record with the latest update time is selected according to the query result, and the business environment restored by the first environment is upgraded to a snapshot environment corresponding to the snapshot address through a preset command to complete a corresponding snapshot recovery operation.

7. The service snapshot fault tolerance method according to claim 6, characterized in that: Also includes: When a snapshot cleanup operation is triggered, a record whose snapshot task status value is the second preset value is obtained from the snapshot record table based on the target business identifier of the target snapshot task to be cleaned up, so as to obtain a corresponding second target record; Deleting snapshot data according to the snapshot address in the second target record, and updating the corresponding snapshot task state value to a third preset value; If the preset condition is currently met, the third target record in the snapshot record table whose snapshot task status value is the first preset value is deleted based on the target service identifier.

8. A business snapshot fault-tolerant device, characterized in that: Applied to cloud platforms, including: The task list acquisition module is used to generate corresponding pending snapshot tasks based on the preset snapshot task timing triggering rules and using the snapshot information recorded in the pre-configured snapshot record table to obtain a pending snapshot task list; A task sorting module is used to determine the target task weight corresponding to each of the pending snapshot tasks in the pending snapshot task list based on the size relationship between the service performance data corresponding to each of the pending snapshot tasks and the preset performance threshold, and sort the pending snapshot tasks using the target task weight to obtain a sorted list; A snapshot backup module, used to determine whether the snapshot history record data of each of the pending snapshot tasks in the sorted list exceeds a preset snapshot data volume upper limit, and trigger a corresponding snapshot backup operation according to the obtained snapshot determination results; A snapshot fault-tolerant module is used to query snapshot records based on the business identifier corresponding to the target snapshot task after completing the first environment recovery based on the initial business image if fault tolerance occurs during the execution of any snapshot backup operation, and to perform a second environment recovery based on the query result to complete the corresponding snapshot recovery operation; the target snapshot task is the pending snapshot task corresponding to any snapshot backup operation.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the service snapshot fault tolerance method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the service snapshot fault tolerance method according to any one of claims 1 to 7 are implemented.