Method for managing data version and realizing version rollback
By extracting and recording operation information of the data feature body and generating operation records and snapshot tables, the time-consuming and laborious problem of analyzing text analysis during data version management and version rollback in the prior art is solved, and fast and accurate version rollback is achieved and data consistency.
Patent Information
- Application Number
- CN202411474571.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-11
AI Technical Summary
In the process of data version management and version fallback, analyzing data changes through programs through parsing text is time-consuming and laborious, incomplete and inaccurate.
By extracting the feature body of the data, generating a unique identifier, recording the detailed information of each operation, generating operation records and snapshot tables, the data version management and version fallback are realized.
It realizes fast and accurate version fallback, improves the accuracy and consistency of data processing, and reduces misunderstandings and conflicts caused by inconsistent data versions.
Smart Images

Figure CN119415320A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method for managing data versions and implementing version rollback. Background Art
[0002] In today's era of rapid digital development, data management and processing have become increasingly complex and critical. With the continuous advancement of business and the frequent update of data, the need for effective management of data versions and version rollback has become increasingly prominent. In traditional data management methods, there is often a lack of clear records and effective tracking of data versions, which leads to difficulties when rolling back to a specific version. After multiple modifications and updates, data may not be able to accurately restore a specific state before, which poses a great risk to the accuracy, consistency and availability of data. At the same time, some existing data version management methods have some defects, such as:
[0003] When maintaining data, existing conventional systems only maintain the latest modified data and reflect data changes by describing the modified content in additional text. The modified content recorded in text is easy for business personnel to understand, but it is difficult for the system to interpret. When it is necessary to analyze the change process, analyzing by program parsing text is time-consuming, labor-intensive, incomplete and inaccurate.
[0004] In response to the above problems, it is urgent to carry out innovative designs based on the original data return methods. Summary of the invention
[0005] The purpose of the present invention is to provide a method for managing data versions and implementing version rollback, so as to solve the problem that the conventional system's method of parsing program text proposed in the above background technology is time-consuming, labor-intensive, incomplete and inaccurate.
[0006] To achieve the above object, the present invention provides the following technical solution: a method for managing data versions and implementing version rollback, comprising the following steps:
[0007] S1. Extract the characteristic subject from the same business subject information table and generate a unique identifier blacklist (blacklist_id). If there are other related business subjects, blacklist_id is used for associated storage;
[0008] S2. For each single operation performed by different business entities, an operation record blacklist_operate(operate_id, blacklist_id, trigger_blacklist_id) is generated to record different operation types, operators, trigger operators and other information required for business analysis, and generate a unique identifier operate_id, associate operate_id with blacklist_id, and store them in blacklist. The original blacklist(blacklist_id) becomes blacklist(blacklist_id, operate_id);
[0009] S3. Each modification to the subject blacklist (blacklist_id, operate_id), blacklist_group (group_id, group_operate_id) generates a record in the corresponding snapshot table, and associates the corresponding operation information operate_id;
[0010] S4. Find all accounts affected by each operation by selecting the operation_id corresponding to the version, and roll back the operation to the state before it was affected.
[0011] By adopting the above technical solution, the operator is triggered and other business information is connected in parallel to realize the information processing linkage after the version is rolled back.
[0012] Preferably, the associated storage structure in step S1
[0013] blacklist_group(group_id,blacklist_id), where blacklist(blacklist_id) is the subject.
[0014] The above technical solution is used to determine the main part of the associated storage, which is convenient for snapshot table comparison.
[0015] Preferably, in step S2, when an operation on the blacklist occurs, the same type of subject will be associated, and the operation_id of the previous operation can be used as the parent_id and recorded in the record of the associated operation, and the final structure becomes
[0016] blacklist_operate(operate_id,parent_id,blacklist_id,trigger_blacklist_id.
[0017] Adopting the above technical solution;
[0018] Preferably, in step S2, when an operation on the blacklist occurs, other business entities such as blacklist_group (group_id, blacklist_id) will be associated with the operation, and a corresponding operation record table blacklist_group_operate needs to be created to generate a unique identifier group_operate_id, and the operate_id is associated with it.
[0019] The above technical solution is adopted to manage other business entities through blacklist operations.
[0020] Preferably, the structure of the snapshot table is completely consistent with that of the main table. The snapshot table can reflect the complete main information of different modification nodes, and its associated operation_id can also be associated with the specific information of the corresponding operation. The specific content modified by this operation can be checked by comparing with the previous version snapshot.
[0021] By adopting the above technical solution, corresponding data records are provided for checking the backup part of the management data.
[0022] Compared with the prior art, the present invention has the following beneficial effects: the method for managing data versions and implementing version rollback:
[0023] 1. When an erroneous modification occurs during data processing or an unforeseen problem occurs in the new version, you can quickly roll back to the previous stable version. By rolling back the version, you can reprocess the data and improve the accuracy of data processing. You don’t have to worry about data confusion caused by erroneous operations. You can try new functions and optimizations more boldly, thereby improving development efficiency and reducing the risk of business operations.
[0024] 2. By connecting the data information related to operate_id and blacklist_id in parallel, the data information in the same version can be quickly optimized, the data consistency can be improved, and duplication of work and waste of resources caused by data errors can be avoided during version rollback, and resource utilization can be optimized, thereby providing a clear version management and rollback mechanism, facilitating collaboration and communication between team members, and reducing misunderstandings and conflicts caused by inconsistent data versions. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a schematic diagram of the snapshot management process of the present invention;
[0026] Figure 2 It is a schematic diagram of the association operation process of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] See also Figure 1-2 The present invention provides a technical solution: a method for managing data versions and implementing version rollback, comprising the following steps:
[0029] S1. Extract the characteristic subject from the same business subject information table and generate a unique identifier blacklist (blacklist_id). If there are other related business subjects, blacklist_id is used for associated storage;
[0030] The associated storage in step S1 constitutes blacklist_group(group_id, blacklist_id), where blacklist(blacklist_id) is the subject;
[0031] S2. For each single operation performed by different business entities, an operation record blacklist_operate(operate_id, blacklist_id, trigger_blacklist_id) is generated to record different operation types, operators, trigger operators and other information required for business analysis, and generate a unique identifier operate_id, associate operate_id with blacklist_id, and store them in blacklist. The original blacklist(blacklist_id) becomes blacklist(blacklist_id, operate_id);
[0032] In step S2, when an operation on the blacklist occurs, the same type of subject will be associated. The operation_id of the previous operation can be used as the parent_id and recorded in the record of the associated operation. The final structure becomes
[0033] blacklist_operate(operate_id,parent_id,blacklist_id,trigger_blacklist_id;
[0034] The operation of blacklist will be associated with other business entities such as
[0035] blacklist_group(group_id,blacklist_id), you need to create the corresponding operation record table blacklist_group_operate to generate a unique identifier group_operate_id, and associate operate_id with it.
[0036] S3. Each modification to the subject blacklist (blacklist_id, operate_id), blacklist_group (group_id, group_operate_id) generates a record in the corresponding snapshot table, and associates the corresponding operation information operate_id;
[0037] The structure of the snapshot table is exactly the same as that of the main table. The snapshot table can reflect the complete main information of different modification nodes. Its associated operation_id can also be associated with the specific information of the corresponding operation. The specific content modified by this operation can be checked by comparing it with the snapshot of the previous version.
[0038] S4. Find all accounts affected by each operation by selecting the operation_id corresponding to the version, and roll back the operation to the state before the operation was affected;
[0039] In conjunction with the accompanying drawings Figure 1 As shown, each time a blacklist entity is modified, an operation record is created.
[0040] blacklist_operate(operate_id,blacklist_id,trigger_blacklist_id). If the operation affects other accounts, the above operate_id will be recorded as the parent_id of the operation record of other accounts.
[0041] blacklist_operate(parent_id,operate_id,blacklist_id,trigger_blacklist_id), so by specifying operate_id as parent_id, find the operation records of other accounts;
[0042] Because each time an operation record is created, a snapshot is created
[0043] blacklist_snapshot(blacklist_id,operate_id), which finds the blacklist_id of other accounts and their corresponding version table status, and updates the status as the latest status to the blacklist table, thus implementing version rollback;
[0044] Each opearate_id is associated with group_operate_id in the group operation record to form blacklist_group_operate(group_operate_id,operate_id). Similarly, the group's version table status is found and the status is updated as the latest status to the blacklist_group table, thus implementing the group's version rollback.
[0045] The management, storage and traceability of data versions can ensure that even if errors occur during data processing, they can be rolled back to the correct version, thereby greatly improving the accuracy and reliability of data.
[0046] In conjunction with the accompanying drawings Figure 2 As shown, according to the operation_id of each operation, find the associated operations and operation accounts related to the operation;
[0047] like Figure 2 Operation process: When the latest version of A is A3 and you need to roll back to version A1, you need to roll back all the affected data in the modified A and A second batch run rows marked during the process to that time point or before;
[0048] Therefore, A3 returns to A1. Since B1 is generated by D1, it is not affected.
[0049] C2 returns to C, D2 returns to D1, and E1 returns to E, realizing version rollback and data version management, avoiding duplication of work and waste of resources caused by data errors, and optimizing resource utilization;
[0050] in Figure 2 A, B, C, D, and E shown in the figure are all different blacklist data rows, and A1, A2, and A3 represent different version snapshots of the data row.
[0051] Working principle: When using this method to manage data versions and implement version rollback, first create an operation record for each modification, record the operation type type, the blacklist_id of the operated party, and the triggering operator trigger_blacklist_id, and generate an operate_id. The operate_id is bound to the blacklist_id and updated as the latest version. At the same time, insert a record in the snapshot table as snapshot data. If the operation triggers an associated operation, the operate_id is used as the parent_id, and the operation record is created again. The operated account is associated as above, so that all affected accounts are associated with one operation to trace the change path, determine the content of each historical change and the scope of influence, and facilitate the rapid management of the corresponding data content during the version rollback process.
[0052] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for managing data versions and implementing version rollback, characterized in that: The following steps are involved: S1. Extract the characteristic subject from the same business subject information table and generate a unique identifier blacklist (blacklist_id). If there are other related business subjects, blacklist_id is used for associated storage; S2. For each single operation performed by different business entities, an operation record blacklist_operate (operate_id, blacklist_id, trigger_blacklist_id) is generated to record different operation types, operators, trigger operators and other information required for business analysis, and generate a unique identifier operate_id, associate operate_id with blacklist_id, and store them in blacklist. The original blacklist (blacklist_id) becomes blacklist (blacklist_id, operate_id); S3. Each modification to the subject blacklist (blacklist_id, operate_id), blacklist_group (group_id, group_operate_id) generates a record in the corresponding snapshot table, and associates the corresponding operation information operate_id; S4. Find all accounts affected by each operation by selecting the operation_id corresponding to the version, and roll back the operation to the state before it was affected.
2. A method for managing data versions and implementing version rollback according to claim 1, characterized in that: The associated storage structure in step S1 blacklist_group(group_id,blacklist_id), where blacklist(blacklist_id) is the subject.
3. A method for managing data versions and implementing version rollback according to claim 1, characterized in that: In step S2, when an operation on a blacklist occurs, the same type of subject will be associated, and the operate_id of the previous operation can be used as the parent_id and recorded in the record of the associated operation, and the final structure becomes blacklist_operate(operate_id, parent_id, blacklist_id, trigger_blacklist_id.
4. A method for managing data versions and implementing version rollback according to claim 1, characterized in that: In step S2, when an operation on the blacklist occurs, other business entities such as blacklist_group (group_id, blacklist_id) will be associated with the operation. A corresponding operation record table blacklist_group_operate needs to be created to generate a unique identifier group_operate_id, and the operate_id is associated with it.
5. A method for managing data versions and implementing version rollback according to claim 1, characterized in that: The structure of the snapshot table is completely consistent with that of the main table. The snapshot table can reflect the complete main information of different modification nodes, and its associated operation_id can also be associated with the specific information of the corresponding operation. The specific content modified by this operation can be checked by comparing with the previous version snapshot.
