CN115309782A - Transaction asynchronous processing method, device, equipment, medium and program product - Google Patents

Transaction asynchronous processing method, device, equipment, medium and program product Download PDF

Info

Publication number
CN115309782A
CN115309782A CN202210828526.3A CN202210828526A CN115309782A CN 115309782 A CN115309782 A CN 115309782A CN 202210828526 A CN202210828526 A CN 202210828526A CN 115309782 A CN115309782 A CN 115309782A
Authority
CN
China
Prior art keywords
transaction
data
transaction data
data packet
cache region
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.)
Pending
Application number
CN202210828526.3A
Other languages
Chinese (zh)
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 Financial Technology Co Ltd
Original Assignee
Bank of China Financial Technology 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 Bank of China Financial Technology Co Ltd filed Critical Bank of China Financial Technology Co Ltd
Priority to CN202210828526.3A priority Critical patent/CN115309782A/en
Publication of CN115309782A publication Critical patent/CN115309782A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation
    • 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

Landscapes

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

Abstract

The invention provides a transaction asynchronous processing method, a device, equipment, medium and program product, comprising: receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data into the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to a target data cache region; the calling sequence number generator is used for marking the transaction sequence number of each transaction data in the transaction data packet, and each transaction data in the transaction data packet is processed in order according to the transaction sequence number, so that the transaction data of each transaction initiator is stored in a partition mode, and the transaction data in the same partition mode are executed in order according to the transaction sequence number, so that the ordered execution of the transactions in the same account is guaranteed, and the processing performance of the system is improved.

Description

Transaction asynchronous processing method, device, equipment, medium and program product
Technical Field
The present invention relates to the field of computer communication technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for asynchronous transaction processing.
Background
With the explosion of financial services, new financial service scenarios are continuously appearing, in which some transaction scenarios with low timeliness requirements, that is, some transactions are not executed immediately, but executed in a postponed manner, for example: transfer appointment, periodic deduction, automatic repayment, etc.
In the existing scheme, for this type of transaction, the whole transaction is usually transmitted to the core system in a file manner, for example, the whole transaction in the same province area is transmitted to the core system in a packed manner, or the whole transaction in the same time segment is transmitted to the core system in a packed manner, and then the transactions are executed one by one.
However, with the continuous increase of the service volume of the core bank system, the pressure of the core system is increased, the processing performance of the system is poorer and poorer, the transaction execution efficiency is low, and in addition, the problem of inconsistent transaction execution sequence under the same account exists, so that subsequent transaction processing is easy to make mistakes and is unstable.
Disclosure of Invention
The invention provides a transaction asynchronous processing method, a transaction asynchronous processing device, transaction asynchronous processing equipment, transaction asynchronous processing media and a transaction asynchronous processing program product, which are used for solving the defects that in the prior art, the pressure of a core system is high, and transactions under the same account cannot be executed in order.
The invention provides a transaction asynchronous processing method, which comprises the following steps:
receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region;
under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to the target data cache region;
and marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
According to the asynchronous transaction processing method provided by the invention, the reaching of the preset transaction processing condition specifically comprises the following steps:
and under the condition that the transaction data volume in the target data cache region is monitored to reach a preset data volume threshold value, judging that a preset transaction processing condition is reached.
According to the asynchronous transaction processing method provided by the invention, reaching the preset transaction processing condition specifically comprises the following steps:
and when the preset transaction execution time is reached, judging that the preset transaction processing condition is reached.
According to the asynchronous transaction processing method provided by the invention, the marking of the transaction serial number of each transaction data in the transaction data packet specifically comprises the following steps:
determining an area code identifier corresponding to the target data cache area, and acquiring a transaction serial number corresponding to each transaction data in the transaction data packet;
and generating the transaction serial number of each transaction data according to the area code identification and the transaction serial number.
According to the asynchronous transaction processing method provided by the invention, before receiving transaction data, the asynchronous transaction processing method further comprises the following steps:
and under the condition of receiving a data packet sent by a transaction initiator, decrypting and checking the data packet to obtain transaction data after decrypting and checking the data packet.
According to the asynchronous transaction processing method provided by the invention, after the data packet is decrypted and signed, the asynchronous transaction processing method further comprises the following steps:
and sending a decryption and signature verification failure prompt message to the transaction initiator under the condition that the data packet is failed in decryption and signature verification.
The invention also provides a transaction asynchronous processing device, comprising:
the receiving unit is used for receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region;
the acquisition unit is used for acquiring a transaction data packet corresponding to the target data cache region under the condition that a preset transaction processing condition is achieved;
and the processing unit is used for marking the transaction serial number of each transaction data in the transaction data packet and processing each transaction data in the transaction data packet in order according to the transaction serial number.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the transaction asynchronous processing method.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction asynchronous processing method as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of asynchronous processing of transactions as described in any one of the above.
The invention provides a transaction asynchronous processing method, a device, equipment, a medium and a program product, which determine a target data cache region corresponding to a transaction initiator of transaction data by receiving the transaction data and store the transaction data in the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to a target data cache region; the sequence number generator is called to mark the transaction sequence number of each transaction data in the transaction data packet, and each transaction data in the transaction data packet is processed in order according to the transaction sequence number, so that the transaction data of each transaction initiator is stored in a subarea mode, and the transaction data in the same subarea are executed in order according to the transaction sequence number, so that the ordered execution of the transactions in the same account is ensured, and the system processing performance is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a transaction asynchronous processing method provided by the present invention;
FIG. 2 is a schematic structural diagram of a transaction asynchronous processing device provided by the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A transaction asynchronous processing method of the present invention is described below in conjunction with fig. 1.
Fig. 1 is a schematic flow chart of a transaction asynchronous processing method provided by the present invention, as shown in fig. 1, the method includes:
step 100, receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data in the target data cache region;
it should be noted that the transaction data refers to transaction data between accounts of both parties, such as data of transactions such as money transfer. The transaction initiator refers to an account of the payer, for example, if the account a initiates a transaction for transferring money to the account B, the account a is the transaction initiator.
In the embodiment, an asynchronous transaction collector in the system is called, and the asynchronous transaction collector receives transaction data sent by a transaction initiator in real time, but does not immediately initiate a thread for processing the transaction data, so that system abnormity caused by processing a large number of transactions in a short time can be avoided. The asynchronous transaction collector is a device responsible for primarily collecting transaction data, and mainly has the functions of collecting transactions, sequencing transactions, decrypting and checking labels, setting packaged transaction conditions and the like.
The asynchronous transaction collector of the present invention uses a hash algorithm to partition transaction data of different payer accounts, such as the hash algorithms MD2, MD4, and MD5, which is not limited by the present invention. Specifically, the same payer account is hashed to the same partition, and the total amount of the transaction quantity of each same partition is counted, so that when the total amount of the transaction quantity of the partition reaches a specified total amount threshold value or a specified transaction data execution time, the transaction quantity of the same partition is executed in batch, and the purposes of ensuring that the transactions can be executed in sequence and improving the processing performance are achieved.
In particular, a target data buffer refers to a data buffer for buffering transaction data of the transaction initiator. In the invention, in order to realize the consistent transaction sequence under the same account, a transaction mechanism for carrying out partition cache processing on transaction data is adopted, namely for the received transaction data transmitted by a plurality of transaction initiating parties, the transaction data of each transaction initiating party is respectively cached into the respective matched data cache regions, and the resource access of each data cache region is independently carried out without mutual interference. The data storage capacity of each partition may be the same or different, and the present invention is not limited thereto.
In an embodiment, in order to accelerate the processing speed of the transaction partition, a plurality of data cache regions are divided in advance, the data cache capacity in each data cache region is consistent, after a first transaction data of a transaction initiator is received, the data cache region with the current data cache amount being zero is determined and is used as a target data cache region, a mapping relation of a cache path between the transaction initiator and the data cache region is generated, and the storage of the transaction data is realized through the cache path corresponding to the mapping relation.
In other words, in this embodiment, in practical application, the system records a mapping relationship list of cache paths between a plurality of transaction initiators and the data storage area, and therefore, after receiving transaction data, first traverses whether a mapping relationship of a cache path corresponding to a transaction initiator of the transaction data exists in the mapping relationship list, if so, stores the transaction data into a corresponding target data cache area according to the cache path mapped in the mapping relationship, and if not, traverses the cache amount in each current data cache area, determines a data cache area with a current data cache amount of zero, and uses the data cache area as the target data cache area. In addition, because the number of the data cache regions is limited and the transaction initiator has a plurality of data cache regions, in this embodiment, after the mapping relationship of the cache paths between each transaction initiator and each data cache region is generated, after the data in the data storage region corresponding to the transaction initiator is processed, the mapping relationship between the data cache regions is automatically disconnected, thereby ensuring that the data cache regions are not occupied by idle transaction initiators.
200, acquiring a transaction data packet corresponding to the target data cache region under the condition that a preset transaction processing condition is reached;
in the step, an asynchronous transaction executor in the system is called to sequentially read the stored transaction data from the target data cache region, and after the reading is finished, all the transaction data are packaged into transaction data packets for subsequent batch processing. Specifically, the transaction data packet includes not only all transaction data but also a timestamp for storing each transaction data.
The asynchronous transaction executor is a device which is responsible for receiving transaction data which are sent by the transaction collector and need to be processed in a partition mode, and processing the transaction data in the same partition in batches after sequencing.
Specifically, in this embodiment, the preset transaction processing conditions mainly include the following conditions:
firstly: and under the condition that the transaction data volume in the target data cache region is monitored to reach a preset data volume threshold value, judging that a preset transaction processing condition is reached.
The transaction data amount refers to the number of times of initiating the transaction request of the cached transaction data, for example, the transaction data of 53 transaction requests are cached in the data cache region a, the transaction data of 20 transaction requests are cached in the data cache region B, the transaction data of 100 transaction requests are cached in the data cache region C, the transaction data amount of the data cache region a is 53, the transaction data amount of the data cache region B is 20, the transaction data amount of the data cache region C is 100, and under the condition of a preset amount threshold value of 100, the data cache region C reaches a preset transaction processing condition.
Specifically, in this embodiment, the asynchronous transaction collector in the system is called to receive transaction data in real time, and correspondingly store the transaction data into the target data cache region, after the asynchronous transaction collector stores the transaction data, the system may record the transaction data amount currently cached in the target data cache region in real time, and when it is detected that the transaction data amount in the current target data cache region has reached the preset data amount threshold, the asynchronous transaction executor in the system is called to sequentially read the stored transaction data from the target data cache region.
In addition, it should be noted that the preset data amount threshold of each data cache region may be a fixed and unchangeable value or a flexibly changeable value, and in one implementation, in order to improve flexibility of partition batch execution, the preset data amount threshold of the target data cache region corresponding to the transaction initiator at this time may be flexibly set by reading historical transaction data of the transaction initiator.
The historical transaction data may be the transaction data amount of the historical transaction data of the batch at the same time as the current processing time, the batch at the same time may refer to the batch at the same day, may also refer to the batch at the same week, may also be the batch at the same month, and the like, which is not limited thereto.
For example, the system performs the batch transaction processing at the time of 2022, 7/month 1, and reads the transaction data amount of the transaction initiator a from 2021, 7/month 1 to 2021, 7/month 7, so as to set the preset data amount threshold of the target data buffer corresponding to the transaction initiator a at the time according to the transaction data amount of the transaction initiator a from 2021, 7/month 1 to 2021, 7/month 7.
Secondly, the method comprises the following steps: and when the preset transaction execution time is monitored, judging that the preset transaction processing condition is reached.
Specifically, the preset transaction execution time may be a fixed time point value, such as 10 am every day, 4 pm every day, 6 pm every day, etc.
In addition, the preset transaction execution time can also be a fixed duration value. This is illustrated for ease of understanding. For example, for a transaction initiator a, before the transaction initiator a sends transaction data, the longest cache time of the transaction data of the transaction initiator a is agreed to be 24 hours between the transaction initiator a and the system, the system stores the transaction data of the transaction initiator a in a target data cache region, and then the system calls a timer to monitor the data cache time of the target data storage region, if it is monitored that the target data cache region starts timing from the first transaction data of the transaction initiator a, if the transaction data stored in the target data cache region is processed within 24 hours, the timer automatically clears the currently accumulated time length, and if it is monitored that the data in the target data cache region is not processed within 24 hours, the timer outputs a corresponding prompt message to notify the system to call an asynchronous transaction executor to process the transaction data in the target data cache region.
It should be noted that, in this embodiment, the preset transaction execution time may be set by the system according to an actual situation, and may also be set by the transaction initiator notifying the system before or after sending the transaction data, which is not limited to this.
Therefore, in the embodiment, the preset transaction processing conditions ensure that the transaction data of the transaction initiator cannot be cached all the time under the condition that the transaction data amount of the transaction data of some transaction initiators is relatively small, and further avoid the problem that the transaction data of other transaction initiators cannot be processed in time due to the fact that the data cache area is occupied by some small amount of transaction data, so that the transaction data can be processed in time, and the performance of the system can be further improved.
And step 300, marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
In the step, after the transaction data packet is obtained from the target data cache region, the transaction data packet is decompressed to obtain all transaction data and the time stamp of each transaction data, wherein the time stamp refers to the time point information for storing each transaction data.
The transaction sequence number is used for representing the sequence number of the received sequence of each transaction data, and the transaction sequence number also represents the sequence number of the sequence of processing each transaction data, so that the system can process a plurality of cached transaction data in order according to the transaction sequence number of each transaction data.
Specifically, the calling sequence number generator marks each transaction data according to the time stamp of each transaction data in the sequence from the front to the back of the storage time, and then processes each transaction data in sequence from the small to the large according to the sequence of the transaction sequence numbers.
The transaction asynchronous processing method provided by the invention comprises the steps of determining a target data cache region corresponding to a transaction initiator of transaction data by receiving the transaction data; storing the transaction data to a target data cache region, and generating a transaction serial number of the transaction data; under the condition that the data cache parameter of the transaction data in the target data cache region reaches a preset cache parameter threshold value, the transaction data in the target data cache region is processed in order based on the transaction sequence number, therefore, the transaction data of each transaction initiator is stored in a subarea mode, and the transaction data in the same subarea is executed in order according to the transaction sequence number, so that the ordered execution of the transactions in the same account is ensured, and the processing performance of the system is improved.
Based on the above embodiment, step 100 further includes:
and traversing the transaction initiator partition list, and determining a target data cache region corresponding to the transaction data according to a data cache region mapping function of the transaction initiator partition list under the condition that the transaction initiator partition list comprises the transaction initiator.
The transaction initiator partition list records the current existing data cache area information and the transaction initiator information associated with each data cache area.
In practical application, since transaction data sent by multiple transaction initiating parties may be received at the same time, in this embodiment, in order to increase the processing speed of data partitioning, by establishing a transaction initiating party partition list, after receiving the transaction data, first traversing in the transaction initiating party partition list whether transaction initiating party information of the transaction data exists, and if so, directly reading data cache area information associated with the transaction initiating party information in the transaction initiating party partition list, thereby determining a data storage location of the transaction data, and storing the transaction data.
Further, in another embodiment, after traversing the transaction initiator partition list, the method further comprises: under the condition that the transaction initiator is not included in the transaction initiator partition list, establishing a target data cache corresponding to the transaction initiator; and performing association mapping on the transaction initiator and the target data storage area, and storing the transaction initiator in a transaction initiator partition list.
In this step, if the transaction initiator information of the transaction data is not traversed in the transaction initiator partition list, it indicates that there is no data cache location for storing the transaction data in the current system. In this case, the target data cache region corresponding to the transaction initiator is established in this embodiment, wherein a process of establishing a new target data cache region of the transaction initiator is the same as that in the above embodiment, and details are not repeated herein. Therefore, after the target data cache region is established, the transaction initiator and the target data storage region are subjected to associated mapping, and the transaction initiator is stored in the transaction initiator partition list, so that the transaction data of the subsequent transaction initiator can be directly stored to the corresponding target data cache region, the data partition processing speed can be improved, the system pressure is effectively relieved, the throughput is improved, and the system stability and performance can be improved.
Based on the above embodiments, step 300 specifically includes:
determining an area code identifier corresponding to the target data cache area, and acquiring a transaction serial number corresponding to each transaction data in the transaction data packet;
and generating the transaction serial number of each transaction data according to the area code identification and the transaction serial number.
Specifically, each transaction data, for example, '1+1' and '1+2', is marked by using the area code identifier + transaction serial number, where 1 at the first position represents a target data buffer area of the area code identifier 1, and 1 and 2 at the second position represent the first transaction data and the second transaction data stored in the target data buffer area of the identifier 1, respectively. The generation manner of the transaction serial number is the same as that described in the above embodiments, and is not described herein again.
In this embodiment, in order to ensure that transactions are executed in order and to facilitate tracing of subsequent data, the transaction data is marked by the area code identifier and the transaction sequence number identifier, so that subsequently when data is in error, other transaction data in the same storage area can be checked by the area code identifier, and the transaction sequence number can ensure that the system can process each transaction data in sequence from small to large according to the transaction sequence number.
Based on the above embodiment, before step 100, the method specifically includes:
and under the condition of receiving a data packet sent by a transaction initiator, decrypting and checking the data packet to obtain transaction data after decrypting and checking the data packet.
In the step, in order to prevent the transaction information from being tampered and ensure the safety and the integrity, the transaction initiator encrypts and signs the transaction data into a data packet before sending the transaction data for transmission.
In practical application, an MD5WithRSA algorithm can be used for generating a public key and a private key, the public key is sent to a transaction initiator, the transaction initiator uses the public key to encrypt and sign transaction data into a data packet and then sends the data packet to a system, and the system receives the data packet, decrypts and checks the signature of the data packet by using the private key to obtain the transaction data, and then performs subsequent processing.
Further, after decrypting and verifying the signature on the data packet, the method further includes:
and sending a decryption and signature verification failure prompt message to the transaction initiator under the condition that the data packet is failed in decryption and signature verification.
The decryption and signature verification failure in this embodiment mainly includes the following cases:
firstly, the method comprises the following steps: the data packet cannot be opened by using the private key;
secondly, the method comprises the following steps: after the data packet is opened by using the private key, the transaction data in the data packet is missing.
In this embodiment, when the decryption and signature verification of the data packet by using the agreed private key fails, a corresponding prompt message is sent to prompt the transaction initiator to perform data verification, thereby preventing the transaction initiator from being unable to process the transaction data in time.
The following describes the transaction asynchronous processing device provided by the present invention, and the transaction asynchronous processing device described below and the transaction asynchronous processing method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a transaction asynchronous processing device provided by the present invention, and as shown in fig. 2, the transaction asynchronous processing device includes: a receiving unit 210, configured to receive transaction data, determine a target data cache region corresponding to a transaction initiator of the transaction data, and store the transaction data in the target data cache region; the obtaining unit 220 is configured to obtain a transaction data packet corresponding to the target data cache region when a preset transaction processing condition is met; the processing unit 230 is configured to mark a transaction serial number for each transaction data in the transaction data packet, and sequentially process each transaction data in the transaction data packet according to the transaction serial number.
Further, the obtaining unit 220 is further configured to determine that a preset transaction processing condition is reached under the condition that it is monitored that the transaction data amount in the target data cache region reaches a preset data amount threshold.
Further, the obtaining unit 220 is further configured to determine that a preset transaction processing condition is reached when it is monitored that the preset transaction execution time is reached.
Further, the processing unit 230 is further configured to determine an area code identifier corresponding to the target data cache area, and obtain a transaction serial number corresponding to each transaction data in the transaction data packet; and generating the transaction serial number of each transaction data according to the area code identification and the transaction serial number.
Further, the receiving unit 210 is further configured to, in a case that a data packet sent by the transaction initiator is received, decrypt and check the data packet to obtain transaction data after decryption and check.
Further, the receiving unit 210 is further configured to send a decryption and signature verification failure prompt message to the transaction initiator in the case that the decryption and signature verification of the data packet fails.
The transaction asynchronous processing device provided by the invention determines a target data cache region corresponding to a transaction initiator of transaction data by receiving the transaction data, and stores the transaction data to the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to a target data cache region; the sequence number generator is called to mark the transaction sequence number of each transaction data in the transaction data packet, and each transaction data in the transaction data packet is processed in order according to the transaction sequence number, so that the transaction data of each transaction initiator is stored in a subarea mode, and the transaction data in the same subarea are executed in order according to the transaction sequence number, so that the ordered execution of the transactions in the same account is ensured, and the system processing performance is improved.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor) 310, a communication Interface (communication Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication Interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to perform a transaction asynchronous processing method comprising: receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to the target data cache region; and marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing the transaction asynchronous processing method provided by the above methods, the method including: receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to the target data cache region; and marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to execute the transaction asynchronous processing method provided by the above methods, the method including: receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region; under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to the target data cache region; and marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for asynchronous processing of transactions, comprising:
receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region;
under the condition that a preset transaction processing condition is met, acquiring a transaction data packet corresponding to the target data cache region;
and marking the transaction serial number of each transaction data in the transaction data packet, and processing each transaction data in the transaction data packet in order according to the transaction serial number.
2. The transaction asynchronous processing method according to claim 1, wherein said reaching of the preset transaction processing condition specifically comprises:
and under the condition that the transaction data volume in the target data cache region is monitored to reach a preset data volume threshold value, judging that a preset transaction processing condition is reached.
3. The transaction asynchronous processing method according to claim 1, wherein said reaching of the preset transaction processing condition specifically comprises:
and when the preset transaction execution time is reached, judging that the preset transaction processing condition is reached.
4. The transaction asynchronous processing method according to claim 1, wherein the marking of the transaction serial number of each transaction data in the transaction data packet specifically comprises:
determining an area code identifier corresponding to the target data cache area, and acquiring a transaction serial number corresponding to each transaction data in the transaction data packet;
and generating the transaction serial number of each transaction data according to the area code identification and the transaction serial number.
5. The transaction asynchronous processing method according to any of claims 1 to 4, wherein before receiving transaction data, further comprising:
and under the condition of receiving a data packet sent by a transaction initiator, decrypting and checking the data packet to obtain transaction data after decrypting and checking the data packet.
6. The asynchronous transaction processing method of claim 5, wherein after decrypting and verifying the data packet, the asynchronous transaction processing method further comprises:
and sending a decryption and signature verification failure prompt message to the transaction initiator under the condition that the data packet is failed in decryption and signature verification.
7. A transaction asynchronous processing device, comprising:
the receiving unit is used for receiving transaction data, determining a target data cache region corresponding to a transaction initiator of the transaction data, and storing the transaction data to the target data cache region;
the acquisition unit is used for acquiring a transaction data packet corresponding to the target data cache region under the condition that a preset transaction processing condition is met;
and the processing unit is used for marking the transaction serial number of each transaction data in the transaction data packet and processing each transaction data in the transaction data packet in order according to the transaction serial number.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the transaction asynchronous processing method as claimed in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the transaction asynchronous processing method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the transaction asynchronous processing method of any of claims 1 to 6.
CN202210828526.3A 2022-07-13 2022-07-13 Transaction asynchronous processing method, device, equipment, medium and program product Pending CN115309782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210828526.3A CN115309782A (en) 2022-07-13 2022-07-13 Transaction asynchronous processing method, device, equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210828526.3A CN115309782A (en) 2022-07-13 2022-07-13 Transaction asynchronous processing method, device, equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN115309782A true CN115309782A (en) 2022-11-08

Family

ID=83856374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210828526.3A Pending CN115309782A (en) 2022-07-13 2022-07-13 Transaction asynchronous processing method, device, equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115309782A (en)

Similar Documents

Publication Publication Date Title
JP6882474B2 (en) Systems and methods for detecting replay attacks
CN111046109A (en) Cross-chain task processing method, device and equipment and readable storage medium
CN112202779B (en) Block chain based information encryption method, device, equipment and medium
CN112184436B (en) Data synchronization method, electronic device and readable storage medium
CN111552991A (en) Block chain transaction method and device
CN110908812A (en) Business data processing method and device, readable storage medium and computer equipment
CN110784521A (en) Block chain consensus method, electronic device and storage medium
CN110377225A (en) A method of it supporting the transfer of outsourcing data safety and can verify that deletion
CN114157613A (en) Data reporting method, gateway, server, electronic device and storage medium
CN114969803A (en) Data storage method, device and storage medium
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN113129002A (en) Data processing method and equipment
CN112788555B (en) Cross-operator telephone charge transfer settlement method, device and computing equipment
CN108882230B (en) Call record management method, device and system
CN115309782A (en) Transaction asynchronous processing method, device, equipment, medium and program product
CN115022012B (en) Data transmission method, device, system, equipment and storage medium
US20220272203A1 (en) Blockchain-Based Roaming Transaction Method and Apparatus
CN107222453A (en) A kind of document transmission method and device
CN109816525A (en) A kind of data processing method and its device, medium, terminal
CN114418769A (en) Block chain transaction charging method and device and readable storage medium
CN111191273B (en) Method and device for processing document, electronic equipment and readable storage medium
CN113987062A (en) Data uplink storage method, system, device and storage medium
CN103391188A (en) Secret key management method based on symmetric secret key mechanism
CN113468574A (en) Block chain data uplink method and device
CN113221151A (en) Data processing method and device based on block chain and storage medium

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