WO2020258653A1 - Procédé et appareil de traitement de données inter-nœud - Google Patents

Procédé et appareil de traitement de données inter-nœud Download PDF

Info

Publication number
WO2020258653A1
WO2020258653A1 PCT/CN2019/117516 CN2019117516W WO2020258653A1 WO 2020258653 A1 WO2020258653 A1 WO 2020258653A1 CN 2019117516 W CN2019117516 W CN 2019117516W WO 2020258653 A1 WO2020258653 A1 WO 2020258653A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
node
processes
message
routing information
Prior art date
Application number
PCT/CN2019/117516
Other languages
English (en)
Chinese (zh)
Inventor
刘建波
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020258653A1 publication Critical patent/WO2020258653A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Definitions

  • the present invention relates to the field of computer technology in financial technology (Fintech), and in particular to a cross-node data processing method and device.
  • Distributed transaction provides a mechanism to incorporate all operations involved in an activity into an indivisible execution unit. All operations that make up a transaction can only be submitted when all operations can be executed normally, as long as any operation fails. Will cause the rollback of the entire transaction.
  • the peripheral system calls the nodes separately, that is, the first node is called first, and the second node is called after the first node is processed.
  • This method requires multiple interactions between the peripheral system and more than one node, and the interaction process between the peripheral system and the node is complicated and cumbersome, and it is difficult to ensure the consistency of transactions.
  • This application provides a cross-node data processing method and device to reduce the difficulty of remote invocation of peripheral systems.
  • An embodiment of the present invention provides a cross-node data processing method, including:
  • the first node receives the data processing message
  • the first node parses the data processing message, determines the main process and determines whether the main process contains N sub-processes, N ⁇ 1;
  • the first node executes the main process and sequentially determines the nodes corresponding to the N sub-processes;
  • the first node executes the first sub-process
  • the first sub-process is a sub-process in which the corresponding node of the N sub-processes is the first node
  • the first node For the second sub-process, the first node generates a message to be processed according to the second sub-process, and sends the message to be processed to the second node so that the second node can
  • the packet is processed and the sub-process is executed;
  • the second sub-process is a sub-process in which the corresponding node in the N sub-processes is a second node, and the second node is a node other than the first node.
  • the method further includes:
  • the first node determines the configuration information of the N sub-processes
  • the first node sequentially determining the nodes corresponding to the N sub-processes includes:
  • the first node obtains the routing information of the sub-process from the configuration information of the sub-process;
  • the first node determines the node corresponding to the sub-process according to the routing information of the sub-process.
  • the first node determining the node corresponding to the sub-process according to the routing information of the sub-process includes:
  • routing information of the sub-process is a local message, determine that the node corresponding to the sub-process is the first node;
  • routing information of the sub-process is the global service location GSL, determining that the node corresponding to the sub-process is the second node;
  • routing information of the sub-process is a specific identifier
  • look up the correspondence between the specific identifier and the node identifier and if the specific identifier corresponds to the identifier of the first node, determine the node corresponding to the sub-process Is the first node; if the specific identifier corresponds to the identifier of the second node, it is determined that the node corresponding to the sub-process is the second node.
  • the first node for a sub-process where the corresponding node is the second node, the first node generates a message to be processed according to the sub-process, and sends the message to be processed to the second node Before sending, it also includes:
  • the first node determines that the corresponding node is the operation data of the sub-process of the first node
  • the first node submits the operation data to the database of the first node.
  • the method further includes:
  • the first node monitors the execution process of the main process and the sub-processes
  • the performing a reverse operation on the first sub-process to the M-1th sub-process includes:
  • the first node obtains the operation data of the sub-process from the database of the first node;
  • the sub-process is the first sub-process, directly perform a reverse operation on the first sub-process;
  • the sub-process is the second sub-process, perform a remote reverse operation on the second sub-process.
  • a cross-node data processing device includes:
  • the transceiver unit is used to receive data processing messages
  • the parsing unit is used to parse the data processing message, determine the main process and determine whether the main process contains N sub-processes, N ⁇ 1;
  • the execution unit is configured to execute the main process if the main process includes N sub-processes, and sequentially determine the nodes corresponding to the N sub-processes; for the first sub-process, execute the first sub-process, the first A sub-process is a sub-process in which the corresponding node in the N sub-processes is the first node;
  • the transceiver unit is further configured to generate a message to be processed according to the second sub-process for the second sub-process, and send the message to be processed to the second node, so that the second node can
  • the message to be processed executes the second sub-process;
  • the second sub-process is a sub-process in which the corresponding node in the N sub-processes is a second node, and the second node is a sub-process except the first node Outside the node.
  • the parsing unit is further configured to determine the configuration information of the N sub-processes if the main process includes N sub-processes;
  • the execution unit is further configured to obtain the routing information of the sub-process from the configuration information of the sub-process for any one of the N sub-processes; determine the routing information of the sub-process according to the routing information of the sub-process The node corresponding to the sub-process.
  • the execution unit is specifically configured to:
  • routing information of the sub-process is a local message, determine that the node corresponding to the sub-process is the first node;
  • routing information of the sub-process is the global service location GSL, determining that the node corresponding to the sub-process is the second node;
  • routing information of the sub-process is a specific identifier
  • look up the correspondence between the specific identifier and the node identifier and if the specific identifier corresponds to the identifier of the first node, determine the node corresponding to the sub-process Is the first node; if the specific identifier corresponds to the identifier of the second node, it is determined that the node corresponding to the sub-process is the second node.
  • the execution unit is further configured to:
  • a monitoring unit is further included for:
  • the monitoring unit is specifically configured to:
  • the sub-process is the first sub-process, directly perform a reverse operation on the first sub-process;
  • the sub-process is the second sub-process, perform a remote reverse operation on the second sub-process.
  • the embodiment of the present invention also provides an electronic device, including:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method described above.
  • the embodiment of the present invention also provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to make the computer execute the method described above.
  • the first node after receiving the data processing message of the peripheral system, determines the main process according to the data processing message, and determines whether the main process includes sub-processes. If the main process includes N sub-processes, the first node executes the main process and sequentially determines the nodes corresponding to the N sub-processes. According to the nodes corresponding to the sub-processes, the N sub-processes can be divided into a first sub-process and a second sub-process, wherein the node corresponding to the first sub-process is the first node, and the node corresponding to the second sub-process is the second node.
  • the first node since the corresponding node is the first node, the first node directly executes the first sub-process.
  • the first node For the second sub-process, the first node generates a message to be processed according to the second sub-process and sends it to the second node so that the second node executes the second sub-process according to the message to be processed.
  • the peripheral system does not need to frequently interact with nodes, and only needs to send data processing messages to one node, and subsequent processes are solved internally between nodes, and the execution process is simple and does not require human intervention. This reduces the data transmission pressure of peripheral systems and nodes and saves network resources.
  • the transaction processing standards can be uniformly formulated and ensured by the system, thereby ensuring the consistency of distributed transactions.
  • Figure 1 is a schematic structural diagram of a possible system architecture provided by an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a cross-node data processing method provided by an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a cross-node data processing method and apparatus according to an embodiment of the present invention.
  • Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • a system architecture to which the embodiment of the present invention is applicable includes a peripheral system 101 and N account nodes 102.
  • the peripheral system 101 can be a client installed on a terminal or an operating system installed on a server.
  • the terminal can be an electronic device with wireless communication functions such as a mobile phone, a tablet computer, or a dedicated handheld device, or it can be It is a personal computer (personal computer, PC for short), notebook computer, server and other wired access devices connected to the Internet.
  • the terminal can be an independent device or a terminal cluster formed by multiple terminals.
  • the terminal can use cloud computing technology for information processing.
  • the account node 102 may be a network device such as a computer, it may be an independent device, or a server cluster formed by multiple servers.
  • the N account nodes 102 can be installed on N servers or less than N servers, that is, there are two or more account nodes 102 installed on the same server.
  • the account node 102 can use cloud computing technology for information processing.
  • the peripheral system 101 can communicate with the account node 102 through the INTERNET network, or through mobile communication systems and account nodes such as the Global System for Mobile Communications (GSM), long term evolution (LTE) system, etc. 102 to communicate.
  • the peripheral system 101 can also remotely call the account node 102 through RMB, or through other methods such as RPC.
  • Message middleware the infrastructure system responsible for message transmission, such as ESB, Dubbo, RocketMQ, Kafka, Solace, etc., suitable for distributed environments that require reliable data transmission.
  • ESB the infrastructure system responsible for message transmission
  • Dubbo the infrastructure system responsible for message transmission
  • RocketMQ the infrastructure system responsible for message transmission
  • Kafka the infrastructure system responsible for message transmission
  • Solace the infrastructure system responsible for message transmission
  • different objects pass messages to activate each other's events and complete corresponding operations.
  • the sender sends the message to the message server, and the message server stores the message in several queues, and then forwards the message to the receiver when appropriate.
  • Message middleware can communicate between different platforms. It is often used to shield the characteristics of various platforms and protocols to achieve collaboration between applications. Its advantage is that it can provide synchronization and asynchronous between the client and the server.
  • the connection, and the message can be transmitted or stored and forwarded at any time.
  • Routing service system an infrastructure system used to maintain the relationship between card numbers, account numbers, customer numbers, etc. and node numbers.
  • the distributed service architecture is a cluster networking, which means that there is a multi-instance deployment of a service in the cluster, and the routing service system can select an appropriate service provider from the service list to call.
  • the distributed service framework must be able to meet the flexible routing needs of users.
  • AOP Aspect-oriented programming technology used to define interceptors.
  • the distributed deposit core system is a multi-node model.
  • Account data is distributed among multiple database nodes.
  • Cross-node scenarios may occur in transactions between accounts. For example, account A is stored in the database of account node 1, and account B is stored in the database of account node 2. To realize the transfer from account A to account B, a cross-node transaction scenario is formed.
  • the peripheral system first calls the debit interface of account node 1 to execute the fund transfer operation of account A, and then calls the credit interface of account node 2 to execute the funds of account B Transfer to operation. Before performing fund operations, the conditions of account A and account B need to be checked. Therefore, the peripheral system needs to interact with the account node 1 and the account node 2 frequently. In addition, different peripheral systems interact with account nodes, and it is difficult to ensure the consistency of distributed transactions.
  • an embodiment of the present invention provides a cross-node data processing method.
  • the cross-node data processing method provided by the embodiment of the present invention includes the following steps:
  • Step 201 The first node receives a data processing message.
  • the data processing message includes the account information involved in the message.
  • the data processing message involves more than one account, and these accounts are distributed in different account nodes.
  • the peripheral system can look up the correspondence between the account identifier and the node identifier through the message middleware, determine the account node specifically involved in the data processing message, and send the data processing message to any of the account nodes.
  • the peripheral system can send the transfer request to the debit node or the lender node.
  • the peripheral system sends the transfer request to the message middleware, and the message middleware selects one of the debit node and the credit node to accept the transfer request.
  • the first node and the second node can be any node in the system, the first node is the node that receives the data processing message, and the second node is in addition to the first node, the data processing message also involves
  • the number of second nodes can be one or more.
  • node A is the first node and node B is the second node, in other scenarios, node A is the second node, and node B is the first node.
  • Step 202 The first node parses the data processing message, determines the main process, and determines whether the main process contains N sub-processes.
  • the first node after receiving the data processing message, the first node establishes the main process according to the data processing message, and determines N subprocesses according to the involved execution process, where N ⁇ 0.
  • the main process is a transfer
  • the transfer process calls other processes, the called process is a sub-process.
  • the debit node needs to perform the following process:
  • the lender node needs to perform the following process:
  • the sub-process needs to be called for the transfer request.
  • the main process is transfer, and the transfer calls debit check, then debit check is a sub-process.
  • debit check is the main process. Therefore, it can be determined that the transfer request involves the following processes:
  • Sub-process debit check, dr-check
  • Sub-process debit processing, dr-process
  • Sub-process credit processing, cr-process.
  • each process is given a unique transaction code, that is, the transaction code for transfer is fund-transfer, the debit check is dr-check, and so on.
  • Step 203 The first node executes the main process, and sequentially determines nodes corresponding to the N sub-processes.
  • the first node executes the main process, and the sub-processes need to be called sequentially during the execution of the main process.
  • the call of the sub-process can be executed in parallel or serially.
  • Step 204 For a first sub-process, the first node executes the first sub-process, and the first sub-process is a sub-process in which the corresponding node of the N sub-processes is the first node.
  • the first sub-process here is a type of sub-process, that is, the corresponding node is a sub-process of the first node, and the main process may include one first sub-process or multiple first sub-processes.
  • the second sub-process is also a type of sub-process, that is, the corresponding node is a sub-process of the first node, and the main process may include one second sub-process or multiple second sub-processes.
  • Step 205 For the second sub-process, the first node generates a message to be processed according to the second sub-process, and sends the message to be processed to the second node, so that the second node The message to be processed executes the second sub-process; the second sub-process is a sub-process in which the corresponding node in the N sub-processes is a second node, and the second node is a sub-process except the first node Outside the node.
  • step 204 may be executed before step 205, or step 204 may be executed after step 205, or step 204 and step 205 may be executed simultaneously.
  • the first node after receiving the data processing message of the peripheral system, determines the main process according to the data processing message, and determines whether the main process includes sub-processes. If the main process includes N sub-processes, the first node executes the main process and sequentially determines the nodes corresponding to the N sub-processes. According to the nodes corresponding to the sub-processes, the N sub-processes can be divided into a first sub-process and a second sub-process, wherein the node corresponding to the first sub-process is the first node, and the node corresponding to the second sub-process is the second node.
  • the first node since the corresponding node is the first node, the first node directly executes the first sub-process.
  • the first node For the second sub-process, the first node generates a message to be processed according to the second sub-process and sends it to the second node so that the second node executes the second sub-process according to the message to be processed.
  • the peripheral system does not need to frequently interact with nodes, and only needs to send data processing messages to one node, and subsequent processes are solved internally between nodes, and the execution process is simple and does not require human intervention. This reduces the data transmission pressure of peripheral systems and nodes and saves network resources.
  • the transaction processing standards can be uniformly formulated and ensured by the system, thereby ensuring the consistency of distributed transactions.
  • the method further includes:
  • the first node sequentially determining the nodes corresponding to the N sub-processes includes:
  • the first node obtains the routing information of the sub-process from the configuration information of the sub-process;
  • the first node determines the node corresponding to the sub-process according to the routing information of the sub-process.
  • a call interface is defined, and the peripheral system sends a data processing message in a specified format to the node.
  • the data processing message can obtain the corresponding process and the configuration information of the process through the call interface.
  • the interface name is Flow ⁇ I,O>
  • the interface contains a definition of an O execute (I InputDTO) method, where I represents the input data type, namely InputDTO; O represents the output data type, namely OutputDTO.
  • I InputDTO O execute
  • the output type can be in the form of a table, and the specific output content and output format can be defined by the developer as needed, for example, as shown in Table 1:
  • routing_keys is divided into dynamic routing keywords and static routing keywords.
  • the dynamic routing keyword is InputDTO, that is, the attribute identifier in the input data processing message, such as card number (cardNo), account number (accountNo), etc.
  • the node identifier corresponding to the attribute identifier can be found from the routing service system, and then routing is performed according to the node identifier.
  • Static routing keywords include two types, namely GSL (Global Service Location) and LOCAL (or null).
  • GSL Global Service Location
  • LOCAL or null
  • GSL means that the message middleware automatically finds the node ID, that is, the process is not executed locally, and the corresponding node needs to be called remotely.
  • LOCAL means that the process is executed locally without routing.
  • remote_service_id is the service number of the remote service called when sending a message through the message middleware.
  • has_rev_event mark whether the process has registered the corresponding reversal event in the database, you can use "1" to indicate registered, and "null” to indicate not registered.
  • the reversal event is the reverse operation of the current process, used for abnormal reversal or post-event reversal transactions.
  • txn_code routing_keys remote_service_id has_rev_event description fund-transfer null null null Transfer dr-check cardNo,accountNo 01000001 null Debit check cr-check cardNo,accountNo 01000002 null Credit check dr-process cardNo,accountNo 01000003 1 Debit processing cr-process cardNo,accountNo 01000004 1 Credit processing
  • the content of Table 2 can be converted into a HashMap, named flowDefMap and saved.
  • the configuration information shown in Table 2 is obtained by parsing. Further according to the routing information in the configuration information, namely routing_keys, the node corresponding to the sub-process is determined.
  • the first node determining the node corresponding to the sub-process according to the routing information of the sub-process includes:
  • routing information of the sub-process is a local message, determine that the node corresponding to the sub-process is the first node;
  • routing information of the sub-process is the global service location GSL, determining that the node corresponding to the sub-process is the second node;
  • routing information of the sub-process is a specific identifier
  • look up the correspondence between the specific identifier and the node identifier and if the specific identifier corresponds to the identifier of the first node, determine the node corresponding to the sub-process Is the first node; if the specific identifier corresponds to the identifier of the second node, it is determined that the node corresponding to the sub-process is the second node.
  • the routing information of the sub-process is a local message, that is, the content of routing_keys in Table 2 is LOCAL or null, it means that the node corresponding to the sub-process is the first node and is directly executed locally. If the routing information of the sub-process is GSL, it means that the message middleware needs to find the corresponding node identifier for the sub-process. Therefore, the node corresponding to the sub-process is the second node.
  • routing information of the sub-process is a specific identifier, that is, cardNo, accountNo in Table 2, which means that the routing information of the sub-process is a dynamic routing key
  • the routing service system Find the corresponding node ID. If the corresponding node identifier is the identifier of the current first node, it is still executed locally; if the node identifier is not the current first node identifier, it indicates that the node corresponding to the sub-process is the second node, and the remote call is converted. In particular, if the node ID is null, it means that the input is incorrect and the execution process is stopped. In addition, when there are multiple routing information, the node ID found first shall prevail.
  • the relationship between routing information and node identification can be stored in the thread cache, and can be queried from the cache next time.
  • the first node generates a message to be processed according to the sub-process, and before sending the message to be processed to the second node, the method further includes :
  • the first node determines that the corresponding node is the operation data of the sub-process of the first node
  • the first node submits the operation data to the database of the first node.
  • the method further includes:
  • the first node monitors the execution process of the main process and the sub-processes
  • the entire main process and the execution process of each sub-process need to be monitored.
  • the transaction in the local database is rolled back, and then it is judged whether there is a cross-node sub-process in the sub-process before the M-th sub-process. If not, it means that all previous sub-processes are executed at the current first node. Therefore, for the first sub-process that has been processed in the same node under the same main process, there is only one transaction in the local database and it has been Roll back, so you can directly report error feedback and end the process.
  • the current first node has already submitted the database transaction for the first sub-process previously processed.
  • the first sub-process previously processed and the first sub-process that has been rolled back are not the same in the database. Transaction, so you need to perform the reverse operation on the first sub-process previously processed.
  • the remote second node may also have committed the database transaction. Therefore, the second sub-process of the second node also needs to perform a reverse operation.
  • the main process includes sub-process A, sub-process B, sub-process C, and sub-process D, where sub-process A, sub-process B, and sub-process C are processed in the first node, and sub-process C is processed in the second node . If an exception occurs during the execution of sub-process B, since both sub-process A and sub-process B are processed in the first node, and there is no cross-node sub-process in between, then sub-process A and sub-process B are in the database of the first node It is stored in one transaction, so it can be rolled back directly.
  • sub-process D since the sub-process before sub-process D includes the sub-process C processed by the second node, the reverse operation of sub-process C needs to be performed, that is, the correction of sub-process C .
  • the reverse operation of sub-process C since there is a cross-node behavior between sub-process B and sub-process D, it is necessary to make corrections for sub-process A and sub-process B.
  • performing a reverse operation on the first sub-process to the M-1th sub-process includes:
  • the first node obtains the operation data of the sub-process from the database of the first node;
  • the sub-process is the first sub-process, directly perform a reverse operation on the first sub-process;
  • the sub-process is the second sub-process, perform a remote reverse operation on the second sub-process.
  • the correction mechanism is more complicated because of the database transactions involving multiple nodes. Therefore, in the embodiment of the present invention, the hedging mechanism is uniformly prescribed in advance, and the correction process involves the sub-process log table and the correction event table.
  • General reconciliation service general reconciliation process. among them:
  • the sub-process log table is used to record the information of the sub-processes that have been executed, including whether it contains a reversal event, whether it is a remote call, remote call node number, remote call serial number, etc.
  • Reverse event table when the sub-process is executed, the business developer records the reverse operation in the database, which is the reversal event.
  • the reversal event When a reversal or reversal of the sub-process needs to be performed, the reversal event will be executed, so that the transaction in the database of the sub-process is offset.
  • General reversal service traverse the specified sub-process log table, perform reverse operations for reversal or reversal according to the historical execution records of the sub-process.
  • the general correction process is used to call the general correction service.
  • the general reconciliation process is not only suitable for cross-node reconciliation, but also for reconciliation transactions initiated by peripheral systems.
  • the first node needs to query the historical execution records of each sub-process from the sub-process log table of the local database. If the sub-processes that have been processed do not include transaction-type sub-processes, that is, sub-processes that affect the consistency of the database transaction, there is no need to process them. For example, the sub-processes that have been processed are all query-type sub-processes, and there is no need to perform a correction, and abnormal feedback can be directly sent to the peripheral system. If a transaction sub-process is included, it is also necessary to determine whether the transaction sub-process is executed in the first node or in the second node.
  • the first sub-process then directly perform the reverse operation on the first sub-process. Specifically, it may be to find the reversal event corresponding to the first sub-process from the local database of the first node, and perform the reversal to the first sub-process. The execution of a sub-process is offset. If it is the second sub-process, perform a remote reverse operation on the second sub-process, that is, determine the serial number, node identification and other information corresponding to the second sub-process, thereby determining the second node corresponding to the second sub-process, and then call For the general correction service of the second node, the second node corrects the second sub-process.
  • the reconciliation process initiated by the peripheral system is also called the general reconciliation process to perform the reconciliation.
  • the embodiment of the present invention realizes local automatic correction and remote correction after a transaction failure.
  • the bottom-level correction mechanism is completely transparent to the peripheral system, and users only need to record the correction event when writing the process.
  • the system architecture includes client, transaction processing system, and deposit core system. And the financial management system, where the deposit core system and the financial management system are the corresponding subsystems of the sub-transactions.
  • Step S301 The peripheral system sends a transfer request to the message middleware, and the transfer request includes the debit account identifier and the credit account identifier.
  • Step S302 The message middleware sends the transfer request to the first node where the debit account is located according to the debit account identifier.
  • Step S303 According to the transfer request, the first node determines that the main process is transfer, and the four sub-processes are debit check, credit check, debit processing, and credit processing in sequence, and at the same time establish and save the configuration information corresponding to the transfer request table.
  • Step S304 the first node executes the main process.
  • Step S305 The first node obtains the debit check routing information from the configuration information table as the debit account identifier, and then finds the node corresponding to the debit account identifier from the routing service system as the first node, and then performs the debit check. If the debit check passes, step 306 is executed, otherwise the processing failure result is fed back to the peripheral system.
  • Step S306 The first node obtains the routing information of the credit check from the configuration information table as the credit account identifier, and then finds the node corresponding to the credit account identifier from the routing service system as the second node, and then sets the operation data corresponding to the debit check Submit to the local database, and then generate a credit check message and send it to the second node.
  • Step S307 The first node receives the credit check result sent by the second node, and if the credit check passes, step 308 is executed, otherwise the processing failure result is fed back to the peripheral system.
  • Step S308 The first node obtains the routing information of the debit processing as the debit account identifier from the configuration information table, determines that the node corresponding to the debit account identifier is the first node, and then executes the debit processing. If there is no abnormality in the debit processing, step 309 is executed, otherwise, the debit processing is rolled back and the abnormal result of the processing is fed back to the peripheral system.
  • Step S309 The first node obtains the routing information of the credit processing as the credit account identifier from the configuration information table, determines that the node corresponding to the credit account identifier is the second node, then submits the operation data corresponding to the debit processing to the local database, and regenerates Send a credit processing message to the second node.
  • Step S310 The first node receives the credit processing result sent by the second node. If the credit processing is successful, it will feed back the successful result to the peripheral system; if the credit processing is abnormal, the debit processing will be corrected and sent to the peripheral system Feedback processing failure results.
  • the embodiment of the present invention also provides a process guarantee device for distributed transactions, as shown in FIG. 3, including:
  • the transceiver unit 31 is configured to receive data processing messages
  • the parsing unit 32 is configured to parse the data processing message, determine the main process and determine whether the main process contains N sub-processes, N ⁇ 1;
  • the execution unit 33 is configured to execute the main process if the main process includes N sub-processes, and sequentially determine the nodes corresponding to the N sub-processes; for the first sub-process, execute the first sub-process, and the first sub-process A sub-process is a sub-process in which the corresponding node in the N sub-processes is the first node;
  • the transceiver unit 31 is further configured to generate a message to be processed according to the second sub-process for a second sub-process, and send the message to be processed to the second node, so that the second node
  • the second sub-process is executed according to the to-be-processed message; the second sub-process is a sub-process in which the corresponding node of the N sub-processes is the second node, and the second node is a sub-process except the first A node other than the node.
  • the parsing unit 32 is further configured to determine the configuration information of the N sub-processes if the main process includes N sub-processes;
  • the execution unit is further configured to obtain the routing information of the sub-process from the configuration information of the sub-process for any one of the N sub-processes; determine the routing information of the sub-process according to the routing information of the sub-process The node corresponding to the sub-process.
  • the execution unit 33 is specifically configured to:
  • routing information of the sub-process is a local message, determine that the node corresponding to the sub-process is the first node;
  • routing information of the sub-process is the global service location GSL, determining that the node corresponding to the sub-process is the second node;
  • routing information of the sub-process is a specific identifier
  • look up the correspondence between the specific identifier and the node identifier and if the specific identifier corresponds to the identifier of the first node, determine the node corresponding to the sub-process Is the first node; if the specific identifier corresponds to the identifier of the second node, it is determined that the node corresponding to the sub-process is the second node.
  • the execution unit 33 is further configured to:
  • a monitoring unit 34 for:
  • the monitoring unit 34 is specifically configured to:
  • the sub-process is the first sub-process, directly perform a reverse operation on the first sub-process;
  • the sub-process is the second sub-process, perform a remote reverse operation on the second sub-process.
  • the present invention also provides an electronic device, as shown in FIG. 4, including:
  • It includes a processor 401, a memory 402, a transceiver 403, and a bus interface 404, wherein the processor 401, the memory 402 and the transceiver 403 are connected through the bus interface 404;
  • the processor 401 is configured to read the program in the memory 402 and execute the following method:
  • the transceiver 403 is configured to receive data processing messages under the control of the processor 401;
  • the processor 401 is configured to read the program in the memory 402 and execute the following method: parse the data processing message, determine the main flow and determine whether the main flow contains N sub-flows, N ⁇ 1; if the main flow contains N sub-processes, the main process is executed, and the nodes corresponding to the N sub-processes are sequentially determined; for the first sub-process, the first sub-process is executed, and the first sub-process is among the N sub-processes The corresponding node is a sub-process of the first node; for the second sub-process, a message to be processed is generated according to the second sub-process; the second sub-process is that the corresponding node in the N sub-processes is the second node The second node is a node other than the first node;
  • the transceiver 403 is further configured to send the message to be processed to the second node under the control of the processor 401, so that the second node executes the second sub-process according to the message to be processed ;
  • the memory 402 is configured to store one or more executable programs, and can store data used by the processor 401 when performing operations;
  • the bus interface 404 provides an interface, and the processor is responsible for managing the bus architecture and general processing.
  • the bus architecture may include any number of interconnected buses and bridges. Specifically, one or more processors represented by the processor 401 and various circuits of the memory represented by the memory 402 are linked together.
  • the bus architecture can also link various other circuits such as peripherals, voltage regulators, power management circuits, etc., which are all known in the art, and therefore, will not be further described herein.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

L'invention concerne un procédé et un appareil de traitement de données inter-nœud qui relèvent du domaine technique des ordinateurs et qui sont utilisés pour réduire la difficulté d'appel à distance d'un système périphérique. Le procédé comprend les étapes suivantes : un premier nœud reçoit un message de traitement de données (201) ; le premier nœud analyse le message de traitement de données, détermine un flux principal, et détermine si le flux principal comprend N sous-flux (202) ; si le flux principal comprend les N sous-flux, le premier nœud exécute le flux principal, et détermine des nœuds correspondant aux N sous-flux en séquence (203) ; pour un premier sous-flux, le premier nœud exécute le premier sous-flux, le premier sous-flux étant un sous-flux dont un nœud correspond au premier nœud, parmi les N sous-flux (204) ; et pour un second sous-flux, le premier nœud génère, en fonction du second sous-flux, un message à traiter, et envoie le message à traiter à un second nœud, de sorte que le second nœud exécute le sous-flux en fonction du message à traiter (205), le second sous-flux étant un sous-flux dont un nœud correspond au second nœud, parmi les N sous-flux, et le second nœud étant un nœud autre que le premier nœud.
PCT/CN2019/117516 2019-06-28 2019-11-12 Procédé et appareil de traitement de données inter-nœud WO2020258653A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910579312.5 2019-06-28
CN201910579312.5A CN110287267A (zh) 2019-06-28 2019-06-28 一种跨节点的数据处理方法及装置

Publications (1)

Publication Number Publication Date
WO2020258653A1 true WO2020258653A1 (fr) 2020-12-30

Family

ID=68019792

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117516 WO2020258653A1 (fr) 2019-06-28 2019-11-12 Procédé et appareil de traitement de données inter-nœud

Country Status (2)

Country Link
CN (1) CN110287267A (fr)
WO (1) WO2020258653A1 (fr)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287267A (zh) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 一种跨节点的数据处理方法及装置
CN111796950B (zh) * 2020-07-16 2023-06-30 网易(杭州)网络有限公司 数据处理方法和系统
CN111949337B (zh) * 2020-08-07 2023-11-07 中国建设银行股份有限公司 一种账务的处理方法、装置、终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572077A (zh) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 数据库事务的处理方法及业务系统
US20160352843A1 (en) * 2014-03-18 2016-12-01 Huawei Technologies Co., Ltd. Data Processing Method, Device, and ESB System
CN108074076A (zh) * 2017-12-08 2018-05-25 上海壹账通金融科技有限公司 基于esb的服务提供方法、装置、设备及可读存储介质
CN109756481A (zh) * 2018-11-30 2019-05-14 广州因特信息科技有限公司 基于互联网异地分布式对接第三方系统的实现方法及系统
CN110287267A (zh) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 一种跨节点的数据处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160352843A1 (en) * 2014-03-18 2016-12-01 Huawei Technologies Co., Ltd. Data Processing Method, Device, and ESB System
CN104572077A (zh) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 数据库事务的处理方法及业务系统
CN108074076A (zh) * 2017-12-08 2018-05-25 上海壹账通金融科技有限公司 基于esb的服务提供方法、装置、设备及可读存储介质
CN109756481A (zh) * 2018-11-30 2019-05-14 广州因特信息科技有限公司 基于互联网异地分布式对接第三方系统的实现方法及系统
CN110287267A (zh) * 2019-06-28 2019-09-27 深圳前海微众银行股份有限公司 一种跨节点的数据处理方法及装置

Also Published As

Publication number Publication date
CN110287267A (zh) 2019-09-27

Similar Documents

Publication Publication Date Title
CN107045454B (zh) 跨进程分布式事务控制方法及相关系统
WO2020258653A1 (fr) Procédé et appareil de traitement de données inter-nœud
CN106503974B (zh) 交易数据处理方法及装置
US20080005747A1 (en) System and method for object state management
EP3869434B1 (fr) Procédé et appareil de traitement de données basées sur des chaînes de blocs, dispositif et support
CN112288577B (zh) 分布式服务的交易处理方法、装置、电子设备和介质
US11656902B2 (en) Distributed container image construction scheduling system and method
CN112068973A (zh) 策略模式的异步信息处理方法、装置、服务器和存储介质
WO2020006902A1 (fr) Procédé et appareil de paiement par lot, dispositif informatique et support de stockage
WO2021052237A1 (fr) Procédé de traitement de transaction, et appareil, dispositif, support d'enregistrement, et base de données
US10673953B2 (en) Transport channel via web socket for OData
US10108473B2 (en) System and method for automatic error classification in integration systems
CN111399851B (zh) 基于分布式系统的批处理执行方法
CN115145652A (zh) 一种数据处理任务的创建方法、装置、设备及介质
US20220276901A1 (en) Batch processing management
CN110764933B (zh) 一种消息处理方法、装置、系统及计算设备
CN111949862B (zh) 一种管理业务任务流程的方法、装置和电子设备
CN114238352A (zh) 一种微服务业务处理方法及相关装置
CN112261072B (zh) 一种服务调用方法、装置、设备和存储介质
CN113111077A (zh) 一致性的控制方法、装置、电子设备、介质和程序产品
CN115250276A (zh) 分布式系统及数据处理的方法和装置
CN113656239A (zh) 针对中间件的监控方法、装置及计算机程序产品
CN112181686A (zh) 一种数据处理方法、装置、系统、电子设备及存储介质
CN112711602A (zh) 一种存储过程的运行方法、装置,数据库系统及存储介质
CN114090299A (zh) 一种集群间的数据同步方法、装置和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19934616

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.04.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19934616

Country of ref document: EP

Kind code of ref document: A1