Data verification method and related device
Through the data verification method, it is verified whether the data processed by the production environment and disaster recovery environment equipment is consistent, which solves the problem of inconsistent environmental data in data disaster recovery, and realizes data consistency and disaster recovery effectiveness.
Patent Information
- Application Number
- CN202411538844.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
AI Technical Summary
During the data disaster recovery process, due to inconsistent environmental data of the production environment and the disaster recovery environment, the data of the equipment processing running the production environment and the equipment processing of the equipment processing running the disaster recovery environment cannot be ensured to be consistent.
Provide a data verification method, by obtaining the business data to be verified, its target data types and timeliness, and finding the corresponding accuracy requirements, timeliness and importance levels from the preset relationships, and then determining the target verification strategy. The first service data to be verified and the second service data to be verified through the strategy.
It realizes the verification of whether the data processed in production environment equipment and the data processed in disaster recovery environment equipment are consistent, ensuring the consistency of data, and thus ensuring the effectiveness of data disaster recovery.
Smart Images

Figure CN119396630A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data verification method and related devices. Background Art
[0002] Data disaster recovery is the full name of data disaster backup, which refers to the process of copying the entire system or part of the data set from the hard disk or array of the application host to other storage media to prevent data loss due to operational errors or system failures.
[0003] In the process of data disaster recovery for big data applications, due to the large amount of data and the limitation of network bandwidth resources, data disaster recovery is generally carried out by having the equipment running the production environment and the equipment running the disaster recovery environment process data separately. The production environment should have the same environmental data as the disaster recovery environment, so that the data processed by the equipment running the production environment and the equipment running the disaster recovery environment will be consistent, and the data disaster recovery function can be achieved. Then, as technology develops, the production environment will change, and the disaster recovery environment should also change accordingly. Such changes cannot guarantee that the environmental data of the production environment and the disaster recovery environment are completely consistent, that is, the data processed by the equipment running the production environment and the equipment running the disaster recovery environment cannot be guaranteed to be consistent.
[0004] Based on this, there is an urgent need for a technical solution to verify whether the data processed by the equipment running the production environment is consistent with the data processed by the equipment running the disaster recovery environment. Summary of the invention
[0005] In view of the above problems, the present application provides a data verification method and related devices to achieve the purpose of verifying whether the data processed by the equipment running the production environment is consistent with the data processed by the equipment running the disaster recovery environment. The specific scheme is as follows:
[0006] The first aspect of the present application provides a data verification method, comprising:
[0007] Obtain target data types and target timeliness corresponding to first business data to be verified and second business data to be verified that need to be verified, wherein the target data types and target timeliness corresponding to the first business data to be verified and the second business data to be verified are the same; the first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment;
[0008] Finding the target accuracy requirement corresponding to the target data type from the preset correspondence between the data type and the accuracy requirement;
[0009] From the preset correspondence between accuracy requirement, timeliness and importance level, searching for the target importance level corresponding to the target accuracy requirement and the target timeliness;
[0010] From the preset correspondence between importance levels and verification strategies, searching for the target verification strategy corresponding to the target importance level;
[0011] The first business data to be verified and the second business data to be verified are verified using the target verification strategy.
[0012] In a possible implementation, a method for obtaining a corresponding relationship between accuracy requirements, timeliness, and importance levels includes:
[0013] Determine that the importance level corresponding to high accuracy requirements and high timeliness requirements is high;
[0014] Determine that the importance level corresponding to high accuracy requirements and low timeliness requirements is medium;
[0015] Determine that the importance level corresponding to low accuracy requirements and high timeliness requirements is low;
[0016] Determine that the importance level corresponding to low accuracy requirements and low timeliness requirements is low.
[0017] In a possible implementation, if the target importance level is high, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes:
[0018] Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0019] Verifying the first statistical level information and the second statistical level information to obtain a first verification result;
[0020] If the first verification result is passed, obtaining the first business data to be verified and the second business data to be verified;
[0021] Verifying the first to-be-verified business data and the second to-be-verified business data to obtain a second verification result;
[0022] If the second verification result is verification passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
[0023] In a possible implementation, if the target importance level is medium, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes:
[0024] Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0025] Verifying the first statistical level information and the second statistical level information to obtain a first verification result;
[0026] If the first verification result is that the verification is passed, obtain first key information and second key information; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified;
[0027] Verifying the first key information and the second key information to obtain a third verification result;
[0028] If the third verification result is that the verification is passed, a first verification code and a second verification code are obtained; the first verification code is obtained by the first device based on the first business data to be verified, and the first verification code includes verification codes corresponding to each data object in the first business data to be verified; the second verification code is obtained by the second device based on the second business data to be verified, and the second verification code includes verification codes corresponding to each data object in the second business data to be verified;
[0029] Verifying the first verification code and the second verification code to obtain a fourth verification result;
[0030] If the fourth verification result is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
[0031] In a possible implementation, if the target importance level is low, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes:
[0032] Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0033] Verifying the first statistical level information and the second statistical level information to obtain a first verification result;
[0034] If the first verification result is that the verification is passed, first sample data and second sample data are obtained; the first sample data is obtained by the first device based on the first business data to be verified, and the first sample data includes data obtained by filtering the first business data to be verified by setting a filtering condition; the second sample data is obtained by the second device based on the second business data to be verified, and the second sample data includes data obtained by filtering the second business data to be verified by setting a filtering condition;
[0035] Verifying the first sample data and the second sample data to obtain a fifth verification result;
[0036] If the first verification result is that the verification is passed, obtain first key information and second key information; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified;
[0037] Verifying the first key information and the second key information to obtain a third verification result;
[0038] If the third verification result is that the verification is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
[0039] A second aspect of the present application provides a data verification device, comprising:
[0040] An acquisition module, used for acquiring target data types and target timeliness corresponding to first business data to be verified and second business data to be verified that need to be verified, wherein the target data types and target timeliness corresponding to the first business data to be verified and the second business data to be verified are the same; the first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment;
[0041] A first search module, configured to search for a target accuracy requirement corresponding to the target data type from a preset correspondence between data types and accuracy requirements;
[0042] A second search module is used to search for the target importance level corresponding to the target accuracy requirement and the target timeliness from the preset correspondence relationship between the accuracy requirement, timeliness and importance level;
[0043] A third search module is used to search for a target verification strategy corresponding to the target importance level from the preset correspondence between the importance level and the verification strategy;
[0044] A verification module is used to verify the first business data to be verified and the second business data to be verified through the target verification strategy.
[0045] A third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the data verification method of the first aspect or any implementation of the first aspect.
[0046] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0047] The memory is used to store computer programs;
[0048] The processor is used to execute the computer program so that the electronic device can implement the data verification method of the first aspect or any implementation manner of the first aspect.
[0049] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the data verification method of the first aspect or any implementation of the first aspect.
[0050] By means of the above technical scheme, the present application provides a data verification method, which obtains the target data type and target timeliness corresponding to the first business data to be verified and the second business data to be verified that need to be verified; from the correspondence between the preset data type and the accuracy requirement, find the target accuracy requirement corresponding to the target data type; from the correspondence between the preset accuracy requirement, timeliness and importance level, find the target importance level corresponding to the target accuracy requirement and the target timeliness; from the correspondence between the preset importance level and the verification strategy, find the target verification strategy corresponding to the target importance level; verify the first business data to be verified and the second business data to be verified through the target verification strategy. Since the timeliness and accuracy requirements of the first business data to be verified are taken into consideration, the obtained target verification strategy can be more consistent with the first business data to be verified. Thereby achieving the purpose of verifying whether the data processed by the equipment running the production environment and the data processed by the equipment running the disaster recovery environment are consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0052] Figure 1 A schematic diagram of a system architecture provided for this application;
[0053] Figure 2 A schematic diagram of an optional hardware structure of a terminal provided in this application;
[0054] Figure 3 A schematic diagram of the structure of a server provided for this application;
[0055] Figure 4 A schematic diagram of a data verification method provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of four quadrants provided for an embodiment of the present application;
[0057] Figure 6 A schematic diagram of the structure of a data verification device provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0060] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0061] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0062] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a first device 100 and a second device 200.
[0063] Exemplarily, the first device 100 runs a production environment, and the second device 200 runs a disaster recovery environment.
[0064] Exemplarily, the first device 100 or the second device 200 may be a terminal or a server.
[0065] The data verification method provided in the embodiment of the present application can be applied to the first device 100 or the second device 200.
[0066] For example, Figure 1 The system shown may further include a third device, and the data verification method provided in the embodiment of the present application may be applied to the third device. The third device is respectively connected to the first device 100 and the second device 200 for communication.
[0067] Exemplarily, the first device 100 runs in a production environment, so there will be a situation where multiple user terminals access the first device 100. In order to save resources of the first device 100, the data verification method provided in the embodiment of the present application is not applied to the first device. If the first device is required to obtain certain data based on the first business data to be verified, the fourth device that can access the first device can execute "obtaining certain data based on the first business data to be verified", and then the fourth device sends the certain data obtained based on the first business data to be verified to the third device or the second device.
[0068] Next describe Figure 1 When the first device or the second device is a terminal, the product form of the terminal;
[0069] The terminal in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any restrictions on this.
[0070] Figure 2 An optional hardware structure diagram of a terminal is shown.
[0071] refer to Figure 2 As shown, the terminal may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 This is merely an example of a terminal and does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or a combination of certain components, or different components.
[0072] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the terminal. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0073] Among them, the input device 132 can receive input data and the like.
[0074] The display unit 140 may be used to display information input by a user or provided to a user, various menus of the terminal, an interactive interface, file display, and / or playback of any multimedia file.
[0075] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.
[0076] The processor 170 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0077] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0078] In this embodiment of the present application, the RF unit 110 can send data to a server and receive a processing result sent by the server.
[0079] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.
[0080] The terminal also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0081] The terminal also includes an external interface 180, which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal to communicate with other devices, or to connect a charger to charge the terminal.
[0082] Although not shown, the terminal may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 in the terminal shown.
[0083] Next describe Figure 1 When the first device or the second device is a server, the product form of the server;
[0084] Figure 3 A schematic diagram of the structure of a server is provided, such as Figure 3 As shown, the server includes a bus 201, a processor 202, a communication interface 203 and a memory 204. The processor 202, the memory 204 and the communication interface 203 communicate with each other via the bus 201.
[0085] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0086] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0087] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0088] It should be understood that the above-mentioned terminals and servers can be centralized or distributed devices, and the processors in the above-mentioned terminals and servers (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), general-purpose processors, digital signal processors (DSP), microprocessors or microcontrollers, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.
[0089] The following is a description of the various verification objects involved in the embodiments of the present application.
[0090] Statistical level verification mainly includes: data number comparison, file size comparison, slice table comparison and zipper table comparison. Among them, data number comparison is to compare whether the number of records in the two business data to be verified is consistent. File size verification is to compare whether the data volume of the two business data to be verified is consistent. Slice table comparison is to compare whether the incremental data (i.e., slice table) within the same business date in the two business data to be verified is consistent. For example, the number of records, average value, and total of the incremental data on the same business date in the two business data to be verified can be compared. Zipper table comparison is to compare the number of records of the valid full data (i.e., zipper table) on the same business date in the two business data to be verified.
[0091] Statistical verification is simple to operate and has low requirements on network bandwidth and computing resources. It can only provide rough data consistency assurance and cannot detect specific data differences.
[0092] Key field verification: Perform statistical calculations such as summing or averaging the field values of key fields in each business data to be verified to obtain key information; compare whether the key information of two business data to be verified is consistent. Key field verification usually focuses on fields that are critical to the business.
[0093] Exemplarily, key fields that need to be verified may be preset, and the key fields may be determined based on the business and industry. For example, in the financial industry, the key fields may be amounts and important identifiers.
[0094] Because only the key information of key fields is transmitted, key field verification requires less network bandwidth. Key field verification can only verify the consistency of key fields and cannot guarantee the data consistency of non-key fields. If data inconsistency occurs in non-key fields, key field verification may not be able to detect it.
[0095] Sampling level verification: Compare sample data extracted from two business data to be verified.
[0096] For example, appropriate sampling ratios and sampling methods, such as random sampling and stratified sampling, may be determined based on business requirements and data distribution.
[0097] Sampling-level verification can only provide probabilistic consistency assurance because only part of the data is checked. If inconsistent data is not sampled, the problem may not be discovered.
[0098] Sampling-level verification only needs to process sampled data, and the consumption of computing resources is relatively low.
[0099] Verification code verification: Compare the verification codes of two business data to be verified.
[0100] Exemplarily, the fields that need to be verified are determined, and fields related to time and special business requirements, such as record creation time, are usually excluded. Exemplarily, each record in the business data to be verified (a record includes multiple fields) corresponds to a verification code; or, the entire business data to be verified corresponds to a verification code, or, one field corresponds to a verification code; Exemplarily, the verification code can be calculated using MD5 (Message-Digest Algorithm 5) or a hash algorithm for the record. Exemplarily, if the business data to be verified has a primary key, the primary key is used in combination with the verification code; if the business data to be verified does not have a primary key, the verification code is calculated first, and then the results are sorted to ensure comparability.
[0101] When the amount of data is large, calculating and transmitting the checksum may consume more resources, but the checksum verification can quickly discover data inconsistencies.
[0102] Detailed level verification: perform full field comparison on two pieces of business data to be verified.
[0103] Exemplarily, the fields that need to be compared are determined, usually excluding fields related to time and special business requirements, such as record creation time.
[0104] Detailed verification provides the highest level of data consistency assurance because it involves a detailed comparison of all fields. Although full field comparison is required, the consumption of computing resources is moderate compared to calculating the checksum. In the case of large amounts of data, synchronizing and comparing data consumes a lot of network bandwidth and computing resources.
[0105] Detailed verification is a very reliable data consistency verification method, especially suitable for critical business scenarios with extremely high requirements for data accuracy. Through this verification, the complete consistency of data between the production environment and the disaster recovery environment can be ensured, thus providing strong protection for business continuity and data recovery.
[0106] Exemplarily, the verification speed of each verification object is: statistical level verification > sampling level verification > detail level verification > key field verification > check code verification. The computing resource requirement of each verification object is: check code verification > detail level verification > key field verification > sampling level verification > statistical level verification; the network bandwidth requirement of each verification object is: detail level verification > check code verification > key field verification > sampling level verification > statistical level verification; the verification accuracy of each verification object is: detail level verification ≥ key field verification > check code verification > sampling level verification > statistical level verification.
[0107] In the related technology, one or both of the above verification methods may be used when performing data verification, and the verification method for business data to be verified with different levels of importance is consistent. For example, business data to be verified with lower accuracy requirements and business data to be verified with higher accuracy requirements both use detailed-level verification, resulting in a waste of computing resources.
[0108] In order to solve the above problems, the present application provides a data verification method. The data verification method of the present application is described in detail below with reference to the accompanying drawings.
[0109] Reference Figure 4 , Figure 4 A flow chart of a data verification method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, a data verification method provided in an embodiment of the present application may include steps S401 to S405, and these steps are described in detail below.
[0110] Step S401: Obtain target data types and target timeliness corresponding to the first business data to be verified and the second business data to be verified.
[0111] The first business data to be verified and the second business data to be verified have the same target data type. The first business data to be verified and the second business data to be verified have the same target timeliness.
[0112] The first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment.
[0113] Illustratively, the first business data to be verified includes, but is not limited to: a table.
[0114] The processing time of the first business data to be verified is the same as the processing time of the second business data to be verified, for example, both are processed on October 29, 2024.
[0115] Exemplarily, the embodiments of the present application collectively refer to the first business data to be verified and the second business data to be verified as business data to be verified, and the data types of the business data to be verified include but are not limited to: end-of-day batch, ordinary credit business, regular credit business, customer information, account information, and transaction information.
[0116] Among them, the end-of-day batch is the most important batch type in the core system of the bank, which usually includes many batch nodes, such as "pre-processing", "accrual and settlement of interest", "regeneration of repayment plan", "generation of accounting entries", "reconciliation of total accounts", etc. Ordinary credit business is applicable to the situation where the payer actively transfers the confirmed amount to the designated payee through the paying bank, including ordinary remittance, cash remittance, entrusted collection, collection and payment, remittance of bill funds, treasury remittance, remittance of public welfare funds, payment, credit return, etc. Regular credit business is applicable to the situation where the payer actively transfers the amount to the designated payee through the paying bank in the form of regular payment, including regular payment on behalf of others, remittance of wages and salaries, public welfare funds, etc. Customer information includes static customer information and dynamic customer information. Static customer information includes customer type (individual, company, bank, etc.), customer category, customer name, certificate information, contact information, economic type, industry nature, etc. Dynamic customer information involves customer transaction information, which is used for quantitative analysis of customer contribution and risk. Account information is a basic data set used for accounting, including institution number, customer number, account number, account type, account opening date, account closing date, account status, frozen status, currency, book balance, available balance, etc. Transaction information refers to the transaction flow information generated during the business processing, including transaction customer information, transaction medium (such as debit card, credit card, etc.), transaction channel (such as counter, ATM, etc.), transaction product (such as deposit, loan, etc.) and transaction attribution (account opening institution).
[0117] Timeliness can represent the deadline within which the business data to be verified needs to be completed. The shorter the deadline, the higher the timeliness, and the longer the deadline, the lower the timeliness.
[0118] Step S402: searching for the target accuracy requirement corresponding to the target data type from the preset correspondence between the data type and the accuracy requirement.
[0119] Step S403: From the preset correspondence between accuracy requirement, timeliness and importance level, find the target importance level corresponding to the target accuracy requirement and the target timeliness.
[0120] The embodiment of the present application can provide a four-quadrant method to construct the "correspondence between accuracy requirements, timeliness and importance levels". Figure 5 To explain, Figure 5 FIG. 1 is a schematic diagram of the four quadrants provided in the embodiment of the present application. The horizontal axis of the four quadrants represents timeliness, and the vertical axis represents accuracy requirements.
[0121] If the accuracy requirements are high and the timeliness requirements are high (i.e., located in the first quadrant), the corresponding importance level is high; if the accuracy requirements are high and the timeliness requirements are low (i.e., located in the second quadrant), the corresponding importance level is medium; if the accuracy requirements are low and the timeliness requirements are high (i.e., located in the third quadrant), the corresponding importance level is low; if the accuracy requirements are low and the timeliness requirements are low (i.e., located in the fourth quadrant), the corresponding importance level is low.
[0122] Step S404: searching for the target verification strategy corresponding to the target importance level from the preset correspondence between the importance levels and the verification strategies.
[0123] The verification strategy includes at least one target verification object among the five verification objects of statistical level verification, key field verification, sampling level verification, check code verification, and detail level verification, and the execution order of the target verification objects. The following is an example.
[0124] If the target verification objects included in the verification strategy are statistical-level verification and detailed-level verification, the execution order of the target verification objects can be: statistical-level verification → detailed-level verification, that is, if the statistical-level verification passes, the detailed-level verification will be performed.
[0125] Since the timeliness and accuracy requirements of the first business data to be verified are taken into consideration, the obtained target verification strategy can be more consistent with the first business data to be verified.
[0126] In an optional implementation, the process of constructing the correspondence between importance levels and verification strategies includes the following steps A1 to A2.
[0127] Step A1: The importance level of the sample business data to be verified, the verification accuracy corresponding to each verification object, the verification speed corresponding to each verification object, the computing resource requirement corresponding to each verification object, and the network bandwidth requirement corresponding to each verification object are used as inputs to the verification strategy determination model, and the actual verification strategy corresponding to the sample business data to be verified is used as the training target to train the verification strategy determination model.
[0128] The actual verification strategy of the sample business data to be verified is the optimal verification strategy determined by experts.
[0129] Step A2: Determine the corresponding relationship between the model construction importance level and the verification strategy based on the verification strategy.
[0130] It can be understood that the verification strategy for historical business data to be verified may not be optimal. The importance level of some historical business data to be verified, the detection accuracy corresponding to each verification object, the verification speed corresponding to each verification object, the computing resource requirement corresponding to each verification object, and the network bandwidth requirement corresponding to each verification object are input into the verification strategy determination model, and the optimal verification strategy is obtained through the verification strategy determination model. The optimal verification strategy for historical business data to be verified is statistically analyzed to obtain the corresponding relationship between the importance level and the verification strategy.
[0131] Step S405: verifying the first business data to be verified and the second business data to be verified through the target verification strategy.
[0132] The embodiment of the present application provides a data verification method, which obtains the target data type and target timeliness corresponding to the first business data to be verified and the second business data to be verified that need to be verified; from the correspondence between the preset data type and the accuracy requirement, find the target accuracy requirement corresponding to the target data type; from the correspondence between the preset accuracy requirement, timeliness and importance level, find the target importance level corresponding to the target accuracy requirement and the target timeliness; from the correspondence between the preset importance level and the verification strategy, find the target verification strategy corresponding to the target importance level; verify the first business data to be verified and the second business data to be verified through the target verification strategy. Since the timeliness and accuracy requirements of the first business data to be verified are taken into consideration, the obtained target verification strategy can be more consistent with the first business data to be verified. Thereby achieving the purpose of verifying whether the data processed by the equipment running the production environment and the data processed by the equipment running the disaster recovery environment are consistent.
[0133] In an optional implementation, if the target importance level is high, the specific implementation method of step S405 includes but is not limited to the following steps B1 to B5.
[0134] Step B1: Obtain first statistical level information and second statistical level information, the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table and zipper table of the second business data to be verified.
[0135] Step B2: Verify the first statistical level information and the second statistical level information to obtain a first verification result.
[0136] Exemplarily, step B2 is statistical level verification.
[0137] Step B3: If the first verification result is passed, obtain the first business data to be verified and the second business data to be verified.
[0138] If the first verification result is verification failure, step B3 is not performed.
[0139] Step B4: verify the first business data to be verified and the second business data to be verified to obtain a second verification result.
[0140] Exemplarily, step B4 is detailed level verification.
[0141] Step B5: If the second verification result is passed, determine that the first business data to be verified and the second business data to be verified are consistent.
[0142] It is understandable that, since the target importance level is high, it means that the target timeliness requirement is high and the target accuracy requirement is high. The verification accuracy of key field verification and detail level verification is high, but the verification speed of detail level verification is faster than that of key field verification, so the verification speed detail level verification is required. Further, the statistical level verification is placed before the detailed level verification, because the verification speed of the statistical level verification is the fastest. If the verification result of the statistical level verification fails, there is no need to perform detailed level verification. In this way, it is not necessary to perform detailed level verification for each business data to be verified, which saves more computing resources and time. The statistical level verification is used to quickly discover the inconsistency between the first business data to be verified and the second business data to be verified. After the statistical level verification passes, the detailed level verification is directly used. Since the network bandwidth requirement of the detailed level verification is the highest, but the verification speed is higher than the verification code speed of the check code verification and the key field verification, this application sacrifices network bandwidth resources and uses appropriate computing resources to ensure data consistency.
[0143] In an optional implementation, if the target importance level is medium, the specific implementation method of step S405 includes but is not limited to the following steps C1 to C7.
[0144] Step C1: Obtain first statistical level information and second statistical level information.
[0145] The first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table and zipper table of the first business data to be verified.
[0146] The second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table and zipper table of the second business data to be verified.
[0147] Step C2: verify the first statistical level information and the second statistical level information to obtain a first verification result.
[0148] Exemplarily, step C2 is a statistical level verification.
[0149] Step C3: If the first verification result is passed, obtain the first key information and the second key information.
[0150] The first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or average of field values of target key fields in the first business data to be verified.
[0151] The second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or average of the field values of the target key fields in the second business data to be verified.
[0152] For example, the target key field is a field whose data type is an integer or a field whose data type is a floating point.
[0153] Step C4: verify the first key information and the second key information to obtain a third verification result.
[0154] Exemplarily, step C4 is key field verification.
[0155] Step C5: If the third verification result is verification passed, obtain the first verification code and the second verification code.
[0156] The first verification code is obtained by the first device based on the first business data to be verified, and the first verification code includes verification codes corresponding to each data object in the first business data to be verified.
[0157] The second verification code is obtained by the second device based on the second business data to be verified, and the second verification code includes verification codes corresponding to each of the data objects in the second business data to be verified.
[0158] Exemplarily, the data object may include a field that needs to be checked. Exemplarily, the data object is a record, and a record includes multiple fields that need to be checked.
[0159] Step C6: verify the first verification code and the second verification code to obtain a fourth verification result.
[0160] Exemplarily, step C6 is verification of the verification code.
[0161] Step C7: If the fourth verification result is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
[0162] It is understandable that the target importance level is medium, which means that the accuracy requirement of the first business data to be verified is high, but the timeliness requirement is low. It is understandable that if detailed level verification is used, it will consume a lot of resources of the first device, which may affect the business accessing the first device, so the verification code verification and key field verification with relatively low network bandwidth requirements and relatively low verification speed can be used for verification (the combined verification accuracy of the verification code verification and key field verification is equivalent to the verification accuracy of the detailed level verification). Because the verification speed of statistical level verification is fast and the computing resource requirements and bandwidth requirements are the lowest, statistical level verification can be used to screen out obviously inconsistent business data to be verified.
[0163] Statistical-level verification is used to quickly discover inconsistencies between the first business data to be verified and the second business data to be verified. After the statistical-level verification is passed, key field verification is used first to quickly discover inconsistencies in key fields. After the key field verification is passed, check code verification is used. Since the computing resource requirements for check code verification are high, but the network bandwidth requirements are moderate, this application sacrifices computing resources and uses appropriate network bandwidth to ensure data consistency.
[0164] In an optional implementation, if the target importance level is low, the specific implementation method of step S405 includes but is not limited to the following steps D1 to D7.
[0165] Step D1: Obtain first statistical level information and second statistical level information.
[0166] The first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table and zipper table of the first business data to be verified.
[0167] The second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table and zipper table of the second business data to be verified.
[0168] Step D2: verify the first statistical level information and the second statistical level information to obtain a first verification result.
[0169] Exemplarily, step D2 is a statistical level verification.
[0170] Step D3: If the first verification result is passed, obtain the first sample data and the second sample data.
[0171] The first sample data is obtained by the first device based on the first business data to be verified, and the first sample data includes data obtained by filtering the first business data to be verified by setting a filtering condition.
[0172] The second sample data is obtained by the second device based on the second business data to be verified, and the second sample data includes data obtained by filtering the second business data to be verified by setting a filtering condition.
[0173] Exemplarily, the setting of the filtering conditions may be based on actual conditions, which will not be described in detail here.
[0174] Step D4: verify the first sample data and the second sample data to obtain a fifth verification result.
[0175] Exemplarily, step D4 is a sampling level verification.
[0176] Step D5: If the first verification result is passed, obtain the first key information and the second key information.
[0177] The first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of field values of the target key field in the second business data to be verified;
[0178] Step D6: Verify the first key information and the second key information to obtain a third verification result.
[0179] Exemplarily, step D6 is key field verification.
[0180] Step D7: If the third verification result is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
[0181] It can be understood that if the target importance level is low, it means that the target timeliness is low or high, and the target accuracy requirement is low. Therefore, the target verification strategy verification is composed of three verification objects with relatively low computing resource requirements, relatively low network bandwidth requirements and relatively low verification accuracy, namely "statistical level verification → sampling level verification → key field verification".
[0182] Statistical-level verification is used to quickly discover inconsistencies between the first business data to be verified and the second business data to be verified. After the statistical-level verification is passed, sampling-level verification is used first to quickly discover data inconsistencies under certain screening conditions. After the sampling-level verification is passed, key field verification is used. Data consistency guarantees may be inconsistent, but due to the low importance of the data, the use of sampling-level verification and key field verification can basically guarantee the availability of the data, while saving network bandwidth resources and computing resources.
[0183] It is understandable that the embodiment of the present application verifies the first service data to be verified and the second service data to be verified in an application scenario where the network bandwidth is limited. Since the network bandwidth is limited, the verification object used has a minimum demand for network bandwidth, unless the target importance level is high.
[0184] A data verification method provided by an embodiment of the present application is introduced above, and a device for executing the above data verification method will be introduced below.
[0185] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a data verification device provided in an embodiment of the present application. Figure 6 As shown, the data verification device comprises:
[0186] The acquisition module 601 is used to acquire the target data type and target timeliness corresponding to the first business data to be verified and the second business data to be verified, wherein the target data type and target timeliness corresponding to the first business data to be verified and the second business data to be verified are the same; the first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment;
[0187] A first search module 602 is used to search for a target accuracy requirement corresponding to the target data type from a preset correspondence relationship between data types and accuracy requirements;
[0188] The second search module 603 is used to search the target importance level corresponding to the target accuracy requirement and the target timeliness from the preset correspondence relationship between the accuracy requirement, timeliness and importance level;
[0189] The third search module 604 is used to search for the target verification strategy corresponding to the target importance level from the preset correspondence relationship between the importance level and the verification strategy;
[0190] The verification module 605 is used to verify the first to-be-verified business data and the second to-be-verified business data through the target verification strategy.
[0191] In an optional implementation, the method further includes:
[0192] A first determination module is used to determine that the importance level corresponding to the high accuracy requirement and the high timeliness requirement is high;
[0193] The second determination module is used to determine that the importance level corresponding to the high accuracy requirement and low timeliness requirement is medium;
[0194] A third determination module is used to determine that the importance level corresponding to the low accuracy requirement and the high timeliness requirement is low;
[0195] The fourth determination module is used to determine that the importance level corresponding to the low accuracy requirement and the low timeliness requirement is low.
[0196] In an optional implementation, if the target importance level is high, the verification module includes:
[0197] a first obtaining unit, configured to obtain first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; and the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0198] A first verification unit, used to verify the first statistical level information and the second statistical level information to obtain a first verification result;
[0199] A second acquiring unit, configured to acquire the first to-be-verified business data and the second to-be-verified business data if the first verification result is a passed verification;
[0200] A second verification unit, used to verify the first business data to be verified and the second business data to be verified, and obtain a second verification result;
[0201] The first determining unit is configured to determine that the first business data to be verified and the second business data to be verified are consistent if the second verification result is verification passed.
[0202] In an optional implementation, if the target importance level is medium, the verification module includes:
[0203] A third acquisition unit is used to acquire first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0204] A third verification unit, used to verify the first statistical level information and the second statistical level information to obtain a first verification result;
[0205] a fourth acquisition unit, configured to acquire first key information and second key information if the first verification result is a passed verification; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified;
[0206] a fourth verification unit, configured to verify the first key information and the second key information to obtain a third verification result;
[0207] a fifth obtaining unit, configured to obtain, if the third verification result is a passed verification, a first verification code and a second verification code; the first verification code is obtained by the first device based on the first business data to be verified, and the first verification code includes verification codes corresponding to each data object in the first business data to be verified; the second verification code is obtained by the second device based on the second business data to be verified, and the second verification code includes verification codes corresponding to each data object in the second business data to be verified;
[0208] a fifth verification unit, configured to verify the first verification code and the second verification code to obtain a fourth verification result;
[0209] The second determining unit is configured to determine that the first business data to be verified and the second business data to be verified are consistent if the fourth verification result is verification passed.
[0210] In an optional implementation, if the target importance level is low, the verification module includes:
[0211] a sixth obtaining unit, configured to obtain first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; and the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified;
[0212] a sixth verification unit, configured to verify the first statistical level information and the second statistical level information to obtain a first verification result;
[0213] a seventh acquisition unit, configured to acquire, if the first verification result is a passed verification, first sample data and second sample data; the first sample data is obtained by the first device based on the first business data to be verified, and the first sample data includes data obtained by filtering the first business data to be verified by setting a filtering condition; the second sample data is obtained by the second device based on the second business data to be verified, and the second sample data includes data obtained by filtering the second business data to be verified by setting a filtering condition;
[0214] A seventh verification unit, configured to verify the first sample data and the second sample data to obtain a fifth verification result;
[0215] an eighth acquisition unit, configured to acquire first key information and second key information if the first verification result is a passed verification; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified;
[0216] a ninth verification unit, configured to verify the first key information and the second key information to obtain a third verification result;
[0217] A third determination unit is configured to determine, if the third verification result is verification passed, that the first business data to be verified and the second business data to be verified are consistent.
[0218] The present application also provides an electronic device in an embodiment. Figure 7As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0219] like Figure 7 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0220] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a memory card, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0221] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any data verification method provided in the embodiment of the present application.
[0222] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any data verification method provided in the embodiment of the present application.
[0223] It should be noted that the data verification method and related devices provided by the present invention can be used in the field of artificial intelligence or finance. The above is only an example and does not limit the application field of the data verification method and related devices provided by the present invention.
[0224] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0225] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0226] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0227] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A data verification method, characterized in that: include: Obtaining target data types and target timeliness corresponding to first business data to be verified and second business data to be verified that need to be verified, wherein the target data types and target timeliness corresponding to the first business data to be verified and the second business data to be verified are the same; The first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment; Finding the target accuracy requirement corresponding to the target data type from the preset correspondence between the data type and the accuracy requirement; From the preset correspondence between accuracy requirement, timeliness and importance level, searching for the target importance level corresponding to the target accuracy requirement and the target timeliness; From the preset correspondence between importance levels and verification strategies, searching for the target verification strategy corresponding to the target importance level; The first business data to be verified and the second business data to be verified are verified using the target verification strategy.
2. The data verification method according to claim 1, characterized in that: Methods for obtaining the correspondence between accuracy requirements, timeliness, and importance levels include: Determine that the importance level corresponding to high accuracy requirements and high timeliness requirements is high; Determine that the importance level corresponding to high accuracy requirements and low timeliness requirements is medium; Determine that the importance level corresponding to low accuracy requirements and high timeliness requirements is low; Determine that the importance level corresponding to low accuracy requirement and low timeliness requirement is low.
3. The data verification method according to claim 2, characterized in that: If the target importance level is high, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes: Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified; Verifying the first statistical level information and the second statistical level information to obtain a first verification result; If the first verification result is passed, obtaining the first business data to be verified and the second business data to be verified; Verifying the first to-be-verified business data and the second to-be-verified business data to obtain a second verification result; If the second verification result is verification passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
4. The data verification method according to claim 2, characterized in that: If the target importance level is medium, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes: Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified; Verifying the first statistical level information and the second statistical level information to obtain a first verification result; If the first verification result is that the verification is passed, obtain first key information and second key information; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified; Verifying the first key information and the second key information to obtain a third verification result; If the third verification result is that the verification is passed, a first verification code and a second verification code are obtained; the first verification code is obtained by the first device based on the first business data to be verified, and the first verification code includes verification codes corresponding to each data object in the first business data to be verified; the second verification code is obtained by the second device based on the second business data to be verified, and the second verification code includes verification codes corresponding to each data object in the second business data to be verified; Verifying the first verification code and the second verification code to obtain a fourth verification result; If the fourth verification result is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
5. The data verification method according to claim 2, characterized in that: If the target importance level is low, the step of verifying the first to-be-verified business data and the second to-be-verified business data through the target verification strategy includes: Obtaining first statistical level information and second statistical level information, wherein the first statistical level information is obtained by the first device based on the first business data to be verified, and the first statistical level information includes the number of data items, file size, slice table, and zipper table of the first business data to be verified; the second statistical information is obtained by the second device based on the second business data to be verified, and the second statistical level information includes the number of data items, file size, slice table, and zipper table of the second business data to be verified; Verifying the first statistical level information and the second statistical level information to obtain a first verification result; If the first verification result is that the verification is passed, first sample data and second sample data are obtained; the first sample data is obtained by the first device based on the first business data to be verified, and the first sample data includes data obtained by filtering the first business data to be verified by setting a filtering condition; the second sample data is obtained by the second device based on the second business data to be verified, and the second sample data includes data obtained by filtering the second business data to be verified by setting a filtering condition; Verifying the first sample data and the second sample data to obtain a fifth verification result; If the first verification result is that the verification is passed, obtain first key information and second key information; the first key information is obtained by the first device based on the first business data to be verified, and the first key information includes the sum or mean of the field values of the target key field in the first business data to be verified; the second key information is obtained by the second device based on the second business data to be verified, and the second key information includes the sum or mean of the field values of the target key field in the second business data to be verified; Verifying the first key information and the second key information to obtain a third verification result; If the third verification result is that the verification is passed, it is determined that the first business data to be verified and the second business data to be verified are consistent.
6. A data verification device, characterized in that: include: An acquisition module, used to acquire target data types and target timeliness corresponding to first business data to be verified and second business data to be verified, wherein the target data types and target timeliness corresponding to the first business data to be verified and the second business data to be verified are the same; The first business data to be verified is processed by a first device running a production environment, and the second business data to be verified is processed by a second device running a disaster recovery environment; A first search module, configured to search for a target accuracy requirement corresponding to the target data type from a preset correspondence between data types and accuracy requirements; A second search module is used to search for the target importance level corresponding to the target accuracy requirement and the target timeliness from the preset correspondence relationship between the accuracy requirement, timeliness and importance level; A third search module is used to search for a target verification strategy corresponding to the target importance level from the preset correspondence between the importance level and the verification strategy; A verification module is used to verify the first business data to be verified and the second business data to be verified through the target verification strategy.
7. The data verification device according to claim 6, characterized in that: Also includes: A first determination module is used to determine that the importance level corresponding to the high accuracy requirement and the high timeliness requirement is high; The second determination module is used to determine that the importance level corresponding to the high accuracy requirement and low timeliness requirement is medium; A third determination module is used to determine that the importance level corresponding to the low accuracy requirement and the high timeliness requirement is low; The fourth determination module is used to determine that the importance level corresponding to the low accuracy requirement and the low timeliness requirement is low.
8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the data verification method as claimed in any one of claims 1 to 5.
9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the data verification method as described in any one of claims 1 to 5.
10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the data verification method as described in any one of claims 1 to 5.