[go: up one dir, main page]

CN112035503B - Transaction data updating method and device - Google Patents

Transaction data updating method and device Download PDF

Info

Publication number
CN112035503B
CN112035503B CN202010978989.9A CN202010978989A CN112035503B CN 112035503 B CN112035503 B CN 112035503B CN 202010978989 A CN202010978989 A CN 202010978989A CN 112035503 B CN112035503 B CN 112035503B
Authority
CN
China
Prior art keywords
transaction
information table
information
amount
running water
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010978989.9A
Other languages
Chinese (zh)
Other versions
CN112035503A (en
Inventor
邓惠月
韩天阳
李国威
叶蓉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010978989.9A priority Critical patent/CN112035503B/en
Publication of CN112035503A publication Critical patent/CN112035503A/en
Application granted granted Critical
Publication of CN112035503B publication Critical patent/CN112035503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a transaction data updating method and device, wherein the method comprises the following steps: after the online transaction, inquiring a first transaction information table, judging that the transaction is effective transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is effective transaction; scanning out a plurality of pieces of transaction flow information with the last modified state being the first state in the transaction flow information table at intervals of a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information according to a preset ordering mode; according to the order of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, and the running water number of the transaction running water information is written into the last updated running water number in the amount information table. The application can solve the problem of update failure caused by optimistic lock in transaction data update transaction.

Description

Transaction data updating method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a transaction data updating method and apparatus.
Background
In a transaction involving running of records and updating of the amount, when updating the amount, a number of update failures due to optimistic locks often occur, in that, to ensure consistency, both the running records and the amount update are synchronized in one transaction. When the amount is updated, the optimistic lock (typically version) is used instead of the pessimistic lock (to directly lock the database) to resolve high concurrency conflicts. But this only applies to cases where there are fewer database "write" operations. Once the database is accessed frequently, resource conflict under multiple threads is caused by the optimistic lock, so that the database connection pool cannot be released, and only one success is allowed by multiple updates, so that the updating operation is continuously repeated. When the update fails, the consistency of the transaction will cause all operations to roll back. Meanwhile, there are also the following problems:
1. transaction performance is poor. When frequent database write operations are performed, the optimistic locks enable threads to be increased continuously, and frequently occupy a database connection pool and cannot be released, so that a large number of conflicts are caused, and updating operations are repeated in a large number, so that transaction performance is affected. 2. And (5) operating redundancy. In case of failure of the amount update, operations such as pipeline records under the same transaction can synchronously roll back and re-lift due to the consistency of the transaction, so that the redundancy of the whole operation is increased. 3. The usability is poor. If the database is encountered during the recording and the running of the line, the amount of money can not be updated all the time, so that the availability of the transaction is not high.
Disclosure of Invention
The embodiment of the application provides a transaction data updating method for solving the problem of updating failure caused by optimistic lock in transaction data updating transaction, comprising the following steps:
after the online transaction, inquiring a first transaction information table, judging that the transaction is effective transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is effective transaction;
scanning out a plurality of pieces of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into an amount information table;
according to the sequence of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
The embodiment of the application provides a transaction data updating device, which is used for solving the problem of updating failure caused by optimistic lock in transaction data updating transaction, and comprises the following steps:
the validity judging module is used for inquiring the first transaction information table after the online transaction occurs, judging that the transaction is valid transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is valid transaction;
the inquiry module is used for scanning out a plurality of transaction flow information with a first state of last modification in the transaction flow information list at intervals of a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into the amount information list;
the updating module is used for calling the amount updating transaction according to the sequence of the transaction running water information in the first list, updating the amount information table one by one, changing the last modified state of the transaction running water information in the transaction running water information table into a second state after each transaction running water information is updated successfully, writing the running water number of the transaction running water information into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
The embodiment of the application also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the transaction data updating method when executing the computer program.
The embodiment of the application also provides a computer readable storage medium, which stores a computer program for executing the transaction data updating method.
In the embodiment of the application, after the online transaction, a first transaction information table is queried to judge that the transaction is an effective transaction, and when the transaction is an effective transaction, transaction flow information of the transaction is written into the transaction flow information table; scanning out a plurality of pieces of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into an amount information table; according to the sequence of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table. In the process, the last modification state of transaction flow information is automatically and synchronously updated after the monetary amount information table is updated, so that the conflict between the transaction flow information and the transaction flow information is reduced, the consistency of the transaction is ensured, and the availability is improved; meanwhile, according to the order of transaction flow information in the first list, the transaction is updated by invoking the transaction amount, the transaction amount information table is updated one by one, asynchronous operation of the transaction is realized, update failure caused by optimistic lock is solved, throughput is reduced, and transaction performance is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of a transaction data updating method according to an embodiment of the application;
FIG. 2 is a detailed flow chart of a transaction data updating method according to an embodiment of the application;
FIG. 3 is a schematic diagram of a transaction data updating device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present application and their descriptions herein are for the purpose of explaining the present application, but are not to be construed as limiting the application.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are open-ended terms, meaning including, but not limited to. The description of the reference terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The order of steps involved in the embodiments is illustrative of the practice of the application, and is not limited and may be suitably modified as desired.
Fig. 1 is a flowchart of a transaction data updating method according to an embodiment of the present application, as shown in fig. 1, the method includes:
step 101, after online transaction, inquiring a first transaction information table, judging that the transaction is effective transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is effective transaction;
102, scanning out a plurality of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information in a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated in an amount information table;
step 103, according to the order of the transaction running water information in the first list, the amount updating transaction is called, the amount information table is updated one by one, after each transaction running water information is updated successfully, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
In the method provided by the embodiment of the application, the last modification state of transaction flow information is automatically and synchronously updated after the monetary amount information table is updated, so that the conflict between the monetary amount information table and the transaction flow information is reduced, the consistency of the transaction is ensured, and the availability is improved; meanwhile, according to the order of transaction flow information in the first list, the transaction is updated by invoking the transaction amount, the transaction amount information table is updated one by one, asynchronous operation of the transaction is realized, update failure caused by optimistic lock is solved, throughput is reduced, and transaction performance is improved.
In the implementation, the first transaction information table is a table filled with transaction data in advance and is used for inquiring and judging the validity of the online transaction, and before the online transaction does not occur, the transaction flow information table and the amount information table are empty tables.
In one embodiment, the first transaction information table includes a number, a transaction type, a status, a creation date, a control credit, and a control debit;
the transaction flow information list comprises bank codes, numbers, accounting dates, serial numbers, collection point types, collection point currencies, collection point change amounts, opponent occurrence amounts, types, business subclasses, provinces, final modification states and final modification dates;
the money amount information table comprises bank codes, numbers, collection point types, collection point currencies, accumulated credit amounts, accumulated debit amounts, money amounts, last modification states, last modification dates and last updated serial numbers.
Specific examples of the three tables are shown in tables 1 to 3.
TABLE 1 first transaction information Table
Numbering device Type(s) Status of Creation date Control credit Controlling debiting
Wherein,,
numbering: ID, serial number in order, can record how many transactions are altogether;
creation date: date of transaction creation;
type (2): the type of transaction;
status: "0-New, 5-active, 9-off";
control credit: the credit account number must be entered, space-not controlled, Y controls the credit;
control debiting: the debit account number must be entered, space-not controlled, Y controls debiting.
In one embodiment, querying a first transaction information table to determine that the transaction is a valid transaction includes:
inquiring a first transaction information table based on the number of the transaction, and judging whether the transaction type, state, control credit and control debit of the transaction are consistent with the information in the first transaction information table; if so, determining the transaction as a valid transaction.
Table 2 transaction flow information table
Wherein,,
numbering: recording how many transactions are in total, and numbering according to the sequence;
serial number: when a transaction is initiated, the serial number of the transaction;
sequence number: the transaction is used when writing a plurality of running water in the same transaction;
collection point type: b: BGL, C: CGL, etc.;
collection point change amount: negative numbers represent debits and positive numbers represent credits;
opponent occurrence amount: negative numbers represent debits and positive numbers represent credits;
finally, modifying the state: s (second state) -transaction flow information is updated into the amount information table, I (first state) -newly inserted transaction flow information is not updated into the amount information table.
TABLE 3 amount information Table
Wherein,,
accumulated credit amount: the accumulation of the credit amounts, which just represents the credit, may be 0;
accumulated debit amount: accumulation of debit amounts, negative sign representing debit, may be 0;
amount of money: sum of credit and debit;
and finally updating the serial number: and the serial number corresponding to the last updated serial water.
In step 102, a plurality of pieces of transaction flow information with the last modified state being the first state in the transaction flow information table are scanned every first set time length, temporarily stored in the first list, and the plurality of pieces of transaction flow information in the first list are arranged according to a preset ordering mode. The first list can be ArrayList, and data is stored in a dynamic array mode, so that the flexibility is high.
In one embodiment, the predetermined ordering is an inverted order of billing dates.
The reverse order of billing dates may allow the most recently occurring transactions to be foremost.
In step 103, according to the order of the transaction running water information in the first list, the transaction is invoked, the amount information table is updated one by one, after each transaction running water information is updated successfully, the last modified state of the transaction running water information in the transaction running water information table is changed into the second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, so that the consistency of the transaction is ensured, the corresponding running water record can be tracked in time, and the reliability of the transaction is ensured. Wherein, in an embodiment, updating the amount information table pen by pen includes:
the accumulated credit amount, accumulated debit amount, and amount in the amount information table are updated each time.
In the above embodiment, if the money amount information table is updated for the first time, the bank code, the number, the type of the collection point, the money of the collection point, the accumulated credit amount, the accumulated debit amount, the money, the last modification state, the last modification date, the last updated serial number are filled in completely, and when the money amount information table is updated for the subsequent time, the accumulated credit amount, the accumulated debit amount, the money and the last updated serial number are updated.
In an embodiment, the method further comprises:
if the transaction flow information in the first list is failed to update in the second preset time stamp, the amount updating transaction is recalled until the updating is successful; if the transaction flow information is not updated successfully in the second preset time period, jumping to the next transaction flow information.
Through the embodiment, the updating success rate can be improved while the updating efficiency is ensured. The updating continues until no transaction flowing information is in the first list.
Based on the above embodiments, the present application proposes the following embodiment to explain the detailed flow of the transaction data updating method, and fig. 2 is a detailed flow chart of the transaction data updating method according to the embodiment of the present application, as shown in fig. 2, including:
step 201, after online transaction, inquiring a first transaction information table based on the number of the transaction, and judging whether the transaction type, state, control credit and control debit of the transaction are consistent with the information in the first transaction information table; if so, determining that the transaction is a valid transaction;
step 202, when the transaction is a valid transaction, writing transaction flow information of the transaction into a transaction flow information table;
step 203, scanning out a plurality of pieces of transaction flow information with the last modified state being the first state in the transaction flow information table at intervals of a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode;
step 204, according to the order of the transaction running water information in the first list, invoking the amount updating transaction, updating the amount information table one by one, changing the last modified state of the transaction running water information in the transaction running water information table into a second state after each transaction running water information is updated successfully, and writing the running water number of the transaction running water information into the last updated running water number in the amount information table;
step 205, for each transaction flow information in the first list, if the update of the transaction flow information fails in the second preset timestamp, recalling the amount update transaction until the update is successful; if the transaction flow information is not updated successfully in the second preset time period, jumping to the next transaction flow information.
Of course, it is to be understood that other variations of the above detailed procedures are also possible, and all related variations should fall within the protection scope of the present application.
In summary, in the method provided by the embodiment of the present application, after the online transaction, the first transaction information table is queried to determine that the transaction is an effective transaction, and when the transaction is an effective transaction, the transaction running information of the transaction is written into the transaction running information table; scanning out a plurality of pieces of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into an amount information table; according to the sequence of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
The beneficial effects achieved by the method are as follows:
(1) The batch operation is automatically executed by updating the amount information table one by one according to fixed time intervals, so that excessive SQL (structured query language) is prevented from being executed at the same time, the transaction stability is improved, the transaction running information fails to be updated in a second preset time stamp, the amount updating transaction is recalled until the updating is successful, the problem of large amount of amount updating failure caused by optimistic locking is effectively solved, and the transaction performance is improved;
(2) The last modified state field and the last updated serial number field in the transaction flow information table ensure the consistency of corresponding flow with the amount and the reliability of the transaction;
(3) The multi-table serial is changed into the single-table asynchronous operation, the transaction flow is recorded first, and then the transaction amount is updated, so that the operation redundancy under multi-table transaction is reduced, and the overall redundancy of the system is reduced.
The embodiment of the application also provides a transaction data updating device, the principle of which is similar to that of a transaction data updating method, and the description is omitted here.
Fig. 3 is a schematic diagram of a transaction data updating device according to an embodiment of the present application, as shown in fig. 3, including:
the validity judging module 301 is configured to query the first transaction information table after the online transaction occurs, judge that the transaction is a valid transaction, and write transaction flow information of the transaction into the transaction flow information table when the transaction is a valid transaction;
the query module 302 is configured to scan out a plurality of transaction flowing information in the transaction flowing information table, where the last modified state is a first state, every first set time length, temporarily store the transaction flowing information in the first list, and arrange the plurality of transaction flowing information in the first list according to a preset ordering manner, where the first state indicates that the transaction flowing information is newly inserted and not updated into the amount information table;
the updating module 303 is configured to invoke an amount updating transaction according to the order of the transaction running water information in the first list, update the amount information table one by one, change the last modified state of the piece of transaction running water information in the transaction running water information table to a second state after each piece of transaction running water information is updated successfully, and write the running water number of the piece of transaction running water information into the last updated running water number in the amount information table, where the second state indicates that the second transaction data has been updated into the amount information table.
In one embodiment, the first transaction information table includes a number, a transaction type, a status, a creation date, a control credit, and a control debit;
the transaction flow information list comprises bank codes, numbers, accounting dates, serial numbers, collection point types, collection point currencies, collection point change amounts, opponent occurrence amounts, types, business subclasses, provinces, final modification states and final modification dates;
the money amount information table comprises bank codes, numbers, collection point types, collection point currencies, accumulated credit amounts, accumulated debit amounts, money amounts, last modification states, last modification dates and last updated serial numbers.
In one embodiment, the validity judging module is specifically configured to:
inquiring a first transaction information table based on the number of the transaction, and judging whether the transaction type, state, control credit and control debit of the transaction are consistent with the information in the first transaction information table; if so, determining the transaction as a valid transaction.
In one embodiment, the update module is specifically configured to:
the accumulated credit amount, accumulated debit amount, and amount in the amount information table are updated each time.
In one embodiment, the predetermined ordering is an inverted order of billing dates.
In an embodiment, the update module is further configured to:
if the transaction flow information in the first list is failed to update in the second preset time stamp, the amount updating transaction is recalled until the updating is successful; if the transaction flow information is not updated successfully in the second preset time period, jumping to the next transaction flow information.
In summary, in the device provided by the embodiment of the application, after the online transaction, the first transaction information table is queried to determine that the transaction is an effective transaction, and when the transaction is an effective transaction, the transaction running information of the transaction is written into the transaction running information table; scanning out a plurality of pieces of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into an amount information table; according to the sequence of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
The beneficial effects achieved by the device are as follows:
(1) The batch operation is automatically executed by updating the amount information table one by one according to fixed time intervals, so that excessive SQL (structured query language) is prevented from being executed at the same time, the transaction stability is improved, the transaction running information fails to be updated in a second preset time stamp, the amount updating transaction is recalled until the updating is successful, the problem of large amount of amount updating failure caused by optimistic locking is effectively solved, and the transaction performance is improved;
(2) The last modified state field and the last updated serial number field in the transaction flow information table ensure the consistency of corresponding flow with the amount and the reliability of the transaction;
(3) The multi-table serial is changed into the single-table asynchronous operation, the transaction flow is recorded first, and then the transaction amount is updated, so that the operation redundancy under multi-table transaction is reduced, and the overall redundancy of the system is reduced.
An embodiment of the present application further provides a computer device, and fig. 4 is a schematic diagram of a computer device in the embodiment of the present application, where the computer device is capable of implementing all the steps in the transaction data updating method in the foregoing embodiment, and the computer device specifically includes the following contents:
a processor (processor) 401, a memory (memory) 402, a communication interface (Communications Interface) 403, and a communication bus 404;
wherein, the processor 401, the memory 402, the communication interface 403 complete the communication with each other through the communication bus 404; the communication interface 403 is configured to implement information transmission between related devices such as a server device, a detection device, and a user device;
the processor 401 is configured to invoke a computer program in the memory 402, and when the processor executes the computer program, the processor implements all the steps in the transaction data updating method in the above embodiment.
Embodiments of the present application also provide a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements all the steps of the transaction data updating method in the above embodiments.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the application, and is not meant to limit the scope of the application, but to limit the application to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the application are intended to be included within the scope of the application.

Claims (14)

1. A transaction data updating method, comprising:
after the online transaction, inquiring a first transaction information table, judging that the transaction is effective transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is effective transaction;
scanning out a plurality of pieces of transaction flow information with a first state of last modification in a transaction flow information table every a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into an amount information table;
according to the sequence of the transaction running water information in the first list, an amount updating transaction is called, an amount information table is updated one by one, after each transaction running water information is successfully updated, the last modified state of the transaction running water information in the transaction running water information table is changed into a second state, the running water number of the transaction running water information is written into the last updated running water number in the amount information table, and the second state indicates that the transaction running water information is updated into the amount information table.
2. The transaction data updating method according to claim 1, wherein the first transaction information table includes a number, a transaction type, a status, a creation date, a control credit, and a control debit;
the transaction flow information list comprises bank codes, numbers, accounting dates, serial numbers, collection point types, collection point currencies, collection point change amounts, opponent occurrence amounts, types, business subclasses, provinces, final modification states and final modification dates;
the money amount information table comprises bank codes, numbers, collection point types, collection point currencies, accumulated credit amounts, accumulated debit amounts, money amounts, last modification states, last modification dates and last updated serial numbers.
3. The transaction data updating method according to claim 2, wherein querying the first transaction information table to determine that the transaction is a valid transaction comprises:
inquiring a first transaction information table based on the number of the transaction, and judging whether the transaction type, state, control credit and control debit of the transaction are consistent with the information in the first transaction information table; if so, determining the transaction as a valid transaction.
4. The transaction data updating method according to claim 2, wherein updating the amount information table on a per-stroke basis includes:
the accumulated credit amount, accumulated debit amount, and amount in the amount information table are updated each time.
5. The transaction data updating method according to claim 2, wherein the preset ordering is an inverted order of billing dates.
6. The transaction data updating method according to claim 1, further comprising:
if the transaction flow information in the first list is failed to update in the second preset time stamp, the amount updating transaction is recalled until the updating is successful; if the transaction flow information is not updated successfully in the second preset time period, jumping to the next transaction flow information.
7. A transaction data updating apparatus, comprising:
the validity judging module is used for inquiring the first transaction information table after the online transaction occurs, judging that the transaction is valid transaction, and writing transaction flow information of the transaction into the transaction flow information table when the transaction is valid transaction;
the inquiry module is used for scanning out a plurality of transaction flow information with a first state of last modification in the transaction flow information list at intervals of a first set time length, temporarily storing the transaction flow information into a first list, and arranging the transaction flow information in the first list according to a preset ordering mode, wherein the first state represents newly inserted transaction flow information and is not updated into the amount information list;
the updating module is used for calling the amount updating transaction according to the sequence of the transaction running water information in the first list, updating the amount information table one by one, changing the last modified state of the transaction running water information in the transaction running water information table into a second state after each transaction running water information is updated successfully, writing the running water number of the transaction running water information into the last updated running water number in the amount information table, and the second state indicates that the second transaction data is updated into the amount information table.
8. The transaction data updating device according to claim 7, wherein the first transaction information table includes a number, a transaction type, a status, a creation date, a control credit, and a control debit;
the transaction flow information list comprises bank codes, numbers, accounting dates, serial numbers, collection point types, collection point currencies, collection point change amounts, opponent occurrence amounts, types, business subclasses, provinces, final modification states and final modification dates;
the money amount information table comprises bank codes, numbers, collection point types, collection point currencies, accumulated credit amounts, accumulated debit amounts, money amounts, last modification states, last modification dates and last updated serial numbers.
9. The transaction data updating device of claim 8, wherein the validity determination module is specifically configured to:
inquiring a first transaction information table based on the number of the transaction, and judging whether the transaction type, state, control credit and control debit of the transaction are consistent with the information in the first transaction information table; if so, determining the transaction as a valid transaction.
10. The transaction data updating device of claim 8, wherein the updating module is specifically configured to:
the accumulated credit amount, accumulated debit amount, and amount in the amount information table are updated each time.
11. The transaction data updating device of claim 8, wherein the predetermined ordering is an inverted order of billing dates.
12. The transaction data updating apparatus according to claim 7, wherein the updating module is further configured to:
if the transaction flow information in the first list is failed to update in the second preset time stamp, the amount updating transaction is recalled until the updating is successful; if the transaction flow information is not updated successfully in the second preset time period, jumping to the next transaction flow information.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 6 when executing the computer program.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 to 6.
CN202010978989.9A 2020-09-17 2020-09-17 Transaction data updating method and device Active CN112035503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010978989.9A CN112035503B (en) 2020-09-17 2020-09-17 Transaction data updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010978989.9A CN112035503B (en) 2020-09-17 2020-09-17 Transaction data updating method and device

Publications (2)

Publication Number Publication Date
CN112035503A CN112035503A (en) 2020-12-04
CN112035503B true CN112035503B (en) 2023-09-19

Family

ID=73589629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010978989.9A Active CN112035503B (en) 2020-09-17 2020-09-17 Transaction data updating method and device

Country Status (1)

Country Link
CN (1) CN112035503B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12229750B2 (en) * 2021-11-04 2025-02-18 Capital One Services, Llc Systems and methods for generating and using virtual card numbers

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7206805B1 (en) * 1999-09-09 2007-04-17 Oracle International Corporation Asynchronous transcription object management system
CN106934025A (en) * 2017-03-13 2017-07-07 广州爱九游信息技术有限公司 A kind of account data management method, device and server
CN109146663A (en) * 2018-07-20 2019-01-04 中国邮政储蓄银行股份有限公司 The processing method and system of flowing water information
CN109493205A (en) * 2018-10-16 2019-03-19 深圳壹账通智能科技有限公司 Intelligent bookkeeping methods, computer readable storage medium and terminal device
CN111444002A (en) * 2020-03-25 2020-07-24 深圳前海微众银行股份有限公司 A task scheduling method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7206805B1 (en) * 1999-09-09 2007-04-17 Oracle International Corporation Asynchronous transcription object management system
CN106934025A (en) * 2017-03-13 2017-07-07 广州爱九游信息技术有限公司 A kind of account data management method, device and server
CN109146663A (en) * 2018-07-20 2019-01-04 中国邮政储蓄银行股份有限公司 The processing method and system of flowing water information
CN109493205A (en) * 2018-10-16 2019-03-19 深圳壹账通智能科技有限公司 Intelligent bookkeeping methods, computer readable storage medium and terminal device
CN111444002A (en) * 2020-03-25 2020-07-24 深圳前海微众银行股份有限公司 A task scheduling method and device

Also Published As

Publication number Publication date
CN112035503A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN107563887B (en) AS 400-based zero-halt daily cutting method for bank core accounting system
US8667329B2 (en) Processing transactions in graph-based applications
US8825615B2 (en) Simplifying implementation of custom atomic transactions in a programming environment
US7461065B2 (en) Method and system for utilizing shared numeric locks
US20130013576A1 (en) System with multiple conditional commit databases
CN108269184B (en) Bank institution change management method and system supporting uninterrupted service
CN110889754B (en) Method for improving processing efficiency of non-overdraft hot spot account
US9734187B2 (en) Atomic transactions in a NOSQL database
CN101350022B (en) Changing process method based on database logical lock
CN107993147A (en) The remaining sum control method and device of hot spot account
CN113312259A (en) Interface testing method and device
CN112035503B (en) Transaction data updating method and device
CN107678856B (en) Method and device for processing incremental information in business entity
CN111461864A (en) Transaction processing method and device
US20080162610A1 (en) Database garbage collector
CN112559496B (en) Method and device for realizing transaction atomicity of distributed database
CN114995998B (en) A quasi-real-time accounting method, device, and storage medium
CN115860952A (en) A transaction processing method and device
CN113391933A (en) Method for processing fund
JPH10232809A (en) Transaction processing system
CN118134491A (en) Method and system for managing public credit
CN118606009A (en) A transaction concurrency control method, device, equipment and medium
CN117829988A (en) Redis-based account fund processing method and device, storage medium and electronic equipment
EP1835400A1 (en) Transaction processing method
CN117291741A (en) Account data processing method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant