Data Processing Method, Apparatus, Device, and Computer Storage Medium
By performing classified calculations on data backups and determining the verification information of each backup data, the problem of low verification efficiency in backup data in the prior art is solved, and the reliability and efficiency of data processing are improved.
Patent Information
- Application Number
- CN202111527558.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In the existing data backup methods, the verification efficiency of backup data is low, which affects the reliability and consistency of data processing.
By determining the backup data of the to-process data on multiple processing nodes, data classification is performed, and calculation is performed based on the data type of the sub-backup data, verification information is obtained, and combined to determine the validity of the backup data.
Improve the efficiency of data backup verification, ensure reliability and consistency in data processing, and realize the integration and atomicity of data backup and revision operations.
Smart Images

Figure CN114281602B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of computer data processing, and particularly to a data processing method, apparatus, device, and computer storage medium. Background Art
[0002] As IT systems are used to optimize existing system problems and meet the continuously increasing requirements for new business functions during the production process, data processing operations such as data revision and data reconstruction need to be frequently performed during IT operation and maintenance. To ensure the reliability and fault tolerance during the data processing, relevant backups need to be made before data processing for subsequent data processing consistency verification and data rollback, so as to ensure the reliability of data processing.
[0003] The inventors of the present application found during the implementation of the embodiments of the present invention that the efficiency of verifying backup data in existing data backup methods is relatively low. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention provide a data processing method for solving the problem of relatively low efficiency of data backup verification in the prior art.
[0005] According to one aspect of the embodiments of the present invention, a data processing method is provided, the method comprising:
[0006] Determine the backup data respectively corresponding to the data to be processed on multiple processing nodes;
[0007] Classify the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data;
[0008] Calculate the sub-backup data according to the data type of the sub-backup data to obtain the verification information corresponding to the backup data;
[0009] Determine the backup validity of the data to be processed according to the verification information.
[0010] In an alternative manner, the method comprises:
[0011] Calculate the sub-backup data according to the calculation rule corresponding to the data type to obtain the sub-verification information corresponding to each of the sub-backup data;
[0012] Combine the sub-verification information of each of the backup data to obtain the verification information corresponding to each of the backup data.
[0013] In an alternative manner, the data type includes numerical type; the method further comprises:
[0014] Perform an inversion process on the numerical sub-backup data to obtain the inverted data;
[0015] Pad the inverted data to a preset length to obtain the padded data;
[0016] Determine the sub-check information based on the padded data.
[0017] In an alternative approach, the data type includes character type; the method further includes:
[0018] Perform a concatenation process on the character-type sub-backup data to obtain the concatenated data;
[0019] Determine the data acquisition timestamp corresponding to the sub-backup data;
[0020] Add the data acquisition timestamp to the concatenated data to obtain the added data;
[0021] Perform a hash calculation on the added data to obtain the sub-check information.
[0022] In an alternative approach, the data type includes timestamp type; the method further includes:
[0023] Perform a format conversion on the timestamp-type sub-backup data to obtain the converted time data;
[0024] Perform an inversion process on the converted time data to obtain the inverted time data;
[0025] Pad the inverted time data to a preset length to obtain the padded time data;
[0026] Determine the sub-check information based on the padded time data.
[0027] In an alternative approach, the method further includes:
[0028] Match the check information to obtain a matching result;
[0029] Determine the backup validity based on the matching result.
[0030] In an alternative approach, the method further includes:
[0031] Obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope;
[0032] Verify the processing scope, processing object, and processing logic;
[0033] When it is determined that the processing scope, processing object, and processing logic pass the verification and it is determined that the backup of the data to be processed is valid, the data to be processed is processed according to the processing logic.
[0034] According to another aspect of the embodiments of the present invention, a data processing apparatus is provided, including:
[0035] A first determination module, configured to determine the backup data respectively corresponding to the data to be processed on multiple processing nodes;
[0036] A classification module, configured to classify the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data;
[0037] A calculation module, configured to calculate the sub-backup data according to the data type of the sub-backup data to obtain verification information corresponding to the backup data;
[0038] A second determination module, configured to determine the backup validity of the data to be processed according to the verification information.
[0039] According to another aspect of the embodiments of the present invention, a data processing device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus;
[0040] The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations of the data processing method as described above.
[0041] According to yet another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, and at least one executable instruction is stored in the storage medium, and the executable instruction causes a data processing device to execute the operations of the data processing method as described above.
[0042] In the embodiments of the present invention, by determining the backup data respectively corresponding to the data to be processed on multiple processing nodes; classifying the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data; calculating the sub-backup data according to the data type of the sub-backup data to obtain verification information corresponding to the backup data; and determining the backup validity of the data to be processed according to the verification information. Thus, different from the problem of low efficiency in verifying backup data in the existing data processing, in the embodiments of the present application, by classifying the backup data, calculating the verification information corresponding to each type of backup data, comprehensively obtaining the verification information corresponding to each backup data, comparing the verification information of the backup data of multiple processing nodes, and determining the validity of the backup data, the efficiency of batch verification of backup data can be improved.
[0043] The above description is only an overview of the technical solution of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features, and advantages of the embodiments of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically exemplified below. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings are only used to illustrate the embodiments and are not considered as a limitation to the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0045] Figure 1 A flowchart showing the data processing method provided by the embodiments of the present invention is shown;
[0046] Figure 2 A schematic structural diagram of the data processing device provided by the embodiments of the present invention is shown;
[0047] Figure 3 A schematic structural diagram of the data processing device provided by the embodiments of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein.
[0049] Figure 1 A flowchart showing the data processing method provided by the embodiments of the present invention is shown. This method is executed by a computer processing device. The computer processing device may include a mobile phone, a laptop computer, etc. As Figure 1 shown, the method includes the following steps:
[0050] Step 10: Determine the backup data corresponding to the data to be processed on multiple processing nodes respectively.
[0051] In an embodiment of the present invention, the data to be processed may be data to be revised. Data revision refers to modifying and reconstructing data according to requirements in aspects such as business functions or optimization problems. The processing nodes may include the execution nodes corresponding to each action in the data revision process.
[0052] The processing node at least includes a node for obtaining a data revision request, a node for executing a revision operation, and a node in the database at the current time. Among them, the data revision request includes the data identifier of the data to be processed. When receiving the data revision request, the data to be processed is obtained from the database according to the data identifier, backed up, immediately backed up before performing the revision operation on the data to be processed, and when verifying the validity of the backup of the data to be processed, the backup obtained from the database can be based on the data identifier of the data to be processed. It should be noted that the data to be processed can be revised by multiple people at the same time. Therefore, from the time when the data to be processed is obtained to the time of processing, that is, there is a data processing window period for the data that has been backed up but not yet processed. During this data processing window period, the data to be processed may change.
[0053] Step 20: Classify the backup data to obtain at least one sub-backup data corresponding to each of the backup data.
[0054] Considering that the checksum calculation methods for different types of data are different, therefore, in order to improve the efficiency of data verification, in an embodiment of the present invention, classification can be performed according to the data type of the backup data, where the data type includes numeric type, character type, and timestamp type, etc. One sub-backup data corresponds to one data type. One backup data corresponds to at least one data type.
[0055] Step 30: Calculate the sub-backup data according to the data type of the sub-backup data to obtain the check information corresponding to the backup data.
[0056] In an embodiment of the present invention, the sub-backup data is calculated according to the checksum calculation rule corresponding to the data type to obtain the sub-checksum corresponding to the sub-backup data, and all the sub-checksums corresponding to each backup data are combined to obtain the check information corresponding to the backup data.
[0057] Therefore, in still another embodiment of the present invention, step 30 further includes:
[0058] Step 301: Calculate the sub-backup data according to the calculation rule corresponding to the data type to obtain the sub-check information corresponding to each of the sub-backup data.
[0059] In an embodiment of the present invention, the data type includes numeric type; step 301 further includes:
[0060] Step 311: Perform an inversion process on the numeric sub-backup data to obtain the inverted data.
[0061] In an embodiment of the present invention, the inversion process includes bitwise inversion.
[0062] Step 312: Pad the reversed data to a preset length to obtain padded data.
[0063] In an embodiment of the present invention, the reversed data can be padded to the preset length by adding a preset value to the end of the reversed data. The preset value can be 0, and the preset length can be 20 bits.
[0064] Step 313: Determine the sub-check information according to the padded data.
[0065] In an embodiment of the present invention, the padded data can be accumulated to obtain the sub-check information.
[0066] In an embodiment of the present invention, the data type includes character type; Step 301 further includes:
[0067] Step 321: Perform splicing processing on the character-type sub-backup data to obtain spliced data.
[0068] Step 322: Determine the data acquisition timestamp corresponding to the sub-backup data.
[0069] In an embodiment of the present invention, the data acquisition timestamp corresponds to the processing node of the sub-backup data. For example, it can be the timestamp when data verification is performed at the current time, the timestamp when a data processing request is received, and the timestamp when the data processing request is executed, etc.
[0070] Step 323: Add the data acquisition timestamp to the spliced data to obtain added data.
[0071] In an embodiment of the present invention, the data acquisition timestamp can be added to the end of the spliced data to obtain added data.
[0072] Step 3017: Perform hash calculation on the added data to obtain the sub-check information.
[0073] In an embodiment of the present invention, the data type includes timestamp type; Step 301 further includes:
[0074] Step 331: Perform format conversion on the timestamp-type sub-backup data to obtain converted time data.
[0075] In an embodiment of the present invention, the format conversion can be to convert the timestamp-type sub-backup data into numerical data, specifically, it can be converted into a unix timestamp.
[0076] Step 332: Perform reverse processing on the converted time data to obtain reversed time data.
[0077] In one embodiment of the present invention, the inversion process includes bitwise inversion.
[0078] Step 334: Pad the inverted time data to a preset length to obtain padded time data.
[0079] In one embodiment of the present invention, the inverted time data can be padded to the preset length by adding a preset value to the last bit. The preset value can be 0, and the preset length can be 20 bits.
[0080] Step 335: Determine the sub-check information according to the padded time data.
[0081] In one embodiment of the present invention, the padded time data can be accumulated to obtain the sub-check information.
[0082] Step 302: Combine the sub-check information of each of the backup data to obtain the check information corresponding to each of the backup data.
[0083] In one embodiment of the present invention, the sub-check information can be concatenated to obtain the check information corresponding to each backup data. Thus, different from the existing data verification method that uses a line-by-line comparison method, which has high computational resource overhead and low performance, the embodiments of the present application classify and calculate the sub-checksum of batch data, and then combine the classified sub-checksums to obtain the total checksum corresponding to the backup data, improving the efficiency of data verification.
[0084] Step 40: Determine the backup validity of the data to be processed according to the check information.
[0085] In one embodiment of the present invention, step 40 further includes:
[0086] Step 401: Match the check information to obtain a matching result.
[0087] In one embodiment of the present invention, the check information corresponding to all backup data is compared to obtain a matching result. When the check information is consistent, it is regarded as a match; otherwise, it is regarded as a non-match.
[0088] Step 402: Determine the backup validity according to the matching result.
[0089] In one embodiment of the present invention, when the matching result is that all check information is consistent, it is determined that the backup for the data to be processed is valid; when the matching result is that there is inconsistent check information, it is determined that the backup for the data to be processed is invalid, thereby ensuring the reliability of the backup data during the data processing process.
[0090] Considering that problems may occur when data rollback or data consistency check is performed according to invalid backup data in the case of invalid backup data, therefore, on the basis of improving the efficiency of data backup verification, data backup, verification of data backup, and data revision can also be coupled to achieve the integration and atomicity of data backup operations and data revision operations, thereby ensuring the reliability of data revision. Therefore, in another embodiment of the present invention, after step 40, the following steps are further included:
[0091] Step 401: Obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope.
[0092] In an embodiment of the present invention, the processing object may be a data object that needs to be processed in the data to be processed, the processing scope may be the fields and attribute lists to be processed corresponding to the processing object, and the processing logic is used to process the data of the processing object under the processing scope, such as performing reverse operations, increment operations, etc.
[0093] Step 402: Verify the processing scope, processing object, and processing logic.
[0094] In an embodiment of the present invention, the verification of the processing scope and processing object may be to determine whether they are legal types. The verification of the processing logic may include whether there are security risks in the processing logic, whether there are meaningless revisions such as self-closure replication, whether there is a data type inconsistency before and after the revision, whether the preset data type in the processing expression is consistent with the types of the processing scope and processing object in the processing request, etc.
[0095] Therefore, in another embodiment of the present invention, step 402 may further include:
[0096] Step 4021: Verify the processing scope according to the type of the processing scope to obtain a verified processing scope.
[0097] In an embodiment of the present invention, the types of valid processing scopes may include entity table classes, view classes, full-scale classes, and local classes. These valid processing scopes are all based on valid database objects or query statements of tables. Among them, the view class refers to a query definition based on a base table or other views. The full-scale class means including all attribute columns and all rows of an object, and the local class means limiting specified attribute columns or rows with specific conditions; a processing scope that does not meet the above requirements is determined to be an invalid processing scope. When it is determined that the processing scope is invalid, the data processing process is exited.
[0098] In yet another embodiment of the present invention, the processing range may also be parsed by a preset processing range verification device to obtain the type of the processing range. For example, for the processing range of entities and views, the field attribute columns are obtained, and for the processing range of query statement classes, the general characters are converted into specific field attribute columns. The type of the data range obtained after parsing is a valid entity table, view object, or query statement containing specific attribute columns.
[0099] Step 4022: Verify the processing object according to the type of the processing object to obtain a verified processing object.
[0100] In one embodiment of the present invention, a valid processing object refers to a valid entity table processing object and does not include view class processing objects; those that do not meet the above requirements are determined to be invalid processing objects. Specifically, the type of the processing object can be determined by parsing the processing object through a preset processing object parsing device. For entity class processing objects, the field attribute columns are obtained, and the processed object after parsing is a valid entity table containing specific attribute columns.
[0101] Step 4023: Verify the processing logic according to expression validity, self-closure replication, abnormal data, and revision risk, and output a verified processing logic.
[0102] In one embodiment of the present invention, the processing logic is used to process the processing object that meets the processing range. Therefore, first, it can be verified whether the data attributes and expressions of the processing logic match the previously verified processing object and processing range. If the processing range and / or processing object in the processing logic do not exist in the verified processing range and processing object output in steps 4021 and 4022, it is determined that the processing logic is invalid. If there are calculation syntax errors, function method usage errors, etc. in the logic expression of the processing logic, it is determined that the processing logic is invalid.
[0103] In yet another embodiment of the present invention, it is also possible to identify whether there is self-closure replication in the processing logic. Self-closure replication refers to directly assigning the value of the target object attribute to the target object attribute itself without any processing, which is a meaningless processing logic and is prone to occur but difficult to identify in actual revision practices. This type of processing logic consumes system resources in large-scale data revisions, including runtime performance overhead, capacity overhead generated by backups, and synchronization overhead generated by database master-slave synchronization. When self-closure replication is identified, although it is theoretically possible to remove this processing logic, it is impossible to determine whether this is caused by a human error or a truly redundant processing logic. To ensure the rigor and reliability of data revision, when self-closure replication is identified, the processing logic is determined to be invalid.
[0104] In yet another embodiment of the present invention, in case abnormal data is generated due to inconsistent data types, it is also possible to verify the data types corresponding to the processing logic. For example, if the processing logic is used to process processing objects within a processing range, the target object to be processed may be a floating-point type field, but the processing object is a character type or a numeric type. In this case, data truncation may occur due to precision issues when the object is stored. For example, when the integer 123456789 is stored in a floating-point type, it may become 1234567, and the numerical difference between before and after the revision is two orders of magnitude. If such logic is recognized, it is determined to be invalid.
[0105] In yet another embodiment of the present invention, it is also possible to verify processing logics with data revision risks such as unsafe data revision. For example, if the fields used for conditional judgment and data range conditional judgment in the processing logic are modified, it may affect the accuracy of the processing logic and the revision range. If such logic is recognized, it is determined to be invalid. For example, a primary key is usually used to identify the unique identity of data and is usually an unmodifiable field attribute. If a processing logic for modifying primary key data is recognized, the processing logic is determined to be invalid.
[0106] In yet another embodiment of the present invention, verification can be performed in multiple aspects such as the full attributes, partial attributes, and custom processing logic relationships of the processing range and processing objects.
[0107] Step 403: When it is determined that the processing range, processing object, and processing logic pass the verification and it is determined that the backup of the data to be processed is valid, process the data to be processed according to the processing logic.
[0108] In one embodiment of the present invention, when the backup of the data to be processed is invalid or the verification of the processing range, processing object, and processing logic fails, the data to be processed is not processed.
[0109] In yet another embodiment of the present invention, in order to improve the efficiency of data processing, after receiving a data processing request, it is possible to back up the data to be processed corresponding to the data processing request to obtain a first backup data, and then determine whether the processing range, processing object, and processing logic all pass the verification. In the case where all three pass the verification, execute the processing logic on the data to be processed, and perform an immediate backup before executing the processing logic to obtain a second backup data. Finally, when verifying the validity of the data revision after the data revision is completed, obtain a third backup data by acquiring data in the database according to the data identifier of the data to be processed.
[0110] Among them, it should be noted that considering that the data to be processed may be accessed and modified by multiple users, during the data processing idle period of the backed-up but unprocessed data, the data to be processed may change, resulting in the data to be processed during processing being inconsistent with the backup at the time of receiving the request. Therefore, it is necessary to take an immediate backup again before processing the data to be processed, that is, while there is a first backup data, a second backup data is obtained.
[0111] In an embodiment of the present invention, the backup and revision of the data entity object can be encapsulated into a data operation item, which is used to complete data backup and data revision. Before the data revision ends, the consistency of the first backup data, the second backup data, and the third backup data is verified through the foregoing steps. When the backup data is valid, it is determined that the data backup and revision data operations are reliable and the data revision ends. Otherwise, the data backup and data revision are revoked, thereby realizing the atomicity of data backup and data revision and ensuring the reliability of data processing.
[0112] The data processing method provided by the embodiment of the present invention determines the backup data corresponding to the data to be processed on multiple processing nodes respectively; classifies the backup data to obtain at least one sub-backup data corresponding to each of the backup data; calculates the sub-backup data according to the data type of the sub-backup data to obtain the verification information corresponding to the backup data; determines the backup validity of the data to be processed according to the verification information. Therefore, different from the problem of low efficiency in verifying backup data in the existing data processing process, the data processing method provided by the embodiment of the present application classifies the backup data, calculates the verification information corresponding to each type of backup data, comprehensively obtains the verification information corresponding to each backup data, compares the verification information of the backup data of multiple processing nodes, and determines the validity of the backup data, which can improve the efficiency of batch verification of backup data.
[0113] Figure 2 The structural schematic diagram of the data processing device provided by the embodiment of the present invention is shown. As Figure 2 shown, the device 500 includes: a first determination module 501, a classification module 502, a calculation module 503, and a second determination module 504.
[0114] Among them, the first determination module 501 is used to determine the backup data corresponding to the data to be processed on multiple processing nodes respectively;
[0115] The classification module 502 is used to classify the backup data to obtain at least one sub-backup data corresponding to each of the backup data;
[0116] A calculation module 503, configured to calculate the sub-backup data according to the data type of the sub-backup data to obtain check information corresponding to the backup data;
[0117] A second determination module 504, configured to determine the backup validity of the data to be processed according to the check information.
[0118] In an optional manner, the calculation module 503 is further configured to: calculate the sub-backup data according to the calculation rule corresponding to the data type to obtain sub-check information corresponding to each sub-backup data;
[0119] Combine the sub-check information of each backup data to obtain check information corresponding to each backup data.
[0120] In an optional manner, the data type includes numerical type; the calculation module 503 is further configured to:
[0121] Perform an inversion process on the numerical sub-backup data to obtain inverted data;
[0122] Pad the inverted data to a preset length to obtain padded data;
[0123] Determine the sub-check information according to the padded data.
[0124] In an optional manner, the data type includes character type; the calculation module 503 is further configured to:
[0125] Perform a splicing process on the character sub-backup data to obtain spliced data;
[0126] Determine the data acquisition timestamp corresponding to the sub-backup data;
[0127] Add the data acquisition timestamp to the spliced data to obtain added data;
[0128] Perform a hash calculation on the added data to obtain the sub-check information.
[0129] In an optional manner, the data type includes timestamp type; the calculation module 503 is further configured to:
[0130] Perform a format conversion on the timestamp type sub-backup data to obtain converted time data;
[0131] Perform an inversion process on the converted time data to obtain inverted time data;
[0132] Pad the inverted time data to a preset length to obtain padded time data;
[0133] Determine the sub-check information according to the supplemented time data.
[0134] In an alternative manner, the determining module 504 is further configured to:
[0135] Match the check information to obtain a matching result;
[0136] Determine the backup validity according to the matching result.
[0137] In an alternative manner, the determining module 504 is further configured to:
[0138] Obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope;
[0139] Verify the processing scope, processing object, and processing logic;
[0140] When it is determined that the processing scope, processing object, and processing logic pass the verification and it is determined that the backup of the data to be processed is valid, process the data to be processed according to the processing logic.
[0141] The data processing device provided by the embodiments of the present invention determines the backup data respectively corresponding to the data to be processed on multiple processing nodes; classifies the backup data to obtain at least one sub-backup data respectively corresponding to each backup data; calculates the check information corresponding to the backup data according to the data type of the sub-backup data; determines the backup validity of the data to be processed according to the check information. Thus, different from the problem of low efficiency in verifying backup data in the existing data processing, the data processing device provided by the embodiments of the present application classifies the backup data, calculates the check information corresponding to each type of backup data, comprehensively obtains the check information corresponding to each backup data, compares the check information of the backup data of multiple processing nodes, and determines the validity of the backup data, which can improve the efficiency of batch verification of backup data.
[0142] Figure 3 The structural schematic diagram of the data processing device provided by the embodiments of the present invention is shown. The specific embodiments of the present invention do not limit the specific implementation of the data processing device.
[0143] As Figure 3 shown, the data processing device may include: a processor 602, a communication interface 604, a memory 606, and a communication bus 608.
[0144] Wherein: a processor 602, a communication interface 604, and a memory 606 communicate with each other through a communication bus 608. The communication interface 604 is used to communicate with network elements of other devices such as clients or other servers. The processor 602 is used to execute a program 610, and specifically can execute relevant steps in the above-described embodiments of the data processing method.
[0145] Specifically, the program 610 may include program code, and the program code includes computer-executable instructions.
[0146] The processor 602 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the data processing device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0147] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0148] The program 610 can specifically be called by the processor 602 to cause the data processing device to perform the following operations:
[0149] Determine backup data respectively corresponding to the data to be processed on multiple processing nodes;
[0150] Classify the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data;
[0151] Calculate the sub-backup data according to the data type of the sub-backup data to obtain check information corresponding to the backup data;
[0152] Determine the backup validity of the data to be processed according to the check information.
[0153] In an alternative manner, the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0154] Calculate the sub-backup data according to the calculation rule corresponding to the data type to obtain sub-check information corresponding to each of the sub-backup data;
[0155] Combine the sub-check information of each of the backup data to obtain check information corresponding to each of the backup data.
[0156] In an alternative manner, the data type includes numerical type; the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0157] Perform an inversion process on the sub-backup data of the numerical type to obtain inverted data;
[0158] Pad the inverted data to a preset length to obtain padded data;
[0159] Determine the sub-check information according to the padded data.
[0160] In an alternative manner, the data type includes character type; the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0161] Perform a concatenation process on the sub-backup data of the character type to obtain concatenated data;
[0162] Determine the data acquisition timestamp corresponding to the sub-backup data;
[0163] Add the data acquisition timestamp to the concatenated data to obtain added data;
[0164] Perform a hash calculation on the added data to obtain the sub-check information.
[0165] In an alternative manner, the data type includes timestamp type; the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0166] Perform a format conversion on the sub-backup data of the timestamp type to obtain converted time data;
[0167] Perform an inversion process on the converted time data to obtain inverted time data;
[0168] Pad the inverted time data to a preset length to obtain padded time data;
[0169] Determine the sub-check information according to the padded time data.
[0170] In an alternative manner, the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0171] Match the check information to obtain a matching result;
[0172] Determine the backup validity according to the matching result.
[0173] In an alternative manner, the program 610 is called by the processor 602 to cause the data processing device to perform the following operations:
[0174] Obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope;
[0175] Verify the processing scope, processing object, and processing logic;
[0176] When it is determined that the processing scope, processing object, and processing logic pass the verification and it is determined that the backup of the data to be processed is valid, process the data to be processed according to the processing logic.
[0177] The data processing device provided by the embodiments of the present invention determines the backup data respectively corresponding to the data to be processed on multiple processing nodes; classifies the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data; calculates the verification information corresponding to the backup data according to the data type of the sub-backup data; determines the backup validity of the data to be processed according to the verification information. Thus, different from the problem of low efficiency in verifying backup data in the existing data processing, the data processing device provided by the embodiments of the present application classifies the backup data, calculates the verification information corresponding to each type of backup data, comprehensively obtains the verification information corresponding to each backup data, compares the verification information of the backup data of multiple processing nodes, and determines the validity of the backup data, which can improve the efficiency of batch verification of backup data.
[0178] The embodiments of the present invention provide a computer-readable storage medium, and the storage medium stores at least one executable instruction. When the executable instruction runs on a data processing device, the data processing device is caused to execute the data processing method in any of the above method embodiments.
[0179] The executable instruction can specifically be used to cause the data processing device to perform the following operations:
[0180] Determine the backup data respectively corresponding to the data to be processed on multiple processing nodes;
[0181] Classify the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data;
[0182] Calculate the verification information corresponding to the backup data according to the data type of the sub-backup data;
[0183] Determine the backup validity of the data to be processed according to the verification information.
[0184] In an alternative manner, the executable instructions cause the data processing device to perform the following operations:
[0185] Calculate the sub-backup data according to the calculation rules corresponding to the data type to obtain sub-check information corresponding to each sub-backup data;
[0186] Combine the sub-check information of each backup data to obtain check information corresponding to each backup data.
[0187] In an alternative manner, the data type includes numerical type; the executable instructions cause the data processing device to perform the following operations:
[0188] Perform an inversion process on the numerical sub-backup data to obtain inverted data;
[0189] Pad the inverted data to a preset length to obtain padded data;
[0190] Determine the sub-check information according to the padded data.
[0191] In an alternative manner, the data type includes character type; the executable instructions cause the data processing device to perform the following operations:
[0192] Perform a splicing process on the character-type sub-backup data to obtain spliced data;
[0193] Determine the data acquisition timestamp corresponding to the sub-backup data;
[0194] Add the data acquisition timestamp to the spliced data to obtain added data;
[0195] Perform a hash calculation on the added data to obtain the sub-check information.
[0196] In an alternative manner, the data type includes timestamp type; the executable instructions cause the data processing device to perform the following operations:
[0197] Perform a format conversion on the timestamp-type sub-backup data to obtain converted time data;
[0198] Perform an inversion process on the converted time data to obtain inverted time data;
[0199] Pad the inverted time data to a preset length to obtain padded time data;
[0200] Determine the sub-check information according to the padded time data.
[0201] In an alternative manner, the executable instructions cause the data processing device to perform the following operations:
[0202] Match the verification information to obtain a matching result;
[0203] Determine the backup validity according to the matching result.
[0204] In an alternative manner, the executable instructions cause the data processing device to perform the following operations:
[0205] Obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope;
[0206] Verify the processing scope, processing object, and processing logic;
[0207] When it is determined that the verification of the processing scope, processing object, and processing logic passes and the backup of the data to be processed is determined to be valid, process the data to be processed according to the processing logic.
[0208] The computer-readable storage medium provided by the embodiments of the present invention determines the backup data corresponding to the data to be processed on multiple processing nodes respectively; classifies the backup data to obtain at least one sub-backup data corresponding to each of the backup data respectively; calculates the verification information corresponding to the backup data according to the data type of the sub-backup data; determines the backup validity of the data to be processed according to the verification information. Thus, different from the problem of low efficiency in verifying backup data in the existing data processing process, the computer-readable storage medium provided by the embodiments of the present application classifies the backup data, calculates the verification information corresponding to each type of backup data, comprehensively obtains the verification information corresponding to each backup data, compares the verification information of the backup data of multiple processing nodes, and determines the validity of the backup data, which can improve the efficiency of batch verification of backup data.
[0209] The embodiments of the present invention provide a data processing device for executing the above data processing method.
[0210] The embodiments of the present invention provide a computer program, which can be called by a processor to cause a data processing device to execute the data processing method in any of the above method embodiments.
[0211] An embodiment of the present invention provides a computer program product. The computer program product includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions run on a computer, the computer is caused to execute the data processing method in any of the above method embodiments.
[0212] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings based herein. The structure required to construct such systems will be apparent from the above description. In addition, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the description of a particular language above is to disclose the best mode of the present invention.
[0213] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0214] Similarly, it should be understood that, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0215] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be adopted to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0216] It should be noted that the above embodiments are illustrative of the present invention and not restrictive thereof, and alternative embodiments can be designed by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A data processing method, characterized in that, The method includes: Determining the backup data corresponding to the data to be processed on multiple processing nodes respectively; the data to be processed is the data to be revised; the processing nodes include the execution nodes corresponding to each action in the data revision process, at least including the node that obtains the data revision request, the node that executes the revision operation, and the node in the database at the current time; Classifying the backup data to obtain at least one sub-backup data corresponding to each of the backup data respectively; the types of the backup data include numerical type, character type, and timestamp type; Calculating the backup data according to the data types of the sub-backup data to obtain the verification information corresponding to the backup data, including: matching the verification information to obtain a matching result; determining the backup validity according to the matching result; Determining the backup validity of the data to be processed according to the verification information; Obtaining a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope; Verifying the processing scope, processing object, and processing logic; When it is determined that the verification of the processing scope, processing object, and processing logic passes and it is determined that the backup of the data to be processed is valid, processing the data to be processed according to the processing logic.
2. The method according to claim 1, characterized in that The calculating the backup data according to the data types of the sub-backup data to obtain the verification information corresponding to the backup data includes: Calculating the sub-backup data according to the calculation rules corresponding to the data types to obtain the sub-verification information corresponding to each of the sub-backup data; Combining the sub-verification information of each of the backup data to obtain the verification information corresponding to each of the backup data.
3. The method according to claim 2, wherein The data type includes numerical type; the calculating the sub-backup data according to the calculation rules corresponding to the data types to obtain the sub-verification information corresponding to each of the sub-backup data includes: Performing an inversion process on the numerical sub-backup data to obtain the inverted data; Padding the inverted data to a preset length to obtain the padded data; Determining the sub-verification information according to the padded data.
4. The method according to claim 2, wherein The data type includes character type; the calculating the sub-backup data according to the calculation rules corresponding to the data types to obtain the sub-verification information corresponding to each of the sub-backup data includes: Performing a splicing process on the character sub-backup data to obtain the spliced data; Determining the data acquisition timestamp corresponding to the sub-backup data; Adding the data acquisition timestamp to the spliced data to obtain the added data; Performing a hash calculation on the added data to obtain the sub-verification information.
5. The method according to claim 2, characterized in that, The data type includes timestamp type; the calculating the sub-backup data according to the calculation rules corresponding to the data types to obtain the sub-verification information corresponding to each of the sub-backup data includes: Performing a format conversion on the timestamp type sub-backup data to obtain the converted time data; Perform an inversion process on the converted time data to obtain the inverted time data; Pad the inverted time data to a preset length to obtain the padded time data; Determine the sub-check information according to the padded time data.
6. A data processing device, characterized in that, The device includes: A first determination module, configured to determine the backup data respectively corresponding to the data to be processed on multiple processing nodes; the data to be processed is the data to be revised; the processing nodes include the execution nodes corresponding to each action in the data revision process, at least including the node that obtains the data revision request, the node that executes the revision operation, and the node in the current time database; A classification module, configured to classify the backup data to obtain at least one sub-backup data respectively corresponding to each of the backup data; the types of the backup data include numeric type, character type, and timestamp type; A calculation module, configured to calculate the backup data according to the data type of the sub-backup data to obtain the check information corresponding to the backup data, including: matching the check information to obtain a matching result; determining the backup validity according to the matching result; A second determination module, configured to determine the backup validity of the data to be processed according to the check information; obtain a processing request for the data to be processed; the processing request includes a processing object, a processing scope, and a processing logic; the processing logic is used to operate on the processing object belonging to the processing scope; check the processing scope, the processing object, and the processing logic; when it is determined that the processing scope, the processing object, and the processing logic pass the check and it is determined that the backup of the data to be processed is valid, process the data to be processed according to the processing logic.
7. A data processing device, characterized in that, It includes: A processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations of the data processing method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, At least one executable instruction is stored in the storage medium, and when the executable instruction runs on the data processing device, the data processing device is caused to execute the operations of the data processing method according to any one of claims 1-5.
Citation Information
Patent Citations
Data verification method and device, computer system and medium
CN111897842A
Data processing method and device, electronic equipment and readable storage medium
CN113641873A