CN114238411A - Transaction data processing method and device, electronic equipment and storage medium - Google Patents
Transaction data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114238411A CN114238411A CN202111572868.5A CN202111572868A CN114238411A CN 114238411 A CN114238411 A CN 114238411A CN 202111572868 A CN202111572868 A CN 202111572868A CN 114238411 A CN114238411 A CN 114238411A
- Authority
- CN
- China
- Prior art keywords
- transaction
- cluster
- current
- identifier
- target cluster
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Finance (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a transaction data processing method and device, electronic equipment and a storage medium, and relates to the technical field of data verification. One embodiment of the method comprises: receiving transaction data of the current transaction, determining that the current transaction is an associated transaction type, and acquiring a transaction index identifier in the transaction data to send a query request to a cluster cache layer; receiving original transaction information sent by a cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction. The method and the device can solve the problems that the data query efficiency is low and the data processing efficiency is reduced due to the fact that time is long when the original transaction data search depth is large.
Description
Technical Field
The present invention relates to the field of data verification technologies, and in particular, to a method and an apparatus for processing transaction data, an electronic device, and a storage medium.
Background
With the rapid development of the internet and the continuous emergence of new technologies, the system deployed in a single cluster in the past cannot be kept stable in the presence of increasingly large traffic pressure. In order to achieve strong expansibility, high availability and high manageability of the system, multi-clustering has become a reliable system deployment mode, however, when the system deployed by multi-clustering is used for processing the problem of consistency of associated data, the original transaction data is difficult to be accurately positioned, and the associated transaction processing is incomplete. In the prior art, a multi-cluster system can adopt a depth-first search algorithm to perform data traversal query of a cluster so as to determine that the original transaction data is accurately searched, but along with the expansion of the traffic volume and the expansion of machines of the cluster system, the depth-first search algorithm needs to spend a long time when the search depth is large, so that the data query efficiency is low, and the data processing efficiency is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a transaction data processing method and apparatus, an electronic device, and a storage medium, which can solve the problems that the original transaction data needs to spend a long time when the search depth is very large, so that the efficiency of data query is low, and the data processing efficiency is reduced.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for processing transaction data is provided.
The transaction data processing method of the embodiment of the invention comprises the following steps: receiving transaction data of a current transaction, determining that the current transaction is an associated transaction type, acquiring a transaction index identifier in the transaction data, and sending an inquiry request comprising the transaction index identifier to a cluster cache layer so that the cluster cache layer inquires corresponding original transaction information; receiving original transaction information sent by the cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring the target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
In one embodiment, querying target cluster information corresponding to the target cluster identifier to determine a transaction service handler corresponding to the current transaction includes:
acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with the target cluster identifier;
if yes, determining the target cluster as a current cluster to call a thread in the current cluster and determine a transaction service processing program corresponding to the current transaction; if not, inquiring corresponding target cluster address information based on the target cluster identifier, and calling a preset outbound service to send the transaction data to the target cluster, so that the target cluster determines a transaction service processing program corresponding to the current transaction.
In another embodiment, determining the transaction service processing program corresponding to the current transaction includes:
and identifying the service type of the current transaction based on the transaction data, and inquiring a service processing program corresponding to the service type to determine the service processing program corresponding to the current transaction.
In another embodiment, invoking a preset routing decision module to determine that the original transaction information includes a target cluster identifier includes:
judging whether the original transaction information comprises a cluster identifier;
if yes, determining that the original transaction information comprises a target cluster identifier; if not, determining that the database query program is the service processing program corresponding to the current transaction.
In another embodiment, after the determining that the database query program is the business processing program corresponding to the current transaction, the method further includes
Triggering the database query program based on the transaction data so as to send a query request of the original transaction information to a preset database;
receiving returned original transaction information, and acquiring a target cluster identifier in the original transaction information;
and inquiring the target cluster information corresponding to the target cluster identification, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
In another embodiment, after obtaining the target cluster identifier in the original transaction information, the method further includes:
and sending the target cluster identifier and the transaction index identifier to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identifier and the target cluster identifier.
In another embodiment, before receiving the returned original transaction information, the method further comprises:
receiving overtime bottom-holding prompt information sent by the database, and inquiring a corresponding original transaction service system based on the transaction index identification so as to send an acquisition request of the original transaction information to the original transaction service system.
In another embodiment, after receiving the transaction data of the current transaction, the method further comprises:
under the condition that the current transaction is determined not to be the associated transaction type, acquiring a transaction index identifier and a cluster identifier of a current cluster in the transaction data;
and sending a transaction information storage message to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identification and the cluster identification.
To achieve the above object, according to another aspect of the embodiments of the present invention, a transaction data processing device is provided.
The transaction data processing device of the embodiment of the invention comprises: the receiving unit is used for receiving transaction data of current transaction, determining that the current transaction is an associated transaction type, acquiring a transaction index identifier in the transaction data, and sending an inquiry request comprising the transaction index identifier to a cluster cache layer so as to enable the cluster cache layer to inquire corresponding original transaction information; and the processing unit is used for receiving the original transaction information sent by the cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring the target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the transaction data processing method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements a transaction data processing method provided by an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product.
A computer program product according to an embodiment of the present invention includes a computer program, and when the computer program is executed by a processor, the computer program implements a method for processing transaction data according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, a cluster cache layer is arranged in a cluster, and the corresponding relation between the identification of each transaction and the cluster identification of the cluster in which the original transaction information is positioned is stored through the cluster cache layer, so that after the transaction data of the current transaction is received and the current transaction is determined to be the associated transaction type, the corresponding original transaction information can be directly inquired from the cluster cache layer through a transaction index identification, and then a preset routing decision module can be called to determine the target cluster information, so that the accurate positioning of the original transaction information is realized, and the corresponding service processing is carried out on the transaction data. Therefore, the query process of the original transaction information is simplified, and the time spent on transaction processing is reduced, so that the query efficiency of the original transaction information and the transaction data processing efficiency are improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic view of a main flow of a transaction data processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of one configuration of a transaction data processing system according to an embodiment of the invention;
FIG. 3 is a schematic diagram of yet another major flow of a method of processing transaction data according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main elements of a transaction data processing apparatus according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
An embodiment of the present invention provides a method for processing transaction data, where the method may be executed by a system for processing transaction data, as shown in fig. 1, and the method includes:
s101: receiving transaction data of the current transaction, determining that the current transaction is an associated transaction type, obtaining a transaction index identifier in the transaction data, and sending a query request comprising the transaction index identifier to the cluster cache layer so that the cluster cache layer queries corresponding original transaction information.
The current transaction may be various, and the transaction data may include a transaction index identifier of the transaction, a transaction type, an amount, and the like.
The associated transaction means that the current transaction has an association relation with the original transaction, and the business processing of the current transaction needs to depend on the consistency state of the original transaction data, such as the transaction processing of consumption and consumption reversal, and the transaction-level association cycle data, such as the transaction processing of consumption and consumption reversal. When the data of the associated transaction type is processed by the service, the original transaction data, namely the processing result of the original transaction, needs to be positioned first, and then the corresponding service processing is executed based on the processing result of the original transaction, so that the storage position of the original transaction data needs to be accurately positioned before the service processing.
In the embodiment of the invention, in a multi-cluster deployed system, a cluster cache layer is added to provide a cache service for associating original transaction information in transactions, and the original transaction information can be specifically a corresponding relation between a cluster identifier for storing an original transaction processing result and a transaction index identifier. For example, the original transaction information may be stored in a key-value mode, where the key is a transaction index identifier corresponding to the original transaction, and the value is a cluster identifier storing a processing result of the original transaction. Because the transaction index identification of the current transaction in the associated transaction is the same as the transaction index identification corresponding to the original transaction, the original transaction information can be inquired through the transaction index identification of the current transaction in the associated transaction.
Therefore, in this step, after receiving the transaction data of the current transaction, it may be determined whether the current transaction is a related transaction type, specifically, the determination may be performed based on the transaction keyword, the transaction description information, the transaction type identifier, and the like in the transaction data. After determining that the current transaction is the associated transaction type, the transaction index identifier in the transaction data may be obtained, so as to send a query request corresponding to the original transaction information, that is, a query request including the transaction index identifier, to the cluster cache layer, where the query request is used to query the original transaction information corresponding to the current transaction, such as the cluster identifier storing the processing result of the original transaction.
It should be noted that, after receiving the transaction data of the current transaction in this step, the current transaction may not be an associated transaction type, and at this time, the corresponding service processing may be directly performed without querying the original transaction information, but the transaction data may be the original transaction corresponding to other transactions.
S102: receiving original transaction information sent by a cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
After the cluster cache layer sends the original transaction information, a preset routing decision module can be called to process the original transaction information. The routing decision module can judge whether the original transaction information includes the target cluster identifier, and after the original transaction information is determined to include the target cluster identifier, the target cluster information can be positioned based on the target cluster identifier, namely the cluster information of the original transaction processing result is stored, so that a transaction service processing program corresponding to the current transaction can be determined, and the current transaction is processed.
It should be noted that, if the target cluster is the current cluster, the current cluster may directly obtain the processing result of the original transaction, and further process the transaction data of the current transaction; if the target cluster is not the current cluster, the current cluster needs to acquire a processing result of the original transaction from the target cluster to process the transaction data of the current transaction, or send the transaction data to the target cluster, so that the target cluster queries the processing result of the original transaction to process the transaction data of the current transaction. In the embodiment of the present invention, when the target cluster is not the current cluster, the current cluster sends the transaction data to the target cluster, so that the target cluster queries the processing result of the original transaction to process the transaction data of the current transaction.
Specifically, when the target cluster is the current cluster, the thread of the current cluster may be used to perform service processing on the current transaction, and when the target cluster is not the current cluster, the outbound service needs to be invoked to invoke the associated transaction processing service of the target cluster. This step can be specifically performed as: acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with a target cluster identifier; if yes, determining the target cluster as the current cluster, calling a thread in the current cluster, and determining a transaction service processing program corresponding to the current transaction; if not, calling a preset outbound service based on the target cluster identifier to send the transaction data to the target cluster, and further enabling the target cluster to determine a transaction service processing program corresponding to the current transaction.
It should be noted that, in the embodiment of the present invention, the service type of the current transaction may be identified based on the transaction data, for example, for a transaction with consumption cancellation, the transaction data generally includes an identifier or a word indicating consumption cancellation, so that the service type of the current transaction may be identified through the transaction data in this step, and further, a service processing program corresponding to the service type may be queried to determine the service processing program corresponding to the current transaction.
In the embodiment of the present invention, the original transaction information of the current transaction may not be stored in the cluster cache layer due to factors such as an error storage, and at this time, the original transaction information returned by the cluster cache layer does not include the target cluster identifier. If yes, the cluster cache layer is indicated to store the original transaction information, the cluster identifier in the original transaction information can be determined as the target cluster identifier, and then the processing process is executed; if not, the cluster cache layer is indicated to not store the original transaction information, and at this time, in order to ensure data consistency, the target cluster identifier can be queried through the database, that is, the database query program is determined to be the service processing program corresponding to the current transaction.
After determining that the database query program is a service processing program corresponding to the current transaction, the database query program can be executed, specifically: and triggering a database query program based on the transaction data so as to send a query request of the original transaction data to the database, wherein the query request comprises the transaction index identification in the transaction data. After receiving the query request, the database can query the original transaction information based on the query request and return the query result. Therefore, after the query request is sent in this step, the original transaction information returned by the database can be received, and then the target cluster identifier in the original transaction information can be obtained, so as to query the target cluster information corresponding to the target cluster identifier, and further determine the transaction service processing program corresponding to the current transaction, and process the current transaction.
It should be noted that, in the execution process of the database query program, the database may not store the original transaction information, and at this time, the database returns the timeout bottom information. After receiving the overtime bottom-holding information, the original transaction information in the database can be determined to be unable to be inquired, and at the moment, the original transaction information can be acquired from the service system corresponding to the original transaction, so that after receiving the overtime bottom-holding prompt information sent by the database, the corresponding original transaction service system can be inquired based on the transaction index identifier, so as to send an acquisition request of the original transaction information to the original transaction service system, and after receiving the original transaction information, the routing decision module is called, so as to execute the processing process in the step.
In the embodiment of the invention, a cluster cache layer is arranged in a cluster, and the corresponding relation between the identification of each transaction and the cluster identification of the cluster in which the original transaction information is positioned is stored through the cluster cache layer, so that after the transaction data of the current transaction is received and the current transaction is determined to be the associated transaction type, the corresponding original transaction information can be directly inquired from the cluster cache layer through a transaction index identification, and then a preset routing decision module can be called to determine the target cluster information, so that the accurate positioning of the original transaction information is realized, and the corresponding service processing is carried out on the transaction data. Therefore, the query process of the original transaction information is simplified, and the time spent on transaction processing is reduced, so that the query efficiency of the original transaction information and the transaction data processing efficiency are improved.
With reference to the embodiment shown in fig. 1, an embodiment of the present invention provides the transaction data processing system shown in fig. 2, where a plurality of clusters and a cluster cache layer are deployed in the transaction data processing system, and the cluster cache layer may perform data transmission with each cluster to store and query original transaction information. Meanwhile, each cluster is also provided with a route decision module so as to receive query information returned by the cluster cache layer and process the query information through the route decision module.
The following describes, in detail, a method for processing transaction data in an embodiment of the present invention with reference to the embodiment shown in fig. 1 and the system structure shown in fig. 2, as shown in fig. 3, the method includes:
s301: and receiving transaction data of the current transaction, and determining that the current transaction is the associated transaction type.
S302: the method comprises the steps of obtaining transaction index identification in transaction data, and sending a query request comprising the transaction index identification to a cluster cache layer.
S303: and receiving the original transaction information sent by the cluster cache layer.
S304: calling a routing decision module, judging whether the original transaction information comprises a target cluster identifier, if so, executing the step S305; if not, triggering a database query program based on the transaction data so as to send a query request of the original transaction data to the database.
S305: acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with a target cluster identifier, if so, executing a step S306; if not, go to step S307.
S306: and calling the thread in the current cluster, and determining a transaction service processing program corresponding to the current transaction.
S307: and calling a preset outbound service based on the target cluster identifier to send the transaction data to the target cluster, so that the target cluster determines a transaction service processing program corresponding to the current transaction.
In the embodiment of the invention, the cluster cache layer can loosely couple the machine query among different clusters, the routing decision module performs special processing aiming at the data consistency under different scenes to finish high cohesion of the machine query in the clusters, and the database retrieval module is added to perform deep processing on the relevance period data so as to ensure the closed loop of the life cycle of the system data. According to the embodiment of the invention, the system cluster can be stably deployed, and the consistency and reliable processing of the system can be realized under the condition that the current production is not influenced by the expansion of the machine. The cluster cache layer is arranged and can be used for caching data cluster information, such as original transaction information, the routing decision module is responsible for scheduling machines in a cluster, and data volume retrieval can be used for consistency processing of associated transaction data, so that service risks such as customer complaints and financial problems caused by the fact that key original data are not retrieved in place are avoided.
In order to solve the problems in the prior art, an embodiment of the present invention provides a transaction data processing apparatus 400, as shown in fig. 4, where the apparatus 400 includes:
a receiving unit 401, configured to receive transaction data of a current transaction, determine that the current transaction is an associated transaction type, obtain a transaction index identifier in the transaction data, and send an inquiry request including the transaction index identifier to a cluster cache layer, so that the cluster cache layer inquires corresponding original transaction information;
a processing unit 402, configured to receive original transaction information sent by the cluster cache layer, call a preset routing decision module to determine that the original transaction information includes a target cluster identifier, query target cluster information corresponding to the target cluster identifier, and further determine a transaction service processing program corresponding to the current transaction, so as to process the current transaction.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 1, and the description thereof is omitted.
In an embodiment, the processing unit 402 is specifically configured to:
acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with the target cluster identifier;
if yes, determining the target cluster as a current cluster to call a thread in the current cluster and determine a transaction service processing program corresponding to the current transaction; if not, inquiring corresponding target cluster address information based on the target cluster identifier, and calling a preset outbound service to send the transaction data to the target cluster, so that the target cluster determines a transaction service processing program corresponding to the current transaction.
In another embodiment, the processing unit 402 is specifically configured to:
and identifying the service type of the current transaction based on the transaction data, and inquiring a service processing program corresponding to the service type to determine the service processing program corresponding to the current transaction.
In another embodiment, the processing unit 402 is specifically configured to:
judging whether the original transaction information comprises a cluster identifier;
if yes, determining that the original transaction information comprises a target cluster identifier; if not, determining that the database query program is the service processing program corresponding to the current transaction.
In another embodiment, the processing unit 402 is specifically configured to:
triggering the database query program based on the transaction data so as to send a query request of the original transaction information to a preset database;
receiving returned original transaction information, and acquiring a target cluster identifier in the original transaction information;
and inquiring the target cluster information corresponding to the target cluster identification, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
In another embodiment, the processing unit 402 is specifically configured to:
and sending the target cluster identifier and the transaction index identifier to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identifier and the target cluster identifier.
In another embodiment, the processing unit 402 is specifically configured to:
receiving overtime bottom-holding prompt information sent by the database, and inquiring a corresponding original transaction service system based on the transaction index identification so as to send an acquisition request of the original transaction information to the original transaction service system.
In another embodiment, the processing unit 402 is further configured to:
under the condition that the current transaction is determined not to be the associated transaction type, acquiring a transaction index identifier and a cluster identifier of a current cluster in the transaction data;
and sending a transaction information storage message to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identification and the cluster identification.
It should be understood that the embodiment of the present invention is implemented in the same manner as the embodiment shown in fig. 1 or fig. 3, and is not repeated herein.
In the embodiment of the invention, a cluster cache layer is arranged in a cluster, and the corresponding relation between the identification of each transaction and the cluster identification of the cluster in which the original transaction information is positioned is stored through the cluster cache layer, so that after the transaction data of the current transaction is received and the current transaction is determined to be the associated transaction type, the corresponding original transaction information can be directly inquired from the cluster cache layer through a transaction index identification, and then a preset routing decision module can be called to determine the target cluster information, so that the accurate positioning of the original transaction information is realized, and the corresponding service processing is carried out on the transaction data. Therefore, the query process of the original transaction information is simplified, and the time spent on transaction processing is reduced, so that the query efficiency of the original transaction information and the transaction data processing efficiency are improved.
According to an embodiment of the present invention, an electronic device and a readable storage medium are also provided.
The electronic device of the embodiment of the invention comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the transaction data processing method provided by the embodiment of the invention.
Fig. 5 illustrates an exemplary system architecture 500 of a transaction data processing method or a transaction data processing apparatus to which embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, and the server may analyze and process data such as a received product information query request, and feed back a processing result (for example, product information — just an example) to the terminal device.
It should be noted that the transaction data processing method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the transaction data processing device is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 6 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, 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 or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, 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.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit and a processing unit. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, a receiving element may also be described as "an element of the function of the receiving element".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the transaction data processing method provided by the present invention.
As another aspect, the present invention further provides a computer program product including a computer program, where the computer program is executed by a processor to implement the transaction data processing method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (17)
1. A method of processing transaction data, comprising:
receiving transaction data of a current transaction, determining that the current transaction is an associated transaction type, acquiring a transaction index identifier in the transaction data, and sending an inquiry request comprising the transaction index identifier to a cluster cache layer so that the cluster cache layer inquires corresponding original transaction information;
receiving original transaction information sent by the cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring the target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
2. The method of claim 1, wherein querying target cluster information corresponding to the target cluster identifier to determine a transaction service handler corresponding to the current transaction comprises:
acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with the target cluster identifier;
if yes, determining the target cluster as a current cluster to call a thread in the current cluster and determine a transaction service processing program corresponding to the current transaction; if not, inquiring corresponding target cluster address information based on the target cluster identifier, and calling a preset outbound service to send the transaction data to the target cluster, so that the target cluster determines a transaction service processing program corresponding to the current transaction.
3. The method of claim 2, wherein determining the transaction service handler corresponding to the current transaction comprises:
and identifying the service type of the current transaction based on the transaction data, and inquiring a service processing program corresponding to the service type to determine the service processing program corresponding to the current transaction.
4. The method of claim 1, wherein invoking a preset routing decision module to determine that the original transaction information includes a target cluster identifier comprises:
judging whether the original transaction information comprises a cluster identifier;
if yes, determining that the original transaction information comprises a target cluster identifier; if not, determining that the database query program is the service processing program corresponding to the current transaction.
5. The method of claim 4, wherein after determining that the database query procedure is the business process procedure corresponding to the current transaction, further comprising
Triggering the database query program based on the transaction data so as to send a query request of the original transaction information to a preset database;
receiving returned original transaction information, and acquiring a target cluster identifier in the original transaction information;
and inquiring the target cluster information corresponding to the target cluster identification, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
6. The method of claim 5, after obtaining the target cluster identifier in the original transaction information, further comprising:
and sending the target cluster identifier and the transaction index identifier to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identifier and the target cluster identifier.
7. The method of claim 5, further comprising, prior to receiving the returned original transaction information:
receiving overtime bottom-holding prompt information sent by the database, and inquiring a corresponding original transaction service system based on the transaction index identification so as to send an acquisition request of the original transaction information to the original transaction service system.
8. The method of claim 1, wherein after receiving transaction data for a current transaction, further comprising:
under the condition that the current transaction is determined not to be the associated transaction type, acquiring a transaction index identifier and a cluster identifier of a current cluster in the transaction data;
and sending a transaction information storage message to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identification and the cluster identification.
9. An apparatus for processing transaction data, comprising:
the receiving unit is used for receiving transaction data of current transaction, determining that the current transaction is an associated transaction type, acquiring a transaction index identifier in the transaction data, and sending an inquiry request comprising the transaction index identifier to a cluster cache layer so as to enable the cluster cache layer to inquire corresponding original transaction information;
and the processing unit is used for receiving the original transaction information sent by the cluster cache layer, calling a preset routing decision module to determine that the original transaction information comprises a target cluster identifier, inquiring the target cluster information corresponding to the target cluster identifier, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
10. The apparatus according to claim 9, wherein the processing unit is specifically configured to:
acquiring a cluster identifier of a current cluster to judge whether the cluster identifier is consistent with the target cluster identifier;
if yes, determining the target cluster as a current cluster to call a thread in the current cluster and determine a transaction service processing program corresponding to the current transaction; if not, inquiring corresponding target cluster address information based on the target cluster identifier, and calling a preset outbound service to send the transaction data to the target cluster, so that the target cluster determines a transaction service processing program corresponding to the current transaction.
11. The apparatus according to claim 10, wherein the processing unit is specifically configured to:
and identifying the service type of the current transaction based on the transaction data, and inquiring a service processing program corresponding to the service type to determine the service processing program corresponding to the current transaction.
12. The apparatus according to claim 9, wherein the processing unit is specifically configured to:
judging whether the original transaction information comprises a cluster identifier;
if yes, determining that the original transaction information comprises a target cluster identifier; if not, determining that the database query program is the service processing program corresponding to the current transaction.
13. The apparatus according to claim 12, wherein the processing unit is specifically configured to:
triggering the database query program based on the transaction data so as to send a query request of the original transaction information to a preset database;
receiving returned original transaction information, and acquiring a target cluster identifier in the original transaction information;
and inquiring the target cluster information corresponding to the target cluster identification, further determining a transaction service processing program corresponding to the current transaction, and processing the current transaction.
14. The apparatus according to claim 12, wherein the processing unit is specifically configured to:
and sending the target cluster identifier and the transaction index identifier to the cluster cache layer so that the cluster cache layer stores the corresponding relation between the transaction index identifier and the target cluster identifier.
15. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
16. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
17. A computer program product comprising a computer program, characterized in that the program realizes the method according to any of claims 1-8 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111572868.5A CN114238411A (en) | 2021-12-21 | 2021-12-21 | Transaction data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111572868.5A CN114238411A (en) | 2021-12-21 | 2021-12-21 | Transaction data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114238411A true CN114238411A (en) | 2022-03-25 |
Family
ID=80760416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111572868.5A Pending CN114238411A (en) | 2021-12-21 | 2021-12-21 | Transaction data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114238411A (en) |
-
2021
- 2021-12-21 CN CN202111572868.5A patent/CN114238411A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113127564B (en) | Parameter synchronization method and device | |
CN110909022A (en) | Data query method and device | |
CN111460129A (en) | Method and device for generating identification, electronic equipment and storage medium | |
CN111881329A (en) | Account balance management method and system | |
CN114281663A (en) | Test processing method, test processing device, electronic equipment and storage medium | |
CN113282589A (en) | Data acquisition method and device | |
CN110928594A (en) | Service development method and platform | |
CN116450622B (en) | Method, apparatus, device and computer readable medium for data warehouse entry | |
CN113704222A (en) | Method and device for processing service request | |
CN112948138A (en) | Method and device for processing message | |
CN113220705A (en) | Slow query identification method and device | |
CN112131257B (en) | Data query method and device | |
CN108933802B (en) | Method and apparatus for monitoring operation | |
CN112214500A (en) | Data comparison method and device, electronic equipment and storage medium | |
CN113726885B (en) | Flow quota adjusting method and device | |
CN115858905A (en) | Data processing method and device, electronic equipment and storage medium | |
CN110806967A (en) | Unit testing method and device | |
CN114238411A (en) | Transaction data processing method and device, electronic equipment and storage medium | |
CN114764713A (en) | Method and device for generating merchant patrol task, electronic equipment and storage medium | |
CN110309121B (en) | Log processing method and device, computer readable medium and electronic equipment | |
CN113760315A (en) | Method and device for testing system | |
CN113127416A (en) | Data query method and device | |
CN112732471A (en) | Error correction method and error correction device for interface return data | |
CN112862554A (en) | Order data processing method and device | |
CN112948430B (en) | Date data query method and device |
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 |