A data verification method, product, device and storage medium
By generating a disk configuration list and operation list, determining the functions and supported operations of the cloud host virtual disk, and performing data verification when executing use cases, the problem of data integrity cannot be guaranteed during cloud host virtual disk operation is solved, and efficient data integrity testing is achieved.
Patent Information
- Application Number
- CN202411908124.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Virtual disks in cloud hosts cannot fully guarantee data integrity when performing various operations.
By generating disk configuration lists and operation lists, determine the virtual disk functions and supported operations of cloud hosts, and generate operation use cases based on these lists. When performing these use cases, check the data before and after operations to ensure data integrity.
The data integrity test of cloud host virtual disks under various operations is realized, which improves the efficiency of data integrity testing and avoids omissions in manual testing.
Smart Images

Figure CN119356617B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and specifically, to a data verification method, product, device and storage medium. Background Art
[0002] The cloud server (Elastic Compute Service) in the cloud platform is also called a cloud host. The data reading and writing of the cloud host are realized through virtual disks with different configurations. When the cloud host is running, virtual disks with different configurations can perform a variety of different operations, which have high requirements for data integrity.
[0003] In the related art, the virtual disk in the cloud host cannot fully guarantee the integrity of the data when performing various operations. Summary of the invention
[0004] The embodiments of the present application provide a data verification method, product, device and storage medium, which are intended to ensure data integrity when a virtual disk in a cloud host is operated.
[0005] A first aspect of an embodiment of the present application provides a data verification method, the method comprising:
[0006] Generate a corresponding disk configuration list based on the virtual disk functions corresponding to the cloud host on the cloud platform;
[0007] Generate a corresponding operation list based on the preset cloud host operation weights and cloud host operation mutual exclusion rules;
[0008] Obtaining at least one operation use case corresponding to the cloud host according to the disk configuration list and the operation list;
[0009] When the cloud host executes the operation use case, data verification is performed on the pre-operation data and post-operation data of the cloud host to obtain a comprehensive verification result.
[0010] Optionally, generating a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform includes:
[0011] Determining disk configuration parameters of the virtual disk corresponding to the cloud host according to the virtual disk function corresponding to the cloud host;
[0012] The disk configuration parameters are stored one by one in a list to obtain the disk configuration list.
[0013] Optionally, generating a corresponding operation list according to preset cloud host operation weights and cloud host operation mutual exclusion rules includes:
[0014] Reading the cloud host operation weight of each cloud host operation supported by the cloud host;
[0015] Combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation;
[0016] Each of the cloud host operations and the combined operations that meet the cloud host operation mutual exclusion rule are added to a list to obtain the operation list.
[0017] Optionally, combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation includes:
[0018] Set the target weight value;
[0019] The cloud host operations are combined according to the target weight value to obtain the combined operation.
[0020] Optionally, combining the cloud host operations according to the target weight value to obtain the combined operation includes:
[0021] Combining the cloud host operation weights corresponding to any plurality of the cloud host operations so that the combined weight value is equal to the target weight value;
[0022] When the combined weight value is equal to the target weight value, the corresponding multiple cloud host operations are regarded as one combined operation.
[0023] Optionally, obtaining at least one operation use case corresponding to the cloud host according to the disk configuration list and the operation list includes:
[0024] For each virtual disk configuration in the disk configuration list, select a corresponding cloud host operation and a combination operation in the operation list;
[0025] The operation use case is obtained according to the virtual disk configuration, the cloud host operation and the combined operation.
[0026] Optionally, before the cloud host executes the operation use case, the method further includes:
[0027] Parsing the operation use case to obtain a cloud host configuration corresponding to the operation use case;
[0028] A cloud host that meets the cloud host configuration is created on the cloud platform.
[0029] Optionally, the method further comprises:
[0030] Perform resource determination on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
[0031] Optionally, the method further comprises:
[0032] When the resources in the cloud platform satisfy the execution of the operation use case, the operation use case is executed through the cloud host.
[0033] Optionally, the method further comprises:
[0034] If the resources in the cloud platform do not satisfy the execution of the operation use case, stop executing the operation use case;
[0035] Generate corresponding exception information;
[0036] The abnormal information is recorded in the system log.
[0037] Optionally, when the cloud host executes the operation use case, performing data verification on the pre-operation data and the post-operation data of the cloud host to obtain a comprehensive verification result includes:
[0038] When the cloud host starts to execute the operation use case, reading the pre-operation data;
[0039] Verifying the pre-operation data to obtain a first verification result;
[0040] When the cloud host completes executing the operation use case, reading the post-operation data;
[0041] Verifying the operated data to obtain a second verification result;
[0042] The first verification result and the second verification result are used as the comprehensive verification result.
[0043] Optionally, the method further includes: determining, based on the comprehensive verification result, whether the operation use case has an impact on the data integrity of the cloud host;
[0044] In the case where the operation case affects the data integrity of the cloud host, the operation case is marked as an abnormal operation.
[0045] A second aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the method described in the first aspect of the present application.
[0046] A third aspect of an embodiment of the present application provides a data verification device, the device comprising:
[0047] The configuration list generation module is used to generate a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform;
[0048] An operation list generation module is used to generate a corresponding operation list according to preset cloud host operation weights and cloud host operation mutual exclusion rules;
[0049] An operation case acquisition module, used to obtain at least one operation case corresponding to the cloud host according to the disk configuration list and the operation list;
[0050] The comprehensive verification result acquisition module is used to perform data verification on the pre-operation data and post-operation data of the cloud host when the cloud host executes the operation use case to obtain a comprehensive verification result.
[0051] Optionally, the configuration list generating module includes:
[0052] A configuration parameter acquisition submodule, used to determine the disk configuration parameters of the virtual disk corresponding to the cloud host according to the virtual disk function corresponding to the cloud host;
[0053] The configuration list acquisition submodule is used to store the disk configuration parameters one by one into a list to obtain the disk configuration list.
[0054] Optionally, the operation list generating module includes:
[0055] A weight reading submodule, used for reading the cloud host operation weight of each cloud host operation supported by the cloud host;
[0056] A combined operation acquisition submodule, used to combine the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation;
[0057] The operation list generation submodule is used to add each of the cloud host operations and the combined operations that meet the mutual exclusion rule of the cloud host operations into a list to obtain the operation list.
[0058] Optionally, the combined operation acquisition submodule includes:
[0059] The target weight setting submodule is used to set the target weight value;
[0060] The operation combination submodule is used to combine the cloud host operations according to the target weight value to obtain the combined operation.
[0061] Optionally, the operation combination submodule includes:
[0062] A weight combination submodule, used to combine the cloud host operation weights corresponding to any plurality of the cloud host operations so that the combined weight value is equal to the target weight value;
[0063] The combined operation determination submodule is used to regard the corresponding multiple cloud host operations as one combined operation when the combined weight value is equal to the target weight value.
[0064] Optionally, the operation case acquisition module includes:
[0065] An operation selection submodule, for selecting, for each virtual disk configuration in the disk configuration list, a corresponding cloud host operation and a combination operation in the operation list;
[0066] The operation case generation submodule is used to obtain the operation case according to the virtual disk configuration, the cloud host operation and the combined operation.
[0067] Optionally, the device further comprises:
[0068] A cloud host configuration acquisition module, used to parse the operation use case and obtain the cloud host configuration corresponding to the operation use case;
[0069] A cloud host creation module is used to create a cloud host that meets the cloud host configuration on the cloud platform.
[0070] Optionally, the device further comprises:
[0071] The resource determination module is used to perform resource determination on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
[0072] Optionally, the device further comprises:
[0073] The operation case execution module is used to execute the operation case through the cloud host when the resources in the cloud platform meet the execution of the operation case.
[0074] Optionally, the device further comprises:
[0075] An operation case execution stopping module, used to stop executing the operation case if the resources in the cloud platform do not meet the execution of the operation case;
[0076] An exception information generation module, used to generate corresponding exception information;
[0077] The abnormal information recording module is used to record the abnormal information in the system log.
[0078] Optionally, the comprehensive verification result acquisition module includes:
[0079] A pre-operation data reading submodule, used for reading the pre-operation data when the cloud host starts to execute the operation use case;
[0080] A first verification result acquisition submodule, used to verify the pre-operation data to obtain a first verification result;
[0081] A post-operation data reading submodule, used for reading the post-operation data when the cloud host completes executing the operation use case;
[0082] A second verification result acquisition submodule is used to verify the post-operation data to obtain a second verification result;
[0083] The comprehensive verification result acquisition submodule is used to use the first verification result and the second verification result as the comprehensive verification result.
[0084] Optionally, the device further comprises: an impact determination module, configured to determine whether the operation use case has an impact on the data integrity of the cloud host according to the comprehensive verification result;
[0085] The abnormal operation marking module is used to mark the operation case as an abnormal operation when the operation case affects the data integrity of the cloud host.
[0086] A fourth aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present application are implemented.
[0087] A fifth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect of the present application are implemented.
[0088] By adopting the data verification method proposed in the present application, a corresponding disk configuration list is generated according to the virtual disk function corresponding to the cloud host on the cloud platform; a corresponding operation list is generated according to the preset cloud host operation weight and the cloud host operation mutual exclusion rule; at least one operation use case corresponding to the cloud host is obtained according to the disk configuration list and the operation list; when the cloud host executes the operation use case, data verification is performed on the pre-operation data and post-operation data of the cloud host to obtain a comprehensive verification result.
[0089] In the present application, a disk configuration list is generated according to the virtual disk functions supported by the cloud host on the cloud platform, and the list lists various functions of the disk, thereby realizing the calculation of all combinations of configurable parameters of the cloud host virtual disk, and generating a corresponding operation list according to the preset operation weights and the cloud host operation mutual exclusion rules, and the operation list includes various operations that can be performed by the disk, and according to the various functions of the disk and the various operations performed, a corresponding plurality of use cases are obtained, so that no operation is missed, and when the cloud host executes the operation use case, the data before and after the cloud host operation is verified, and a comprehensive verification result is obtained, and the integrity of the data before and after different operations of the cloud host virtual disk is tested and verified. Compared with manual testing, various disk configurations and various disk operations are taken into account, and various combination operations are also taken into account, and no test omissions will occur, and then through this automated testing method, the test efficiency of the cloud host data integrity is improved, and the data integrity of the virtual disk in the cloud host during various operations is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. 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 paying creative labor.
[0091] Figure 1 is a flow chart of a data verification method proposed in one embodiment of the present application;
[0092] Figure 2 This is a schematic diagram of a cloud host data integrity verification process proposed in an embodiment of the present application;
[0093] Figure 3 is a schematic diagram of a data verification device proposed in an embodiment of the present application;
[0094] Figure 4 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0095] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0096] refer to Figure 1 , Figure 1 1 is a flow chart of a data verification method proposed in one embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0097] S11: Generate a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform.
[0098] In this embodiment, the cloud platform is a cloud computing platform, which is a hardware-based service that provides computing, network and storage capabilities. The cloud platform is mainly divided into a storage-type cloud platform that focuses on data storage, a computing-type cloud platform that focuses on data processing, and a comprehensive cloud computing platform that takes both computing and storage into account. Cloud computing is to assign tasks submitted by users to a resource pool composed of a data center server cluster. The system provides corresponding computing capabilities, storage space or various software services according to the needs of users. Server virtualization is to create various hardware through software definition, so as to realize the simultaneous operation of several independent cloud hosts on a hardware platform. Each cloud host uses an independent central processing unit, hard disk, memory, data input and output port, network card and other hardware devices. At the same time, different operating systems can be installed on the cloud host to meet the various needs of different users. Cloud server is a simple, efficient, safe and reliable computing service with elastic processing power. The management method of cloud server is simpler and more efficient than that of physical server. Users can create customized cloud hosts for deployment and use of related applications by making relevant applications on the cloud platform.
[0099] In this embodiment, the virtual disk is implemented based on storage virtualization technology. Storage virtualization technology combines multiple physical storage devices into a virtual storage device, thereby providing higher storage efficiency and reliability. Storage virtualization integrates the capacity and performance of physical storage devices to form a virtual storage pool. Data can be freely moved between different physical storage devices, thereby optimizing storage utilization and performance. A new virtual disk is created in the storage pool and mounted to the cloud host. The cloud host can use the virtual disk to set the corresponding disk policy, disk format, disk interface, disk read and write mode, start asynchronous IO, enable kernel IO acceleration, etc. Through different configurations, the host IO read and write capabilities can be more fully realized. The cloud host runs on the physical server of the cloud platform. When the cloud host is running, the corresponding task data runs in the memory space of the physical server, and the data is not written to the storage pool hard disk. In addition, the cloud host management capabilities provided by the cloud platform, including hot editing of cloud hosts, cross-cloud platform migration, DRS (Data Replication Servic) migration, snapshots, backups and other functions, may affect the reading and writing of cloud host data. Therefore, it is necessary to consider the data integrity of the cloud platform's virtual disk under various operations to ensure that data is not lost. Data loss will affect the operation and calculation of the cloud platform, and then affect the services provided by the cloud platform to users. Therefore, when verifying data integrity, it is necessary to take various possible operations and combined operations into consideration.
[0100] In this embodiment, the disk configuration list lists various function configurations supported by the disk one by one in a table.
[0101] In this embodiment, the host virtual disk configuration management device generates a corresponding disk configuration list according to the virtual disk functions corresponding to the cloud host on the cloud platform. The list lists the functions of the virtual disks supported by the cloud host one by one. The functions of each virtual disk are not exactly the same and need to be determined based on the actual supported virtual disks.
[0102] In this embodiment, the specific steps of generating a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform by the host virtual disk configuration management device include:
[0103] S11 - 1 : Determine disk configuration parameters of the virtual disk corresponding to the cloud host according to the virtual disk function corresponding to the cloud host.
[0104] In this embodiment, the disk configuration parameters are specific configuration parameters of the virtual disk, including but not limited to disk type, disk policy, disk format, disk interface, read / write policy, setting the number of queues, enabling kernel io, asynchronous io, sharing, locking and other configurations.
[0105] In this embodiment, each cloud host supports different types of virtual disks with different configurations. The function of the virtual disk corresponding to the cloud host is determined based on the virtual disk information stored in the cloud host, and then the disk configuration parameters of the virtual disk corresponding to the cloud host are determined.
[0106] In this embodiment, after the functions of the virtual disk corresponding to the cloud host are determined, the supported functions are counted, integrated, and listed one by one. The integrated data is the disk configuration parameters of the virtual disk.
[0107] For example, disk types include virtual disks and raw device disks, disk policies include thin provisioning and non-thin provisioning, disk formats include RAW, QCOW2 and other formats, disk interfaces include VIRTIO, SCSI (Small Computer System Interface), IDE (Integrated Drive Electronics) and other interfaces, and read and write policies include writeback, writethrough, none, directsync and other policies. Different types of configurations support some operations, but not others. For example, virtio supports setting the number of queues; iscsi and ide do not support setting the number of io queues; none and directsync support opening kernel io, but writethrough and writeback do not support kernel io.
[0108] S11 - 2: storing the disk configuration parameters one by one in a list to obtain the disk configuration list.
[0109] In this embodiment, after obtaining the specific configuration parameters of the virtual disk corresponding to the cloud host, the disk configuration parameters are stored one by one in an empty list. After the storage is completed, the list is used as the disk configuration list.
[0110] S12: Generate a corresponding operation list according to the preset cloud host operation weights and cloud host operation mutual exclusion rules.
[0111] In this embodiment, the cloud host operation weight is a weight set for each cloud host operation. The weight setting is based on the impact of the operation on data integrity. The greater the impact, the higher the weight of the operation. The impact of the cloud host operation on the cloud host data integrity is obtained by collecting and integrating the operation data of the cloud host during normal operation. The host operation mutual exclusion rule means that some operations cannot be performed at the same time, that is, when the virtual disk performs some operations, it cannot perform other operations, and some operations conflict with each other.
[0112] In this embodiment, a corresponding operation list is generated according to the preset cloud host operation weights and cloud host operation mutual exclusion rules. When generating the operation list, each single operation is set with a corresponding weight, and then multiple target weights are set in order from small to large. Under the premise of following the cloud host operation mutual exclusion rules, the single operations are combined according to the weights to obtain the combined operations corresponding to the target weights. Then the corresponding operation list is generated.
[0113] In this embodiment, the specific steps of generating a corresponding operation list according to the preset cloud host operation weights and cloud host operation mutual exclusion rules include:
[0114] S12-1: Read the cloud host operation weight of each cloud host operation supported by the cloud host.
[0115] In this embodiment, when generating the operation list, the cloud host operation weight of each cloud host operation supported by the cloud host is first read.
[0116] S12-2: Combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation.
[0117] In this embodiment, cloud host operations are combined according to the cloud host operation mutual exclusion rules and cloud host operation weights to obtain at least one combined operation. Generally, as long as the operation mutual exclusion rules are not affected, multiple cloud host operations can be combined into multiple combined operations.
[0118] In this embodiment, the specific steps of combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation are:
[0119] S12-2-1: Set the target weight value.
[0120] In this embodiment, the target weight value is a target value set for combining operations, and is the basis for combining operations.
[0121] In this embodiment, in order to combine cloud host operations to simulate the situation where the cloud host virtual disk performs multiple combined operations during actual operation, a target weight value is set, and the target weight value can be increased in sequence until there is no satisfied combined operation.
[0122] S12-2-2: According to the target weight value, the cloud host operations are combined to obtain the combined operation.
[0123] In this embodiment, according to the target weight value, any number of cloud host operations are combined to obtain multiple combined operations. When combining the operations, the weight values corresponding to the any number of cloud host operations are added together, and when the weight value is equal to the target weight value, the corresponding combined operation is determined.
[0124] In this embodiment, the cloud host operations are combined according to the target weight value to obtain the specific steps of the combined operation including:
[0125] S12-2-2-1: Combine the cloud host operation weights corresponding to any plurality of the cloud host operations so that the combined weight value is equal to the target weight value.
[0126] In this embodiment, the cloud host operation weights corresponding to any multiple cloud host operations are combined so that the combined weight value is equal to the target weight value. When combining, the weight of a single cloud host operation is determined, and then the weight values of the multiple cloud host operations to be combined are added. When the added weight value is equal to the target weight value, the combination is completed.
[0127] S12-2-2-2: When the combined weight value is equal to the target weight value, the corresponding multiple cloud host operations are regarded as one combined operation.
[0128] In this embodiment, when the combined weight value is equal to the target weight value, the operation formed by combining the corresponding multiple cloud host operations is regarded as a combined operation.
[0129] S12-3: Add each of the cloud host operations and the combined operations that comply with the cloud host operation mutual exclusion rule to a list to obtain the operation list.
[0130] In this embodiment, each cloud host operation is added as a separate operation to a newly created list, and combined operations that meet the mutual exclusion rule of cloud host operations are added to the list to obtain a corresponding operation list.
[0131] In this embodiment, the weight value is read by the operation generation device, and the corresponding operation is selected according to the weight value. The corresponding weight value is defined according to the operations supported by the cloud platform and the operations that affect the cloud host io reading and writing. At the same time, according to the preset rules, each operation is required to be different.
[0132] For example, weight values are set for the following operations:
[0133] Cross-cloud platform migration: Weight 20
[0134] Calculation migration: weight 20
[0135] Storage migration: weight 20
[0136] Migrate the entire machine: Weight 20
[0137] Backup: Weight 40
[0138] Snapshot: Weight 40
[0139] Hot-add virtual disk: weight 50
[0140] The operation generation device reads the weight value 20, and the operation list that can be generated includes 3 types. The weight value 60, and the operation list that can be generated includes 12 types, such as computing migration 20+backup 40, storage migration 20+snapshot 40, etc., which are all combined operations.
[0141] S13: Obtain at least one operation use case corresponding to the cloud host according to the disk configuration list and the operation list.
[0142] In this embodiment, a use case is a description of how a system responds to external requests in software engineering or system engineering. It is a technique for obtaining requirements through user usage scenarios. Each use case provides one or more scenarios that illustrate how the system interacts with end users or other systems, that is, who can use the system to do what, so as to obtain a clear business goal.
[0143] In this embodiment, after obtaining the disk configuration list and the operation list, at least one operation use case corresponding to the cloud host is obtained. The disk configuration list lists the functional configurations of the virtual disk, and the operation list lists the corresponding operations. Each functional configuration combined with an operation is a use case.
[0144] In this embodiment, at least one operation use case corresponding to the cloud host is obtained according to the disk configuration list and the operation list. The specific steps include:
[0145] S13 - 1 : For each virtual disk configuration in the disk configuration list, select a corresponding cloud host operation and a combination operation in the operation list.
[0146] In this embodiment, for each virtual disk configuration in the disk configuration list, a corresponding host operation and a combination operation are selected in the operation list.
[0147] In this embodiment, generally, each virtual disk configuration can form a use case with any operation or combination of operations.
[0148] S13-2: Obtain the operation use case according to the virtual disk configuration, the cloud host operation and the combined operation.
[0149] In this embodiment, after determining the virtual disk configuration and the corresponding cloud host operation or combined operation, the use case device combines the two to obtain the corresponding operation use case.
[0150] In this embodiment, each configuration in the configuration list and any operation or combination of operations in the operation list can be combined into a use case. Therefore, the number of operation use cases can be obtained by multiplying the number of configurations by the number of operations in the operation list.
[0151] S14: When the cloud host executes the operation use case, data verification is performed on the pre-operation data and the post-operation data of the cloud host to obtain a comprehensive verification result.
[0152] In this embodiment, the pre-operation data is the data in the virtual disk before the cloud host executes the operation use case, and the post-operation data is the data stored in the virtual disk after the cloud host executes the operation use case. The comprehensive verification result is a comprehensive evaluation result of the data integrity obtained by combining the integrity of the pre-operation data and the integrity of the post-operation data.
[0153] In this embodiment, when the cloud host executes the operation use case, data verification is performed on the pre-operation data and the post-operation data of the cloud host to obtain a comprehensive verification result. The specific steps include:
[0154] S14-1: When the cloud host starts to execute the operation use case, read the pre-operation data.
[0155] In this embodiment, when the cloud host starts to execute the operation use case, the data verification device receives the corresponding notification and writes the data before the cloud host operation.
[0156] S14-2: Verify the pre-operation data to obtain a first verification result.
[0157] In this embodiment, the data verification device verifies the pre-operation data to obtain a first verification result, which represents the integrity of the pre-operation data.
[0158] S14-3: When the cloud host completes executing the operation use case, the post-operation data is obtained.
[0159] In this embodiment, when the cloud host completes the operation use case, the data verification device receives a corresponding notification and obtains the post-operation data.
[0160] S14-4: Verify the operated data to obtain a second verification result.
[0161] In this embodiment, the data verification device verifies the post-operation data to obtain a second verification result, which represents the integrity of the post-operation data.
[0162] S14-5: Use the first verification result and the second verification result as the comprehensive verification result.
[0163] In this embodiment, after the first verification result and the second verification result are obtained, the two results are combined to obtain a comprehensive verification result.
[0164] For example, data verification can use verification methods such as MD5 verification, which are not limited here. If the first result and the second result both indicate that the corresponding data is complete, the comprehensive verification result indicates that the cloud host can ensure data integrity when executing the use case. If any one or both of the first result and the second result has incomplete data, the comprehensive verification result indicates that the data is incomplete.
[0165] In this embodiment, the method further includes:
[0166] S14-6: Determine whether the operation use case has an impact on the data integrity of the cloud host based on the comprehensive verification result.
[0167] In this embodiment, after obtaining the comprehensive verification result, it is determined whether the corresponding operation use case has an impact on the data integrity of the cloud host according to the obtained comprehensive verification result. If the comprehensive verification result indicates that the data is incomplete, it means that the operation use case has affected the data integrity of the host. If the comprehensive verification result indicates that the data is complete, it means that the operation use case has not affected the data integrity of the host.
[0168] S14-7: When the operation case affects the data integrity of the cloud host, mark the operation case as an abnormal operation.
[0169] In this embodiment, when an operation case affects the data integrity of the cloud host, the operation case is marked as an abnormal operation. The operation case marked as an abnormal operation will affect the integrity of the host data, and the code corresponding to the operation needs to be adjusted to ensure the integrity of the cloud platform data.
[0170] In another embodiment of the present application, before the cloud host executes the operation use case, the method further includes:
[0171] S21: Parse the operation use case to obtain a cloud host configuration corresponding to the operation use case.
[0172] In this embodiment, before the cloud host executes the operation case, the operation case is parsed to obtain the cloud host configuration corresponding to the operation case. The cloud host configuration corresponding to the operation case is the host configuration that needs to be satisfied to execute the operation case.
[0173] S22: Creating the cloud host satisfying the cloud host configuration on the cloud platform.
[0174] In this embodiment, before executing the operation use case in the cloud host on the cloud platform, a cloud host that meets the configuration of the cloud host is created on the cloud platform. Only after the host is created can the corresponding operation use case be run.
[0175] In this embodiment, the method further includes:
[0176] S23: Perform resource determination on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
[0177] In this embodiment, after the cloud host is created, resource information in the cloud platform is obtained, and a resource determination is performed on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
[0178] In this embodiment, the method further includes:
[0179] S24: When the resources in the cloud platform satisfy the execution of the operation use case, the operation use case is executed through the cloud host.
[0180] In this embodiment, when the resources in the cloud platform meet the execution requirements of the operation, the corresponding operation use case is started to be executed on the cloud host.
[0181] In this embodiment, the method further includes:
[0182] S25: When the resources in the cloud platform do not satisfy the execution of the operation use case, stop executing the operation use case.
[0183] In this embodiment, when the resources of the cloud platform do not meet the execution of the operation use case, the execution of the operation use case is stopped until the resources of the cloud platform are released and the execution of the operation use case is met, and then the corresponding operation use case is executed.
[0184] S26: Generate corresponding abnormal information.
[0185] In this embodiment, when the operation use case cannot be executed normally, corresponding exception information is generated.
[0186] S27: Record the abnormal information in the system log.
[0187] In this embodiment, after the exception information is generated, the exception information is recorded in the system log to facilitate the tester to review.
[0188] In another embodiment of the present application, when it is detected that a certain operation use case has an impact on the data integrity of the cloud platform, it is necessary to check the configuration and operation corresponding to the operation use case to see where the problem occurs. If there is a problem with the configuration, modify the corresponding configuration parameters. If there is a problem with the cloud platform operation, adjust the code corresponding to the operation, or adjust the calling relationship between different codes in the combined operation to adjust the operation. After the adjustment is completed, re-execute the corresponding operation use case through the cloud host on the cloud platform. If the data before and after the operation of the operation use case are complete, the corresponding configuration and operation adjustment are complete.
[0189] refer to Figure 2 , Figure 2 : is a schematic diagram of a cloud host data integrity check process proposed in an embodiment of the present application, such as Figure 2 As shown, first, the configuration parameters of the cloud host are obtained through the configuration management device, and a corresponding configuration list is generated according to the configuration parameters. At the same time, the operation generation device generates a corresponding operation list according to the corresponding operation mutual exclusion rules and weight values. The use case device obtains the corresponding operation use case according to the operation list and the configuration list, and accesses the cloud platform at the same time to determine whether the current use case environment satisfies the execution of the use case. When the use case environment satisfies the execution of the use case, the corresponding use case is executed. Before and after the execution, the verification device verifies the integrity of the pre-operation data and the post-operation data. Finally, the results are collected and the process ends.
[0190] In the above embodiment of the present application, the virtual disk configuration of the cloud host and the operations that affect the data IO reading and writing are separated to obtain a configuration list and an operation list respectively. The configuration is selected by classification, and the operation is selected by weight value. The configuration and operation are combined into a use case for testing, and data integrity verification is performed before and after each operation to minimize the damage to data integrity caused by a certain operation in the operation list of the test virtual disk configuration, so as to achieve automated testing, be able to fully cover the configuration and specified operations, reduce omissions in manual testing, and quickly improve the efficiency of testing. The configuration management device only needs to add configuration items, and the operation generation device only needs to add operation assignments and weights, and the operation list can be regenerated by modifying the incoming weight value, which facilitates the testing of cloud platforms with different configurations, enables the test method to be applied on different cloud platforms, and improves the efficiency of testing.
[0191] Based on the same inventive concept, an embodiment of the present application provides a data verification device. Figure 3 , Figure 3 FIG. 3 is a schematic diagram of a data verification device 300 proposed in an embodiment of the present application. Figure 3 As shown, the device comprises:
[0192] The configuration list generating module 301 is used to generate a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform;
[0193] The operation list generating module 302 is used to generate a corresponding operation list according to the preset cloud host operation weight and the cloud host operation mutual exclusion rule;
[0194] An operation case acquisition module 303, configured to obtain at least one operation case corresponding to the cloud host according to the disk configuration list and the operation list;
[0195] The comprehensive verification result acquisition module 304 is used to perform data verification on the pre-operation data and post-operation data of the cloud host when the cloud host executes the operation use case to obtain a comprehensive verification result.
[0196] Optionally, the configuration list generating module includes:
[0197] A configuration parameter acquisition submodule, used to determine the disk configuration parameters of the virtual disk corresponding to the cloud host according to the virtual disk function corresponding to the cloud host;
[0198] The configuration list acquisition submodule is used to store the disk configuration parameters one by one into a list to obtain the disk configuration list.
[0199] Optionally, the operation list generating module includes:
[0200] A weight reading submodule, used for reading the cloud host operation weight of each cloud host operation supported by the cloud host;
[0201] A combined operation acquisition submodule, used to combine the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation;
[0202] The operation list generation submodule is used to add each of the cloud host operations and the combined operations that meet the mutual exclusion rule of the cloud host operations into a list to obtain the operation list.
[0203] Optionally, the combined operation acquisition submodule includes:
[0204] The target weight setting submodule is used to set the target weight value;
[0205] The operation combination submodule is used to combine the cloud host operations according to the target weight value to obtain the combined operation.
[0206] Optionally, the operation combination submodule includes:
[0207] A weight combination submodule, used to combine the cloud host operation weights corresponding to any plurality of the cloud host operations so that the combined weight value is equal to the target weight value;
[0208] The combined operation determination submodule is used to regard the corresponding multiple cloud host operations as one combined operation when the combined weight value is equal to the target weight value.
[0209] Optionally, the operation case acquisition module includes:
[0210] An operation selection submodule, for selecting, for each virtual disk configuration in the disk configuration list, a corresponding cloud host operation and a combination operation in the operation list;
[0211] The operation case generation submodule is used to obtain the operation case according to the virtual disk configuration, the cloud host operation and the combined operation.
[0212] Optionally, the device further comprises:
[0213] A cloud host configuration acquisition module, used to parse the operation use case and obtain the cloud host configuration corresponding to the operation use case;
[0214] A cloud host creation module is used to create a cloud host that meets the cloud host configuration on the cloud platform.
[0215] Optionally, the device further comprises:
[0216] The resource determination module is used to perform resource determination on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
[0217] Optionally, the device further comprises:
[0218] The operation case execution module is used to execute the operation case through the cloud host when the resources in the cloud platform meet the execution of the operation case.
[0219] Optionally, the device further comprises:
[0220] An operation case execution stopping module, used to stop executing the operation case if the resources in the cloud platform do not meet the execution of the operation case;
[0221] An exception information generation module, used to generate corresponding exception information;
[0222] The abnormal information recording module is used to record the abnormal information in the system log.
[0223] Optionally, the comprehensive verification result acquisition module includes:
[0224] A pre-operation data reading submodule, used for reading the pre-operation data when the cloud host starts to execute the operation use case;
[0225] A first verification result acquisition submodule, used to verify the pre-operation data to obtain a first verification result;
[0226] A post-operation data reading submodule, used for reading the post-operation data when the cloud host completes executing the operation use case;
[0227] A second verification result acquisition submodule is used to verify the post-operation data to obtain a second verification result;
[0228] The comprehensive verification result acquisition submodule is used to use the first verification result and the second verification result as the comprehensive verification result.
[0229] Optionally, the device further comprises: an impact determination module, configured to determine whether the operation use case has an impact on the data integrity of the cloud host according to the comprehensive verification result;
[0230] The abnormal operation marking module is used to mark the operation case as an abnormal operation when the operation case affects the data integrity of the cloud host.
[0231] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method described in any of the above embodiments of the present application.
[0232] Based on the same inventive concept, another embodiment of the present application provides an electronic device, Figure 4 It is a schematic diagram of an electronic device 400 proposed in one embodiment of the present application, including a memory 402, a processor 401 and a computer program stored in the memory and executable on the processor, wherein when the processor is executed, the steps in the dual-site data storage method described in any of the above embodiments of the present application are implemented.
[0233] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0234] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0235] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0236] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0237] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0238] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0239] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0240] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0241] The data verification method, product, device and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method 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 verification method, characterized in that: The method comprises: Generate a corresponding disk configuration list based on the virtual disk functions corresponding to the cloud host on the cloud platform; Generate a corresponding operation list based on the preset cloud host operation weights and cloud host operation mutual exclusion rules; Obtaining at least one operation use case corresponding to the cloud host according to the disk configuration list and the operation list; When the cloud host executes the operation use case, data verification is performed on the pre-operation data and post-operation data of the cloud host to obtain a comprehensive verification result.
2. The data verification method according to claim 1, characterized in that: The generating of a corresponding disk configuration list according to the virtual disk function corresponding to the cloud host on the cloud platform includes: Determining disk configuration parameters of the virtual disk corresponding to the cloud host according to the virtual disk function corresponding to the cloud host; The disk configuration parameters are stored one by one in a list to obtain the disk configuration list.
3. The data verification method according to claim 1, characterized in that: The generating of a corresponding operation list according to the preset cloud host operation weight and cloud host operation mutual exclusion rule includes: Reading the cloud host operation weight of each cloud host operation supported by the cloud host; Combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation; Each of the cloud host operations and the combined operations that meet the cloud host operation mutual exclusion rule are added to a list to obtain the operation list.
4. The data verification method according to claim 3, characterized in that: The combining the cloud host operations according to the cloud host operation mutual exclusion rule and the cloud host operation weight to obtain at least one combined operation includes: Set the target weight value; The cloud host operations are combined according to the target weight value to obtain the combined operation.
5. The data verification method according to claim 4, characterized in that: The combining the cloud host operations according to the target weight value to obtain the combined operation includes: Combining the cloud host operation weights corresponding to any plurality of the cloud host operations so that the combined weight value is equal to the target weight value; When the combined weight value is equal to the target weight value, the corresponding multiple cloud host operations are regarded as one combined operation.
6. The data verification method according to claim 1, characterized in that: The obtaining, according to the disk configuration list and the operation list, at least one operation use case corresponding to the cloud host includes: For each virtual disk configuration in the disk configuration list, select a corresponding cloud host operation and a combination operation in the operation list; The operation use case is obtained according to the virtual disk configuration, the cloud host operation and the combined operation.
7. The data verification method according to claim 1, characterized in that: Before the cloud host executes the operation use case, the method further includes: Parsing the operation use case to obtain a cloud host configuration corresponding to the operation use case; A cloud host that meets the cloud host configuration is created on the cloud platform.
8. The data verification method according to claim 7, characterized in that: The method further comprises: Perform resource determination on the operation use case to determine whether the resources in the cloud platform meet the execution of the operation use case.
9. The data verification method according to claim 8, characterized in that: The method further comprises: When the resources in the cloud platform satisfy the execution of the operation use case, the operation use case is executed through the cloud host.
10. The data verification method according to claim 9, characterized in that: The method further comprises: If the resources in the cloud platform do not satisfy the execution of the operation use case, stop executing the operation use case; Generate corresponding exception information; The abnormal information is recorded in the system log.
11. The data verification method according to claim 1, characterized in that: When the cloud host executes the operation use case, data verification is performed on the pre-operation data and the post-operation data of the cloud host to obtain a comprehensive verification result, including: When the cloud host starts to execute the operation use case, reading the pre-operation data; Verifying the pre-operation data to obtain a first verification result; When the cloud host completes executing the operation use case, reading the post-operation data; Verifying the operated data to obtain a second verification result; The first verification result and the second verification result are used as the comprehensive verification result.
12. The data verification method according to claim 11, characterized in that: The method further includes: determining, based on the comprehensive verification result, whether the operation use case has an impact on the data integrity of the cloud host; In the case where the operation case affects the data integrity of the cloud host, the operation case is marked as an abnormal operation.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps in the method according to any one of claims 1 to 12 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 12 are implemented.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Data storage array device and data access method
US20020040419A1
Disk management method, disk management apparatus, and electronic device
WO2020077534A1