CN113837881A - Transaction data updating method and device, electronic equipment and storage medium - Google Patents

Transaction data updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113837881A
CN113837881A CN202111142327.9A CN202111142327A CN113837881A CN 113837881 A CN113837881 A CN 113837881A CN 202111142327 A CN202111142327 A CN 202111142327A CN 113837881 A CN113837881 A CN 113837881A
Authority
CN
China
Prior art keywords
data
transaction
target component
updating
balance
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.)
Granted
Application number
CN202111142327.9A
Other languages
Chinese (zh)
Other versions
CN113837881B (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.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co 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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202111142327.9A priority Critical patent/CN113837881B/en
Publication of CN113837881A publication Critical patent/CN113837881A/en
Application granted granted Critical
Publication of CN113837881B publication Critical patent/CN113837881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method and a device for updating transaction data, electronic equipment and a storage medium, and relates to the technical field of transaction data processing. The method comprises the following steps: acquiring first data related to a transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database; determining a target field from a plurality of fields included in the first data and the second data respectively; and updating the data in the target field by using the updating operation corresponding to the target field. The method adopts the preset data block to store the transaction related data, and determines the target field to update, thereby improving the efficiency of transaction data updating.

Description

Transaction data updating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of transaction data processing technologies, and in particular, to a method and an apparatus for updating transaction data, an electronic device, and a storage medium.
Background
Some transactions need to be erased or corrected after the transactions are executed, and data before the transactions need to be acquired when the transaction is erased or corrected so as to restore the data before the transactions. When updating operations such as restoration and modification are performed on transaction data, the prior art generally performs updating operations on all contents of the whole transaction, and the problem that the transaction data processing amount is large, so that the efficiency of updating the transaction data is low is caused.
Disclosure of Invention
In view of the above, an object of the embodiments of the present application is to provide a method, an apparatus, an electronic device and a storage medium for updating transaction data, so as to solve the problem of low efficiency of updating transaction data in the prior art.
The embodiment of the application provides a method for updating transaction data, which comprises the following steps: acquiring first data related to a transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database; determining a target component from a plurality of components included in the first data and the second data respectively; and updating the data in the target component by using the updating operation corresponding to the target component.
In the implementation mode, the preset database is used for storing and acquiring the transaction related data before and after the transaction is executed, so that the target component is determined to be updated, the update of all related data of the whole transaction is avoided when the transaction data needs to be updated, and the update efficiency and accuracy of the transaction data are improved.
Optionally, the preset database is created by the following method, including: and when the transaction amount of the transaction is larger than the preset amount, searching a trace-remaining control table corresponding to the transaction, and when the trace-remaining control table comprises a trace-remaining mark, storing the first data and the second data into the preset database.
In the implementation mode, when the transaction amount of the transaction is larger than the preset amount, the transaction trace is carried out, the related data of the transaction is stored in the preset database, so that the transaction trace can trigger the transaction trace when the transaction amount is abnormal, the data security of the transaction is ensured, meanwhile, whether the transaction trace is carried out or not is judged according to the trace control table, and the efficiency of the transaction trace is improved.
Optionally, the determining a target component from a plurality of components included in the first data and the second data respectively includes: and when the transaction information of the transaction is modified and the account for charge and account for charge of the transaction belong to the same bank, respectively comparing the data corresponding to the components of the first data and the components of the second data, and taking the corresponding components as the target components when the comparison results are different.
In the implementation mode, when the transaction information of the transaction is modified and the account-out account and the account-in account of the transaction belong to the same bank, different components in the transaction are compared, so that the comparison components are all components capable of performing subsequent processing on transaction data, and the accuracy of transaction data processing is improved.
Optionally, the updating the data corresponding to the target component by using the update operation corresponding to the target component includes: and when the data corresponding to the target component is not a balance, replacing the content of the target component in the second data with the content of the target component in the first data.
In the above implementation, when the data corresponding to the target component is not a balance, the target component in the first data is used to replace the content of the target component in the second data, and the data change of the entry, the name or other contents except the amount of money is implemented.
Optionally, the updating the data corresponding to the target component by using the update operation corresponding to the target component includes: and when the data corresponding to the target component is the balance, obtaining a target value according to the balance in the first data and the balance in the second data, and replacing the data corresponding to the target component in the second data with the target value.
In the above implementation manner, when the data corresponding to the target component is a balance, the target value is used to replace the data corresponding to the target component in the second data, so as to restore the amount of money.
Optionally, the obtaining a target value according to the balance in the first data and the balance in the second data includes: subtracting the balance in the first data from the balance in the second data to obtain a difference value; and calculating the difference between the balance in the first data and the difference value to obtain a target value.
In the above implementation, the target value is obtained by the calculation method, so that the amount can be accurately restored when the transaction amount changes for a plurality of times.
The embodiment of the application provides a device for updating transaction data, which comprises: the data acquisition module is used for acquiring first data related to the transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database; a target component determination module, configured to determine a target component from multiple components included in the first data and the second data, respectively; and the updating module is used for updating the data in the target assembly by using the updating operation corresponding to the target assembly.
In the implementation mode, the preset database is used for storing and acquiring the transaction related data before and after the transaction is executed, so that the target component is determined to be updated, the update of all related data of the whole transaction is avoided when the transaction data needs to be updated, and the update efficiency and accuracy of the transaction data are improved.
Optionally, the apparatus for updating transaction data further comprises: and the data block creating module is used for searching a trace control table corresponding to the transaction when the transaction amount of the transaction is larger than a preset amount, and storing the first data and the second data into the preset database when the trace control table comprises a trace mark.
In the implementation mode, when the transaction amount of the transaction is larger than the preset amount, the transaction trace is carried out, the related data of the transaction is stored in the preset database, so that the transaction trace can trigger the transaction trace when the transaction amount is abnormal, the data security of the transaction is ensured, meanwhile, whether the transaction trace is carried out or not is judged according to the trace control table, and the efficiency of the transaction trace is improved.
Optionally, the target component determination module is specifically configured to: and when the transaction information of the transaction is modified and the account for charge and account for charge of the transaction belong to the same bank, respectively comparing the data corresponding to the components of the first data and the components of the second data, and taking the corresponding components as the target components when the comparison results are different.
In the implementation mode, when the transaction information of the transaction is modified and the account-out account and the account-in account of the transaction belong to the same bank, different components in the transaction are compared, so that the comparison components are all components capable of performing subsequent processing on transaction data, and the accuracy of transaction data processing is improved.
Optionally, the update module is specifically configured to: and when the data corresponding to the target component is not a balance, replacing the content of the target component in the second data with the content of the target component in the first data.
In the above implementation, when the data corresponding to the target component is not a balance, the target component in the first data is used to replace the content of the target component in the second data, and the data change of the entry, the name or other contents except the amount of money is implemented.
Optionally, the update module is specifically configured to: and when the data corresponding to the target component is the balance, obtaining a target value according to the balance in the first data and the balance in the second data, and replacing the data corresponding to the target component in the second data with the target value.
In the above implementation manner, when the data corresponding to the target component is a balance, the target value is used to replace the data corresponding to the target component in the second data, so as to restore the amount of money.
Optionally, the update module is specifically configured to: subtracting the balance in the first data from the balance in the second data to obtain a difference value; and calculating the difference between the balance in the first data and the difference value to obtain a target value.
In the above implementation, the target value is obtained by the calculation method, so that the amount can be accurately restored when the transaction amount changes for a plurality of times.
An embodiment of the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores program instructions, and the processor executes steps in any one of the above implementation manners when reading and executing the program instructions.
The embodiment of the present application further provides a readable storage medium, in which computer program instructions are stored, and the computer program instructions are read by a processor and executed to perform the steps in any of the above implementation manners.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a method for updating transaction data according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a step of determining a target component according to an embodiment of the present application.
Fig. 3 is a block diagram of an apparatus for updating transaction data according to an embodiment of the present disclosure.
Icon: 20-update transaction data means; 21-a data acquisition module; 22-target component determination module; 23-update module.
Detailed Description
The technical solution in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for updating transaction data according to an embodiment of the present application.
Step S12: and acquiring first data related to the transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database.
First, the first data and the second data are exemplified, for example, the balance of a is 100 yuan, a transfers to the object B50 yuan, and the balance after a transfers is 50 yuan, then the first data in the transaction is "balance a: 100 yuan ", and the second data is" a balance: 50 yuan.
Optionally, for different transactions, it may be determined according to a preset whether the transaction needs to store related data before and after the transaction, that is, the first data and the second data, that is, the transaction trace, where the preset may be a specific setting based on a business requirement, and a corresponding trace control table is set according to whether the transaction needs to be performed.
Before or after a certain transaction is executed, when the related data of the transaction indicates that the transaction is more important, for example, the related amount is larger, or the transaction party is a preset important transaction party, and the related data belongs to a type needing transaction trace, whether the transaction trace needs to be carried out is determined by searching a trace control table corresponding to the transaction, namely, the related data before and after the transaction are stored in a preset database.
For example, if the detection condition of whether the transaction requires transaction trace is that whether the transaction amount is greater than the preset amount, when the transaction amount is greater than the preset amount, the transaction is judged to meet the preset condition of the transaction trace, a trace control table corresponding to the transaction is searched, and when the trace control table comprises a trace mark, the first data and the second data are stored in a preset database.
In other embodiments, in addition to whether the transaction amount is greater than the preset amount as the detection condition, whether the change of the transaction amount is greater than the preset amount, whether the transaction party is changed, and the like can be used as the detection condition.
Optionally, the trace identifier may be assigned to a trace switch field in the trace control table, and is used to indicate whether the transaction needs to be traced, and any character may be used as the trace identifier or the no-trace identifier, for example, "0" is used as the no-trace identifier, and "1" is used as the trace identifier.
Besides, the trace control table may further include a bank number field, a transaction code field, a table name field, a component field, and/or a component content field, etc. in addition to the trace identifier. The data corresponding to the bank number field is an identifier for distinguishing a bank to which the transaction belongs; the data corresponding to the transaction code field is an identifier for distinguishing each transaction; the data corresponding to the table name field is the table name identifier of the trace control table; the corresponding content of the component field is the component name of different components contained in the transaction, the component can be understood as a component which is divided into a plurality of intervals in the whole transaction data, and the interval division basis can be transaction party, transaction time and the like; the data corresponding to the component content field may be specific data content corresponding to different components in the transaction related data.
The specific way of searching the trace control table corresponding to the transaction may be to search, in a preset database, the data content of the transaction code field as the transaction code of the transaction, and the data content of the table name field as the table name of the trace control table corresponding to the transaction.
The transaction codes, table names and the like in the embodiment can be represented by any character strings, each transaction has a uniquely corresponding transaction code, and each table name has a uniquely corresponding trace control table, transaction trace table or updating mode table.
In addition to setting the preset database in a conventional database manner, the present embodiment may also use a transaction trace table to store transaction-related data.
Optionally, the transaction trace table may include a bank number field, a transaction code field, a table name field, a transaction number field, a transaction flow field, a status field, an operation flag field, a pre-update content field, and/or a post-update content field, etc. The data corresponding to the bank number field is an identifier for distinguishing a bank to which the transaction belongs; the data corresponding to the transaction code field is an identifier for distinguishing each transaction; the transaction flow field is used for storing transaction flow data of the transaction; the data corresponding to the table name field is the table name identification of the transaction trace table; the content corresponding to the transaction sequence number field is the execution time sequence identification of the transaction; the data corresponding to the status field is used for indicating whether the transaction is updated by transaction data or not, whether the transaction data is updated successfully or not and the like; the operation mark field is used for indicating the specific updating operation of the transaction data updating carried out by the transaction; the pre-update content field is used for storing first data related to the transaction before the transaction is executed; the updated content field is used for storing second data which is generated after the transaction is executed and is related to the transaction.
The specific way of searching the transaction trace table corresponding to the transaction may be to search the preset database for a transaction trace table in which the data content of the transaction code field is the transaction code of the transaction and the data content of the table name field is the table name of the transaction trace table corresponding to the transaction.
Step S14: the target component is determined from a plurality of components included in the first data and the second data, respectively.
It should be understood that, in this embodiment, a component that needs to update transaction data is regarded as a target component, and the selected rule of the target component may be set according to any requirement of the business side, for example, a component that changes transaction information, and changes data content before and after a transaction, and the like.
Optionally, different components in this embodiment, that is, different text fields divided according to the transaction party, the transaction time, and the like in the data content of a whole transaction.
Specifically, the transaction information generally includes accounts, register processing, detail records, and the like, and if the transaction information is modified to indicate that one or more components of the transaction (i.e., components in the trace control table) are changed, the data corresponding to the components of the first data and the components of the second data are compared, and the corresponding component is taken as a target component when the comparison result is different.
Optionally, in this embodiment, the target component may also be determined by the trace control table, for example, a component in a component field in the trace control table is taken as the target component.
Step S16: and updating the data in the target component by using the updating operation corresponding to the target component.
Optionally, the transaction data update in this embodiment may be a reconciliation, and the following steps are described by taking the reconciliation as an example.
Optionally, in this embodiment, different target components have corresponding different applicable update operations, for example, the determination of the update operation is performed according to the data type of the target component.
Specifically, the update operation may specifically be: when the data corresponding to the target component is not a balance, replacing the content of the target component in the second data with the content of the target component in the first data; and when the data corresponding to the target component is the balance, obtaining a target value according to the balance in the first data and the balance in the second data, and replacing the data corresponding to the target component in the second data with the target value.
For example, the register information is modified by the original transaction, and the register information of the second data needs to be overwritten by the register information of the first data when the transaction data is updated so as to restore to the state before modification.
Specifically, the balance in the first data may be subtracted from the balance in the second data to obtain a difference, and the difference between the balance in the first data and the difference may be calculated to obtain the target value.
Further, when there are a plurality of changes in the change from the first data to the second data and a reconciliation is required for a certain transaction change, the target value can be obtained based on the following formula: the target value is the balance of the second data (balance after the change of the transaction-balance before the change of the transaction).
For example, the original balance of the account a is 1000 yuan, 10 yuan is withdrawn in each transaction today, the balance before the withdrawal (before the transaction is changed) is 1000 yuan, the balance after the withdrawal (after the transaction is changed) is 990 yuan, then the withdrawal is 20 yuan, the balance after the withdrawal is 970 yuan, the withdrawal is 30 yuan, the current balance (the balance in the second data) is 1000-10-20-30-940, the current balance is 940- (990-1000) 950 yuan, and the transaction for withdrawing 10 yuan is to be erased.
As an optional implementation manner, the determination of the update operation may also be performed by using an update manner table, where the update manner table may include a transaction code field, a table name field, a component field, an update level field, and/or an update operation field. The data corresponding to the transaction code field is an identifier for distinguishing each transaction; the data corresponding to the table name field is the table name identification of the updating mode table; the data corresponding to the update level field is used for indicating that the target for executing the update operation is all components or target components; the data corresponding to the component field is used for representing the component name of the target component corresponding to the updating operation; and the data corresponding to the updating operation field is used for indicating a specific updating operation mode needing to be executed.
Referring to fig. 2, a specific step of determining a target component by using an update mode table, where fig. 2 is a schematic flowchart of a step of determining a target component according to an embodiment of the present application, the specific step may be as follows:
step S161: and searching the preset database for the data content of the transaction code field as the transaction code of the transaction, the data content of the table name field as the table name of the updating mode table corresponding to the transaction, and the data content of the updating level field as the updating mode table of all component level identifications.
Step S162: and when the corresponding update mode tables of all component levels are not found, searching an update mode table in which the data content of the transaction code field is a default transaction code, the data content of the table name field is the table name of the update mode table corresponding to the transaction, and the data content of the update level field is the identification of all component levels in a preset database.
The default transaction code may be any preset character, for example, "#" or "", where the default transaction code indicates that a unique corresponding update mode table is not configured for the transaction, the update operation may be performed according to the corresponding default update mode table, and the update mode table in which the data content of the transaction code field is the default transaction code is the default update mode table.
Alternatively, the update operation in the default update mode table may be an update operation preset by the service personnel to be applicable to most transactions.
Optionally, after the update mode table of all component levels corresponding to the transaction is found, whether the transaction data update can be performed on the entire content of the transaction may be checked according to the contents of the detail flag field, the detail check field, and the data update related identification field in the update mode table, for example, when the identification of the data update related identification field indicates that the component content variable can perform the transaction data update, the subsequent transaction data update can be continuously performed, and when the identification of the data update related identification field indicates that the component content variable cannot perform the transaction data update, the subsequent transaction data update cannot be continuously performed.
In addition, if checking before updating, checking after updating or a custom checking mode is needed before updating the transaction data, an iretersefield interface needs to be implemented first, and the implementation name is configured as the name of the implementation class of the user.
Step S163, when the corresponding default updating mode table is not found, the updating mode table in which the data content of the transaction code field is the transaction code, the data content of the table name field is the table name of the updating mode table corresponding to the transaction, the data content of the updating level field is the target level identification, and the data content of the component field is the component name is found in the preset database.
Step S164: when the transaction code of the transaction and the update mode table of the target component level corresponding to the target component are found, determining update operation according to the data content of the component field corresponding to the component as the update operation field in the update mode table of the component name, and updating the data in the component by adopting the update operation.
The update operation may be preset in the update mode table by the service person according to the type of update operation applicable to different components, for example, when the data corresponding to the component is not a balance, setting an identifier of an update operation field to indicate that the content of the target component in the first data is used to replace the content of the target component in the second data.
Step S165: when the transaction code of the transaction and the update mode table of the target component level corresponding to the target component are not found, the data content of the transaction code field is the default transaction code, the data content of the table name field is the table name of the update mode table corresponding to the transaction, the data content of the update level field is the target level identification, and the data content of the component field is the update mode table of the component name.
Step S166: and determining an updating operation according to the updating operation field in the updating mode table in which the data content of the transaction code field corresponding to the component is the default transaction code and the data content of the component field is the component name, and updating the data in the component by adopting the updating operation.
Further, if the target component level reconciliation mode cannot be found, comparing the data before modification, the data after modification and the current data, and if the transaction data change exists, not allowing the transaction data modification.
In order to cooperate with the above method for updating transaction data, an apparatus 20 for updating transaction data is further provided in the embodiment of the present application, please refer to fig. 3, and fig. 3 is a schematic block diagram of the apparatus for updating transaction data according to the embodiment of the present application.
The update transaction data device 20 includes:
the data acquisition module 21 is configured to acquire, from a preset database, first data related to a transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed;
a target component determination module 22, configured to determine a target component from multiple components included in the first data and the second data, respectively;
and the updating module 23 is configured to update the data in the target component by using the updating operation corresponding to the target component.
Optionally, the means for updating transaction data 20 further comprises: and the data block creating module is used for searching a trace control table corresponding to the transaction when the transaction amount of the transaction is larger than the preset amount, and storing the first data and the second data into a preset database when the trace control table comprises a trace mark.
Optionally, the target component determining module 22 is specifically configured to: when the transaction information of the transaction is modified and the account for charge and account for charge of the transaction belong to the same bank, comparing the data corresponding to the components of the first data with the data corresponding to the components of the second data respectively, and taking the corresponding components as target components when the comparison results are different.
Optionally, the updating module 23 is specifically configured to: and when the data corresponding to the target component is not a balance, replacing the content of the target component in the second data with the content of the target component in the first data.
Optionally, the updating module 23 is specifically configured to: and when the data corresponding to the target component is the balance, obtaining a target value according to the balance in the first data and the balance in the second data, and replacing the data corresponding to the target component in the second data with the target value.
Optionally, the updating module 23 is specifically configured to: subtracting the balance in the first data from the balance in the second data to obtain a difference value; and calculating the difference between the balance in the first data and the difference value to obtain the target value.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores program instructions, and when the processor reads and runs the program instructions, the processor executes the steps in any of the methods for updating transaction data provided in this embodiment.
It should be understood that the electronic device may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), or other electronic device having a logical computing function.
The embodiment of the application also provides a readable storage medium, wherein computer program instructions are stored in the readable storage medium, and the computer program instructions are read by a processor and executed to execute the steps in the method for updating the transaction data.
To sum up, the embodiment of the present application provides a method, an apparatus, an electronic device and a storage medium for updating transaction data, where the method includes: acquiring first data related to a transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database; determining a target component from a plurality of components included in the first data and the second data respectively; and updating the data in the target component by using the updating operation corresponding to the target component.
In the implementation mode, the preset database is used for storing and acquiring the transaction related data before and after the transaction is executed, so that the target component is determined to be updated, the update of all related data of the whole transaction is avoided when the transaction data needs to be updated, and the update efficiency and accuracy of the transaction data are improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices according to various embodiments of the present application. In this regard, each block in the block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams, and combinations of blocks in the block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Therefore, the present embodiment further provides a readable storage medium, in which computer program instructions are stored, and when the computer program instructions are read and executed by a processor, the computer program instructions perform the steps of any of the block data storage methods. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RanDom Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. A method of updating transactional data, the method comprising:
acquiring first data related to a transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database;
determining a target component from a plurality of components included in the first data and the second data respectively;
and updating the data in the target component by using the updating operation corresponding to the target component.
2. The method of claim 1, wherein the pre-set database is created by:
and when the transaction amount of the transaction is larger than the preset amount, searching a trace-remaining control table corresponding to the transaction, and when the trace-remaining control table comprises a trace-remaining mark, storing the first data and the second data into the preset database.
3. The method of claim 1, wherein determining a target component from the plurality of components included in the first data and the second data, respectively, comprises:
and when the transaction information of the transaction is modified and the account for charge and account for charge of the transaction belong to the same bank, respectively comparing the data corresponding to the components of the first data and the components of the second data, and taking the corresponding components as the target components when the comparison results are different.
4. The method of claim 3, wherein the updating the data corresponding to the target component using the update operation corresponding to the target component comprises:
and when the data corresponding to the target component is not a balance, replacing the content of the target component in the second data with the content of the target component in the first data.
5. The method of claim 3, wherein the updating the data corresponding to the target component using the update operation corresponding to the target component comprises:
and when the data corresponding to the target component is the balance, obtaining a target value according to the balance in the first data and the balance in the second data, and replacing the data corresponding to the target component in the second data with the target value.
6. The method of claim 5, wherein obtaining a target value based on the balance in the first data and the balance in the second data comprises:
subtracting the balance in the first data from the balance in the second data to obtain a difference value;
and calculating the difference between the balance in the first data and the difference value to obtain a target value.
7. An apparatus for updating transaction data, the apparatus comprising:
the data acquisition module is used for acquiring first data related to the transaction before the transaction is executed and second data related to the transaction generated after the transaction is executed from a preset database;
a target component determination module, configured to determine a target component from multiple components included in the first data and the second data, respectively;
and the updating module is used for updating the data in the target assembly by using the updating operation corresponding to the target assembly.
8. An electronic device comprising a memory having stored therein program instructions and a processor that, when executed, performs the steps of the method of any of claims 1-6.
9. A readable storage medium having stored thereon computer program instructions for executing the steps of the method according to any one of claims 1 to 6 when executed by a processor.
CN202111142327.9A 2021-09-28 2021-09-28 Transaction data updating method and device, electronic equipment and storage medium Active CN113837881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111142327.9A CN113837881B (en) 2021-09-28 2021-09-28 Transaction data updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111142327.9A CN113837881B (en) 2021-09-28 2021-09-28 Transaction data updating method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113837881A true CN113837881A (en) 2021-12-24
CN113837881B CN113837881B (en) 2023-02-28

Family

ID=78966975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111142327.9A Active CN113837881B (en) 2021-09-28 2021-09-28 Transaction data updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113837881B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
US20150277966A1 (en) * 2014-03-27 2015-10-01 Nec Corporation Transaction system
CN106327332A (en) * 2016-08-18 2017-01-11 深圳市金证科技股份有限公司 Liquidation method and system for supporting partial returning
CN107169767A (en) * 2017-05-31 2017-09-15 深圳市长亮科技股份有限公司 Correction method and system are rushed in transaction
CN110175919A (en) * 2019-05-29 2019-08-27 深圳前海微众银行股份有限公司 Transaction data processing method, device, equipment and computer readable storage medium
CN111798296A (en) * 2020-06-15 2020-10-20 远光软件股份有限公司 Automatic account checking method, automatic account checking device and computer readable storage medium
CN111951009A (en) * 2020-07-26 2020-11-17 中国建设银行股份有限公司 Transaction data processing method and device, electronic equipment and computer-readable storage medium
CN112613993A (en) * 2020-12-26 2021-04-06 中电金信软件有限公司 Transaction data processing method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996855A (en) * 2006-12-22 2007-07-11 中国建设银行股份有限公司 A method and system for keeping data consistency
US20150277966A1 (en) * 2014-03-27 2015-10-01 Nec Corporation Transaction system
CN106327332A (en) * 2016-08-18 2017-01-11 深圳市金证科技股份有限公司 Liquidation method and system for supporting partial returning
CN107169767A (en) * 2017-05-31 2017-09-15 深圳市长亮科技股份有限公司 Correction method and system are rushed in transaction
CN110175919A (en) * 2019-05-29 2019-08-27 深圳前海微众银行股份有限公司 Transaction data processing method, device, equipment and computer readable storage medium
CN111798296A (en) * 2020-06-15 2020-10-20 远光软件股份有限公司 Automatic account checking method, automatic account checking device and computer readable storage medium
CN111951009A (en) * 2020-07-26 2020-11-17 中国建设银行股份有限公司 Transaction data processing method and device, electronic equipment and computer-readable storage medium
CN112613993A (en) * 2020-12-26 2021-04-06 中电金信软件有限公司 Transaction data processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113837881B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
KR101627592B1 (en) Detection of confidential information
US20170147688A1 (en) Automatically mining patterns for rule based data standardization systems
US10452627B2 (en) Column weight calculation for data deduplication
CN107402957B (en) Method and system for constructing user behavior pattern library and detecting user behavior abnormity
CN111797594B (en) Character string processing method based on artificial intelligence and related equipment
CN109492401B (en) Content carrier risk detection method, device, equipment and medium
CN110705297A (en) Enterprise name-identifying method, system, medium and equipment
CN113837881B (en) Transaction data updating method and device, electronic equipment and storage medium
CN106897224B (en) Method and device for determining software testing range
JP6870454B2 (en) Analytical equipment, analytical programs and analytical methods
CN112990466A (en) Redundancy rule detection method and device and server
CN109189827B (en) Time sequence processing method and device and electronic equipment
CN110309315B (en) Template file generation method and device, computer readable medium and electronic equipment
CN112149402A (en) Document comparison method and device, electronic equipment and computer-readable storage medium
CN112232962A (en) Transaction index processing method, device and equipment
CN113760888B (en) Method, device and storage medium for generating data table
JP5197128B2 (en) Dependency Estimation Device, Dependency Estimation Program, and Recording Medium
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN111158746B (en) Method and device for acquiring call relationship
JP2009199461A (en) Personal information file determination system
CN117785962A (en) Code amount acquisition method, device, equipment and medium
CN115374087A (en) Database change risk analysis method, device, equipment and readable storage medium
CN113806422A (en) Data processing method and device, electronic equipment and storage medium
CN115495447A (en) Data re-checking prevention method and device
Edwards et al. IUCALC: a FORTRAN subroutine for calculating polygon-line intersections, and polygon--polygon intersections, unions, and relative differences.[For IBM 360]

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