Data backup method and related device

By automatically calculating the matching degree between the server and data platform directories and determining the target backup directory set, the problem of low backup efficiency in large-scale data service systems is solved, and efficient data backup is achieved.

CN114860509BActive Publication Date: 2025-09-23SHENZHEN SECURITIES COMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210624211.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-09-23
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

In the prior art, data backup efficiency of large-scale data service systems is low, mainly because the application directory and configuration directory of each device are different, resulting in manual confirmation of the backup directory taking a lot of time.

Method used

By automatically obtaining the directory sets of the server and data platform, calculating the matching degree between the directories, determining the target backup directory set, and performing data backup processing.

Benefits of technology

It improves the efficiency of data backup, reduces manual intervention time, and improves the automation and accuracy of the backup process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860509B_ABST
    Figure CN114860509B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data backup method and related devices, wherein the method includes: obtaining a set of directories to be backed up on a server, and obtaining a set of preset backup directories in a data platform; obtaining a matching degree between each to-be-backed-up directory in the set of directories to be backed up and each preset backup directory in the set of preset backup directories to obtain a matching degree set; determining a target backup directory set from the set of directories to be backed up based on the matching degree set; performing backing up processing on data corresponding to the target backup directory set in the server, and being able to automatically determine the target backup directory set from the set of directories to be backed up, and perform data backup processing, thereby improving the efficiency of data backup.
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 technology, and in particular to a data backup method and related devices. Background Art

[0002] Stable operation is paramount for large-scale data service systems. If the system cannot restore or recover data in a timely manner when a system crashes or encounters other failures, unforeseen losses will result. Therefore, data backup is necessary for important systems. These important data systems involve a large number of servers, and due to the differences in the roles and functions of each device, the application directory and configuration directory of each device are different. In existing solutions, manual confirmation of the backup directory for each device is usually required, which takes a lot of time and costs, resulting in a low efficiency when backing up data. Summary of the Invention

[0003] The embodiments of the present application provide a data backup method and related apparatus, which can automatically determine a target backup directory set from a set of directories to be backed up and perform data backup processing, thereby improving the efficiency of data backup.

[0004] A first aspect of an embodiment of the present application provides a data backup method, the method comprising:

[0005] Obtain the set of directories to be backed up on the server, and obtain the set of preset backup directories in the data platform;

[0006] Obtaining a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set;

[0007] Determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set;

[0008] Back up the data corresponding to the target backup directory set in the server.

[0009] In conjunction with the first aspect, in one possible implementation, obtaining a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set includes:

[0010] Determine a first to-be-backed-up directory and a first preset backup directory, wherein the first to-be-backed-up directory is any one in the to-be-backed-up directory set, and the first preset backup directory is any one in the preset backup directories;

[0011] Splitting the first directory to be backed up to obtain M first segments, and splitting the first preset backup directory to obtain N second segments;

[0012] Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence;

[0013] performing a similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory;

[0014] Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

[0015] In conjunction with the first aspect, in one possible implementation, performing a similarity comparison on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory includes:

[0016] Obtaining a reference matching degree between the first to-be-backed-up directory and the first preset backup directory by using a preset matching algorithm, the first numbering sequence, and the second numbering sequence;

[0017] Splitting the first numbering sequence to obtain a first sub-numbering sequence and a second sub-numbering sequence, where the first sub-numbering sequence is a sequence consisting of the first number, the second number, and the third number of the first numbering sequence in that order;

[0018] Obtaining similarities between the segments corresponding to the first sub-numbering sequence and the corresponding segments in the second sub-numbering sequence to obtain a first sub-matching degree set;

[0019] Obtaining a weight of each sub-matching degree in the first sub-matching degree set to obtain a first weight set;

[0020] Determining a first matching degree correction value according to the first sub-matching degree set, the first weight set, and a first reduction coefficient;

[0021] Obtain a third sub-numbering sequence, where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first numbering sequence in reverse order;

[0022] Determining a second matching degree correction value based on at least the third sub-numbering sequence and the second reduction coefficient;

[0023] The matching degree between the first to-be-backed-up directory and the first preset backup directory is determined according to the reference matching degree, the first matching degree correction value, and the second matching degree correction value.

[0024] In conjunction with the first aspect, in one possible implementation, the method further includes:

[0025] Obtaining a first host name corresponding to the set of directories to be backed up, and obtaining a second host name corresponding to the set of preset backup directories;

[0026] determining a third matching degree correction value according to the matching degree between the first host name and the second host name and a third reduction coefficient;

[0027] The matching degree between the first to-be-backed-up directory and the first preset backup directory is corrected according to the third correction value to obtain a corrected matching degree between the first to-be-backed-up directory and the first preset backup directory.

[0028] In conjunction with the first aspect, in one possible implementation, determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set includes:

[0029] Determining the to-be-backed-up directories corresponding to the matching degrees higher than the preset matching degrees in the matching degree set as reference backup directories to obtain a reference backup directory set;

[0030] Sending the reference backup directory set to an administrator to instruct the administrator to determine the target backup directory set from the reference backup directory set;

[0031] The target backup directory set is received.

[0032] In conjunction with the first aspect, in one possible implementation, the method further includes:

[0033] Obtaining a data type of data corresponding to each target backup directory in the target backup directory set to obtain a data type set;

[0034] Obtaining a target data type from the data type set;

[0035] determining first reference state information of the server according to target data corresponding to the target data type;

[0036] Acquiring second reference status information of the server;

[0037] determining target state information of the server according to the first reference state information and the second reference state information;

[0038] If the target state information indicates that the server is in an abnormal state, determining the abnormal state type and abnormal information according to the target state information;

[0039] Determining adjustment information of the server according to the abnormal state type and the abnormal information;

[0040] The adjustment information is displayed.

[0041] A second aspect of an embodiment of the present application provides a data backup device, the device comprising:

[0042] A first acquisition unit is used to acquire a set of directories to be backed up on the server and a set of preset backup directories in the data platform;

[0043] a second obtaining unit, configured to obtain a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set, to obtain a matching degree set;

[0044] a determining unit, configured to determine a target backup directory set from the to-be-backed-up directory set according to the matching degree set;

[0045] The processing unit is configured to perform backup processing on the data corresponding to the target backup directory set in the server.

[0046] With reference to the second aspect, in one possible implementation, the second acquiring unit is configured to:

[0047] Determine a first to-be-backed-up directory and a first preset backup directory, wherein the first to-be-backed-up directory is any one in the to-be-backed-up directory set, and the first preset backup directory is any one in the preset backup directories;

[0048] Splitting the first directory to be backed up to obtain M first segments, and splitting the first preset backup directory to obtain N second segments;

[0049] Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence;

[0050] performing a similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory;

[0051] Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

[0052] With reference to the second aspect, in one possible implementation, in performing a similarity comparison on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory, the second acquiring unit is configured to:

[0053] Obtaining a reference matching degree between the first to-be-backed-up directory and the first preset backup directory by using a preset matching algorithm, the first numbering sequence, and the second numbering sequence;

[0054] Splitting the first numbering sequence to obtain a first sub-numbering sequence and a second sub-numbering sequence, where the first sub-numbering sequence is a sequence consisting of the first number, the second number, and the third number of the first numbering sequence in that order;

[0055] Obtaining similarities between the segments corresponding to the first sub-numbering sequence and the corresponding segments in the second sub-numbering sequence to obtain a first sub-matching degree set;

[0056] Obtaining a weight of each sub-matching degree in the first sub-matching degree set to obtain a first weight set;

[0057] Determining a first matching degree correction value according to the first sub-matching degree set, the first weight set, and a first reduction coefficient;

[0058] Obtain a third sub-numbering sequence, where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first numbering sequence in reverse order;

[0059] Determining a second matching degree correction value based on at least the third sub-numbering sequence and the second reduction coefficient;

[0060] The matching degree between the first to-be-backed-up directory and the first preset backup directory is determined according to the reference matching degree, the first matching degree correction value, and the second matching degree correction value.

[0061] In conjunction with the second aspect, in one possible implementation, the apparatus is further configured to:

[0062] Obtaining a first host name corresponding to the set of directories to be backed up, and obtaining a second host name corresponding to the set of preset backup directories;

[0063] determining a third matching degree correction value according to the matching degree between the first host name and the second host name and a third reduction coefficient;

[0064] The matching degree between the first to-be-backed-up directory and the first preset backup directory is corrected according to the third correction value to obtain a corrected matching degree between the first to-be-backed-up directory and the first preset backup directory.

[0065] In conjunction with the second aspect, in one possible implementation, the determining unit is configured to:

[0066] Determining the to-be-backed-up directories corresponding to the matching degrees higher than the preset matching degrees in the matching degree set as reference backup directories to obtain a reference backup directory set;

[0067] Sending the reference backup directory set to an administrator to instruct the administrator to determine the target backup directory set from the reference backup directory set;

[0068] The target backup directory set is received.

[0069] In conjunction with the second aspect, in one possible implementation, the apparatus is further configured to:

[0070] Obtaining a data type of data corresponding to each target backup directory in the target backup directory set to obtain a data type set;

[0071] Obtaining a target data type from the data type set;

[0072] determining first reference state information of the server according to target data corresponding to the target data type;

[0073] Acquiring second reference status information of the server;

[0074] determining target state information of the server according to the first reference state information and the second reference state information;

[0075] If the target state information indicates that the server is in an abnormal state, determining the abnormal state type and abnormal information according to the target state information;

[0076] Determining adjustment information of the server according to the abnormal state type and the abnormal information;

[0077] The adjustment information is displayed.

[0078] A third aspect of an embodiment of the present application provides a terminal, comprising a processor, an input device, an output device, and a memory, wherein the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions and execute the step instructions in the first aspect of the embodiment of the present application.

[0079] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application.

[0080] A fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.

[0081] Implementing the embodiments of the present application has at least the following beneficial effects:

[0082] By obtaining a set of directories to be backed up on a server and a set of preset backup directories in a data platform, the degree of matching between each directory to be backed up in the set of directories to be backed up and each preset backup directory in the set of preset backup directories is obtained to obtain a matching degree set. A target backup directory set is determined from the set of directories to be backed up according to the matching degree set, and data corresponding to the target backup directory set in the server is backed up. Therefore, the target backup directory set can be automatically determined from the set of directories to be backed up, and data backup processing can be performed, thereby improving the efficiency of data backup. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0084] Figure 1 A flowchart of a data backup method is provided for an embodiment of the present application;

[0085] Figure 2 A flowchart of another data backup method is provided for an embodiment of the present application;

[0086] Figure 3 A schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0087] Figure 4 A structural diagram of a data backup device is provided for an embodiment of the present application. DETAILED DESCRIPTION

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

[0089] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0090] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0091] To better understand the data backup method provided in an embodiment of the present application, the following first briefly introduces the data processing platform to which the data backup method is applied. A large amount of data is stored in a server, which may include multiple hosts, each of which may have different host names. Each host has a data storage directory, which is a directory for storing data. The data platform can back up the data stored in the storage directory through the storage directory, so that the data can be restored and recovered in a timely manner when the system crashes or other failures occur.

[0092] See also Figure 1 , Figure 1 The present invention provides a flow chart of a data backup method. Figure 1 As shown, the data backup method includes:

[0093] 101. Obtain a set of directories to be backed up on the server, and obtain a set of preset backup directories in the data platform.

[0094] The directories to be backed up can be directories on the server that require backup verification. These directories include directories that require backup processing as well as directories that do not require backup processing. The preset backup directories in the data platform can be understood as pre-set directories that require backup processing. These directories that require backup processing can be directories that have already been backed up, or directories set by the administrator.

[0095] 102. Obtain a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set.

[0096] Each directory to be backed up may be compared with a preset backup directory for similarity, and the obtained similarity may be determined as a matching degree, thereby determining a matching degree set.

[0097] 103. Determine a target backup directory set from the to-be-backed-up directory set according to the matching degree set.

[0098] The directories corresponding to the to-be-backed-up directories in the to-be-backed-up directory set and having a matching degree higher than a preset matching degree may be determined as elements in the target backup directory set, thereby obtaining the target backup directory set.

[0099] 104. Back up the data corresponding to the target backup directory set in the server.

[0100] The data corresponding to the target backup directory set may be common application data or application programs.

[0101] In this example, by obtaining a set of directories to be backed up on the server and a set of preset backup directories in the data platform, the matching degree between each directory to be backed up in the set of directories to be backed up and each preset backup directory in the set of preset backup directories is obtained to obtain a matching degree set. According to the matching degree set, a target backup directory set is determined from the set of directories to be backed up, and the data corresponding to the target backup directory set in the server is backed up. Therefore, the target backup directory set can be automatically determined from the set of directories to be backed up, and data backup processing can be performed, thereby improving the efficiency of data backup.

[0102] In one possible implementation, a possible method for obtaining a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set includes steps A1-A5, specifically as follows:

[0103] A1. Determine a first directory to be backed up and a first preset backup directory, wherein the first directory to be backed up is any one in the set of directories to be backed up, and the first preset backup directory is any one in the preset backup directories;

[0104] A2. Split the first directory to be backed up to obtain M first segments, and split the first preset backup directory to obtain N second segments;

[0105] A3. Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence;

[0106] A4. Performing a similarity comparison on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory;

[0107] A5. Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

[0108] The method for splitting the first directory to be backed up may be to split it according to a preset identifier, such as " / ". Thus, the first directory to be backed up can be split into multiple segments. For example, if the first directory to be backed up is " / home / sscc+bin / cfg", the first directory to be backed up can be split into: home, sscc+bin, cfg, thereby obtaining three first segments. The method for splitting the first preset backup directory refers to the method for splitting the first directory to be backed up.

[0109] The M first segments may be numbered in a sequential manner. For example, the serial numbers corresponding to home, sscc+bin, and cfg may be 1, 2, and 3.

[0110] A similarity comparison can be performed on the first directory to be backed up and the first preset backup directory to obtain a reference matching degree, and a similarity comparison can be performed on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to determine multiple matching degree correction values, so that the reference matching degree can be corrected to obtain the matching degree between the first directory to be backed up and the first preset backup directory.

[0111] In this example, the matching degree between the directory to be backed up and the preset backup directory is corrected by using the correction value, which can improve the accuracy of determining the matching degree between the directory to be backed up and the preset backup directory.

[0112] In one possible implementation, a possible method for performing a similarity comparison on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory includes B1-B, specifically as follows:

[0113] B1. Obtaining a reference matching degree between the first to-be-backed-up directory and the first preset backup directory using a preset matching algorithm, the first numbering sequence, and the second numbering sequence;

[0114] B2. Split the first numbering sequence to obtain a first sub-numbering sequence and a second sub-numbering sequence, where the first sub-numbering sequence is a sequence consisting of the first number, the second number, and the third number of the first numbering sequence in that order;

[0115] B3. Obtain similarities between the segments corresponding to the first sub-numbering sequence and the corresponding segments in the second sub-numbering sequence to obtain a first sub-matching degree set;

[0116] B4. Obtaining the weight of each sub-matching degree in the first sub-matching degree set to obtain a first weight set;

[0117] B5. Determine a first matching degree correction value based on the first sub-matching degree set, the first weight set, and the first reduction coefficient;

[0118] B6. Obtain a third sub-numbering sequence, where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first sub-numbering sequence in reverse order;

[0119] B7. Determine a second matching degree correction value based on at least the third sub-numbering sequence and the second elimination coefficient;

[0120] B8. Determine a matching degree between the first to-be-backed-up directory and the first preset backup directory based on the reference matching degree, the first matching degree correction value, and the second matching degree correction value.

[0121] The preset matching algorithm can be used for similarity matching, and the algorithm is set by experience value or historical data.

[0122] A specific example of a method for splitting the first numbering sequence may be: for example, if the first numbering sequence is 1, 2, 3, 4, 5, 6, then the first sub-numbering sequence may be: 1, 2, 3, and the second sub-numbering sequence may be: 4, 5, 6.

[0123] Obtaining the similarity between the segment corresponding to the first sub-numbering sequence and the corresponding segment in the second numbering sequence to obtain the first sub-matching degree set can be understood as: performing a similarity comparison between the first number, the second number, and the third number in the first sub-numbering sequence and the first number, the second number, and the third number in the corresponding second numbering sequence, respectively, to obtain three similarities, and determining the similarities as matching degrees, thereby obtaining matching degrees in the first sub-matching degree set.

[0124] Different sequence numbers correspond to different weights. For example, the weight corresponding to the first number is 0.2, the weight corresponding to the second number is 0.3, and the weight corresponding to the third number is 0.5. The weight corresponding to the sequence number is determined as the weight corresponding to the corresponding matching degree, thereby obtaining a first weight set.

[0125] A weighted operation is performed on the matching degrees in the first sub-matching degree set and the corresponding weights in the first weight value set to obtain an operation result, and the product of the operation result and the first reduction coefficient is determined as the first matching degree correction value.

[0126] A specific example where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first numbering sequence in reverse order can be: if the first numbering sequence is 1, 2, 3, 4, 5, 6, then the third sub-numbering sequence is 6, 5, 4. The method for determining the second matching degree correction value based on at least the third sub-numbering sequence and the second reduction coefficient is the same as the method for obtaining the first matching degree correction value in the aforementioned embodiment and is not further described here.

[0127] The first reduction coefficient and the second reduction coefficient are set by empirical values ​​or historical data. For example, the first reduction coefficient may be 0.05, and the second reduction coefficient may be 0.1.

[0128] The sum of the reference matching degree, the first matching degree correction value, and the second matching degree correction value may be determined as the matching degree between the first to-be-backed-up directory and the first preset backup directory.

[0129] In this example, the reference matching degree is corrected by the first matching degree correction value and the second matching degree correction value, thereby obtaining the matching degree between the first to-be-backed-up directory and the first preset backup directory, thereby improving the accuracy of the final matching degree determination.

[0130] In a possible implementation, the embodiment of the present application may further modify the matching degree, as follows:

[0131] C1. Obtain a first host name corresponding to the set of directories to be backed up, and obtain a second host name corresponding to the set of preset backup directories;

[0132] C2. Determine a third matching degree correction value based on the matching degree between the first host name and the second host name and a third reduction coefficient;

[0133] C3. Correct the matching degree between the first to-be-backed-up directory and the first preset backup directory according to the third correction value to obtain a corrected matching degree between the first to-be-backed-up directory and the first preset backup directory.

[0134] The third reduction coefficient may be set based on experience or historical data. For example, the third reduction coefficient may be 0.1. The third matching degree correction value may be determined by multiplying the matching degree between the first host name and the second host name by the third reduction coefficient.

[0135] In this example, the matching degree is corrected again using the host name, thereby further improving the accuracy of the matching degree determination.

[0136] In a possible implementation, a possible method for determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set includes D1-D3, specifically as follows:

[0137] D1. Determine the to-be-backed-up directories corresponding to the matching degrees higher than the preset matching degrees in the matching degree set as reference backup directories to obtain a reference backup directory set;

[0138] D2. Sending the reference backup directory set to an administrator to instruct the administrator to determine the target backup directory set from the reference backup directory set;

[0139] D3. Receive the target backup directory set.

[0140] The preset matching degree can be set by experience value or historical data.

[0141] The administrator may determine the reference backup directory set as the target backup directory set, or may determine some elements in the reference backup directory set as elements in the target backup directory set.

[0142] Of course, the backup directories in the target backup directory set may also be added to the preset backup directory set, thereby expanding the preset backup directory set.

[0143] In a possible implementation, the embodiment of the present application may further include:

[0144] E1. Obtaining the data type of data corresponding to each target backup directory in the target backup directory set to obtain a data type set;

[0145] E2. Obtain a target data type from the data type set;

[0146] E3. Determine first reference state information of the server according to target data corresponding to the target data type;

[0147] E4. Obtain second reference status information of the server;

[0148] E5. Determine target state information of the server based on the first reference state information and the second reference state information;

[0149] E6. If the target state information indicates that the server is in an abnormal state, determine the abnormal state type and abnormal information according to the target state information;

[0150] E7. Determine adjustment information for the server according to the abnormal state type and the abnormal information;

[0151] E8. Display the adjustment information.

[0152] The target data type may be a data type used for server status detection. The target data may be analyzed and processed to obtain first reference status information. Specifically, the target data may be subjected to keyword extraction to obtain a keyword set; and the first reference status information may be determined based on keywords in the keyword set. Keywords correspond to status information. Multiple keywords may be present simultaneously, resulting in one corresponding status information, thereby determining the first reference status information. Alternatively, different keywords may correspond to different status information, thereby determining the first reference status information.

[0153] The second reference state information may be determined based on the operating parameters of the server. The first reference state information and the second reference state information may be integrated to obtain the target state information. Specifically, the different information between the first reference state information and the second reference state information may be added to the second reference state information to obtain the target state information.

[0154] The target state information can reflect the abnormal state type and abnormal information, so that the abnormal state type and abnormal information can be extracted.

[0155] Different abnormal information corresponds to different adjustment information. The abnormal state type can correct the adjustment information. Different abnormal state types can correspond to different correction information, thereby realizing the correction of the adjustment information.

[0156] In this example, the first reference status information of the server can be determined from the data corresponding to the backup directory, and the second reference status information can be determined based on the operating parameters. The target status information can be determined based on the first reference status information and the second reference status information. When the state indicated by the target status information is an abnormal state, the adjustment information can be determined based on the abnormal state type and the abnormal information. The adjustment information can be automatically generated, which improves the convenience of server maintenance.

[0157] In a specific embodiment, when matching a directory, a method of forward matching, reverse matching, and intersection matching is adopted. Compared with the existing scheme of forward matching, reverse matching, and intersection matching, which finally obtains the final matching result based on the three matching results, the three matching calculations can be reduced to one, thereby improving the matching efficiency.

[0158] In a specific example, to solve the problem of not being able to adjust the weight of subsequent matching entries according to the preset backup directory set during matching, in this example, a dictionary is added to store the matching value information of all matched directories. When the matching value is greater than 70, the corresponding host name is recorded and the weight calculation of the host name is adjusted by increasing the weight value (increase by 0.01).

[0159] A specific implementation method for the recommended method of the backup directory list is:

[0160] 1. Import the existing backup directory into the data platform and store the data in the form of "host name, directory" for backup directory matching.

[0161] 2. Use the automated platform to log in and scan the existing main directories (root directories such as / home and / bin) of the server to be backed up to obtain all directory structures existing on the target host.

[0162] 3. Using the preset backup directory set in the data platform as the matching source, traverse all directories on the matching server in turn, obtain the matching values ​​of all directories on the server, and store them in the data processing platform.

[0163] 4. Filter out all directories with matching values ​​greater than 90 and sort them in descending order to obtain the final recommended list of data backup directories. This list is then recommended to the administrator.

[0164] See also Figure 2 , Figure 2The present invention provides another data backup method flow chart. Figure 2 As shown, the method includes:

[0165] 201. Obtain a set of directories to be backed up on the server, and obtain a set of preset backup directories in the data platform;

[0166] 202. Obtain a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set;

[0167] 203. Determine a target backup directory set from the to-be-backed-up directory set according to the matching degree set;

[0168] 204. Back up the data corresponding to the target backup directory set in the server;

[0169] 205. Obtain the data type of the data corresponding to each target backup directory in the target backup directory set to obtain a data type set;

[0170] 206. Obtain a target data type from the data type set;

[0171] 207. Determine first reference state information of the server according to target data corresponding to the target data type;

[0172] 208. Acquire second reference status information of the server;

[0173] 209. Determine target state information of the server according to the first reference state information and the second reference state information;

[0174] 210. If the target state information indicates that the server is in an abnormal state, determine the abnormal state type and abnormal information according to the target state information;

[0175] 211. Determine adjustment information of the server according to the abnormal state type and the abnormal information;

[0176] 212. Display the adjustment information.

[0177] In this example, the first reference status information of the server can be determined from the data corresponding to the backup directory, and the second reference status information can be determined based on the operating parameters. The target status information can be determined based on the first reference status information and the second reference status information. When the state indicated by the target status information is an abnormal state, the adjustment information can be determined based on the abnormal state type and the abnormal information. The adjustment information can be automatically generated, which improves the convenience of server maintenance.

[0178] For the same example as above, please refer to Figure 3 , Figure 3 A schematic structural diagram of a terminal provided in an embodiment of the present application, as shown in the figure, includes a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, the processor being configured to call the program instructions, and the program including instructions for executing the following steps;

[0179] Obtain the set of directories to be backed up on the server, and obtain the set of preset backup directories in the data platform;

[0180] Obtaining a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set;

[0181] Determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set;

[0182] Back up the data corresponding to the target backup directory set in the server.

[0183] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to implement the above functions, the terminal includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the various examples described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.

[0184] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0185] In line with the above, please see Figure 4 , Figure 4 The present invention provides a structural diagram of a data backup device. Figure 4 As shown, the device includes:

[0186] The first acquisition unit 401 is used to acquire a set of directories to be backed up on the server and a set of preset backup directories in the data platform;

[0187] The second obtaining unit 402 is configured to obtain a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set, to obtain a matching degree set;

[0188] A determining unit 403 is configured to determine a target backup directory set from the to-be-backed-up directory set according to the matching degree set;

[0189] The processing unit 404 is configured to perform backup processing on the data corresponding to the target backup directory set in the server.

[0190] In a possible implementation, the second acquiring unit 402 is configured to:

[0191] Determine a first to-be-backed-up directory and a first preset backup directory, wherein the first to-be-backed-up directory is any one in the to-be-backed-up directory set, and the first preset backup directory is any one in the preset backup directories;

[0192] Splitting the first directory to be backed up to obtain M first segments, and splitting the first preset backup directory to obtain N second segments;

[0193] Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence;

[0194] performing a similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory;

[0195] Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

[0196] In one possible implementation, in performing similarity comparison on the M first segments and the N second segments based on the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory, the second obtaining unit 402 is configured to:

[0197] Obtaining a reference matching degree between the first to-be-backed-up directory and the first preset backup directory by using a preset matching algorithm, the first numbering sequence, and the second numbering sequence;

[0198] Splitting the first numbering sequence to obtain a first sub-numbering sequence and a second sub-numbering sequence, where the first sub-numbering sequence is a sequence consisting of the first number, the second number, and the third number of the first numbering sequence in that order;

[0199] Obtaining similarities between the segments corresponding to the first sub-numbering sequence and the corresponding segments in the second sub-numbering sequence to obtain a first sub-matching degree set;

[0200] Obtaining a weight of each sub-matching degree in the first sub-matching degree set to obtain a first weight set;

[0201] Determining a first matching degree correction value according to the first sub-matching degree set, the first weight set, and a first reduction coefficient;

[0202] Obtain a third sub-numbering sequence, where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first numbering sequence in reverse order;

[0203] Determining a second matching degree correction value based on at least the third sub-numbering sequence and the second reduction coefficient;

[0204] The matching degree between the first to-be-backed-up directory and the first preset backup directory is determined according to the reference matching degree, the first matching degree correction value, and the second matching degree correction value.

[0205] In one possible implementation, the device is further configured to:

[0206] Obtaining a first host name corresponding to the set of directories to be backed up, and obtaining a second host name corresponding to the set of preset backup directories;

[0207] determining a third matching degree correction value according to the matching degree between the first host name and the second host name and a third reduction coefficient;

[0208] The matching degree between the first to-be-backed-up directory and the first preset backup directory is corrected according to the third correction value to obtain a corrected matching degree between the first to-be-backed-up directory and the first preset backup directory.

[0209] In one possible implementation, the determining unit 403 is configured to:

[0210] Determining the to-be-backed-up directories corresponding to the matching degrees higher than the preset matching degrees in the matching degree set as reference backup directories to obtain a reference backup directory set;

[0211] Sending the reference backup directory set to an administrator to instruct the administrator to determine the target backup directory set from the reference backup directory set;

[0212] The target backup directory set is received.

[0213] In conjunction with the second aspect, in one possible implementation, the apparatus is further configured to:

[0214] Obtaining a data type of data corresponding to each target backup directory in the target backup directory set to obtain a data type set;

[0215] Obtaining a target data type from the data type set;

[0216] determining first reference state information of the server according to target data corresponding to the target data type;

[0217] Acquiring second reference status information of the server;

[0218] determining target state information of the server according to the first reference state information and the second reference state information;

[0219] If the target state information indicates that the server is in an abnormal state, determining the abnormal state type and abnormal information according to the target state information;

[0220] Determining adjustment information of the server according to the abnormal state type and the abnormal information;

[0221] The adjustment information is displayed.

[0222] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any data backup method described in the above method embodiments.

[0223] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any data backup method recorded in the above method embodiments.

[0224] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0225] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0226] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0227] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0228] In addition, the functional units in the various embodiments of the application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software program modules.

[0229] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0230] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.

[0231] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein 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 and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there may 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 data backup method, characterized in that: The method comprises: Obtain the set of directories to be backed up on the server, and obtain the set of preset backup directories in the data platform; Obtaining a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set; Determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set; Backing up the data corresponding to the target backup directory set in the server; The obtaining of a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set to obtain a matching degree set includes: Determine a first to-be-backed-up directory and a first preset backup directory, wherein the first to-be-backed-up directory is any one in the to-be-backed-up directory set, and the first preset backup directory is any one in the preset backup directories; Splitting the first directory to be backed up to obtain M first segments, and splitting the first preset backup directory to obtain N second segments; Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence; performing a similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory; Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

2. The method according to claim 1, characterized in that The performing similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory includes: Obtaining a reference matching degree between the first to-be-backed-up directory and the first preset backup directory by using a preset matching algorithm, the first numbering sequence, and the second numbering sequence; Splitting the first numbering sequence to obtain a first sub-numbering sequence and a second sub-numbering sequence, where the first sub-numbering sequence is a sequence consisting of the first number, the second number, and the third number of the first numbering sequence in that order; Obtaining similarities between the segments corresponding to the first sub-numbering sequence and the corresponding segments in the second sub-numbering sequence to obtain a first sub-matching degree set; Obtaining a weight of each sub-matching degree in the first sub-matching degree set to obtain a first weight set; Determining a first matching degree correction value according to the first sub-matching degree set, the first weight set, and a first reduction coefficient; Obtain a third sub-numbering sequence, where the third sub-numbering sequence is a sequence consisting of the last three numbers of the first numbering sequence in reverse order; Determining a second matching degree correction value based on at least the third sub-numbering sequence and the second reduction coefficient; The matching degree between the first to-be-backed-up directory and the first preset backup directory is determined according to the reference matching degree, the first matching degree correction value, and the second matching degree correction value.

3. The method according to claim 2, characterized in that The method further comprises: Obtaining a first host name corresponding to the set of directories to be backed up, and obtaining a second host name corresponding to the set of preset backup directories; determining a third matching degree correction value according to the matching degree between the first host name and the second host name and a third reduction coefficient; The matching degree between the first to-be-backed-up directory and the first preset backup directory is corrected according to the third matching degree correction value to obtain a corrected matching degree between the first to-be-backed-up directory and the first preset backup directory.

4. The method according to any one of claims 1 to 2, characterized in that The step of determining a target backup directory set from the to-be-backed-up directory set according to the matching degree set includes: Determining the to-be-backed-up directories corresponding to the matching degrees higher than the preset matching degrees in the matching degree set as reference backup directories to obtain a reference backup directory set; Sending the reference backup directory set to an administrator to instruct the administrator to determine the target backup directory set from the reference backup directory set; The target backup directory set is received.

5. The method according to claim 4, characterized in that The method further comprises: Obtaining a data type of data corresponding to each target backup directory in the target backup directory set to obtain a data type set; Obtaining a target data type from the data type set; determining first reference state information of the server according to target data corresponding to the target data type; Acquiring second reference status information of the server; determining target state information of the server according to the first reference state information and the second reference state information; If the target state information indicates that the server is in an abnormal state, determining the abnormal state type and abnormal information according to the target state information; Determining adjustment information of the server according to the abnormal state type and the abnormal information; The adjustment information is displayed.

6. A data backup device, characterized in that: The device comprises: A first acquisition unit is used to acquire a set of directories to be backed up on the server and a set of preset backup directories in the data platform; a second obtaining unit, configured to obtain a matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set, to obtain a matching degree set; a determining unit, configured to determine a target backup directory set from the to-be-backed-up directory set according to the matching degree set; a processing unit, configured to perform backup processing on the data corresponding to the target backup directory set in the server; The second acquiring unit is configured to: Determine a first to-be-backed-up directory and a first preset backup directory, wherein the first to-be-backed-up directory is any one in the to-be-backed-up directory set, and the first preset backup directory is any one in the preset backup directories; Splitting the first directory to be backed up to obtain M first segments, and splitting the first preset backup directory to obtain N second segments; Numbering the M first segments to obtain a first numbering sequence, and numbering the N second segments to obtain a second numbering sequence; performing a similarity comparison on the M first segments and the N second segments according to the first numbering sequence and the second numbering sequence to obtain a matching degree between the first to-be-backed-up directory and the first preset backup directory; Repeat the above method for determining the matching degree between the first to-be-backed-up directory and the first preset backup directory until the matching degree between each to-be-backed-up directory in the to-be-backed-up directory set and each preset backup directory in the preset backup directory set is obtained, so as to obtain the matching degree set.

7. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Directory backup integrity detection method and device

    CN114153652A