Automatic data disaster recovery method and device

By encoding and weight assignment of data operation commands, combining the importance of operations and system resource status, an automatic data disaster recovery method based on the existing technology is realized, and the problems of loss of important operations and system resource occupation are solved, and the problems of loss of important operations and system resource occupation are improved. Data security and reliability are provided.

CN119473711APending Publication Date: 2025-02-18BEIJING C H L ROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411464439.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

If the existing data automatic disaster recovery technology does not reach the set time interval during the work process, abnormally shutdown of data may lead to the loss of important operations, and shortening the automatic disaster recovery time interval will occupy more system resources.

Method used

By obtaining data operation commands, unique encoding and weight assignment are performed, the importance of the operation command is determined based on the execution time, resource consumption and data change amount, and the weight mapping database and accumulation rules are used to determine whether data automatic disaster recovery is performed.

Benefits of technology

Improve the security and reliability of automatic data disaster recovery, avoid the loss of important operations, and reduce the use of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473711A_ABST
    Figure CN119473711A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an automatic data disaster recovery method and device, and the method comprises the steps: obtaining a data operation command, carrying out the weight assignment operation of the operation command, determining a corresponding basic operation weight, carrying out the complexity evaluation operation of the operation command, and determining a corresponding operation weight, determining a corresponding weight mapping database according to the operation weight and the operation command code, receiving a data real-time operation command, determining a corresponding real-time operation weight according to the weight mapping database, performing accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determining a corresponding total weight; determining a corresponding real-time time interval according to the operation time of the data real-time operation command; whether the total weight or the real-time time interval exceeds a preset threshold value or not is judged in a polling mode, if yes, automatic data disaster recovery operation is carried out, and the safety and reliability of automatic data disaster recovery can be improved based on weight accumulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method and device for automatic data disaster recovery. Background Art

[0002] With the rapid development of information technology, computers and various types of data have become an indispensable part of our daily life and work. However, when using this data, users often need to process a large amount of data and face the risk of data loss if they are not saved in time. This data is often of great value to users, and once lost, it may bring immeasurable losses. In this context, data automatic disaster recovery technology came into being.

[0003] Automatic disaster recovery technology, also known as automatic disaster recovery, refers to the use of scientific technical means and methods to establish a systematic data emergency response method in advance. In the software system, it refers to the technology that can automatically save user data to persistent storage media (such as hard disks, cloud storage, etc.). Its emergence has greatly improved the security and reliability of user data, while also reducing the psychological burden of users, allowing users to focus more on the work itself. Data automatic disaster recovery technology has become relatively mature with its development and is widely used in various data. At present, data automatic disaster recovery technology is mainly based on setting time for automatic disaster recovery, saving open files at specified time intervals, so that if the data is closed abnormally, these files can be used to restore unsaved work.

[0004] However, this faces a problem. If an important operation is completed during the work process, but the set disaster recovery time interval has not arrived, the data will be abnormally closed, which will cause the important operations within this time interval to be lost. If the automatic disaster recovery time interval is shortened, it will take up more system resources. Therefore, there is an urgent need for a data automatic disaster recovery method that can add a method of automatic data disaster recovery based on the importance of the operation on the basis of the time interval to meet the security and reliability requirements of data automatic disaster recovery. Summary of the invention

[0005] In view of the problems in the prior art, the present application provides a method and device for automatic data disaster recovery, which can improve the security and reliability of automatic data disaster recovery based on weight accumulation.

[0006] In order to solve at least one of the above problems, the present application provides the following technical solutions:

[0007] In a first aspect, the present application provides a data automatic disaster recovery method, comprising:

[0008] Obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code;

[0009] Determine the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, perform a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, perform a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determine the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determine the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0010] Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and determine by polling whether the total weight or the real-time time interval exceeds a preset threshold value. If so, perform an automatic data disaster recovery operation.

[0011] Further, determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command includes:

[0012] Collect historical operation command execution data, and perform model training on a preset support vector machine model according to the historical operation command execution data to determine a corresponding loss function, wherein the historical operation command execution data includes at least one of execution time, resource consumption, and data change amount;

[0013] A corresponding importance classification model is determined according to the minimum loss function, and the importance of the corresponding operation command is determined according to the importance classification model and the operation command.

[0014] Further, the determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight includes:

[0015] Determine a corresponding additional weight according to the operation time complexity, the operation space complexity and a preset additional weight rule, wherein the additional weight includes at least one of a time additional weight and a space additional weight;

[0016] A weight adjustment operation is performed on the basic operation weight according to the additional weight to determine a corresponding operation weight.

[0017] Further, the determining a corresponding weight mapping database according to the operation weight and the operation command code includes:

[0018] Determine a corresponding weight-operation mapping relationship according to the operation weight, the operation command code and a preset hash table;

[0019] A corresponding weight mapping database is determined according to the weight operation mapping relationship and the preset operation command frequency.

[0020] Further, the determining a corresponding weight mapping database according to the weight operation mapping relationship and the preset operation command frequency includes:

[0021] Determine corresponding high-frequency weight operation mapping data according to the high-frequency operation command and the weight operation mapping relationship, perform a database construction operation according to the high-frequency weight operation mapping data, and determine a corresponding first-level cache database;

[0022] Determine corresponding non-high-frequency weight operation mapping data according to the non-high-frequency operation command and the weight operation mapping relationship, perform a database construction operation according to the non-high-frequency weight operation mapping data, and determine a corresponding secondary cache database;

[0023] A corresponding weight mapping database is determined according to the first-level cache database and the second-level cache database.

[0024] Further, the receiving of the data real-time operation command, performing a coding mapping operation according to the operation command code of the data real-time operation command and the weight mapping database, and determining the corresponding real-time operation weight, includes:

[0025] receiving a data real-time operation command, and determining whether an operation command code of the data real-time operation command is consistent with an operation command code in the first-level cache database according to a preload rule, and if so, determining a corresponding real-time operation weight;

[0026] If not, the corresponding real-time operation weight is determined according to the secondary cache database.

[0027] Further, after determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, it also includes:

[0028] Determine the corresponding user feedback score according to the preset user feedback rules;

[0029] The operation weight is updated according to the user feedback score and the preset weight coefficient to determine the updated operation weight.

[0030] In a second aspect, the present application provides a data automatic disaster recovery device, comprising:

[0031] An operation command code determination module is used to obtain a data operation command, perform a unique coding operation on the operation command, and determine a corresponding operation command code;

[0032] A weight mapping database determination module is used to determine the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, perform a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, perform a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determine the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determine the corresponding weight mapping database according to the operation weight and the operation command code, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0033] The polling automatic disaster recovery module is used to receive real-time data operation commands, perform coding mapping operations according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, accumulate the real-time operation weight according to the preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; poll to determine whether the total weight or the real-time time interval exceeds the preset threshold value, and if so, perform data automatic disaster recovery operation.

[0034] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the automatic data disaster recovery method when executing the program.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the automatic data disaster recovery method when executed by a processor.

[0036] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the automatic data disaster recovery method when executed by a processor.

[0037] It can be seen from the above technical scheme that the present application provides a method and device for automatic data disaster recovery, which obtains data operation commands, performs weight assignment operations on the operation commands, determines the corresponding basic operation weights, performs complexity evaluation operations on the operation commands, determines the corresponding operation weights, determines the corresponding weight mapping database according to the operation weights and the operation command codes, receives real-time data operation commands, determines the corresponding real-time operation weights according to the weight mapping database, performs accumulation operations on the real-time operation weights according to preset weight accumulation rules, and determines the corresponding total weights; determines the corresponding real-time time interval according to the operation time of the real-time data operation commands; and polls to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, performs automatic data disaster recovery operations, thereby improving the security and reliability of automatic data disaster recovery based on weight accumulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 This is one of the flow charts of the automatic data disaster recovery method in the embodiment of the present application;

[0040] Figure 2 This is a second flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0041] Figure 3 This is a third flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0042] Figure 4 This is a fourth flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0043] Figure 5 This is a fifth flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0044] Figure 6 This is a sixth flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0045] Figure 7 This is the seventh flow chart of the automatic data disaster recovery method in the embodiment of the present application;

[0046] Figure 8 A structural diagram of the automatic data disaster recovery device in an embodiment of the present application;

[0047] Fig. 9It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0048] Reference numerals:

[0049] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0052] Considering that if an important operation has just been completed during the work process, but the set disaster recovery time interval has not arrived, the data is abnormally closed, which will cause the important operations within this time interval to be lost. The present application provides a method and device for automatic data disaster recovery, which obtains data operation commands, performs weight assignment operations on the operation commands, determines the corresponding basic operation weights, performs complexity evaluation operations on the operation commands, determines the corresponding operation weights, determines the corresponding weight mapping database according to the operation weights and the operation command codes, receives data real-time operation commands, determines the corresponding real-time operation weights according to the weight mapping database, performs accumulation operations on the real-time operation weights according to preset weight accumulation rules, and determines the corresponding total weights; determines the corresponding real-time time interval according to the operation time of the data real-time operation commands; polls to determine whether the total weight or the real-time time interval exceeds the preset threshold, and if so, performs data automatic disaster recovery operations, thereby improving the security and reliability of data automatic disaster recovery based on weight accumulation.

[0053] In order to improve the security and reliability of automatic data disaster recovery based on weight accumulation, the present application provides an embodiment of a method for automatic data disaster recovery, see Figure 1 The automatic data disaster recovery method specifically includes the following contents:

[0054] Step S101: obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code;

[0055] Optionally, in this embodiment, this step identifies all operation commands of the operation data and assigns a unique coding ID to each operation command.

[0056] It can be understood that the implementation of this step lays the foundation for subsequent weight mapping through unique coding.

[0057] Step S102: determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, performing a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, performing a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determining the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0058] Optionally, the purpose of this step is to establish a weight mapping database so that weight mapping can be performed through the weight mapping database after receiving real-time data operation commands, and automatic data disaster recovery operations can be performed through the total weight.

[0059] Optionally, the technical means of this step is to determine the basic operation weights and the operation weights in sequence, and construct a corresponding weight mapping library.

[0060] Specifically, the construction of basic operation weights:

[0061] First of all, it is understandable that for data, the most important data operations are those with long execution time, large resource consumption and large amount of data changes, so the corresponding instruction data for important operations is the most important data operation command.

[0062] Secondly, basic weights are assigned to operations so that the system can identify important operations through weights and perform disaster recovery for important operations.

[0063] For example, the basic weight range is 0-5. The data operation that is comprehensively judged to be the most important is given a weight of 5, and the data operation that is comprehensively judged to be the least important is given a weight of 0. In this way, the subsequent system can perform disaster recovery of important operations within the time interval of automatic disaster recovery through the preset weight threshold, and will not lose important operations due to the short interval.

[0064] Based on the above understanding, when determining the basic weights, it is necessary to comprehensively consider the execution time, resource consumption, and data change amount to determine the important operations and assign basic operation weights based on the determination of the important operations.

[0065] Among them, one way to determine the important operations is to have experts evaluate the data operations to determine their importance, and such weights are fixed after being assigned.

[0066] Another way is to learn the relationship between important operations through classification models, and find the comprehensive relationship between important operations and execution time, resource consumption, and data change to determine important operations.

[0067] In this way, the most important thing is the training of the classification model:

[0068] First, it is determined that this is a multi-classification problem and the classification data characteristics are mixed. Therefore, the classification model is selected as the support vector machine model.

[0069] It is understood that support vector machines can be used for both linear and nonlinear classification problems.

[0070] Secondly, select the data for training the model. In this step, data is extracted by collecting execution data of operation commands from channels such as system logs, database change records, and performance monitoring tools, including execution time, resource consumption (such as CPU usage, memory usage, disk I / O, etc.), data change amount, and other information.

[0071] Then, the extracted data is processed, including:

[0072] 1. Mark each operation command with an importance label. The importance can be divided into multiple levels, such as "unimportant", "low", "lower", "medium", "higher", and "high".

[0073] 2. Clean the collected data to remove noise and outliers.

[0074] 3. Normalize continuous features (such as execution time, resource consumption, etc.) to avoid the impact of different dimensions on the model.

[0075] 4. Encode categorical features (such as operation command types) and convert them into numerical or one-hot encoding forms that the model can handle.

[0076] 5. Divide the processed clean data into training set, validation set and test set for subsequent model training.

[0077] Again, use the divided training set data to train the model, evaluate the model performance through cross-validation and other methods, and iteratively tune the model based on its performance on the validation set. You can use methods such as grid search, random search, or Bayesian optimization to automate the parameter tuning process.

[0078] Finally, the model that has undergone the above iterative tuning is the importance classification model. This model fully learns the comprehensive relationship between the importance of an operation and its execution time, resource consumption, and data change amount.

[0079] It can be understood that the importance of data operations can be identified through this model, and basic weights can be assigned to operation commands according to the weight range and the importance of the data operations, so that the basic weight of each operation can be determined.

[0080] For example, the importance classification model can comprehensively identify the importance of "unimportant", "low", "lower", "medium", "higher" and "high" based on the execution time, resource consumption and data change amount, and then assign values ​​to the above importance according to the weight range of 0-5.

[0081] “Not important” - 0

[0082] "Low" - 1

[0083] "Lower" - 2

[0084] Medium - 3

[0085] "Higher" - 4

[0086] High - 5

[0087] After the above operations, we get the basic operation weight corresponding to each operation command. Next, we need to adjust the basic operation weight to make the weight more accurate.

[0088] Specifically, the construction of operation weights:

[0089] First of all, it can be understood that the operation weight is obtained by adjusting the weight on the basis of the basic operation weight. The basis for weight adjustment is the algorithm complexity of the operation command itself. The more complex the algorithm, the greater the adjustment weight will be given. Introducing the adjustment weight of these algorithms into the basic operation weight will obtain the operation weight.

[0090] Secondly, algorithm complexity. Algorithm complexity needs to be obtained through complexity evaluation, where complexity includes time complexity and space complexity.

[0091] Time complexity refers to the trend of the time required for algorithm execution as the size of input data increases. It is usually expressed in big O notation, such as O(n), O(n^2), O(log n), etc. Time complexity focuses on the number of steps executed by the algorithm, that is, how long the algorithm runs. Its complexity is ranked as follows:

[0092] O(1) - constant time complexity

[0093] O(log n) - logarithmic time complexity

[0094] O(n) - linear time complexity

[0095] O(n log n) - linear logarithmic time complexity

[0096] O(n^2)-square time complexity

[0097] O(n^3)-cubic time complexity

[0098] O(2^n) - exponential time complexity

[0099] O(n!)-factorial time complexity

[0100] Space complexity refers to the amount of storage space required during the execution of an algorithm as the size of the input data grows. It is also expressed using big O notation, such as O(1), O(n), etc. Space complexity focuses on the amount of memory occupied by the algorithm during its execution. Its complexity is ranked as follows:

[0101] O(1) - constant space complexity

[0102] O(log n) - logarithmic space complexity

[0103] O(n) - linear space complexity

[0104] O(n^2)-square space complexity

[0105] O(2^n) - exponential space complexity

[0106] The corresponding weight adjustment values ​​are assigned to the above time complexity and space complexity in sequence. The starting point of the weight adjustment value is 1 and it increases by 0.5 each time. The weight of the basic operation is added according to the weight adjustment value, as follows:

[0107] Operation weight = basic operation weight + (time complexity weight adjustment + space complexity weight adjustment)

[0108] For example, assume that a comprehensive evaluation is conducted on the execution time, resource consumption, and data change amount of the operation corresponding to an operation command, and the operation importance is determined to be "medium". The corresponding basic weight is 3. On this basis, the time complexity of the operation command algorithm is O(n), and the weight adjustment value is 2. The space complexity of the operation command execution algorithm is O(1), and the weight adjustment value is 1. The final operation weight is 6.

[0109] It is understandable that the above is only an embodiment of the weight adjustment operation, and the weights can also be adjusted according to the actual application scenario. For example, if the impact of space complexity has little effect on the overall operation, then a weighted function can be defined to weight the time complexity and space complexity to obtain an overall weighted adjustment value.

[0110] Through the above method, the operation weight of each operation command can be obtained. Next, the operation weight and the unique code of the operation command obtained in step S101 are used to construct a weight mapping library.

[0111] Specifically, the construction of the weight mapping library:

[0112] First of all, it can be understood that the weight mapping library is a database that stores the mapping relationship between command IDs and weights, wherein the operation command ID has been obtained in step S101 and is unique, and its corresponding operation weight has also been described in the above method of this step. Therefore, the weight mapping relationship can be obtained by matching the above command IDs with the weights one by one, and a basic weight mapping database can be created by writing the weight mapping relationship into a hash table.

[0113] Secondly, based on the basic weight mapping library, a weight mapping database is created according to the usage frequency of the operation commands.

[0114] It is understandable that in a data, some operation commands are frequently executed, while some operation commands are not frequently executed. Therefore, the high-frequency operation commands are written into the first-level cache database, and the weight mapping relationship corresponding to the operation command ID is also stored in the first-level cache database. When the system starts, the first-level cache database is preheated and loaded. In this way, when the user triggers an operation command, it checks whether the relevant data already exists in the first-level cache. If so, the corresponding weight query is immediately performed. When the operation is completed, the weight is accumulated. If not, the data is queried and loaded from the second-level cache database and returned to the user at the same time. This method can reduce user waiting time and improve user experience.

[0115] A weight mapping database that can be used to quickly query data is built through the first-level cache database and the second-level cache database, laying the foundation for subsequent receiving real-time operation commands and performing weight queries.

[0116] Step S103: Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and poll to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, perform automatic data disaster recovery operation.

[0117] Optionally, in this embodiment, the purpose of this step is to achieve automatic data disaster recovery through weight accumulation.

[0118] Specifically, after receiving the real-time operation command, its unique operation command code is matched first, and then the first-level cache database of the weight mapping database is searched according to the operation command code. If there is a consistency, the corresponding weight is used as the real-time operation weight.

[0119] It is understandable that the first-level cache database has been preheated (ie, local cache) when the data is started, so the search speed is faster than that of the second-level cache database.

[0120] If the operation command code does not exist in the first-level cache database, the second-level cache database is searched to obtain the corresponding real-time operation weight.

[0121] After the system detects that the real-time operation is completed, the operation weight is immediately accumulated according to the obtained real-time operation weight and the previous operation weight to obtain the total operation weight, and the total operation weight is compared with the threshold of the operation weight.

[0122] For example, assume that the system has previously executed step A with a weight of 6, step B with a weight of 4, and the total weight is 10:

[0123] 1. The system executes step C with a weight of 7. After the execution is completed, the calculated total weight is 17. If the weight threshold is 15, it is determined that the weight threshold is exceeded and data disaster recovery is performed.

[0124] 2. The system executes step C weight 2. After execution, the calculated total weight is 12. If the weight threshold is 15, it is determined that it does not exceed the weight threshold, the total weight is updated, and polling is performed to determine the next operation.

[0125] Through the above method, the system can perform data disaster recovery based on the polling judgment weight method.

[0126] This system also has another data disaster recovery method, which is to perform data disaster recovery based on time intervals. The time interval should not be set too short, otherwise it will cause a burden on the system. Assuming that the disaster recovery interval is 20 minutes, the system can perform automatic disaster recovery every 20 minutes.

[0127] It can be understood that the two automatic disaster recovery operations of this system are parallel and exist at the same time. The system polls and checks the time interval and total weight. As long as one indicator meets the corresponding threshold, data disaster recovery will be performed and the record will be reset to zero and recalculated, but it will not affect the other indicators or clear the other indicators.

[0128] For example, the total weight of the system is 12, the time interval is 5 minutes, the weight threshold is 15, and the time interval threshold is 20 minutes.

[0129] 1. The system polls and detects that the total weight is 17, and the time interval is 10 minutes. Because the total weight exceeds the threshold, disaster recovery is performed and the total weight is cleared to 0, and the time interval is still 10 minutes. Continue the next round of polling detection.

[0130] 2. The system polls and detects that its total weight is 12 and the time interval is 21 minutes. Because the time interval exceeds the threshold, disaster recovery is performed and the time interval is cleared to 0. The total weight is still 12, and the next round of polling and detection continues.

[0131] This example shows how this embodiment performs automatic data disaster recovery by increasing the total weight based on the time interval, which can improve the security and reliability of automatic data disaster recovery.

[0132] From the above description, it can be seen that the data automatic disaster recovery method provided in the embodiment of the present application can obtain data operation commands, perform weight assignment operations on the operation commands, determine the corresponding basic operation weights, perform complexity assessment operations on the operation commands, determine the corresponding operation weights, determine the corresponding weight mapping database according to the operation weights and the operation command codes, receive data real-time operation commands, determine the corresponding real-time operation weights according to the weight mapping database, accumulate the real-time operation weights according to preset weight accumulation rules, and determine the corresponding total weights; determine the corresponding real-time time interval according to the operation time of the real-time data operation commands; poll to determine whether the total weight or the real-time time interval exceeds the preset threshold, and if so, perform data automatic disaster recovery operations, thereby improving the security and reliability of data automatic disaster recovery based on weight accumulation.

[0133] In one embodiment of the automatic data disaster recovery method of the present application, see Figure 2 , and can also include the following:

[0134] Step S201: collecting historical operation command execution data, and performing model training on a preset support vector machine model according to the historical operation command execution data to determine a corresponding loss function, wherein the historical operation command execution data includes at least one of execution time, resource consumption, and data change amount;

[0135] Step S202: determining a corresponding importance classification model according to the minimum loss function, and determining the importance of the corresponding operation command according to the importance classification model and the operation command.

[0136] Optionally, this step uses a classification model to learn important operation relationships, find the comprehensive relationship between importance and execution time, resource consumption, and data change amount, and determine important operation commands.

[0137] In this way, the most important thing is the training of the classification model:

[0138] First, it is determined that this is a multi-classification problem and the classification data characteristics are mixed. Therefore, the classification model is selected as the support vector machine model.

[0139] It is understood that support vector machines can be used for both linear and nonlinear classification problems.

[0140] Secondly, select the data for training the model. In this step, data is extracted by collecting execution data of operation commands from channels such as system logs, database change records, and performance monitoring tools, including execution time, resource consumption (such as CPU usage, memory usage, disk I / O, etc.), data change amount, and other information.

[0141] Then, the extracted data is processed, including:

[0142] 1. Mark each operation command with an importance label. The importance can be divided into multiple levels, such as "unimportant", "low", "lower", "medium", "higher", and "high".

[0143] 2. Clean the collected data to remove noise and outliers.

[0144] 3. Normalize continuous features (such as execution time, resource consumption, etc.) to avoid the impact of different dimensions on the model.

[0145] 4. Encode categorical features (such as operation command types) and convert them into numerical or one-hot encoding forms that the model can handle.

[0146] 5. Divide the processed clean data into training set, validation set and test set for subsequent model training.

[0147] Again, use the divided training set data to train the model, evaluate the model performance through cross-validation and other methods, and iteratively tune the model based on its performance on the validation set. You can use methods such as grid search, random search, or Bayesian optimization to automate the parameter tuning process.

[0148] Finally, the model that has undergone the above iterative tuning is the importance classification model. This model fully learns the comprehensive relationship between the importance of an operation and its execution time, resource consumption, and data change amount.

[0149] It can be understood that the importance of data operations can be identified through this model, and basic weights can be assigned to operation commands according to the weight range and the importance of the data operations, so that the basic weight of each operation can be determined.

[0150] Through step S202, this embodiment obtains an importance classification model, which can automatically classify the importance according to the operation, laying a foundation for subsequently assigning weights to important operation commands.

[0151] In one embodiment of the automatic data disaster recovery method of the present application, see Figure 3 , and can also include the following:

[0152] Step S301: determining a corresponding additional weight according to the operation time complexity, the operation space complexity and a preset additional weight rule, wherein the additional weight includes at least one of a time additional weight and a space additional weight;

[0153] Step S302: performing a weight adjustment operation on the basic operation weight according to the additional weight to determine a corresponding operation weight.

[0154] Optionally, in this embodiment, it can be understood that the operation weight is obtained by adjusting the weight on the basis of the basic operation weight. The basis for weight adjustment is the algorithm complexity of the operation command itself. The more complex the algorithm, the greater the adjustment weight will be given. Introducing the adjustment weight of these algorithms into the basic operation weight will obtain the operation weight.

[0155] Optionally, in this embodiment, the algorithm complexity needs to be obtained through complexity evaluation, where the complexity includes time complexity and space complexity.

[0156] Time complexity refers to the trend of the time required for algorithm execution as the size of input data increases. It is usually expressed in big O notation, such as O(n), O(n^2), O(log n), etc. Time complexity focuses on the number of steps executed by the algorithm, that is, how long the algorithm runs. Its complexity is ranked as follows:

[0157] O(1) - constant time complexity

[0158] O(log n) - logarithmic time complexity

[0159] O(n) - linear time complexity

[0160] O(n log n) - linear logarithmic time complexity

[0161] O(n^2)-square time complexity

[0162] O(n^3)-cubic time complexity

[0163] O(2^n) - exponential time complexity

[0164] O(n!)-factorial time complexity

[0165] Space complexity refers to the amount of storage space required during the execution of an algorithm as the size of the input data grows. It is also expressed using big O notation, such as O(1), O(n), etc. Space complexity focuses on the amount of memory occupied by the algorithm during its execution. Its complexity is ranked as follows:

[0166] O(1) - constant space complexity

[0167] O(log n) - logarithmic space complexity

[0168] O(n) - linear space complexity

[0169] O(n^2)-square space complexity

[0170] O(2^n) - exponential space complexity

[0171] The corresponding weight adjustment values ​​are assigned to the above time complexity and space complexity in sequence. The starting point of the weight adjustment value is 1 and it increases by 0.5 each time. The weight of the basic operation is added according to the weight adjustment value, as follows:

[0172] Operation weight = basic operation weight + (time complexity weight adjustment + space complexity weight adjustment)

[0173] For example, assume that a comprehensive evaluation is conducted on the execution time, resource consumption, and data change amount of the operation corresponding to an operation command, and the operation importance is determined to be "medium". The corresponding basic weight is 3. On this basis, the time complexity of the operation command algorithm is O(n), and the weight adjustment value is 2. The space complexity of the operation command execution algorithm is O(1), and the weight adjustment value is 1. The final operation weight is 6.

[0174] It is understandable that the above is only an embodiment of the weight adjustment operation, and the weights can also be adjusted according to the actual application scenario. For example, if the impact of space complexity has little effect on the overall operation, then a weighted function can be defined to weight the time complexity and space complexity to obtain an overall weighted adjustment value.

[0175] Through step S302, this embodiment achieves the adjustment of basic operation weights by adding additional weights, thereby obtaining more accurate operation weights and laying a foundation for subsequent data disaster recovery.

[0176] In one embodiment of the data automatic disaster recovery method of the present application, see Figure 4 , and can also include the following:

[0177] Step S401: determining a corresponding weight-operation mapping relationship according to the operation weight, the operation command code and a preset hash table;

[0178] Step S402: determining a corresponding weight mapping database according to the weight operation mapping relationship and the preset operation command frequency;

[0179] Optionally, in this embodiment, the weight mapping library is a database that stores the mapping relationship between command IDs and weights, wherein the operation command ID has been obtained in step S101 and is unique, and its corresponding operation weight has also been described in the above method of this step. Therefore, the weight mapping relationship can be obtained by matching the above command IDs with the weights one by one, and a basic weight mapping database can be created by writing the weight mapping relationship into a hash table.

[0180] Through step S402, this embodiment successfully obtains the weight mapping database, laying a foundation for subsequently assigning weights corresponding to real-time operation commands.

[0181] In one embodiment of the data automatic disaster recovery method of the present application, see Figure 5 , and can also include the following:

[0182] Step S501: determining corresponding high-frequency weight operation mapping data according to the high-frequency operation command and the weight operation mapping relationship, performing a database construction operation according to the high-frequency weight operation mapping data, and determining a corresponding first-level cache database;

[0183] Step S502: determining corresponding non-high-frequency weight operation mapping data according to the non-high-frequency operation command and the weight operation mapping relationship, performing a database construction operation according to the non-high-frequency weight operation mapping data, and determining a corresponding secondary cache database;

[0184] Step S503: determining a corresponding weight mapping database according to the first-level cache database and the second-level cache database.

[0185] Optionally, in this embodiment, based on the basic weight mapping library, a weight mapping database is created according to the usage frequency of the operation commands.

[0186] It is understandable that in a data, some operation commands are frequently executed, while some operation commands are not frequently executed. Therefore, the high-frequency operation commands are written into the first-level cache database, and the weight mapping relationship corresponding to the operation command ID is also stored in the first-level cache database. When the system starts, the first-level cache database is preheated and loaded. In this way, when the user triggers an operation command, it checks whether the relevant data already exists in the first-level cache. If so, the corresponding weight query is immediately performed. When the operation is completed, the weight is accumulated. If not, the data is queried and loaded from the second-level cache database and returned to the user at the same time. This method can reduce user waiting time and improve user experience.

[0187] Through step S503, this embodiment successfully constructs a weight mapping database that can be used to quickly query data through the first-level cache database and the second-level cache database, laying a foundation for subsequent receiving real-time operation commands and performing weight queries.

[0188] In one embodiment of the automatic data disaster recovery method of the present application, see Figure 6 , and can also include the following:

[0189] Step S601: receiving a data real-time operation command, determining whether the operation command code of the data real-time operation command is consistent with the operation command code in the first-level cache database according to the preload rule, and if so, determining the corresponding real-time operation weight;

[0190] Step S602: If not, determining the corresponding real-time operation weight according to the secondary cache database.

[0191] Optionally, in this embodiment, after receiving the real-time operation command, its unique operation command code is first matched, and then the first-level cache database of the weight mapping database is searched according to the operation command code. If there is a consistency, the corresponding weight is used as the real-time operation weight.

[0192] It is understandable that the first-level cache database has been preheated (ie, local cache) when the data is started, so the search speed is faster than that of the second-level cache database.

[0193] If the operation command code does not exist in the first-level cache database, the second-level cache database is searched to obtain the corresponding real-time operation weight.

[0194] Through step S602, this embodiment successfully performs a real-time weight search, laying a foundation for subsequent data disaster recovery through weight accumulation.

[0195] In one embodiment of the automatic data disaster recovery method of the present application, see Figure 7 , and can also include the following:

[0196] Step S701: Determine a corresponding user feedback score according to a preset user feedback rule;

[0197] Step S702: updating the operation weight according to the user feedback score and the preset weight coefficient to determine the updated operation weight.

[0198] Optionally, in addition to the above complete technical solution, this step can also be improved by adding a user feedback mechanism during the assignment operation.

[0199] A channel for interaction with users is added through the configuration file, and the importance score of data operation commands (such as 0-5) is provided. The importance of user feedback is used as a weighting factor and combined with the complexity weight to obtain the operation weight, that is:

[0200] Final weight = basic weight + (time complexity weight adjustment + space complexity weight adjustment) + (user feedback score * feedback weight coefficient)

[0201] By weighting user feedback, the user adaptability of automatic data disaster recovery can be improved.

[0202] Through step S702, this embodiment successfully adds a user feedback mechanism, which additionally increases user adaptability on the basis of automatic disaster recovery of weight-based data.

[0203] In order to improve the security and reliability of automatic data disaster recovery based on weight accumulation, the present application provides an embodiment of an automatic data disaster recovery device for implementing all or part of the content of the automatic data disaster recovery method, see Figure 8 The data automatic disaster recovery device specifically includes the following contents:

[0204] The operation command code determination module 10 is used to obtain a data operation command, perform a unique coding operation on the operation command, and determine a corresponding operation command code;

[0205] A weight mapping database determination module 20 is used to determine the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, perform a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, perform a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determine the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determine the corresponding weight mapping database according to the operation weight and the operation command code, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0206] The polling automatic disaster recovery module 30 is used to receive real-time data operation commands, perform coding mapping operations according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, accumulate the real-time operation weight according to the preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; poll to determine whether the total weight or the real-time time interval exceeds the preset threshold, and if so, perform data automatic disaster recovery operation.

[0207] From the above description, it can be seen that the data automatic disaster recovery device provided in the embodiment of the present application can obtain data operation commands, perform weight assignment operations on the operation commands, determine the corresponding basic operation weights, perform complexity assessment operations on the operation commands, determine the corresponding operation weights, determine the corresponding weight mapping database according to the operation weights and the operation command codes, receive data real-time operation commands, determine the corresponding real-time operation weights according to the weight mapping database, accumulate the real-time operation weights according to preset weight accumulation rules, and determine the corresponding total weights; determine the corresponding real-time time interval according to the operation time of the data real-time operation commands; poll to determine whether the total weight or the real-time time interval exceeds the preset threshold, and if so, perform data automatic disaster recovery operations, thereby improving the security and reliability of data automatic disaster recovery based on weight accumulation.

[0208] From the hardware level, in order to improve the security and reliability of automatic data disaster recovery based on weight accumulation, the present application provides an embodiment of an electronic device for implementing all or part of the content of the automatic data disaster recovery method, and the electronic device specifically includes the following content:

[0209] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize the information transmission between the data automatic disaster recovery method and the core business system, user terminal and related database and other related devices; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the data automatic disaster recovery method and the embodiment of the data automatic disaster recovery method in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0210] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.

[0211] In practical applications, part of the data automatic disaster recovery method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0212] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0213] Fig. 9 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig. 9 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig. 9 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0214] In one embodiment, the data automatic disaster recovery method function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control:

[0215] Step S101: obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code;

[0216] Step S102: determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, performing a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, performing a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determining the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0217] Step S103: Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and poll to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, perform automatic data disaster recovery operation.

[0218] From the above description, it can be seen that the electronic device provided in the embodiment of the present application obtains data operation commands, performs weight assignment operations on the operation commands, determines the corresponding basic operation weights, performs complexity assessment operations on the operation commands, determines the corresponding operation weights, determines the corresponding weight mapping database according to the operation weights and the operation command codes, receives data real-time operation commands, determines the corresponding real-time operation weights according to the weight mapping database, performs accumulation operations on the real-time operation weights according to preset weight accumulation rules, and determines the corresponding total weights; determines the corresponding real-time time interval according to the operation time of the data real-time operation commands; and polls to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, an automatic data disaster recovery operation is performed, thereby improving the security and reliability of automatic data disaster recovery based on weight accumulation.

[0219] In another embodiment, the automatic data disaster recovery method can be configured separately from the central processing unit 9100. For example, the automatic data disaster recovery method can be configured as a chip connected to the central processing unit 9100, and the function of the automatic data disaster recovery method is realized through the control of the central processing unit.

[0220] like Fig. 9 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig. 9 In addition, the electronic device 9600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0221] like Fig. 9 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0222] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0223] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0224] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0225] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0226] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0227] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0228] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the automatic data disaster recovery method in the above embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the automatic data disaster recovery method in the above embodiments are implemented by the execution subject being a server or a client. For example, when the processor executes the computer program, the following steps are implemented:

[0229] Step S101: obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code;

[0230] Step S102: determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, performing a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, performing a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determining the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0231] Step S103: Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and poll to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, perform automatic data disaster recovery operation.

[0232] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application obtains data operation commands, performs weight assignment operations on the operation commands, determines the corresponding basic operation weights, performs complexity evaluation operations on the operation commands, determines the corresponding operation weights, determines the corresponding weight mapping database according to the operation weights and the operation command codes, receives data real-time operation commands, determines the corresponding real-time operation weights according to the weight mapping database, performs accumulation operations on the real-time operation weights according to preset weight accumulation rules, and determines the corresponding total weights; determines the corresponding real-time time interval according to the operation time of the data real-time operation commands; and polls to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, an automatic data disaster recovery operation is performed, thereby improving the security and reliability of automatic data disaster recovery based on weight accumulation.

[0233] The embodiments of the present application also provide a computer program product capable of implementing all the steps of the automatic data disaster recovery method in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the automatic data disaster recovery method are implemented. For example, the computer program / instruction implements the following steps:

[0234] Step S101: obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code;

[0235] Step S102: determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, performing a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, performing a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determining the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command;

[0236] Step S103: Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and poll to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, perform automatic data disaster recovery operation.

[0237] From the above description, it can be seen that the computer program product provided in the embodiment of the present application obtains data operation commands, performs weight assignment operations on the operation commands, determines the corresponding basic operation weights, performs complexity evaluation operations on the operation commands, determines the corresponding operation weights, determines the corresponding weight mapping database according to the operation weights and the operation command codes, receives data real-time operation commands, determines the corresponding real-time operation weights according to the weight mapping database, performs accumulation operations on the real-time operation weights according to preset weight accumulation rules, and determines the corresponding total weights; determines the corresponding real-time time interval according to the operation time of the data real-time operation commands; and polls to determine whether the total weight or the real-time time interval exceeds a preset threshold. If so, an automatic data disaster recovery operation is performed, thereby improving the security and reliability of automatic data disaster recovery based on weight accumulation.

[0238] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0239] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0240] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0241] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0242] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, 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 invention.

Claims

1. A data automatic disaster recovery method, characterized in that: The method comprises: Obtaining a data operation command, performing a unique encoding operation on the operation command, and determining a corresponding operation command code; Determine the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, perform a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, perform a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determine the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determine the corresponding weight mapping database according to the operation weight and the operation command encoding, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command; Receive a real-time data operation command, perform a coding mapping operation according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, perform an accumulation operation on the real-time operation weight according to a preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; and determine by polling whether the total weight or the real-time time interval exceeds a preset threshold value. If so, perform an automatic data disaster recovery operation.

2. The automatic data disaster recovery method according to claim 1, characterized in that: The determining the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command includes: Collect historical operation command execution data, and perform model training on a preset support vector machine model according to the historical operation command execution data to determine a corresponding loss function, wherein the historical operation command execution data includes at least one of execution time, resource consumption, and data change amount; A corresponding importance classification model is determined according to the minimum loss function, and the importance of the corresponding operation command is determined according to the importance classification model and the operation command.

3. The automatic data disaster recovery method according to claim 1, characterized in that: The determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight includes: Determine a corresponding additional weight according to the operation time complexity, the operation space complexity and a preset additional weight rule, wherein the additional weight includes at least one of a time additional weight and a space additional weight; A weight adjustment operation is performed on the basic operation weight according to the additional weight to determine a corresponding operation weight.

4. The automatic data disaster recovery method according to claim 1, characterized in that: The determining of a corresponding weight mapping database according to the operation weight and the operation command code comprises: Determine a corresponding weight-operation mapping relationship according to the operation weight, the operation command code and a preset hash table; A corresponding weight mapping database is determined according to the weight operation mapping relationship and the preset operation command frequency.

5. The automatic data disaster recovery method according to claim 4, characterized in that: The determining of the corresponding weight mapping database according to the weight operation mapping relationship and the preset operation command frequency includes: Determine corresponding high-frequency weight operation mapping data according to the high-frequency operation command and the weight operation mapping relationship, perform a database construction operation according to the high-frequency weight operation mapping data, and determine a corresponding first-level cache database; Determine corresponding non-high-frequency weight operation mapping data according to the non-high-frequency operation command and the weight operation mapping relationship, perform a database construction operation according to the non-high-frequency weight operation mapping data, and determine a corresponding secondary cache database; A corresponding weight mapping database is determined according to the first-level cache database and the second-level cache database.

6. The automatic data disaster recovery method according to claim 1, characterized in that: The receiving of the data real-time operation command, performing a coding mapping operation according to the operation command code of the data real-time operation command and the weight mapping database, and determining the corresponding real-time operation weight, includes: receiving a data real-time operation command, and determining whether an operation command code of the data real-time operation command is consistent with an operation command code in the first-level cache database according to a preload rule, and if so, determining a corresponding real-time operation weight; If not, the corresponding real-time operation weight is determined according to the secondary cache database.

7. The automatic data disaster recovery method according to claim 1, characterized in that: After determining the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, the method further includes: Determine the corresponding user feedback score according to the preset user feedback rules; The operation weight is updated according to the user feedback score and the preset weight coefficient to determine the updated operation weight.

8. A data automatic disaster recovery device, characterized in that: The device comprises: An operation command code determination module is used to obtain a data operation command, perform a unique coding operation on the operation command, and determine a corresponding operation command code; A weight mapping database determination module is used to determine the importance of the corresponding operation command according to the execution time, resource consumption and data change amount of the operation command, perform a weight assignment operation on the operation command according to a preset weight range and the importance of the operation command to determine the corresponding basic operation weight, perform a complexity evaluation operation on the operation command to determine the corresponding operation time complexity and operation space complexity, determine the corresponding operation weight according to the operation time complexity, the operation space complexity and the basic operation weight, and determine the corresponding weight mapping database according to the operation weight and the operation command code, wherein the operation time complexity is the time required for the operation command to execute, and the operation space complexity is the amount of storage space required during the execution of the operation command; The polling automatic disaster recovery module is used to receive real-time data operation commands, perform coding mapping operations according to the operation command code of the real-time data operation command and the weight mapping database, determine the corresponding real-time operation weight, accumulate the real-time operation weight according to the preset weight accumulation rule, and determine the corresponding total weight; determine the corresponding real-time time interval according to the operation time of the real-time data operation command; poll to determine whether the total weight or the real-time time interval exceeds the preset threshold value, and if so, perform data automatic disaster recovery operation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the automatic data disaster recovery method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automatic data disaster recovery method described in any one of claims 1 to 7 are implemented.