Transaction data processing method and apparatus, electronic device, and storage medium
By introducing a cluster caching layer and a routing decision module into a multi-cluster system, the problem of long transaction data query time in multi-cluster systems is solved, and efficient transaction data processing is achieved.
Patent Information
- Application Number
- CN202111572868.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In multi-cluster systems, the depth-first search algorithm results in long query times and reduced data processing efficiency when processing related transaction data.
In a multi-cluster system, a cluster caching layer is introduced. The original transaction information is queried by identifying the transaction index, and the target cluster information is determined by the routing decision module, so as to accurately locate the transaction data for processing.
By combining the cluster caching layer and the routing decision module, the process of querying transaction information is simplified, and the efficiency of querying and processing transaction data is improved.
Smart Images

Figure CN114238411B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data verification technology, and in particular to a method, apparatus, electronic device, and storage medium for processing transaction data. Background Technology
[0002] With the rapid development of the internet and the continuous emergence of new technologies, systems previously deployed in a single cluster can no longer maintain stability under the ever-increasing traffic pressure. To achieve strong scalability, high availability, and high manageability, multi-cluster deployment has become a reliable system deployment method. However, when dealing with consistency issues related to data, multi-cluster systems struggle to accurately locate the original transaction data, leading to incomplete processing of related transactions. Existing technologies use depth-first search algorithms to traverse and query the cluster's data to accurately locate the original transaction data. However, as the workload and machine capacity of the cluster system increase, depth-first search algorithms become increasingly time-consuming when the search depth is large, resulting in low data query efficiency and consequently reducing data processing efficiency. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method, apparatus, electronic device and storage medium for processing transaction data, which can solve the problem that when the original transaction data has a large search depth, it takes a long time, resulting in low data query efficiency and reduced data processing efficiency.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for processing transaction data is provided.
[0005] An embodiment of the present invention provides a method for processing transaction data, comprising: receiving transaction data of a current transaction, determining that the current transaction is a related transaction type, obtaining a transaction index identifier in the transaction data, sending a query request including the transaction index identifier to a cluster cache layer, so that the cluster cache layer queries the corresponding original transaction information; receiving the original transaction information sent by the cluster cache layer, invoking a preset routing decision module to determine that the original transaction information includes a target cluster identifier, querying the target cluster information corresponding to the target cluster identifier, and then determining the transaction business processing program corresponding to the current transaction, and processing the current transaction.
[0006] In one embodiment, querying the target cluster information corresponding to the target cluster identifier, and then determining the transaction processing procedure corresponding to the current transaction, includes:
[0007] Obtain the cluster identifier of the current cluster to determine whether it matches the target cluster identifier;
[0008] If yes, then the target cluster is determined to be the current cluster, and a thread in the current cluster is invoked to determine the transaction processing program corresponding to the current transaction; if not, the target cluster address information is queried based on the target cluster identifier, and a preset outbound call service is invoked to send the transaction data to the target cluster, thereby enabling the target cluster to determine the transaction processing program corresponding to the current transaction.
[0009] In yet another embodiment, determining the transaction processing procedure corresponding to the current transaction includes:
[0010] Based on the transaction data, the business type of the current transaction is identified, and the corresponding business processing program is queried to determine the business processing program corresponding to the current transaction.
[0011] In another embodiment, a preset routing decision module is invoked to determine that the original transaction information includes a target cluster identifier, including:
[0012] Determine whether the original transaction information includes a cluster identifier;
[0013] If yes, then the original transaction information is determined to include the target cluster identifier; if not, then the database query program is determined to be the business processing program corresponding to the current transaction.
[0014] In yet another embodiment, after determining that the database query program is the business processing program corresponding to the current transaction, the method further includes...
[0015] The database query program is triggered based on the transaction data to send a query request for the original transaction information to a preset database.
[0016] Receive the returned original transaction information and obtain the target cluster identifier from the original transaction information;
[0017] The target cluster information corresponding to the target cluster identifier is queried to determine the transaction processing program corresponding to the current transaction and process the current transaction.
[0018] In yet another embodiment, after obtaining the target cluster identifier from the original transaction information, the method further includes:
[0019] The target cluster identifier and the transaction index identifier are sent to the cluster cache layer so that the cluster cache layer stores the correspondence between the transaction index identifier and the target cluster identifier.
[0020] In yet another embodiment, before receiving the returned original transaction information, the method further includes:
[0021] The system receives a timeout fallback notification from the database, queries the corresponding original transaction business system based on the transaction index identifier, and sends a request to the original transaction business system to retrieve the original transaction information.
[0022] In yet another embodiment, after receiving the transaction data of the current transaction, the method further includes:
[0023] If it is determined that the current transaction is not a related transaction type, obtain the transaction index identifier and the cluster identifier of the current cluster from the transaction data;
[0024] A transaction information storage message is sent to the cluster cache layer so that the cluster cache layer stores the correspondence between the transaction index identifier and the cluster identifier.
[0025] To achieve the above objectives, according to another aspect of the present invention, a transaction data processing apparatus is provided.
[0026] An embodiment of the present invention provides a transaction data processing apparatus comprising: a receiving unit, configured to receive transaction data of a current transaction, determine that the current transaction is a related transaction type, obtain a transaction index identifier in the transaction data, and send a query request including the transaction index identifier to a cluster cache layer so that the cluster cache layer can query the corresponding original transaction information; and a processing unit, configured to receive the original transaction information sent by the cluster cache layer, invoke a preset routing decision module to determine that the original transaction information includes a target cluster identifier, query the target cluster information corresponding to the target cluster identifier, and then determine the transaction business processing program corresponding to the current transaction and process the current transaction.
[0027] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.
[0028] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the transaction data processing method provided in the embodiment of the present invention.
[0029] To achieve the above objectives, according to another aspect of the present invention, a computer-readable medium is provided.
[0030] An embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the transaction data processing method provided in the embodiment of the present invention.
[0031] To achieve the above objectives, according to another aspect of the present invention, a computer program product is provided.
[0032] A computer program product according to an embodiment of the present invention includes a computer program that, when executed by a processor, implements the transaction data processing method provided in the embodiment of the present invention.
[0033] One embodiment of the above invention has the following advantages or beneficial effects: In this embodiment, a cluster cache layer is set up in the cluster, and the cluster cache layer stores the correspondence between the identifier of each transaction and the cluster identifier of the original transaction information. Therefore, after receiving the transaction data of the current transaction and determining that the current transaction is a related transaction type, the corresponding original transaction information can be directly queried from the cluster cache layer through the transaction index identifier. Then, a preset routing decision module can be called to determine the target cluster information, thereby achieving accurate positioning of the original transaction information and performing corresponding business processing on the transaction data. This simplifies the query process of the original transaction information, reduces the time required for transaction processing, and thus improves the efficiency of querying the original transaction information and the efficiency of transaction data processing.
[0034] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0035] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0036] Figure 1 This is a schematic diagram of a main flow of a transaction data processing method according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of a transaction data processing system according to an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of another main process of a transaction data processing method according to an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the main units of a transaction data processing apparatus according to an embodiment of the present invention;
[0040] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0041] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present invention. Detailed Implementation
[0042] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0043] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.
[0044] This invention provides a method for processing transaction data, which can be executed by a transaction data processing system, such as... Figure 1 As shown, the method includes:
[0045] S101: Receive the transaction data of the current transaction, determine that the current transaction is a related transaction type, obtain the transaction index identifier in the transaction data, and send a query request including the transaction index identifier to the cluster cache layer so that the cluster cache layer can query the corresponding original transaction information.
[0046] The current transaction can be of various types, and the transaction data can include the transaction index identifier, transaction type, amount, etc.
[0047] Related transactions indicate that the current transaction is related to an earlier transaction, and the business processing of the current transaction depends on the consistency of the data in the earlier transaction. Examples include transactions involving consumption and consumption reversal, as well as transaction-level related periodic data, such as transactions involving consumption and consumption cancellation. When processing data of this type of related transaction, it is necessary to first locate the data in the earlier transaction, i.e., the processing result of the earlier transaction, and then execute the corresponding business processing based on the processing result of the earlier transaction. Therefore, it is necessary to accurately locate the storage location of the earlier transaction data before processing it.
[0048] In this embodiment of the invention, a cluster caching layer is added to a multi-cluster deployed system to provide caching services for original transaction information in related transactions. Specifically, the original transaction information can be the correspondence between the cluster identifier storing the original transaction processing result and the transaction index identifier. For example, the original transaction information can be stored in a key-value pattern, where the key is the transaction index identifier corresponding to the original transaction, and the value is the cluster identifier storing the original transaction processing result. Since the transaction index identifier of the current transaction in the related transaction is the same as the transaction index identifier corresponding to the original transaction, the original transaction information can be queried through the transaction index identifier of the current transaction in the related transaction.
[0049] Therefore, in this step, after receiving the transaction data of the current transaction, we can first determine whether the current transaction is a related transaction type. This can be done based on transaction keywords, transaction description information, transaction type identifiers, etc., in the transaction data. After determining that the current transaction is a related transaction type, we can obtain the transaction index identifier from the transaction data to send a query request for the corresponding original transaction information to the cluster cache layer. That is, a query request including the transaction index identifier is used to query the original transaction information corresponding to the current transaction, such as the cluster identifier storing the original transaction processing result.
[0050] It should be noted that after receiving the transaction data of the current transaction in this step, the current transaction may not be a related transaction type. In this case, there is no need to query the original transaction information, and the corresponding business processing can be performed directly. However, the transaction data may be the original transaction corresponding to other transactions. Therefore, in this embodiment of the invention, after processing the transaction data, the transaction index identifier and the cluster identifier of the current cluster in the transaction data can be sent to the cluster cache layer so that the cluster cache layer can store the correspondence between the transaction index identifier and the cluster identifier of the current cluster, thereby realizing the accurate location of the original transaction information of other related transactions in the future.
[0051] S102: Receive the original transaction information sent by the cluster cache layer, call the preset routing decision module to determine that the original transaction information includes the target cluster identifier, query the target cluster information corresponding to the target cluster identifier, and then determine the transaction business processing program corresponding to the current transaction and process the current transaction.
[0052] After the cluster cache layer sends the original transaction information, it can call a preset routing decision module to process it. The routing decision module can determine whether the original transaction information includes the target cluster identifier. If it is determined that the original transaction information includes the target cluster identifier, the target cluster information, i.e., the cluster information storing the original transaction processing results, can be located based on the target cluster identifier. This allows the determination of the transaction business processing program corresponding to the current transaction, and thus the processing of the current transaction.
[0053] It should be noted that if the target cluster is the current cluster, the current cluster can directly obtain the processing result of the original transaction and then process the transaction data of the current transaction. If the target cluster is not the current cluster, the current cluster needs to first obtain the 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 can query the processing result of the original transaction to process the transaction data of the current transaction. In this embodiment of the invention, when the target cluster is not the current cluster, the example of the current cluster sending the transaction data to the target cluster so that the target cluster can query the processing result of the original transaction to process the transaction data of the current transaction is used for illustration.
[0054] Specifically, when the target cluster is the current cluster, the threads of the current cluster can be used to process the current transaction. However, when the target cluster is not the current cluster, an outbound call service needs to be invoked to call the associated transaction processing service of the target cluster. Therefore, this step can be specifically executed as follows: obtain the cluster identifier of the current cluster to determine if it matches the target cluster identifier; if so, determine that the target cluster is the current cluster, and invoke the threads in the current cluster to determine the transaction processing program corresponding to the current transaction; if not, invoke the preset outbound call service based on the target cluster identifier to send the transaction data to the target cluster, thereby enabling the target cluster to determine the transaction processing program corresponding to the current transaction.
[0055] It should be noted that, in this embodiment of the invention, the business type of the current transaction can be identified based on the transaction data. For example, for a transaction that cancels a purchase, the transaction data usually includes an identifier or word indicating the cancellation of the purchase. Therefore, this step can identify the business type of the current transaction through the transaction data, and then query the business processing program corresponding to the business type to determine the business processing program corresponding to the current transaction.
[0056] In this embodiment of the invention, due to factors such as incorrect storage, the original transaction information of the current transaction may not be stored in the cluster cache layer. In this case, the original transaction information returned by the cluster cache layer will not include the target cluster identifier. Therefore, after calling the preset routing decision module in this step, it can be determined whether the original transaction information includes the cluster identifier. If yes, it means that the cluster cache layer stores the original transaction information, and the cluster identifier in the original transaction information can be determined as the target cluster identifier, and then the above processing procedure can be executed; if no, it means that the cluster cache layer does not store the original transaction information. In this case, in order to ensure data consistency, the target cluster identifier can be queried through the database, that is, the database query program can be determined as the business processing program corresponding to the current transaction.
[0057] Once the database query program is identified as the business processing program corresponding to the current transaction, it can be executed. Specifically, the database query program is triggered based on the transaction data to send a query request for the original transaction data to the database. This query request includes the transaction index identifier from the transaction data. After receiving the query request, the database can query the original transaction information based on the request and return the query results. Thus, in this step, after sending the query request, the database can receive the original transaction information returned by the database. This allows the database to obtain the target cluster identifier from the original transaction information, query the target cluster information corresponding to the target cluster identifier, and ultimately determine the transaction business processing program corresponding to the current transaction for processing.
[0058] It should be noted that during the execution of the database query program described above, the original transaction information may not be stored in the database. In this case, the database will return a timeout fallback message. After receiving the timeout fallback message, it can be determined that the original transaction information cannot be found in the database either. In this case, the original transaction information can still be obtained from the business system corresponding to the original transaction. Therefore, after receiving the timeout fallback message sent by the database, the corresponding original transaction business system can be queried based on the transaction index identifier to send a request to the original transaction business system to obtain the original transaction information. After receiving the original transaction information, the routing decision module is called to execute the processing procedure in this step.
[0059] In this embodiment of the invention, a cluster cache layer is set up in the cluster to store the correspondence between the identifiers of each transaction and the cluster identifiers of the original transaction information. Therefore, after receiving the transaction data of the current transaction and determining that the current transaction is a related transaction type, the corresponding original transaction information can be directly queried from the cluster cache layer through the transaction index identifier. Then, a preset routing decision module can be invoked to determine the target cluster information, achieving accurate positioning of the original transaction information for corresponding business processing. This simplifies the process of querying the original transaction information, reduces the time required for transaction processing, and thus improves the efficiency of querying the original transaction information and the efficiency of transaction data processing.
[0060] Combination Figure 1 The embodiments shown in this paper provide, as described in the present invention, such as Figure 2 The transaction data processing system shown includes multiple clusters and cluster caching layers. The cluster caching layers can transmit data between clusters for storing and retrieving original transaction information. Each cluster also includes a routing decision module, which processes the query information returned by the cluster caching layers.
[0061] The following is combined Figure 1 The illustrated embodiments and Figure 2 The system structure shown illustrates the method for processing transaction data in this embodiment of the invention, such as... Figure 3 As shown, the method includes:
[0062] S301: Receive the transaction data of the current transaction and determine that the current transaction is a related transaction type.
[0063] S302: Obtain the transaction index identifier from the transaction data and send a query request including the transaction index identifier to the cluster cache layer.
[0064] S303: Receives the original transaction information sent by the cluster cache layer.
[0065] S304: Call the routing decision module to determine whether the original transaction information includes the target cluster identifier. If yes, proceed to step S305; otherwise, trigger the database query program based on the transaction data to send a query request for the original transaction data to the database.
[0066] S305: Obtain the cluster identifier of the current cluster to determine whether it is consistent with the target cluster identifier. If yes, proceed to step S306; otherwise, proceed to step S307.
[0067] S306: Invoke the thread in the current cluster to determine the transaction processing program corresponding to the current transaction.
[0068] S307: Invoke the preset outbound call service based on the target cluster identifier to send transaction data to the target cluster, thereby enabling the target cluster to determine the transaction business processing program corresponding to the current transaction.
[0069] In this embodiment of the invention, the cluster caching layer loosely couples machine queries between different clusters, the routing decision module performs special processing for data consistency in different scenarios, achieving high cohesion for machine queries within the cluster, and a database retrieval module is added for in-depth processing of related periodic data to ensure a closed-loop system data lifecycle. This embodiment of the invention ensures stable system cluster deployment and reliable system consistency processing without affecting current production capacity when expanding machine capacity. The cluster caching layer can be used to cache cluster data information, such as original transaction information. The routing decision module is responsible for machine scheduling within the cluster, and data volume retrieval can be used for consistency processing of related transaction data, thereby avoiding business risks such as customer complaints and accounting problems caused by inadequate retrieval of key original data.
[0070] To address the problems existing in the prior art, embodiments of the present invention provide a transaction data processing device 400, such as... Figure 4 As shown, the device 400 includes:
[0071] The receiving unit 401 is used to receive the transaction data of the current transaction, determine that the current transaction is a related transaction type, obtain the transaction index identifier in the transaction data, and send a query request including the transaction index identifier to the cluster cache layer so that the cluster cache layer can query the corresponding original transaction information.
[0072] The processing unit 402 is used to receive the original transaction information sent by the cluster cache layer, call the preset routing decision module to determine that the original transaction information includes a target cluster identifier, query the target cluster information corresponding to the target cluster identifier, and then determine the transaction business processing program corresponding to the current transaction to process the current transaction.
[0073] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 The embodiments shown are the same and will not be described again here.
[0074] In one embodiment, the processing unit 402 is specifically used for:
[0075] Obtain the cluster identifier of the current cluster to determine whether it matches the target cluster identifier;
[0076] If yes, then the target cluster is determined to be the current cluster, and a thread in the current cluster is invoked to determine the transaction processing program corresponding to the current transaction; if not, the target cluster address information is queried based on the target cluster identifier, and a preset outbound call service is invoked to send the transaction data to the target cluster, thereby enabling the target cluster to determine the transaction processing program corresponding to the current transaction.
[0077] In yet another embodiment, the processing unit 402 is specifically used for:
[0078] Based on the transaction data, the business type of the current transaction is identified, and the corresponding business processing program is queried to determine the business processing program corresponding to the current transaction.
[0079] In yet another embodiment, the processing unit 402 is specifically used for:
[0080] Determine whether the original transaction information includes a cluster identifier;
[0081] If yes, then the original transaction information is determined to include the target cluster identifier; if not, then the database query program is determined to be the business processing program corresponding to the current transaction.
[0082] In yet another embodiment, the processing unit 402 is specifically used for:
[0083] The database query program is triggered based on the transaction data to send a query request for the original transaction information to a preset database.
[0084] Receive the returned original transaction information and obtain the target cluster identifier from the original transaction information;
[0085] The target cluster information corresponding to the target cluster identifier is queried to determine the transaction processing program corresponding to the current transaction and process the current transaction.
[0086] In yet another embodiment, the processing unit 402 is specifically used for:
[0087] The target cluster identifier and the transaction index identifier are sent to the cluster cache layer so that the cluster cache layer stores the correspondence between the transaction index identifier and the target cluster identifier.
[0088] In yet another embodiment, the processing unit 402 is specifically used for:
[0089] The system receives a timeout fallback notification from the database, queries the corresponding original transaction business system based on the transaction index identifier, and sends a request to the original transaction business system to retrieve the original transaction information.
[0090] In yet another embodiment, the processing unit 402 is further configured to:
[0091] If it is determined that the current transaction is not a related transaction type, obtain the transaction index identifier and the cluster identifier of the current cluster from the transaction data;
[0092] A transaction information storage message is sent to the cluster cache layer so that the cluster cache layer stores the correspondence between the transaction index identifier and the cluster identifier.
[0093] It should be understood that the manner in which embodiments of the present invention are implemented is different from the implementation method. Figure 1 or Figure 3 The embodiments shown are the same and will not be described again here.
[0094] In this embodiment of the invention, a cluster cache layer is set up in the cluster to store the correspondence between the identifiers of each transaction and the cluster identifiers of the original transaction information. Therefore, after receiving the transaction data of the current transaction and determining that the current transaction is a related transaction type, the corresponding original transaction information can be directly queried from the cluster cache layer through the transaction index identifier. Then, a preset routing decision module can be invoked to determine the target cluster information, achieving accurate positioning of the original transaction information for corresponding business processing. This simplifies the process of querying the original transaction information, reduces the time required for transaction processing, and thus improves the efficiency of querying the original transaction information and the efficiency of transaction data processing.
[0095] According to embodiments of the present invention, an electronic device and a readable storage medium are also provided.
[0096] An electronic device according to an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the transaction data processing method provided in the embodiment of the present invention.
[0097] Figure 5 An exemplary system architecture 500 is shown, in which a method or apparatus for processing transaction data can be applied according to embodiments of the present invention.
[0098] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0099] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, and 503.
[0100] Terminal devices 501, 502, and 503 can be, but are not limited to, smartphones, tablets, laptops, and desktop computers, etc.
[0101] Server 505 can be a server that provides various services. The server can analyze and process data such as received product information query requests, and feed back the processing results (such as product information - just an example) to the terminal device.
[0102] It should be noted that the transaction data processing method provided in this embodiment of the invention is generally executed by server 505, and correspondingly, the transaction data processing device is generally located in server 505.
[0103] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0104] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing embodiments of the present invention. Figure 6 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0105] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0106] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0107] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.
[0108] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0109] The flowcharts and block diagrams in the accompanying drawings 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 a flowchart or block diagram may represent a unit, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0110] The units described in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be located in a processor; for example, a processor can be described as including a receiving unit and a processing unit. The names of these units do not necessarily limit the unit itself; for example, a receiving unit can also be described as "a unit that performs the functions of a receiving unit."
[0111] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the transaction data processing method provided by the present invention.
[0112] In another aspect, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the transaction data processing method provided in the embodiments of the present invention.
[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method of processing transaction data, characterized by, Comprise: Receiving transaction data of a current transaction, determining that the current transaction is a correlation transaction type, obtaining a transaction index identifier in the transaction data, sending a query request including the transaction index identifier to a cluster cache layer to enable the cluster cache layer to query corresponding original transaction information; Receiving the original transaction information sent by the cluster cache layer, calling a preset routing decision module to determine that the original transaction information includes a target cluster identifier, calling a preset database retrieval module to query target cluster information corresponding to the target cluster identifier, and then determining a transaction business processing program corresponding to the current transaction to process the current transaction; wherein the database retrieval module deeply processes periodic data to enable system data life cycle closed loop; Querying target cluster information corresponding to the target cluster identifier and then determining a transaction business processing program corresponding to the current transaction, comprising: obtaining a cluster identifier of a current cluster to determine whether it is consistent with the target cluster identifier; if yes, determining that the target cluster is the current cluster to call a thread in the current cluster to determine the transaction business processing program corresponding to the current transaction; if not, querying corresponding target cluster address information based on the target cluster identifier, calling a preset outbound service to send the transaction data to the target cluster, and then enabling the target cluster to determine the transaction business processing program corresponding to the current transaction; Calling a preset routing decision module to determine that the original transaction information includes a target cluster identifier, comprising: determining whether the original transaction information includes a cluster identifier; if yes, determining that the original transaction information includes a target cluster identifier; if not, determining that the database query program is the business processing program corresponding to the current transaction; triggering the database query program based on the transaction data to send a query request of original transaction information to a preset database; receiving the returned original transaction information, obtaining the target cluster identifier in the original transaction information; querying target cluster information corresponding to the target cluster identifier and then determining a transaction business processing program corresponding to the current transaction to process the current transaction; Before receiving the returned original transaction information, it further comprises: receiving a timeout bottoming prompt information sent by the database, querying a corresponding original transaction business system based on the transaction index identifier to send an acquisition request of the original transaction information to the original transaction business system.
2. The method of claim 1, wherein, Determining the transaction business processing program corresponding to the current transaction, comprising: Identifying the business type of the current transaction based on the transaction data, querying the business processing program corresponding to the business type to determine the business processing program corresponding to the current transaction.
3. The method of claim 1, wherein, After obtaining the target cluster identifier in the original transaction information, it further comprises: Sending the target cluster identifier and the transaction index identifier to the cluster cache layer to enable the cluster cache layer to store the corresponding relationship between the transaction index identifier and the target cluster identifier.
4. The method of claim 1, wherein, After the transaction data of the current transaction is received, it further comprises: In a case where it is determined that the current transaction is not a correlation transaction type, a transaction index identifier in the transaction data and a cluster identifier of a current cluster are acquired; A transaction information storage message is sent to the cluster cache layer, so that the cluster cache layer stores a correspondence between the transaction index identifier and the cluster identifier.
5. A processing apparatus of transaction data, characterized by, Comprise: A receiving unit is configured to receive transaction data of a current transaction, determine that the current transaction is a correlation transaction type, acquire a transaction index identifier in the transaction data, and send a query request including the transaction index identifier to a cluster cache layer, so that the cluster cache layer queries corresponding original transaction information; A processing unit is 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, call a preset database retrieval module to query target cluster information corresponding to the target cluster identifier, and further determine a transaction business processing program corresponding to the current transaction, and process the current transaction; wherein the database retrieval module deeply processes correlation period data, so as to close a system data life cycle; The processing unit is specifically configured to acquire a cluster identifier of a current cluster to determine whether the cluster identifier is consistent with the target cluster identifier; if yes, it is determined that the target cluster is the current cluster, and a thread in the current cluster is called to determine the transaction business processing program corresponding to the current transaction; if not, target cluster address information corresponding to the target cluster identifier is queried, a preset outbound service is called to send the transaction data to the target cluster, and the target cluster is further caused to determine the transaction business processing program corresponding to the current transaction; The processing unit is specifically configured to determine whether the original transaction information includes a cluster identifier; if yes, it is determined that the original transaction information includes a target cluster identifier; if not, a database query program is determined as the business processing program corresponding to the current transaction; based on the transaction data, the database query program is triggered to send a query request of original transaction information to a preset database; the returned original transaction information is received, the target cluster identifier in the original transaction information is acquired, target cluster information corresponding to the target cluster identifier is queried, and the transaction business processing program corresponding to the current transaction is further determined, and the current transaction is processed; Before receiving the returned original transaction information, the method further comprises: receiving timeout bottom-up prompt information sent by the database, querying a corresponding original transaction business system based on the transaction index identifier, and sending an acquisition request of the original transaction information to the original transaction business system.
6. The apparatus of claim 5, wherein, The processing unit is specifically configured to: Identify a business type of the current transaction based on the transaction data, query a business processing program corresponding to the business type, and determine the business processing program corresponding to the current transaction.
7. The apparatus of claim 5, wherein, The processing unit is specifically configured to: Send the target cluster identifier and the transaction index identifier to the cluster cache layer, so that the cluster cache layer stores a correspondence between the transaction index identifier and the target cluster identifier.
8. An electronic device, comprising: Comprise: One or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1-4.
9. A computer readable medium having stored thereon a computer program, characterized in that, the program, when executed by the processor, causes the processor to carry out the method of any one of claims 1-4.
10. A computer program product comprising a computer program, characterized in that, the program, when executed by the processor, causes the processor to carry out the method of any one of claims 1-4. the program, when executed by the processor, causes the processor to carry out the method of any one of claims 1-4.
Citation Information
Patent Citations
Processing method and device for distributed caching
CN106375425A
Financial data processing method and device
CN113435989A