Data rollback method and system and electronic equipment
By identifying the data types in the bank general ledger system and utilizing the daily backup mechanism of the backup and cleanup class and the reverse posting operation of the posting class, efficient and automated data rollback was achieved, solving the data recovery problem after data errors in the bank general ledger system and improving the system's stability and processing efficiency.
Patent Information
- Application Number
- CN202511593432.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-03
AI Technical Summary
When errors occur in the bank's general ledger system's end-of-day data processing, existing technologies struggle to efficiently and automatically roll back the data, resulting in time-consuming and inefficient manual adjustments that may lead to system outages.
By identifying the parameter types of the data to be rolled back, matching differentiated processing procedures, using the daily backup mechanism for backup and cleanup data to locate historical data, performing reverse posting operations on posting data, and cleaning up relevant information in downstream modules before deleting the data to be rolled back, we can ensure data consistency and system stability.
It improves the automation and processing efficiency of data rollback, reduces the cost of manual intervention, ensures data integrity and system stability, and avoids data inconsistency issues.
Smart Images

Figure CN121455751A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data rollback method, system and electronic equipment. BACKGROUND
[0002] The bank general ledger system is the core downstream system in the bank information system architecture, which undertakes the key responsibilities of interfacing various upstream business systems, performing daily industry and financial conversion, account processing and report generation. Due to the large number of interfacing systems and wide range of data processing, especially in the transaction-level general ledger scenario, data elements cover both account and business levels, resulting in complex and lengthy daily processing procedures. Once the data error is found after processing, the root cause may involve upstream data reporting abnormalities, system internal processing logic defects, program code problems or human operation errors, etc., which brings great challenges to problem positioning and data repair.
[0003] Currently, the conventional processing method for the general ledger system data error in the industry has significant limitations. For small-scale data problems, it usually relies on technical experts for manual positioning and manual adjustment. However, the general ledger processing involves complex processes such as multi-table association and summary posting, and the account reconciliation relationship is rigorous, making manual adjustment not only extremely high in technical depth and business understanding ability of technical personnel, but also time-consuming and inefficient in processing.
[0004] For large-scale data errors or serious problems with extensive impact, manual adjustment is difficult to meet the requirements, and the database backup recovery method can be used for data rollback. However, since the rollback scheme based on the database level highly depends on the backup strategy of the database and the integrity of the backup data, especially in the test environment, the backup may not be complete, which will cause the rollback operation to fail. In addition, the database recovery operation itself takes a long time, and the system cannot perform normal business processing during the recovery period, resulting in service interruption and affecting the normal use of the system. SUMMARY
[0005] In view of the deficiencies in the prior art, the present application provides a data rollback method, system and electronic equipment, aiming to solve the problem of difficult data rollback of the bank general ledger system after the daily data processing error, and improve the automation degree and processing efficiency of data rollback.
[0006] The present application discloses a data rollback method applied to a bank general ledger system, comprising: In response to a data rollback instruction input by a user, obtaining the data to be rolled back, the data rollback instruction comprising a data rollback date; Obtaining the parameter type of the data to be rolled back, and matching the processing flow of the data to be rolled back according to the parameter type; Generating the historical data of the data to be rolled back according to the processing flow; deleting the to-be-rolled-back data in the bank general ledger system and storing the historical data into a data table corresponding to the to-be-rolled-back data; updating a date of the bank general ledger system as a data rollback date.
[0007] Preferably, the parameter type of the to-be-rolled-back data includes a backup cleaning type and a posting type. The backup cleaning data corresponding to the backup cleaning type has a daily backup mechanism, and the backup cleaning data is stored in a backup table. The posting data corresponding to the posting type does not have a daily backup mechanism, and the posting data is used to represent balance accumulation.
[0008] Preferably, before the to-be-rolled-back data is obtained, the method further comprises: obtaining business data to be backed up in the bank general ledger system on the current day; obtaining a business table name in which the business data is located; storing the business data into a backup table and marking a backup time for the backup table; establishing a backup association relationship among the business table name, the backup table and the backup time, and storing the backup association relationship into a preset parameter configuration table.
[0009] Preferably, before the to-be-rolled-back data is obtained, the method further comprises: obtaining posting data and a posting time of posting on the current day in the bank general ledger system; obtaining a posting table name and a posting operation of the posting data; establishing a posting association relationship among the posting table name, the posting operation and the posting time, and storing the posting association relationship into the preset parameter configuration table.
[0010] Preferably, the historical data of the to-be-rolled-back data is generated according to a processing flow, comprising: in a case that the to-be-rolled-back data is backup cleaning data, obtaining a business table name corresponding to the backup cleaning data; querying a backup table corresponding to the to-be-rolled-back data from the preset parameter configuration table with the data rollback date and the business table name as query conditions; generating a backup query statement based on the backup table and the data rollback date; querying the historical data of the to-be-rolled-back data according to the backup query statement.
[0011] Preferably, the historical data of the to-be-rolled-back data is generated according to a processing flow, comprising: in a case that the to-be-rolled-back data is posting data, obtaining a posting state corresponding to the posting data, the posting state including a posted state and an unposted state; in a case that the posting data is in the unposted state, deleting the posting data.
[0012] Preferably, in the case that the posting data is in a posted state, a posting table name corresponding to the posting data is acquired; With the data rollback date and the posting table name as query conditions, a posting operation corresponding to the to-be-rolled-back data is queried from a preset parameter configuration table; Based on the posting operation, a reverse posting operation is performed on the to-be-rolled-back data to obtain reverse posting data; The reverse posting data is taken as historical data of the to-be-rolled-back data.
[0013] Preferably, before the to-be-rolled-back data in the target database is deleted, the method further comprises: A downstream module of the to-be-rolled-back data is queried, the downstream module being a business module that depends on the to-be-rolled-back data for subsequent processing; Processing information related to the to-be-rolled-back data in the downstream module is deleted.
[0014] The application discloses a data rollback system for executing a data rollback method, the data rollback system comprising: A data acquisition module is configured to acquire to-be-rolled-back data in response to a data rollback instruction input by a user, the data rollback instruction comprising a data rollback date; A flow matching module is configured to acquire a parameter type of the to-be-rolled-back data and match a processing flow of the to-be-rolled-back data according to the parameter type; A data rollback module is configured to generate historical data of the to-be-rolled-back data according to the processing flow; A data storage module is configured to delete the to-be-rolled-back data in a bank general ledger system and store the historical data into a data table corresponding to the to-be-rolled-back data; A date rollback module is configured to update a date of the bank general ledger system to the data rollback date.
[0015] The application discloses an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the data rollback method when executing the program.
[0016] Compared with the prior art, the present application has the beneficial effects that: by acquiring the parameter type of the data to be rolled back, the present application matches the corresponding rollback processing flow, for backup cleaning type data, the daily backup mechanism is used to quickly locate the backup table from the preset parameter configuration table, and then an accurate backup query statement is generated to acquire historical data, ensuring the integrity and accuracy of the data; and for the over-accounting type data, differential processing is performed according to the over-accounting state, the un-over-accounting data is directly deleted, and the over-accounting data is generated into historical data through reverse over-accounting operation, effectively avoiding the problem of inconsistent data. In addition, before deleting the data to be rolled back, the present application also queries and cleans the processing information related to the data to be rolled back in the downstream module, further ensuring the stability and consistency of the system after data rollback. Through these measures, the present application significantly improves the automation degree and processing efficiency of the bank general ledger system data rollback, and reduces the cost and risk of manual intervention. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 A flowchart of the data rollback method provided by the present application is shown. Figure 2 A structure diagram of the data rollback system provided by the present application is shown. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0019] The present application will be described in further detail below with reference to the drawings.
[0020] As shown in Figure 1 , the present application provides a data rollback method applied to a bank general ledger system, including the following steps.
[0021] S1, in response to a data rollback instruction input by a user, acquiring data to be rolled back.
[0022] In the embodiments of the present application, the bank general ledger system is the core hub of the entire data processing flow, which receives data from multiple upstream business systems, performs complex summarization, calculation and conversion, and generates final accounting results and outputs them to a report module.
[0023] In the daily operation of the bank general ledger system, data once entered into the system and completed processing is generally considered as an irreversible operation. However, in actual business scenarios, due to operation errors, system abnormalities or external regulatory requirements, it is often necessary to restore the system state to a certain historical time point.
[0024] In the embodiments of the present application, the parameter types of data in the bank general ledger system include two categories of backup cleaning and over-accounting, and different rollback strategies are adopted for different types of data. Among them, the backup cleaning data corresponding to the backup cleaning category has a daily backup mechanism, the backup cleaning data is stored in the backup table, and the over-accounting data corresponding to the over-accounting category does not have a daily backup mechanism, and the over-accounting data is used to represent the balance accumulation.
[0025] The backup cleaning data can be account opening information, customer transaction flow and other independently archivable data, and the bank general ledger system will backup the backup cleaning data daily. Specifically, in the backup process, first, the business data to be backed up in the bank general ledger system is obtained, and then the business table name of the business data is obtained; the business data is stored in the backup table, and the backup time is marked for the backup table; finally, the backup association relationship of the business table name, the backup table and the backup time is established, and the backup association relationship is stored in the preset parameter configuration table.
[0026] The over-accounting data can be account balance change records, general ledger over-accounting details and other data reflecting the state of fund flow, and such data directly participates in balance calculation during business processing and does not perform daily full backup. In the parameter configuration of the over-accounting data, first, the over-accounting data and the over-accounting time of the over-accounting of the bank general ledger system on the current day are obtained; then the over-accounting table name and the over-accounting operation of the over-accounting data are obtained; finally, the over-accounting association relationship of the over-accounting table name, the over-accounting operation and the over-accounting time is established, and the over-accounting association relationship is stored in the preset parameter configuration table.
[0027] In this way, according to the backup association relationship and the over-accounting association relationship stored in the preset parameter configuration table, the data range and time point to be rolled back can be accurately located, and then the differential rollback operation is performed.
[0028] Further, after the bank general ledger system receives the data rollback instruction input by the user, the data to be rolled back is obtained, and the data rollback date contained in the instruction is parsed. Among them, the data to be rolled back is the account record or business information actually stored in the bank general ledger system, which needs to be restored to a historical state due to business abnormalities or operation errors.
[0029] S2, obtain the parameter type of the data to be rolled back, and match the processing flow of the data to be rolled back according to the parameter type.
[0030] In the embodiment of the present application, after obtaining the data to be rolled back, the system first identifies the parameter type of the data, that is, determines whether it belongs to the backup cleaning type or the posting type. According to different parameter types, different processing flows are matched.
[0031] For backup cleaning type data, the system quickly locates the corresponding backup table according to the backup association relationship in the preset parameter configuration table, and then performs data rollback according to the backup table. For posting type data, the system performs data rollback according to the posting operation of the data. Through the accurate matching of the parameter type, the system can ensure that each type of data is processed in the most suitable way for its characteristics, thereby improving the accuracy and efficiency of data rollback.
[0032] S3, generating historical data of the data to be rolled back according to the processing flow.
[0033] In the case that the data to be rolled back is backup cleaning data, the business table name corresponding to the backup cleaning data is obtained; the backup table corresponding to the data to be rolled back is queried from the preset parameter configuration table by taking the data rollback date and the business table name as query conditions; a backup query statement is generated based on the backup table and the data rollback date; and the historical data of the data to be rolled back is queried according to the backup query statement.
[0034] Specifically, when the data to be rolled back is backup cleaning data, the business table name corresponding to the data is first determined, and the backup table containing the required historical data is located from the preset parameter configuration table by taking the combination of the business table name and the data rollback date as a query condition. Then, based on the structure of the backup table and the data rollback date, a backup query statement conforming to the database query syntax specification is dynamically generated. After the query statement is submitted to the database management system, the historical data records matching the specified date and business table name can be efficiently retrieved, and these records constitute the complete historical version of the data to be rolled back. This process fully utilizes the daily backup characteristics of backup cleaning data, ensuring the traceability and integrity of historical data.
[0035] In the case that the data to be rolled back is posting data, the posting state corresponding to the posting data is obtained, including the posted state and the unposted state; in the case that the posting data is in the unposted state, the posting data is deleted. In the case that the posting data is in the posted state, the posting table name corresponding to the posting data is obtained; the data rollback date and the posting table name are taken as query conditions to query the preset parameter configuration table to obtain the posting operation corresponding to the data to be rolled back; a reverse posting operation is performed on the data to be rolled back based on the posting operation to obtain reverse posting data; and the reverse posting data is taken as the historical data of the data to be rolled back.
[0036] It should be noted that the posting state of the posting data can be posted state or unposted state. The posted state is used to represent that the data has completed the accounting processing and has been included in the balance of the account of the current accounting period, and has a business constraint that cannot be directly deleted. The unposted state indicates that the data is only in a pending state and has not yet affected the accounting result. For unposted data, the system can directly perform a delete operation to implement rollback. For posted data, the posting table name and data rollback date associated therewith are required to locate the corresponding posting operation record in the parameter configuration table, and then reverse posting data opposite to the original posting direction is generated to ensure accounting balance and data consistency.
[0037] Specifically, when the posting data is in the posted state, the posting table name corresponding to the data is first extracted, and the data rollback date specified by the user is combined as a joint query condition to retrieve the historical records related to the posting operation from the preset parameter configuration table. These records record the data flow, amount change and accounting processing logic when the original posting is performed, providing an accurate basis for generating reverse posting data. Subsequently, according to the retrieved posting operation information, reverse posting logic is automatically constructed, that is, accounting processing opposite to the original posting direction is performed, for example, amount deduction, reverse adjustment of account balance, etc., to ensure the balance of the accounting system is not affected by data rollback. The finally generated reverse posting data is marked as a historical data version by the system and stored in the corresponding data table.
[0038] In this way, the business state before data rollback is preserved, and complete data chains are provided for subsequent audit tracking and business analysis. This process realizes efficient and accurate rollback of posting data, significantly improving the data recovery capability and business continuity assurance level of the bank general ledger system in the face of abnormal situations.
[0039] S4, deleting the data to be rolled back in the bank general ledger system and storing the historical data in the data table corresponding to the data to be rolled back.
[0040] In the embodiment of the application, after the historical data corresponding to the data to be rolled back is obtained, the downstream module of the data to be rolled back is queried, and the downstream module is a business module that depends on the data to be rolled back for subsequent processing. Then, the processing information related to the data to be rolled back in the downstream module is deleted. In this way, by querying and cleaning the related processing information of the downstream module before deleting the data to be rolled back in the bank general ledger system, the potential impact of the data rollback operation on other business links can be effectively cut off.
[0041] Specifically, first, all business modules that depend on the to-be-rolled-back data to complete subsequent processing, such as report generation, risk assessment or fund allocation, are identified, and then processing records directly associated with the to-be-rolled-back data in these modules are located, including but not limited to intermediate results, state identifiers or association indexes. By accurately deleting these associated information, the system ensures that after the data rollback, the downstream modules will not cause logical errors or data inconsistency problems due to the residual old data state.
[0042] After the downstream module cleaning is completed, the system formally executes the deletion operation of the to-be-rolled-back data, and at the same time, the historical data generated in step S3 is stored in the corresponding data table according to its original business logic, for example, the historical version of the backup cleaning data is written back to the business table, or the reverse posting data is updated to the general ledger detail table. In this process, the system strictly follows the field constraints and association relationships of the data table to ensure that the storage location of the historical data completely matches the business semantics. Through the above operation, the system realizes data rollback while maintaining the integrity and consistency of the full-link data, providing a reliable data foundation for subsequent business query, audit tracking or supervision reporting.
[0043] S5, updating the date of the bank general ledger system to the data rollback date.
[0044] In the embodiment of the present application, the current date of the bank general ledger system is rolled back to the business date corresponding to the to-be-rolled-back data, ensuring that the system clock and business timing are consistent.
[0045] As shown in Figure 2 The present application also provides a data rollback system for executing the data rollback method, the data rollback system comprising a data acquisition module 201, a process matching module 202, a data rollback module 203, a data storage module 204 and a date rollback module 205.
[0046] The data acquisition module 201 is configured to acquire the to-be-rolled-back data in response to a data rollback instruction input by a user, the data rollback instruction comprising a data rollback date. The process matching module 202 is configured to acquire the parameter type of the to-be-rolled-back data and match the processing flow of the to-be-rolled-back data according to the parameter type. The data rollback module 203 is configured to generate the historical data of the to-be-rolled-back data according to the processing flow. The data storage module 204 is configured to delete the to-be-rolled-back data in the bank general ledger system and store the historical data in the data table corresponding to the to-be-rolled-back data. The date rollback module 205 is configured to update the date of the bank general ledger system to the data rollback date.
[0047] The present application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the data rollback method implemented by the processor when executing the program.
[0048] From the above technical solutions can be known, the application provides a kind of data rollback method, system and electronic equipment, data method includes: in response to the data rollback instruction of user input, obtain to be rolled back data, data rollback instruction includes data rollback date;Obtain the parameter type of to be rolled back data, and according to parameter type matching the processing flow of to be rolled back data;According to processing flow, generate the historical data of to be rolled back data;Delete to be rolled back data in bank general ledger system, and historical data is stored to the data table corresponding to to be rolled back data;The date of bank general ledger system is updated as data rollback date.
[0049] The application aims at optimizing error handling and date rollback operation under the condition of data error in system, by obtaining the parameter type of to be rolled back data, matching corresponding rollback processing flow, for backup cleaning class data, using its daily backup mechanism, quickly locate to backup table from preset parameter configuration table, and then generate accurate backup query statement to obtain historical data, ensure the integrity and accuracy of data, and for over-the-counter class data, according to its over-the-counter state, differential treatment is carried out, unover-the-counter data is directly deleted, over-the-counter data is generated historical data through reverse over-the-counter operation, effectively avoid the problem of data inconsistency, improve the data processing convenience and flexibility of general ledger system.
[0050] The above is only the preferred embodiment of the application, and is not used to limit the application, for those skilled in the art, the application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A data rollback method, characterized in that, Applied to bank general ledger systems, including: In response to a user-inputted data rollback command, the system retrieves the data to be rolled back, wherein the data rollback command includes the data rollback date. Obtain the parameter type of the data to be rolled back, and match the processing flow of the data to be rolled back according to the parameter type; Historical data of the data to be rolled back is generated according to the processing flow; Delete the data to be rolled back from the bank general ledger system and store the historical data in the data table corresponding to the data to be rolled back; Update the date in the bank's general ledger system to the data rollback date.
2. The data rollback method according to claim 1, characterized in that, The parameter types of the data to be rolled back include backup cleanup type and posting type; The backup cleanup data corresponding to the backup cleanup class has a daily backup mechanism, and the backup cleanup data is stored in the backup table. The posting data corresponding to the posting class does not have the daily backup mechanism, and the posting data is used to represent the balance accumulation.
3. The data rollback method according to claim 2, characterized in that, Before obtaining the data to be rolled back, the following is also included: Obtain the business data to be backed up for the day from the bank's general ledger system; Obtain the name of the business table where the business data is located; The business data is stored in the backup table, and the backup time is marked on the backup table. Establish a backup association relationship between the business table name, the backup table, and the backup time, and store the backup association relationship in a preset parameter configuration table.
4. The data rollback method according to claim 2, characterized in that, Before obtaining the data to be rolled back, the following is also included: Obtain the posting data and posting time for the current day from the bank's general ledger system; Obtain the posting table name and posting operation of the posting data; Establish the posting association relationship between the posting table name, the posting operation, and the posting time, and store the posting association relationship in a preset parameter configuration table.
5. The data rollback method according to claim 2, characterized in that, The historical data for generating the data to be rolled back according to the processing flow includes: If the data to be rolled back is the backup cleanup data, obtain the business table name corresponding to the backup cleanup data; Using the data rollback date and the business table name as query conditions, query the backup table corresponding to the data to be rolled back from the preset parameter configuration table; Generate a backup query statement based on the backup table and the data rollback date; The historical data of the data to be rolled back is retrieved according to the backup query statement.
6. The data rollback method according to claim 2, characterized in that, The historical data for generating the data to be rolled back according to the processing flow includes: If the data to be rolled back is the posting data, obtain the posting status corresponding to the posting data, and the posting status includes a posted status and an unposted status; If the posting data is in an unposted state, delete the posting data.
7. The data rollback method according to claim 6, characterized in that, Also includes: If the posting data is in a posted state, obtain the posting table name corresponding to the posting data; Using the data rollback date and the posting table name as query conditions, query the posting operation corresponding to the data to be rolled back from the preset parameter configuration table; Based on the posting operation, a reverse posting operation is performed on the data to be rolled back to obtain reverse posting data; The reverse posting data is used as historical data for the data to be rolled back.
8. The data rollback method according to claim 1, characterized in that, Before deleting the data to be rolled back from the target database, the process also includes: Query the downstream modules of the data to be rolled back, where the downstream modules are business modules that rely on the data to be rolled back for subsequent processing; Delete the processing information related to the data to be rolled back in the downstream module.
9. A data rollback system for executing the data rollback method as described in any one of claims 1 to 8, characterized in that, include: The data acquisition module is configured to: in response to a user-inputted data rollback command, acquire the data to be rolled back, wherein the data rollback command includes the data rollback date; The process matching module is configured to: obtain the parameter type of the data to be rolled back, and match the processing flow of the data to be rolled back according to the parameter type; The data rollback module is configured to generate historical data of the data to be rolled back according to the processing flow. The data storage module is configured to: delete the data to be rolled back from the bank general ledger system and store the historical data in the data table corresponding to the data to be rolled back; The date rollback module is configured to update the date in the bank's general ledger system to the data rollback date.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the data rollback method as described in any one of claims 1 to 8.