Update Method, Device, Electronic Device and Storage Medium for Transaction Record Information

By receiving transaction rollback requests under a distributed architecture, obtaining and updating transaction record information, the problem of account balance replenishment and account conversion is solved, and accurate interest calculation is achieved.

CN114595039BActive Publication Date: 2025-06-10AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210215730.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2025-06-10
Estimated Expiration
2042-03-07

AI Technical Summary

Technical Problem

The existing technology cannot update user information in a timely manner under a distributed architecture, resulting in inaccurate account balance replenishment and inaccurate conversion of normal accounts to sleep accounts, which affects interest calculation.

Method used

By receiving the information rollback request of the target transaction, the rollback association information and the associated transaction record information are obtained, the information to be detected is determined, and the associated transaction record information is updated based on the information to be detected and the rollback association information is updated.

Benefits of technology

Accurate updates of related transaction record information are achieved, ensuring that normal accounts can be accurately converted into sleeping accounts and the interest is accurately calculated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595039B_ABST
    Figure CN114595039B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for updating transaction record information. Among them, the method includes: when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information; determining information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and transaction number information and transaction cost information corresponding to the transaction time information. The above technical solution solves technical problems such as the inability to update associated transaction record information, the inability to accurately transfer a normal account to a dormant account, and the inability to accurately calculate interest, and achieves the technical effect of accurately transferring a normal account to a dormant account and accurately calculating interest.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a method, apparatus, electronic device, and storage medium for updating transaction record information. Background Art

[0002] With the continuous growth of banking business, the traditional centralized architecture is constantly challenged by the business volume, and more and more banks adopt a distributed architecture to implement various banking services.

[0003] When implementing various banking services using a distributed architecture, due to the limitations of the distributed architecture on services, it is impossible to obtain the information of users under each distributed architecture in a timely manner, resulting in the failure of some services. Existing technical solutions will replenish the account balance according to the failed services.

[0004] Existing technical solutions can only achieve the accuracy of the account balance, but cannot achieve the accuracy of the account transaction records. For example, the conversion of a normal account to a dormant account is generally based on the last transaction date. Existing technologies only replenish the balance and cannot update the last transaction date, so it is impossible to accurately convert a normal account to a dormant account. There are also transactions such as calculating interest based on the last transaction date, which cannot be solved by existing technologies. Summary of the Invention

[0005] The present invention provides a method, apparatus, electronic device, and storage medium for updating transaction record information to solve technical problems such as the inability to accurately convert a normal account to a dormant account and the inability to accurately calculate interest.

[0006] According to one aspect of the present invention, there is provided a method for updating transaction record information, the method comprising:

[0007] When receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback associated information corresponding to the target transaction and associated transaction record information corresponding to the rollback associated information;

[0008] Determining the information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback associated information, wherein the information to be detected includes transaction time information, and transaction count information and transaction cost information corresponding to the transaction time information.

[0009] According to another aspect of the present invention, there is provided an apparatus for updating transaction record information, the apparatus for updating transaction record information comprising:

[0010] A rollback request receiving module, configured to, when receiving an information rollback request for a target transaction provided for a target operation object, obtain rollback associated information corresponding to the target transaction and associated transaction record information corresponding to the rollback associated information;

[0011] An associated transaction record information update module, configured to determine the information to be detected in the associated transaction record information, and update the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and transaction count information and transaction cost information corresponding to the transaction time information.

[0012] According to another aspect of the present invention, there is provided an electronic device, which includes:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; where

[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for updating transaction record information according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the method for updating transaction record information according to any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention solves the technical problems such as the inability to update the associated transaction record information, the inability to accurately transfer a normal account to a dormant account, and the inability to accurately calculate interest by obtaining the rollback association information corresponding to the target transaction and the associated transaction record information corresponding to the rollback association information, determining the information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback association information, and achieves the beneficial effect of accurately and effectively updating the associated transaction record information according to the information to be detected and the rollback association information, so that a normal account can be accurately transferred to a dormant account and interest can be accurately calculated.

[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0020] Figure 1 is a flowchart of a method for updating transaction record information provided in Embodiment 1 of the present invention;

[0021] Figure 2 is a flowchart of a method for updating transaction record information provided in Embodiment 2 of the present invention;

[0022] Figure 3 is a schematic flowchart of a method for updating transaction record information provided in Embodiment 2 of the present invention;

[0023] Figure 4 is a schematic flowchart of a method for updating transaction record information provided in Embodiment 2 of the present invention;

[0024] Figure 5 is a schematic flowchart of a method for updating transaction record information provided in Embodiment 2 of the present invention;

[0025] Figure 6 is a schematic structural diagram of an apparatus for updating transaction record information provided in Embodiment 3 of the present invention;

[0026] Figure 7 is a schematic structural diagram of an electronic device for implementing the method for updating transaction record information of the embodiments of the present invention. Detailed implementation manners

[0027] In order to enable those skilled in the art of the present technology to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0029] Embodiment 1

[0030] Figure 1 The figure is a flowchart of a method for updating transaction record information provided by Embodiment 1 of the present invention. This embodiment is applicable to situations where transaction record information needs to be updated, especially in the financial field for updating account records. This method can be executed by a transaction record information update device, which can be implemented in the form of hardware and / or software, and can be configured in a terminal and / or a server. As Figure 1 shown, the method includes:

[0031] S110. When receiving an information rollback request for a target transaction provided for a target operation object, obtain rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information.

[0032] Among them, the target operation object can be an object that needs to update transaction record information, such as a bank account. Some bank accounts need to update account records, and these bank accounts can be used as target operation objects. In this application, the update of bank account records is taken as an example to illustrate the technical solution of the embodiments of the present invention.

[0033] Among them, the target transaction can be a transaction to be rolled back, such as a warehousing transaction, a transfer transaction, a lending transaction, or a pledge financing transaction, etc. For the convenience of understanding, in the embodiments of the present invention, the update of account records in the financial field is taken as an example to introduce the technical solution of the embodiments of the present invention.

[0034] Among them, the information rollback request can be a request to roll back a target transaction, such as a request to roll back a transfer transaction, a request to roll back a lending transaction, or a request to roll back a target transaction such as a pledge financing transaction, etc.

[0035] Among them, the rollback association information can be information for rolling back a target transaction. For example, when rolling back a transfer transaction, the rollback association information can be a transfer record.

[0036] Among them, the associated transaction record information can be the transaction record information of the target operation object corresponding to the rollback association information. For example, it can be balance master file information, and the balance master file information can include information such as the current posting date corresponding to the rollback association information, the number of posting transactions on the current posting date, and the balance on the current posting date.

[0037] When receiving an information rollback request for a target transaction provided for a target operation object, obtain rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information. Taking the rollback of a transfer transaction with a bank account as an example, it can be understood that when receiving an information rollback request for a transfer transaction provided for a bank account, according to the transfer transaction ID in the information rollback request, obtain the transfer record information corresponding to the transfer transaction, and the balance master file information corresponding to the transfer record information, where the balance master file information includes information such as the current posting date, the number of posting transactions on the current posting date, and the balance on the current posting date corresponding to the rollback association information.

[0038] Optionally, based on any optional technical solution in the embodiments of the present invention, before the step of, when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information, further includes:

[0039] When receiving a transaction request initiated for a transaction providing object, determine whether the transaction providing object is a target operation object according to a transaction operation configuration item pre-stored in a target cache; where the target cache is Springcache;

[0040] If so, execute the step of, when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information.

[0041] Wherein, the transaction providing object may be an object that needs to update transaction record information, such as a bank account. Some bank accounts need to update account records, and these bank accounts can be used as target operation objects. Some bank accounts do not need to update account records, and these bank accounts can be used as non-target operation objects.

[0042] Wherein, the transaction request is a rollback transaction request for a transaction providing object, such as a transfer rollback transaction request, a loan rollback transaction request, a pledge financing rollback transaction request, and other transaction requests.

[0043] Wherein, the target cache may be a cache capable of storing transaction providing objects, and it can be determined whether the transaction providing object is a target operation object through the target cache.

[0044] Wherein, the transaction operation configuration item may be a configuration item indicating whether the transaction providing object is a target operation object. Through the value of the transaction operation configuration, it can be determined whether the transaction providing object is a target operation object.

[0045] Among them, when a transaction request is received for a transaction providing object, it is determined whether the transaction providing object is a target operation object according to the transaction operation configuration items pre-stored in the target cache. It may be that when a transaction request is received for a transaction providing object, according to the value of the transaction operation configuration items pre-stored in the target cache, it is determined whether the transaction providing object is a target operation object. For example, when the value of the transaction operation configuration item is 1, it indicates that the transaction providing object is a target operation object, and when the value of the transaction operation configuration item is 0, it indicates that the transaction providing object is not a target operation object.

[0046] Optionally, based on any optional technical solution in the embodiments of the present invention, the obtaining the rollback association information corresponding to the target transaction and the associated transaction record information corresponding to the rollback association information includes:

[0047] Obtain the rollback association information corresponding to the target transaction, determine the target transaction occurrence time of the target transaction according to the rollback association information, and determine the associated transaction record information corresponding to the rollback association information according to the target transaction occurrence time and the historical transaction occurrence time in the historical transaction record information; or,

[0048] Obtain the associated transaction record information corresponding to the rollback association information according to the transaction identification information of the target transaction.

[0049] Among them, the target transaction occurrence time may represent the generation time information of the target transaction, and the target transaction occurrence time may be accurate to seconds or milliseconds.

[0050] Among them, the historical transaction record information may be the transaction record information of the target operation object. For example, it may be the balance master file information corresponding to several posting dates. The balance master file information may include information such as the current posting date corresponding to the rollback association information, the number of posting transactions on the current posting date, and the balance on the current posting date. The historical transaction record information contains several associated transaction record information.

[0051] Among them, the determining the target transaction occurrence time of the target transaction according to the rollback association information, and determining the associated transaction record information corresponding to the rollback association information according to the target transaction occurrence time and the historical transaction occurrence time in the historical transaction record information can be understood as determining the target transaction occurrence time of the target transaction according to the rollback association information. Among them, the target transaction occurrence time can take the date as the scale for subsequent judgment time, and then find the associated transaction record information corresponding to the historical transaction occurrence time with the same date as the target transaction occurrence time in the historical transaction record information. This associated transaction record information is the associated transaction record information corresponding to the rollback association information.

[0052] Among them, the transaction identification information may be identification information capable of identifying the target transaction. According to the transaction identification information of the target transaction, the associated transaction record information corresponding to the target transaction can be found by looking up a table, that is, the associated transaction record information corresponding to the rollback association information is obtained according to the transaction identification information of the target transaction and the table of associated transaction record information corresponding to the transaction identification information.

[0053] Optionally, based on any optional technical solution in the embodiments of the present invention, the rollback association information is obtained by accessing the @component annotation in the spring framework. The advantage of this setting is that it is convenient for later maintenance and modification of the rollback association information.

[0054] S120. Determine the information to be detected in the associated transaction record information, and update the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and the transaction number information and transaction cost information corresponding to the transaction time information.

[0055] Among them, the information to be detected may be information that needs to be detected for updating the transaction record information, such as field information that needs to be detected, including transaction time information, and the transaction number information and transaction cost information corresponding to the transaction time information; among them, the transaction time information may be a time record of providing the transaction, representing the time node information of the transaction, such as the current posting date; among them, the transaction number information may be the number of times the transaction occurs under certain conditions, such as the number of posting transactions corresponding to the current posting date; among them, the transaction cost information may be the price information after the transaction is completed, such as the balance of the previous posting date and other information.

[0056] Taking the rollback of a transfer transaction for a bank account as an example, the target operation object is bank account a. On February 27, a transfer transaction occurred, where account a transferred c yuan to account b. After the transfer, due to certain reasons, such as under a distributed framework, account b was frozen, etc., this transfer needed to be rolled back. Among them, the rollback associated information is: "Account a transferred c yuan to account b". In the information to be detected, the transaction time information is February 27, the transaction count information is 2 times, and the transaction cost information is 1000 yuan. Then, according to the information to be detected and the rollback associated information, the associated transaction record information is updated. Specifically, the transaction count information is decreased by 1. If it is greater than 0, it indicates that there are also transaction records on the date of the transaction time information. At this time, the transaction time information remains unchanged, and the transaction cost information is increased by c yuan, becoming 1000 + c yuan. If the transaction count information becomes 0 after being decreased by 1, the backup transaction record information is updated to the associated transaction record information, where the backup transaction record information includes the transaction time information, the transaction count information corresponding to the transaction time information, and the transaction cost information, and the backup transaction record information is the transaction record information corresponding to the previous transaction time information.

[0057] The technical solution of this embodiment, by obtaining the rollback associated information corresponding to the target transaction and the associated transaction record information corresponding to the rollback associated information, determining the information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback associated information, solves the technical problems such as the inability to update the associated transaction record information, the inability to accurately transfer a normal account to a dormant account, and the inability to accurately calculate interest, and achieves the technical effect of accurately and effectively updating the associated transaction record information according to the information to be detected and the rollback associated information, enabling a normal account to be accurately transferred to a dormant account and accurately calculating interest.

[0058] Embodiment 2

[0059] Figure 2 It is a flowchart of a method for updating transaction record information provided by Embodiment 2 of the present invention. On the basis of any optional technical solution in the embodiments of the present invention, optionally, the updating the associated transaction record information according to the information to be detected and the rollback associated information includes: updating the transaction count information corresponding to the transaction time information, and updating the associated transaction record information according to the updated transaction count.

[0060] As Figure 2 shown, the method of this embodiment may specifically include:

[0061] S210. When receiving an information rollback request for a target transaction provided for a target operation object, obtain the rollback associated information corresponding to the target transaction and the associated transaction record information corresponding to the rollback associated information.

[0062] S220. Determine the information to be detected in the associated transaction record information, update the transaction count information corresponding to the transaction time information, and update the associated transaction record information according to the updated transaction count.

[0063] Among them, updating the transaction count information corresponding to the transaction time information and updating the associated transaction record information according to the updated transaction count can be understood as subtracting 1 from the value of the transaction count information corresponding to the transaction time information as the transaction count information corresponding to the updated transaction time information.

[0064] Optionally, based on any optional technical solution in the embodiments of the present invention, updating the associated transaction record information according to the updated transaction count includes:

[0065] If it is detected that the count value corresponding to the updated transaction count information is equal to 0, update the backup transaction record information corresponding to the associated transaction record information to the associated transaction record information, where the transaction time information in the backup transaction record information is earlier than the transaction time information in the associated transaction record information and is closest to the transaction time information in the associated transaction record information.

[0066] For example, the transaction time information is February 27th, the transaction count information is 2 times, and the transaction cost information is 1000 yuan; the transaction time information is February 28th, the transaction count information is 1 time, and the transaction cost information is 1100 yuan. Update the associated transaction record information corresponding to the transaction time information of February 28th, then subtract 1 from the value of the transaction count information corresponding to the transaction time information of February 28th, which is 0, and use the backup transaction record information as the associated transaction record information, that is, the associated transaction record information corresponding to the previous transaction time information as the associated transaction record information. At this time, the associated transaction record information is: the transaction time information is February 27th, the transaction count information is 2 times, and the transaction cost information is 1000 yuan.

[0067] Optionally, based on any optional technical solution in the embodiments of the present invention, updating the associated transaction record information according to the updated transaction count includes:

[0068] If it is detected that the count value corresponding to the updated transaction count information is greater than 0, determine the rollback transaction cost of the target transaction according to the rollback association information, and update the transaction cost information corresponding to the associated transaction record information according to the rollback transaction cost.

[0069] Among them, the rollback transaction cost can be the cost value for rolling back the target transaction provided to the target operation object. For example, after rolling back the transaction cost information corresponding to the associated transaction record information, the rollback transaction cost needs to be added.

[0070] Among them, the rollback transaction cost of the target transaction is determined according to the rollback association information, and the transaction cost information corresponding to the associated transaction record information is updated according to the rollback transaction cost. It can be understood that, for example, the target operation object is bank account a, and a transfer transaction occurs on February 27. Account a transfers 100 yuan to account b. After the transfer, due to certain reasons, such as the freezing of account b in a distributed framework, this transfer needs to be rolled back. Among them, the rollback association information is: "Account a transfers 100 yuan to account b". The transaction time information in the information to be detected is February 27, the transaction number information is 2 times, and the transaction cost information is 1000 yuan. Then, the transaction number information corresponding to the transaction time information is updated, that is, the transaction number information 2 times corresponding to the transaction time information of February 27 is decreased by 1. The updated transaction number information corresponding to the transaction time information of February 27 is 1 time. And the rollback transaction cost of the target transaction is determined according to the rollback association information. The transfer amount of 100 yuan in the rollback association information is from account a to account b. Therefore, after the rollback, the transaction cost information should be increased by 100 yuan so as to restore the transaction cost information before account a transfers 100 yuan to account b. According to the transfer amount of 100 yuan in the rollback association information, which is from account a to account b, the rollback transaction cost is determined to be +100 yuan. The transaction cost information corresponding to the associated transaction record information is updated according to the rollback transaction cost, that is, the transaction cost information of 1000 yuan is added with the rollback transaction cost of +100 yuan. That is, the updated transaction cost information corresponding to the transaction time information of February 27 is 1100 yuan, and the updated transaction number information corresponding to the transaction time information of February 27 is 1 time.

[0071] If the value of the updated transaction count information is not 0, keep the transaction time information unchanged, and determine the transaction cost information corresponding to the transaction time information according to the rollback association information. For example, the target operation object is bank account a, and a transfer transaction occurs on February 27. Account a transfers 100 yuan to account b. After the transfer, due to certain reasons, such as in a distributed framework, account b is frozen, etc., this transfer needs to be rolled back. Among them, the rollback association information is: "Account a transfers 100 yuan to account b". The transaction time information in the information to be detected is February 27, the transaction count information is 2 times, and the transaction cost information is 1000 yuan. Then update the transaction count information corresponding to the transaction time information, that is, subtract 1 from the transaction count information 2 times corresponding to the transaction time information of February 27. The updated transaction count information corresponding to the transaction time information of February 27 is 1 time, and determine the transaction cost information corresponding to the transaction time information according to the rollback association information, that is, add the transfer amount of 100 yuan in the rollback association information to the transaction cost information of 1000 yuan. That is, the updated transaction cost information corresponding to the transaction time information of February 27 is 1100 yuan, and the updated transaction count information corresponding to the transaction time information of February 27 is 1 time.

[0072] The technical solution of this embodiment solves the technical problem of how to accurately and quickly determine the updated associated transaction record by updating the transaction count information corresponding to the transaction time information and updating the associated transaction record information according to the updated transaction count. That is, by updating the transaction count information and then judging the transaction count information to update the associated transaction record information, the technical effect of quickly and accurately determining the updated associated transaction record information according to the transaction count information is achieved.

[0073] As Figure 3 shown, it is a schematic flowchart of a method for updating transaction record information according to an embodiment of the present invention. As Figure 3As shown, receive an information rollback request, obtain rollback associated information, determine the target transaction date according to the target transaction occurrence time information in the rollback associated information, and find the associated transaction record information whose transaction time information date is the target transaction date from the historical transaction record information. For example, the historical transaction record information includes fields such as the last posting date, the number of posting transactions on the last posting date, and the balance. For example, there are four records: February 27, 2022, 1,1000; February 25, 2022, 1,900; February 23, 2022, 1,800; and February 20, 2022, 1,500. Among them, the last posting date, the number of posting transactions on the last posting date, and the balance correspond to the transaction time information, the transaction number information, and the transaction cost information respectively. Determine the target transaction date according to the target transaction occurrence time information in the rollback associated information. If the target transaction occurrence time in the rollback associated information is 23:59:59 on February 25, 2022, the target transaction date is determined to be February 25, 2022. Find the associated transaction record information whose transaction time information date is the target transaction date from the historical transaction record information, that is, find the associated transaction record information as February 25, 2022, 1,900; then subtract 1 from the transaction number information corresponding to the transaction time information, that is, subtract 1 from the 1 time corresponding to February 25, 2022, to get 0. At this time, update the backup transaction record information to the associated transaction record information. The backup transaction record information is the associated transaction record information corresponding to the previous transaction time information. For example, a transaction record occurred on February 23, 2022, and the first transaction record occurred on February 25, 2022. At this time, back up the associated transaction record information corresponding to February 23, 2022. The backup transaction record information can be: February 23, 2022, 1,800. Update the backup transaction record information to the associated transaction record information. The updated associated transaction record information is February 23, 2022, 1,800. At the same time, move the records before February 23, 2022 in the historical transaction record information forward by one record position. For example, the updated historical transaction record information is February 27, 2022, 1,1000; February 23, 2022, 1,800; and February 20, 2022, 1,500, a total of three records.

[0074] If subtracting 1 from the transaction number information corresponding to the transaction time information is not 0, do not update the backup transaction record information to the associated transaction record information. Only subtract 1 from the transaction number information corresponding to the transaction time information, and determine the rollback transaction cost according to the rollback associated information, so as to update the transaction cost information corresponding to the transaction time information.

[0075] Through the above method, fields such as the last transaction date, the number of transactions on the last transaction date, and the balance can be accurately updated. Since the conversion of a normal account to a dormant account generally depends on the last transaction date, and the prior art does not update the last transaction date, it is impossible to accurately convert a normal account to a dormant account. The above technical solution can solve the accuracy of operations such as converting a normal account to a dormant account and interest calculation and other problems.

[0076] Such as Figure 4As shown in the figure, it is a schematic flowchart of a method for updating transaction record information according to an embodiment of the present invention. In this embodiment, the technical solution of the present invention is introduced by taking the update of account records in the financial field as an example. Among them, the balance master file represents the associated service record information, the accounting request information represents the rollback associated information, and the scenario information such as the current accounting date represents the accounting scenario information of the rollback transaction record. The scenario information such as the current accounting date may include information such as the accounting date, teller, device, and request log number or serial number. First, the balance master file is input, representing an update operation on the balance master file. Then, the accounting request information is input, and the scenario information such as the current accounting date is obtained. It is judged whether it is the last posting date according to the accounting date information in the accounting request information. If it is the last posting date, the number of posting transactions on the last posting date is decreased by 1. If it is 0, it means that there are no more posting transactions on the last posting date, and the penultimate posting date needs to be used as the last posting date, and the number of posting transactions on the penultimate posting date is used as the number of posting transactions on the last posting date. And the backed-up penultimate posting date, the backed-up number of posting transactions on the penultimate posting date, and the backed-up balance on the penultimate posting date are restored to the penultimate posting date, the number of posting transactions on the penultimate posting date, and the balance on the penultimate posting date. If the number of posting transactions on the last posting date is not 0, it means that there are still posting records on the last posting date, and only the number of posting transactions on the last posting date is decreased by 1, and then the balance is updated. If the accounting date in the accounting request information is not the last posting date, it means that the record to be rolled back this time is the record of the penultimate posting date. At this time, the number of posting transactions on the penultimate posting date is decreased by 1. If it is 0, it means that there are no more posting transactions on the penultimate posting date, and the backed-up penultimate posting date needs to be used as the penultimate posting date, and the backed-up number of posting transactions on the penultimate posting date is used as the number of posting transactions on the penultimate posting date. And the backed-up balance on the penultimate posting date is used as the balance on the penultimate posting date. If the number of posting transactions on the penultimate posting date is not 0, it means that there are still posting records on the penultimate posting date, and only the number of posting transactions on the penultimate posting date is decreased by 1, and then the balance on the penultimate posting date is updated.It should also be noted that for the above operations, after restoring the backup penultimate posting date, the number of posting transactions on the backup penultimate posting date, and the balance on the backup penultimate posting date to the penultimate posting date, the number of posting transactions on the penultimate posting date, and the balance on the penultimate posting date, it is also necessary to restore the second backup penultimate posting date, the number of posting transactions on the second backup penultimate posting date, and the balance on the second backup penultimate posting date to the backup penultimate posting date, the number of posting transactions on the backup penultimate posting date, and the balance on the backup penultimate posting date. Among them, the backup information is related to the penultimate posting date information. That is, after the day cut, if there are transaction records generated on the new posting date, then the backup penultimate posting date, the number of posting transactions on the backup penultimate posting date, and the balance on the backup penultimate posting date are used as the second backup penultimate posting date, the number of posting transactions on the second backup penultimate posting date, and the balance on the second backup penultimate posting date, and the penultimate posting date, the number of posting transactions on the penultimate posting date, and the balance on the penultimate posting date are used as the backup penultimate posting date, the number of posting transactions on the backup penultimate posting date, and the balance on the backup penultimate posting date. The last posting date, the number of posting transactions on the last posting date, and the balance are used as the penultimate posting date, the number of posting transactions on the penultimate posting date, and the balance on the penultimate posting date. The new posting date is used as the last posting date, the number of posting transactions on the last posting date is 1, and the balance is updated, as follows. Figure 5 As described above, it is necessary to determine whether the input accounting request information is the first one on the current accounting day. If it is the first one, then perform the above operations, that is, the last becomes the penultimate, the penultimate becomes the backup, and the backup becomes the second backup. If it is not the first one, then add 1 to the number of posting transactions on the last posting date and update the balance.

[0077] In the embodiment of the present invention, by introducing the number of posting transactions on the same day, the problem of leaving a record of financial information such as the last posting date of the account balance in the case of rollback of long-term live transactions in the bank system in the SAGA mode in a distributed environment is well solved, and the transaction consistency is improved. Since the embodiment of the present invention is provided to various product applications in the form of program components, the transformation scale of each product line is reduced, and the repetitive development work of each application for account balance business processing is reduced. The present invention provides good scalability as a template base class for various product applications, and product applications can calculate points, product numbers, etc. when updating the balance.

[0078] Embodiment III

[0079] Figure 6 FIG. 12 is a schematic structural diagram of an update device for transaction record information provided in Embodiment III of the present invention. The update device for transaction record information provided in this embodiment can be implemented by software and / or hardware, and can be configured in a terminal and / or a server to implement the method for maintaining an electric vehicle replacement device in the embodiment of the present invention. The device may specifically include: a rollback request receiving module 310 and an associated transaction record information update module 320.

[0080] Among them, the rollback request receiving module 310 is configured to, when receiving an information rollback request for a target transaction provided for a target operation object, obtain rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information; the associated transaction record information updating module 320 is configured to determine information to be detected in the associated transaction record information, and update the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and transaction number information and transaction cost information corresponding to the transaction time information.

[0081] The technical solution of this embodiment solves the technical problems such as the inability to update the associated transaction record information, the inability to accurately transfer a normal account to a dormant account, and the inability to accurately calculate interest by obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information, determining information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback association information, and achieves the technical effect of accurately and effectively updating the associated transaction record information according to the information to be detected and the rollback association information, so that a normal account can be accurately transferred to a dormant account and interest can be accurately calculated.

[0082] Based on any optional technical solution in the embodiment of the present invention, optionally, the associated transaction record information updating module 320 may include an associated transaction record information updating unit configured to update the transaction number information corresponding to the transaction time information, and update the associated transaction record information according to the updated transaction number.

[0083] Based on any optional technical solution in the embodiment of the present invention, optionally, the associated transaction record information updating unit may be configured to: if it is detected that the number value corresponding to the updated transaction number information is equal to 0, update the backup transaction record information corresponding to the associated transaction record information to the associated transaction record information, where the transaction time information in the backup transaction record information is earlier than the transaction time information in the associated transaction record information and is closest to the transaction time information in the associated transaction record information.

[0084] Based on any optional technical solution in the embodiment of the present invention, optionally, the associated transaction record information updating unit may be configured to:

[0085] If it is detected that the number value corresponding to the updated transaction number information is greater than 0, determine the rollback transaction cost of the target transaction according to the rollback association information, and update the transaction cost information corresponding to the associated transaction record information according to the rollback transaction cost.

[0086] Based on any optional technical solution in the embodiments of the present invention, optionally, the updating device for transaction record information further includes:

[0087] A target operation object determination module, configured to, before receiving a request for rolling back information of a target transaction provided for a target operation object and obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information, when receiving a transaction request initiated for a transaction providing object, determine whether the transaction providing object is a target operation object according to a transaction operation configuration item pre-stored in a target cache; where the target cache is a Spring cache; if so, execute obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information when receiving a request for rolling back information of a target transaction provided for the target operation object.

[0088] Based on any optional technical solution in the embodiments of the present invention, optionally, the rollback request receiving module 310 may be configured to obtain rollback association information corresponding to the target transaction, determine a target transaction occurrence time of the target transaction according to the rollback association information, and determine associated transaction record information corresponding to the rollback association information according to the target transaction occurrence time and a historical transaction occurrence time in historical transaction record information; or obtain associated transaction record information corresponding to the rollback association information according to transaction identification information of the target transaction.

[0089] Based on any optional technical solution in the embodiments of the present invention, optionally, the rollback association information is obtained by accessing the @component annotation in the spring framework.

[0090] The updating device for transaction record information provided by the embodiments of the present invention can execute the method for updating transaction record information provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to executing the method for updating transaction record information.

[0091] Embodiment 4

[0092] Figure 7 FIG. is a schematic structural diagram of an electronic device provided for Embodiment 4 of the present invention. As Figure 7 shown, the electronic device includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the device may be one or more, Figure 7 taking one processor 410 as an example; the processor 410, the memory 420, the input device 430, and the output device 440 in the device may be connected by a bus or other means, Figure 7 taking connection by a bus as an example.

[0093] The memory 420, being a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the update method of transaction record information in the embodiments of the present invention. The processor 410 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 420.

[0094] The memory 420 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory 420 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 420 may further include a memory remotely set relative to the processor 410, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0095] The input device 430 can be used to receive input digital or character information and generate signal inputs related to the user settings and function controls of the device. The output device 440 may include a display device such as a display screen.

[0096] Embodiment Five

[0097] Embodiment Five of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the update method of transaction record information when executed by a computer processor. The method includes: when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information; determining the information to be detected in the associated transaction record information, and updating the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and transaction count information and transaction cost information corresponding to the transaction time information.

[0098] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable media may be computer-readable signal media or computer-readable storage media. The computer-readable storage media may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage media may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0099] The computer-readable signal media may include data signals propagated in a baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal media may also be any computer-readable media other than the computer-readable storage media, and the computer-readable media can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0100] The program code contained on the computer-readable media can be transmitted by any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0101] The computer program code for performing the operations of the embodiments of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0102] Note that the above is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for updating transaction record information, characterized in that, it includes: When receiving an information rollback request for a target transaction provided for a target operation object, obtain rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information; Determine the information to be detected in the associated transaction record information, and update the associated transaction record information according to the information to be detected and the rollback association information, where the information to be detected includes transaction time information, and transaction count information and transaction cost information corresponding to the transaction time information; The updating the associated transaction record information according to the information to be detected and the rollback association information includes: Updating the transaction count information corresponding to the transaction time information, and updating the associated transaction record information according to the updated transaction count; The updating the associated transaction record information according to the updated transaction count includes: If it is detected that the count value corresponding to the updated transaction count information is equal to 0, update the backup transaction record information corresponding to the associated transaction record information to the associated transaction record information, where the transaction time information in the backup transaction record information is earlier than the transaction time information in the associated transaction record information and is closest to the transaction time information in the associated transaction record information; If it is detected that the count value corresponding to the updated transaction count information is greater than 0, the transaction time information remains unchanged, determine the rollback transaction cost of the target transaction according to the rollback association information, and update the transaction cost information corresponding to the associated transaction record information according to the rollback transaction cost.

2. The method according to claim 1, characterized in that, Before the step of when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information, it further includes: When receiving a transaction request initiated for a transaction providing object, determine whether the transaction providing object is a target operation object according to a transaction operation configuration item pre-stored in a target cache; where the target cache is a Spring cache; If so, execute the step of when receiving an information rollback request for a target transaction provided for a target operation object, obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information.

3. The method according to claim 1, characterized in that, The obtaining rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information includes: Obtaining rollback association information corresponding to the target transaction, determining the target transaction occurrence time of the target transaction according to the rollback association information, and determining associated transaction record information corresponding to the rollback association information according to the target transaction occurrence time and the historical transaction occurrence time in the historical transaction record information; or, Obtaining associated transaction record information corresponding to the rollback association information according to the transaction identification information of the target transaction.

4. The method according to claim 1, wherein, the rollback association information is obtained by accessing the @component annotation in the spring framework.

5. An update device for transaction record information, wherein, it includes: a rollback request receiving module, configured to obtain rollback association information corresponding to the target transaction and associated transaction record information corresponding to the rollback association information when receiving an information rollback request for the target transaction provided for the target operation object; an associated transaction record information update module, configured to determine information to be detected in the associated transaction record information, and update the associated transaction record information according to the information to be detected and the rollback association information, wherein the information to be detected includes transaction time information, and transaction count information and transaction cost information corresponding to the transaction time information; the associated transaction record information update module includes an associated transaction record information update unit, configured to update the transaction count information corresponding to the transaction time information, and update the associated transaction record information according to the updated transaction count; the associated transaction record information update unit is configured to, if it is detected that the count value corresponding to the updated transaction count information is equal to 0, update the backup transaction record information corresponding to the associated transaction record information to the associated transaction record information, wherein the transaction time information in the backup transaction record information is earlier than and closest to the transaction time information in the associated transaction record information; and is further configured to, if it is detected that the count value corresponding to the updated transaction count information is greater than 0, keep the transaction time information unchanged, determine the rollback transaction cost of the target transaction according to the rollback association information, and update the transaction cost information corresponding to the associated transaction record information according to the rollback transaction cost.

6. An electronic device, wherein, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the update method for transaction record information according to any one of claims 1-4.

7. A computer-readable storage medium, wherein, the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the update method for transaction record information according to any one of claims 1-4 when executed by a processor.

Citation Information

Patent Citations

  • Transaction rollback method based on data processing and related equipment

    CN110135851A

  • Transaction rollback method and apparatus, database, system, and computer storage medium

    WO2021012868A1