Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a data sampling detection processing method and device, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a data sampling method, including:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
The method comprises the steps of executing a command corresponding to the sampling type on data, wherein the sampling type comprises medium availability verification, and correspondingly, the step of executing the command corresponding to the sampling type on the data comprises the following steps:
and executing a verification sampling inspection command on the data.
The method comprises the steps of checking the data, wherein the checking type comprises data availability verification, and correspondingly, executing a command corresponding to the checking type on the data comprises the following steps:
and acquiring the backup strategy type of the data, and executing a recovery command on the data corresponding to the backup strategy type respectively.
The backup strategy type comprises a file backup strategy type, and correspondingly, the executing of the recovery command on the data corresponding to the backup strategy type comprises the following steps:
and restoring the latest backup image corresponding to the file backup strategy type into a verification environment, wherein the verification environment completes the check in advance.
The backup strategy type comprises a database backup strategy type, and correspondingly, the executing of the recovery command on the data corresponding to the backup strategy type comprises the following steps:
and calling a database recovery script in a verification environment, and performing data interaction with backup software by using the database recovery script to realize database recovery, wherein the verification environment completes initialization setting in advance according to the database instance and the database parameters.
The step of obtaining the execution result of the command and updating the spot check list information according to the execution result comprises the following steps:
obtaining a restored file from the verification environment, and comparing the file with a file list in the latest backup image;
and if the comparison results of all the comparison items are the same, determining that the execution result is the completion of the execution, and updating the sampling inspection table information.
The step of obtaining the execution result of the command and updating the spot check list information according to the execution result comprises the following steps:
Logging in the database in the verification environment, if the database is confirmed to be recovered, determining that the execution result is the execution completion, and updating the spot check list information.
Before the step of obtaining the sampling table information of the backup strategy, the data sampling processing method further comprises the following steps:
and acquiring a backup strategy, and executing a corresponding backup strategy updating step according to a comparison result of the backup strategy and the pre-stored backup strategy in the spot check list information.
The data sampling inspection processing method comprises the steps of executing a corresponding backup strategy updating step, wherein the sampling inspection table information comprises application levels of the backup strategy, the application levels reflect the importance degree of the application, and the data sampling inspection processing method further comprises the following steps:
determining the data sampling frequency and the sampling type according to the application grade and a preset corresponding relation, wherein the preset corresponding relation comprises a corresponding relation among the preset application grade, the preset data sampling frequency and the preset sampling type;
Acquiring the latest spot check completion time of the backup strategy, and determining the time interval between the current time and the latest spot check completion time;
And if the time interval is greater than or equal to the data sampling frequency, updating the sampling detection state into the to-be-sampled detection state.
In one aspect, the present invention provides a data sampling processing device, including:
the acquisition unit is used for acquiring the information of the sampling inspection table of the backup strategy; the sampling test table information comprises sampling test states and sampling test types;
the execution unit is used for acquiring data in the sampling inspection state if the sampling inspection state is determined to be the sampling inspection state, and executing a command corresponding to the sampling inspection type on the data;
And the updating unit is used for acquiring an execution result of the command and updating the spot check list information according to the execution result.
In yet another aspect, an embodiment of the present invention provides an electronic device comprising a processor, a memory, and a bus, wherein,
The processor and the memory complete communication with each other through the bus;
The memory stores program instructions executable by the processor, the processor invoking the program instructions capable of performing the method of:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
Embodiments of the present invention provide a non-transitory computer readable storage medium comprising:
The non-transitory computer readable storage medium stores computer instructions that cause the computer to perform the method of:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
The data sampling inspection processing method and device provided by the embodiment of the invention acquire sampling inspection table information of a backup strategy, wherein the sampling inspection table information comprises a sampling inspection state and a sampling inspection type, if the sampling inspection state is determined to be the sampling inspection state, acquiring data in the sampling inspection state, executing a command corresponding to the sampling inspection type on the data, acquiring an execution result of the command, and updating the sampling inspection table information according to the execution result, so that the sampling inspection of the data can be automatically completed, misoperation caused by manual operation is avoided, and the processing efficiency of a sampling inspection task is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present application and their descriptions herein are for the purpose of explaining the present application, but are not to be construed as limiting the application. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be arbitrarily combined with each other.
Fig. 1 is a flow chart of a data sampling inspection processing method according to an embodiment of the present invention, and as shown in fig. 1, the data sampling inspection processing method according to the embodiment of the present invention includes:
step S1, acquiring the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type.
And step S2, if the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data.
And step S3, acquiring an execution result of the command, and updating the spot check list information according to the execution result.
In the step S1, the device acquires the information of the sampling inspection table of the backup strategy, wherein the information of the sampling inspection table comprises the sampling inspection state and the sampling inspection type. The apparatus may be a computer device performing the method and may include, for example, a server or a client, etc. It should be noted that, the data acquisition and analysis according to the embodiments of the present invention are authorized by the user.
Each record in the spot check list information may include the following information:
number for marking each record.
The backup strategy is an application needing backup, and specifically comprises information such as application names, application servers needing backup, application contents needing backup, backup starting time and the like.
And (3) applying the backup strategy, namely applying the backup strategy.
The application grade is that each application has default grade division, and the applications are sequenced from important to unimportant into the most important class A application, the second class B application, the second class C application and the least important class D application.
The sampling inspection state refers to the sampling inspection condition of the backup strategy, and the sampling inspection state is respectively that sampling inspection is not needed from sampling inspection, sampling inspection is already performed, sampling inspection is to be performed and sampling inspection is not needed.
The latest spot check completion time refers to the point in time when the last spot check of the backup strategy is completed from the current moment.
The sampling test table information can also comprise sampling test types, wherein the sampling test types comprise data availability verification and medium availability verification, and the sampling test types comprise:
And verifying the availability of the data, namely, in order to enable the backup data to be used normally, the backup data needs to be restored for verification.
The medium availability verification means that whether the medium where the backup image of the backup data is located is available only needs to be verified, the media command is only required to be verified through the API call of the backup software, and the backup software is used for reading the backup image and calculating whether the backup image is complete or not, so that the backup data does not need to be restored.
As shown in fig. 2, the following is explained:
3.1 starting the spot check task
And starting the sampling inspection task according to the sampling inspection table information. The polling mode can be adopted, and the sampling inspection starting task is executed regularly, so that the sampling inspection starting task is automated, and manual intervention is not needed.
3.2 Acquisition of the sampling test Meter
And 3.3, acquiring a sampling inspection table from the database, returning to 3.2, and judging according to the sampling inspection state by 3.2. If the sampling inspection state of the backup strategy is the sampling inspection state to be inspected, the sampling inspection task of the current time is required to implement the sampling inspection of the backup strategy, the sampling inspection state is updated to be in the sampling inspection, and the sampling inspection task is started to be implemented specifically.
In the step S2, if the device determines that the sampling test state is a sampling test state, the device acquires data in the sampling test state, and executes a command corresponding to the sampling test type on the data.
The method comprises the steps of executing a data, wherein the sampling type comprises medium availability verification, and correspondingly, executing a command corresponding to the sampling type on the data, wherein the command comprises the following steps:
and executing a verification sampling inspection command on the data.
The sampling type comprises data availability verification, and correspondingly, the executing of the command corresponding to the sampling type on the data comprises the following steps:
and acquiring the backup strategy type of the data, and executing a recovery command on the data corresponding to the backup strategy type respectively.
The backup strategy type comprises a file backup strategy type, and correspondingly, the executing of the recovery command on the data corresponding to the backup strategy type comprises the following steps:
and restoring the latest backup image corresponding to the file backup strategy type into a verification environment, wherein the verification environment completes the check in advance.
The backup strategy type comprises a database backup strategy type, and correspondingly, the executing of the recovery command on the data corresponding to the backup strategy type comprises the following steps:
and calling a database recovery script in a verification environment, and performing data interaction with backup software by using the database recovery script to realize database recovery, wherein the verification environment completes initialization setting in advance according to the database instance and the database parameters.
The following is described with reference to fig. 2:
3.4 determining the verification Environment according to the backup strategy type and the sampling inspection type
And if the sampling test type is media availability verification, calling a verification sampling test command of the API. The jump to 3.7 can be made directly without executing 3.5.
If the sampling type is data availability verification, a recovery command of calling an API is required, wherein the recovery command is divided into a file backup strategy type and a database backup strategy type, the backup data is required to be recovered to a verification environment, and the verification environment is required to be checked in advance.
3.5 Checking verification Environment
And confirming the size of the backup image according to the backup strategy and the backup image. It is confirmed through 3.6 whether the size of the verification environment can be restored. If the database backup strategy type is adopted, the database backup strategy type needs to be initialized according to the instance of the database and the parameters of the database. The checking and verifying environment can be selected from the existing mature technology, and will not be described in detail.
3.7 Executing the spot check Command
For the type of the spot check to be media availability verification, only the verification spot check command of the API needs to be started through 3.8, and the command execution result is waited.
And executing a 3.8API for the file backup strategy type with the data availability verification as the sampling inspection type, and controlling the backup software to restore the latest backup image corresponding to the file backup strategy type into the verification environment.
For the database backup policy type where the spot check type is data availability verification, a database recovery script needs to be invoked in a verification environment where initialization setup has been completed. The database recovery script can automatically communicate with the API of the backup software to perform data interaction, so as to complete the database recovery work. The database recovery script may be pre-compiled and stored in the database.
In the step S3, the device obtains the execution result of the command, and updates the spot check list information according to the execution result.
The step of obtaining the execution result of the command and updating the spot check list information according to the execution result comprises the following steps:
obtaining a restored file from the verification environment, and comparing the file with a file list in the latest backup image;
and if the comparison results of all the comparison items are the same, determining that the execution result is the completion of the execution, and updating the sampling inspection table information.
The step of obtaining the execution result of the command and updating the spot check list information according to the execution result comprises the following steps:
Logging in the database in the verification environment, if the database is confirmed to be recovered, determining that the execution result is the execution completion, and updating the spot check list information.
As shown in fig. 2, the following is explained:
3.9 execution of the inspection results
After the command is invoked, a command execution result is obtained.
And for medium availability verification, if the command execution result is that the execution is completed (namely successful), the sampling inspection work of the backup strategy is completed, the sampling inspection state is updated to be sampling inspection through 3.10, the sampling inspection time is updated to be the current time, and the sampling inspection time is written into a database.
And for the file backup strategy type with the sampling inspection type being data availability verification, if the command execution result is that the execution is completed (namely successful), acquiring the restored file from the verification environment, and comparing the file with a file list in the latest backup image.
If the comparison is the same with the data file name, file size, file time stamp and other information, the sampling inspection work of the backup strategy is completed, the sampling inspection state is updated to be sampling inspection through 3.10, the sampling inspection time is updated to be the current time, and the sampling inspection time is written into the database.
And (3) for the database backup strategy type with the sampling test type of data availability verification, if the command execution result is that the execution is completed (namely successful), logging in the database in the verification environment, and if the database recovery is confirmed to be completed, updating the sampling test state to be sampling test, updating the sampling test time to be the current time and writing the sampling test time into the database through 3.10.
It should be noted that if the execution result of the command is that the execution is not completed (i.e. fails), an alarm message may be generated, and a failure cause may be further generated, so that related personnel can check the processing as soon as possible.
3.11 Notification and reporting
And recording and informing the relevant system manager mainly of the verification result. If the spot check abnormality occurs, the relevant system manager can be informed in time, and the intervention is performed manually.
The data sampling inspection processing method provided by the embodiment of the invention acquires sampling inspection table information of a backup strategy, wherein the sampling inspection table information comprises a sampling inspection state and a sampling inspection type, acquires data in the sampling inspection state if the sampling inspection state is determined to be the sampling inspection state, executes a command corresponding to the sampling inspection type on the data, acquires an execution result of the command, and updates the sampling inspection table information according to the execution result, so that the sampling inspection of the data can be automatically completed, misoperation caused by manual operation is avoided, and the processing efficiency of a sampling inspection task is improved.
Further, the sampling test type comprises media availability verification, and correspondingly, the executing of the command corresponding to the sampling test type on the data comprises the following steps:
and executing a verification sampling inspection command on the data. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention is suitable for the data sampling inspection processing of which the sampling inspection type is medium availability verification.
Further, the sampling type comprises data availability verification, and correspondingly, the executing of the command corresponding to the sampling type on the data comprises the following steps:
and acquiring the backup strategy type of the data, and executing a recovery command on the data corresponding to the backup strategy type respectively. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention is suitable for the data sampling inspection processing of which the sampling inspection type is data availability verification.
Further, the backup policy type includes a file backup policy type, and correspondingly, the executing the restore command on the data corresponding to the backup policy type includes:
And restoring the latest backup image corresponding to the file backup strategy type into a verification environment, wherein the verification environment completes the check in advance. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention is suitable for the data sampling inspection processing of which the backup strategy type is the file backup strategy type.
Further, the backup policy type includes a database backup policy type, and correspondingly, the executing the restore command on the data corresponding to the backup policy type includes:
And calling a database recovery script in a verification environment, and performing data interaction with backup software by using the database recovery script to realize database recovery, wherein the verification environment completes initialization setting in advance according to the database instance and the database parameters. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention is suitable for the data sampling inspection processing of which the backup strategy type is the database backup strategy type.
Further, the obtaining the execution result of the command and updating the spot check list information according to the execution result includes:
And obtaining the restored file from the verification environment, and comparing the file with the file list in the latest backup image, wherein the description of the embodiment can be referred to and is not repeated.
And if the comparison results of all the comparison items are the same, determining that the execution result is the completion of the execution, and updating the sampling inspection table information. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention can be suitable for the data sampling inspection processing of the file backup strategy type.
Further, the obtaining the execution result of the command and updating the spot check list information according to the execution result includes:
Logging in the database in the verification environment, if the database is confirmed to be recovered, determining that the execution result is the execution completion, and updating the spot check list information. Reference may be made to the above embodiments, and no further description is given.
The data sampling inspection processing method provided by the embodiment of the invention can be suitable for the data sampling inspection processing of the database backup strategy type.
Further, before the step of obtaining the sampling table information of the backup policy, the data sampling processing method further includes:
and acquiring a backup strategy, and executing a corresponding backup strategy updating step according to a comparison result of the backup strategy and the pre-stored backup strategy in the spot check list information.
As shown in fig. 3, the following is explained:
And for the sampling inspection table for acquiring the backup strategy, acquiring the backup strategy from the database, and executing a corresponding backup strategy updating step according to a comparison result of the backup strategy and the pre-stored backup strategy in the sampling inspection table information, wherein the method specifically comprises the following steps:
No update is needed for the backup policy that already exists in the spot check table.
And for the backup strategy which is not in the sampling inspection table, newly adding the backup strategy into the sampling inspection table.
For backup policies that do not exist in the backup policy table, but exist in the spot check table, it is indicated that spot checks are not needed, and the spot check state needs to be updated to be spot check-free.
The data sampling inspection processing method provided by the embodiment of the invention can ensure the synchronous consistency of the acquired backup strategy and the pre-stored backup strategy in the sampling inspection table information.
Further, the data sampling test processing method further comprises the following steps after the step of executing the corresponding backup strategy updating step:
determining the data sampling frequency and the sampling type according to the application grade and a preset corresponding relation, wherein the preset corresponding relation comprises a corresponding relation among the preset application grade, the preset data sampling frequency and the preset sampling type;
Acquiring the latest spot check completion time of the backup strategy, and determining the time interval between the current time and the latest spot check completion time;
And if the time interval is greater than or equal to the data sampling frequency, updating the sampling detection state into the to-be-sampled detection state.
As shown in fig. 3, the following is explained:
for confirming spot check requirements according to type:
The AB type application with higher importance comprises higher data sampling frequency, which can be selected to be 1 time per month, and sampling type which is data availability verification.
CD applications with lower importance degree are that the data sampling inspection frequency is lower, the data sampling inspection can be selected to be once in 3 months, and the sampling inspection type is medium availability verification. The corresponding relation among the data sampling frequency, the sampling type and the application level can be stored in a database and can be modified according to actual conditions.
And judging whether the time interval exceeds the data sampling frequency corresponding to each backup strategy by comparing the time interval between the latest sampling completion time and the current time of each backup strategy, wherein if the time interval is smaller than the data sampling frequency, the fact that new sampling work is not needed is indicated.
If the time interval is greater than or equal to the data sampling frequency, the backup strategy is indicated to need to carry out new sampling operation, and the sampling state is updated from the sampling state of the non-sampling inspection and the sampling state of the sampling inspection to the sampling state to be detected.
The data sampling inspection processing method provided by the embodiment of the invention can ensure the timeliness of sampling inspection state updating.
For forming the final spot checklist:
And updating the information of the sampling inspection table again according to the change, updating the sampling inspection state, the sampling inspection type and the like in the sampling inspection table, and writing the sampling inspection state, the sampling inspection type and the like into a database.
Before the step of obtaining the backup policy, the data sampling method further includes:
the automatic information collection method specifically comprises the following steps:
and acquiring the backup strategy and the backup data through the backup software API.
The backup strategy may be referred to above and will not be described again.
The backup data is that after the backup operation is initiated according to the preset starting time of the backup strategy, the backup of the data is successfully completed, and the related information of the data comprises the application of the data, the backup strategy, the backup time and the backup mirror image and the reserved medium information of the backup mirror image.
The backup image refers to the minimum unit of backup data.
When the backup software starts backup, the data to be backed up is compressed into a mirror image and stored in a designated backup medium.
The backup medium refers to the target environment in which the backup data is stored last, and can be on a tape or a disk.
A piece of backup data may comprise a backup image, and sometimes, in order to protect the data, the backup data needs to be stored in a redundant manner, so that the backup image is copied to other backup media. At this time, more than one backup image of the backup data exists.
The related information can be obtained from the backup software at regular time and updated to the database of the system, so as to provide basic data support for subsequent operation.
The method of the embodiment of the invention has the following beneficial effects:
1. The full-automatic backup data sampling inspection process is realized.
2. The method effectively reduces manual operation, thereby shortening the transfer operation time, reducing manual misoperation, effectively shortening the sampling inspection working time, simultaneously, independently and flexibly configuring the backup strategy, improving the sampling inspection coverage and enhancing the sampling inspection working effect.
It should be noted that, the data sampling inspection processing method provided by the embodiment of the invention can be used in the financial field and also can be used in any technical field except the financial field, and the application field of the data sampling inspection processing method is not limited by the embodiment of the invention.
Fig. 4 is a schematic structural diagram of a data sampling processing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the data sampling processing apparatus according to an embodiment of the present invention includes an obtaining unit 401, an executing unit 402, and an updating unit 403, where:
The system comprises an acquisition unit 401, an execution unit 402 and an updating unit 403, wherein the acquisition unit 401 is used for acquiring the sampling test table information of the backup strategy, the sampling test table information comprises a sampling test state and a sampling test type, the execution unit 402 is used for acquiring data in the sampling test state and executing a command corresponding to the sampling test type on the data if the sampling test state is determined to be the sampling test state, and the updating unit 403 is used for acquiring an execution result of the command and updating the sampling test table information according to the execution result.
Specifically, the acquiring unit 401 in the device is configured to acquire the information of the sampling test table of the backup policy, where the sampling test table information includes a sampling test state and a sampling test type, the executing unit 402 is configured to acquire data in the sampling test state if the sampling test state is determined to be the sampling test state, execute a command corresponding to the sampling test type on the data, and the updating unit 403 is configured to acquire an execution result of the command and update the sampling test table information according to the execution result.
The data sampling inspection processing device provided by the embodiment of the invention acquires sampling inspection table information of a backup strategy, wherein the sampling inspection table information comprises a sampling inspection state and a sampling inspection type, acquires data in the sampling inspection state if the sampling inspection state is determined to be the sampling inspection state, executes a command corresponding to the sampling inspection type on the data, acquires an execution result of the command, and updates the sampling inspection table information according to the execution result, so that the sampling inspection of the data can be automatically completed, misoperation caused by manual operation is avoided, and the processing efficiency of a sampling inspection task is improved.
Further, the sampling test type includes media availability verification, and correspondingly, the execution unit 402 is specifically configured to:
and executing a verification sampling inspection command on the data.
The data sampling inspection processing device provided by the embodiment of the invention is suitable for the data sampling inspection processing of which the sampling inspection type is the medium availability verification.
Further, the sampling type includes data availability verification, and correspondingly, the execution unit 402 is specifically configured to:
and acquiring the backup strategy type of the data, and executing a recovery command on the data corresponding to the backup strategy type respectively.
The data sampling inspection processing device provided by the embodiment of the invention is suitable for data sampling inspection processing with sampling inspection type of data availability verification.
Further, the backup policy type includes a file backup policy type, and correspondingly, the executing unit 402 is further specifically configured to:
and restoring the latest backup image corresponding to the file backup strategy type into a verification environment, wherein the verification environment completes the check in advance.
The data sampling inspection processing device provided by the embodiment of the invention is suitable for data sampling inspection processing with the backup strategy type being the file backup strategy type.
Further, the backup policy type includes a database backup policy type, and correspondingly, the executing unit 402 is further specifically configured to:
and calling a database recovery script in a verification environment, and performing data interaction with backup software by using the database recovery script to realize database recovery, wherein the verification environment completes initialization setting in advance according to the database instance and the database parameters.
The data sampling inspection processing device provided by the embodiment of the invention is suitable for data sampling inspection processing with the backup strategy type being the database backup strategy type.
Further, the updating unit 403 is specifically configured to:
obtaining a restored file from the verification environment, and comparing the file with a file list in the latest backup image;
and if the comparison results of all the comparison items are the same, determining that the execution result is the completion of the execution, and updating the sampling inspection table information.
The data sampling inspection processing device provided by the embodiment of the invention can adapt to the data sampling inspection processing of the file backup strategy type.
Further, the updating unit 403 is specifically configured to:
Logging in the database in the verification environment, if the database is confirmed to be recovered, determining that the execution result is the execution completion, and updating the spot check list information.
The data sampling inspection processing device provided by the embodiment of the invention can be suitable for the data sampling inspection processing of the database backup strategy type.
Further, before the step of obtaining the sampling table information of the backup policy, the data sampling processing device is further configured to:
and acquiring a backup strategy, and executing a corresponding backup strategy updating step according to a comparison result of the backup strategy and the pre-stored backup strategy in the spot check list information.
The data sampling inspection processing device provided by the embodiment of the invention can ensure the synchronous consistency of the acquired backup strategy and the pre-stored backup strategy in the sampling inspection table information.
Further, the data sampling test processing device is further used for, after the step of executing the corresponding backup strategy updating step,:
determining the data sampling frequency and the sampling type according to the application grade and a preset corresponding relation, wherein the preset corresponding relation comprises a corresponding relation among the preset application grade, the preset data sampling frequency and the preset sampling type;
Acquiring the latest spot check completion time of the backup strategy, and determining the time interval between the current time and the latest spot check completion time;
And if the time interval is greater than or equal to the data sampling frequency, updating the sampling detection state into the to-be-sampled detection state.
The data sampling detection processing device provided by the embodiment of the invention can ensure the timeliness of sampling detection state update.
The embodiment of the data sampling processing device provided in the embodiment of the present invention may be specifically used to execute the processing flow of each method embodiment, and the functions thereof are not described herein again, and may refer to the detailed description of the method embodiments.
Fig. 5 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the present invention, as shown in fig. 5, where the electronic device includes a processor (processor) 501, a memory (memory) 502, and a bus 503;
wherein, the processor 501 and the memory 502 complete communication with each other through a bus 503;
the processor 501 is configured to invoke the program instructions in the memory 502 to perform the methods provided in the above method embodiments, for example, including:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
The present embodiment provides a computer-readable storage medium storing a computer program that causes the computer to execute the methods provided by the above-described method embodiments, for example, including:
The method comprises the steps of obtaining the information of a sampling inspection table of a backup strategy, wherein the information of the sampling inspection table comprises a sampling inspection state and a sampling inspection type;
If the sampling detection state is determined to be the sampling detection state, acquiring data in the sampling detection state, and executing a command corresponding to the sampling detection type on the data;
and acquiring an execution result of the command, and updating the spot check list information according to the execution result.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description of the present specification, reference to the terms "one embodiment," "one particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.