CN111652728A - Transaction processing method and device - Google Patents

Transaction processing method and device Download PDF

Info

Publication number
CN111652728A
CN111652728A CN202010551815.4A CN202010551815A CN111652728A CN 111652728 A CN111652728 A CN 111652728A CN 202010551815 A CN202010551815 A CN 202010551815A CN 111652728 A CN111652728 A CN 111652728A
Authority
CN
China
Prior art keywords
node
blockchain
application service
block chain
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010551815.4A
Other languages
Chinese (zh)
Inventor
张龙
范瑞彬
张开翔
毛嘉宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202010551815.4A priority Critical patent/CN111652728A/en
Publication of CN111652728A publication Critical patent/CN111652728A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application relates to the field of financial technology (Fintech) and discloses a transaction processing method and a device, wherein the method comprises the following steps: the method comprises the steps that a proxy application service receives a transaction request of a block chain application service; the agent application service is respectively connected with N block chain nodes in the block chain network; n is a positive integer; the proxy application service determines a first blockchain node from the N blockchain nodes; the proxy application service sends the transaction request to the blockchain network through the first blockchain link point. The technical scheme is beneficial to reducing the requirement of the block chain application system on the application service.

Description

Transaction processing method and device
Technical Field
The embodiment of the application relates to the field of financial technology (Fintech), in particular to a transaction processing method and device.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology (Fintech), but due to the requirements of the financial industry on safety and real-time performance, higher requirements are also put forward on the technologies.
The Blockchain (Blockchain) application system is a software system formed by applying a Blockchain technology to a specific service scene and combining the characteristics of the Blockchain, such as non-tampering, distributed accounts, non-repudiation and the like. In the blockchain application system, after generating a transaction request, a blockchain application service sends the transaction request to a blockchain node in a blockchain network, and the blockchain node broadcasts the transaction request to the whole blockchain network.
However, in this method, the block chain application service needs to record node information corresponding to the block chain link point, and needs to determine to which block chain node the transaction request is sent according to the node information corresponding to the block chain link point. Thus, the requirement of the blockchain application system for the blockchain application service is high.
Disclosure of Invention
The embodiment of the application provides a transaction processing method and a transaction processing device, which are beneficial to reducing the requirement of a block chain application system on block chain application service.
The transaction processing method provided by the embodiment of the application comprises the following steps:
the method comprises the steps that a proxy application service receives a transaction request of a block chain application service; the proxy application service is respectively connected with N block chain nodes in a block chain network; n is a positive integer; the proxy application service determining a first blockchain node from the N blockchain nodes; the proxy application service sends the transaction request to the blockchain network through the first blockchain link point.
In an optional implementation, the determining, by the proxy application service, a first blockchain node from the N blockchain nodes includes: the proxy application service acquires a node registration record; the node registration records comprise node information corresponding to each block link point; and the agent application service determines the first block chain node according to the node information corresponding to the N block chain nodes.
In an optional implementation manner, the node information corresponding to each block link point includes an operation state of the block link node and a processed transaction number of the block link point; the determining, by the proxy application service, the first block chain node according to the node information corresponding to the N block chain nodes includes: and the agent application service determines the block chain link point which is in a normal operation state and has the least processed transaction number from the N block chain nodes as the first block chain node.
In an optional implementation manner, the method further includes: for any one of the N blockchain nodes, performing the following operations: the proxy application service determines heartbeat information of the blockchain node in a preset time period; and the proxy application service updates the running state of the block chain node according to the heartbeat information.
In an optional implementation manner, after the determining, by the proxy application service, a first block link point from the N block link nodes, the method further includes: the proxy application service increases the number of transactions processed by the first blockchain node.
In an optional implementation manner, the method further includes: the agent application service determines a second block link node to be added in the block link nodes according to the node record information; and the proxy application service establishes connection with the second block link point and updates the node information corresponding to the second block link point in the node record information.
In an optional implementation manner, the updating node information corresponding to the second block link point in the node record information includes: the proxy application service determines the running state of the second blockchain node according to the heartbeat information of the second blockchain node; the proxy application service sets the number of processed transactions of the second blockchain node to an initial value.
In the technical scheme, the blockchain application service generates a transaction request, sends the transaction request to the proxy application service, determines a first blockchain node by the proxy application service, and sends the transaction request to the first blockchain node. The block chain application service does not need to record node information corresponding to the block chain link points and determine the first block chain node, and the requirement of a block chain application system on the block chain application service is favorably reduced.
Correspondingly, the embodiment of the present application further provides a transaction processing apparatus, including:
a processing unit and a transceiver unit;
the receiving and sending unit is used for receiving a transaction request of the blockchain application service; the receiving and sending unit is respectively connected with N block chain link points in a block chain network; n is a positive integer;
the processing unit determines a first blockchain node from the N blockchain nodes;
the transceiver unit sends the transaction request to the blockchain network through the first blockchain link point.
In an optional implementation, the processing unit is specifically configured to: acquiring a node registration record; the node registration records comprise node information corresponding to each block link point; and determining the first block chain node according to the node information corresponding to the N block chain nodes.
In an optional implementation manner, the node information corresponding to each block link point includes an operation state of the block link node and a processed transaction number of the block link point; the processing unit is specifically configured to: and determining a block chain link point which is in a normal operation state and has the least processed transaction number from the N block chain nodes as the first block chain node.
In an optional implementation, the processing unit is further configured to: for any one of the N blockchain nodes, performing the following operations: determining heartbeat information of the block chain nodes in a preset time period; and updating the running state of the block chain node according to the heartbeat information.
In an optional implementation, the processing unit is further configured to: increasing the number of transactions processed by the first blockchain node.
In an optional implementation, the processing unit is further configured to: determining a second block chain node newly added in the block chain link points according to the node record information; and establishing connection with the second block link point, and updating the node information corresponding to the second block link point in the node record information.
In an optional implementation, the processing unit is specifically configured to: determining the running state of the second blockchain node according to the heartbeat information of the second blockchain node; setting the number of processed transactions of the second blockchain node to an initial value.
Correspondingly, an embodiment of the present application further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the transaction processing method according to the obtained program.
Accordingly, embodiments of the present application further provide a computer-readable non-volatile storage medium, which includes computer-readable instructions, and when the computer-readable instructions are read and executed by a computer, the computer is caused to execute the above transaction processing method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram illustrating a system architecture provided herein;
FIG. 2 is a schematic diagram of another system architecture provided herein;
FIG. 3 is a schematic flow chart of a transaction processing method provided herein;
FIG. 4 is a schematic flow chart illustrating a process for processing transaction requests based on load balancing according to the present application;
FIG. 5 is a schematic flow chart illustrating a method for monitoring the operation status of a link point of a block according to the present disclosure;
fig. 6 is a schematic structural diagram of a proxy application service provided in the present application;
fig. 7 is a schematic structural diagram of a transaction processing device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For a better understanding of the present application, the terms of art to which the present application relates are explained as follows:
block chains: a novel distributed infrastructure and computing approach that utilizes block-chain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, cryptographically secures data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
Block chain node: the process for providing the blockchain service runs in a server or cloud environment. In general, a server may run one or more blockchain nodes.
The block chain application system: the block chain technology is applied to a specific business scene, and the characteristics of non-falsification, distributed accounts, non-repudiation and the like of the block chain are combined to form a software system.
Intelligent contract: a computer program or code segment running on a blockchain. The intelligent contract may be automatically executed when certain source code conditions are met.
Service registration: a directory service provides a registration function for services, facilitating definition of services, selection of services, and management of services.
The service agent: a service, a request may be communicated to a real service through a service agent. Service agents may mask compatibility and complexity between services, provide load balancing capabilities, and the like.
Load balancing: for distributing load among multiple computers (computer clusters), network connections, CPUs, disk drives, or other resources for the purposes of optimizing resource usage, maximizing throughput, minimizing response time, while avoiding overload.
The existing blockchain application system includes a blockchain application service and a blockchain network, and the blockchain application service is connected with a plurality of blockchain link points in the blockchain network. The block chain application service records node information corresponding to all block chain link points connected with the block chain application service in a block chain network.
After the blockchain application service generates a transaction request, the blockchain application service determines to send the transaction request to a blockchain node connected with the blockchain application service in a blockchain network, and then the blockchain node broadcasts the transaction request to the whole blockchain network.
Fig. 1 schematically shows a deployment of a blockchain application system. The block chain application service is connected with 2 block chain nodes (block chain node 1, block chain link point 2) in the block chain network, and the block chain application service records node information of the block chain link point 1 and node information of the block chain link point 2.
Illustratively, after generating the transaction request, the blockchain application service sends the transaction request to the blockchain node 1, and the blockchain node 1 broadcasts the transaction request to the whole blockchain network.
Therefore, the blockchain application service needs to record node information corresponding to all blockchain link points connected with the blockchain application service in the blockchain network, and needs to determine a certain blockchain node from the blockchain nodes according to the node information corresponding to the blockchain link points and send a transaction request to the blockchain link point.
Thus, the requirement of the blockchain application system for the blockchain application service is high.
To solve the above technical problem, fig. 2 schematically illustrates a deployment diagram of another blockchain application system provided by the present application. The block chain application system comprises a block chain application service, a proxy application service and a block chain network, wherein the block chain application service is connected with the proxy application service, and the proxy application service is connected with a plurality of block chain link points in the block chain network.
The proxy application service records node information corresponding to all block chain link points connected with the proxy application service in a block chain network. After generating a transaction request, the blockchain application service sends the transaction request to an agent application service, the agent application service determines to send the transaction request to a blockchain node connected with the agent application service in a blockchain network, and the blockchain node broadcasts the transaction request to the whole blockchain network.
For example, as shown in fig. 2, the proxy application service is connected to 2 blockchain nodes (blockchain node 1, blockchain node 2) in the blockchain network, and node information of blockchain node 1 and node information of blockchain node 2 are recorded in the proxy application service. After generating the transaction request, the blockchain application service sends the transaction request to the proxy application service, and the proxy application service determines to send the transaction request to the blockchain node 1, so that the blockchain node 1 broadcasts the transaction request to the whole blockchain network.
In an alternative implementation, the proxy application service and the blockchain application service may be in a one-to-one correspondence, that is, one proxy application service corresponds to one blockchain application service. When the proxy application service is connected to the blockchain network, specifically, the proxy application service may be connected to a blockchain link point in the blockchain network, which is previously connected to the blockchain application service. Referring to fig. 1, the blockchain application service is connected to a blockchain node 1 and a blockchain node 2 in the blockchain network, and when the proxy application service is connected to the blockchain network, the proxy application service may be connected to the blockchain node 1 and the blockchain node 2 in the blockchain network.
In conjunction with the blockchain application system shown in fig. 2, the present application provides a transaction processing method that helps reduce the requirement of the blockchain application system for blockchain application services. The transaction processing method may be performed by a proxy application service, a blockchain application service, and a blockchain network.
The proxy application service may also be referred to as a general service, a blockchain general service, etc., and the blockchain application service may also be referred to as an application service, a business service, a blockchain application service, etc.
The proxy application service and the blockchain application service may be two services deployed on the same server or two services deployed on different servers.
Referring to fig. 3, a flow of the transaction processing method provided in the present application is described as follows.
In step 301, the blockchain application service generates a transaction request.
Wherein the transaction request is a transaction request to be sent to a blockchain network.
The blockchain application service may be software or application deployed in a business system, and when business personnel need to send a transaction request to a blockchain network, the blockchain application service may issue an instruction to the blockchain application service deployed in the business system, and the blockchain application service generates the transaction request according to the received instruction.
In step 302, the blockchain application service sends a transaction request to the proxy application service.
Accordingly, the proxy application service receives a transaction request from the blockchain application service.
In an alternative, the proxy application service is respectively connected to N block link nodes in the block link network, where N is a positive integer. Node information corresponding to each block chain link point in the N block chain nodes is recorded in the proxy application service. Illustratively, the node information corresponding to each block link node includes the operation state of the block link node and the number of processed transactions.
When the running state of the blockchain node is normal, the blockchain link point can receive a transaction request from the proxy application service, namely the blockchain node is in an available state, and the blockchain link point can be called as an available blockchain node; when the operation state of the blockchain node is abnormal, the blockchain link point cannot receive the transaction request from the proxy application service, that is, the blockchain node is in an unavailable state, and the blockchain link point can be called as an unavailable blockchain node.
In addition, the node information corresponding to each block link point may further include connection information of the block link node and the latest change time. Specifically, the connection information of the blockchain node may be an IP address and a port (computer port) of the blockchain node; the latest change time of the block chain node may be the latest change time of the node information corresponding to the block chain node.
In an optional manner, the proxy application service includes a node registration record, and node information corresponding to each block link point in the N block link nodes is recorded in the node registration record.
For example, the proxy application service is connected to the blockchain nodes 1 to 5 in the blockchain network, and the proxy application service includes a node registration record, where the node registration record records node information corresponding to each blockchain node in the blockchain nodes 1 to 5.
Illustratively, the node registration record may be a list of nodes. As shown in table 1, a node list provided in the embodiment of the present application is recorded with node information corresponding to a block link point, where the node information includes an operating state of the block link node, a processed transaction number, connection information, and a latest change time.
TABLE 1
Operating state Number of transactions processed Connection information Latest change time
Block chain node 1 Is normal 10 IP1+port1 T1
Block chain node 2 Is normal 12 IP2+port2 T2
Block chain node 3 Abnormality (S) 14 IP3+port3 T3
Block chain node 4 Is normal 5 IP4+port4 T4
Block chain node 5 Abnormality (S) 9 IP5+port5 T5
In step 303, the proxy application service determines a first blockchain node from the N blockchain nodes.
The agent application service acquires a node registration record; and the agent application service determines the first block chain node according to the node information corresponding to the N block chain nodes.
In one implementation, the first blockchain link is in a normal operating state, and the processed transaction number of the first blockchain link meets the processed transaction number condition. For example, the processed transaction number condition is that the processed transaction number is smaller than the processed transaction number threshold, or the processed transaction number condition is that the processed transaction number in the node information corresponding to the block link point is the minimum.
In one implementation, the proxy application service may determine M blockchain nodes in a normal operating state according to an operating state of each of the N blockchain nodes; and then determining the block chain link point with the minimum processed transaction number as a first block chain node according to the processed transaction number of each block chain node in the M block chain nodes. Wherein M is less than or equal to N, and M is a positive integer.
Taking table 1 as an example, the proxy application service may determine block link point 1, block link point 2, and block link point 4 in a normal operation state according to the operation state of each of block link nodes from block link node 1 to block link point 5; the agent application service determines the number of processed transactions of each of the blockchain nodes 1, blockchain link points 2, and blockchain link points 4, determines that the blockchain link point in which the number of processed transactions is the smallest is the blockchain link point 4, and thereby determines the blockchain node 4 as the first blockchain node.
When determining the first blockchain node from the M blockchain nodes in the normal operation state, the agent application service may determine, as the first blockchain node, a blockchain node having the smallest number of processed transactions among the M blockchain nodes based on a load balancing algorithm, which is helpful for balancing the number of processed transactions processed by the M blockchain nodes.
For example, the embodiment of the present application provides a flow chart of processing a transaction request based on load balancing by a blockchain application system as shown in fig. 4.
Step 401, the agent application service receives a transaction request;
step 402, the agent application service determines a first block chain node according to a load balancing algorithm;
step 403, the agent application service sends the transaction request to the first blockchain node;
at step 404, the first blockchain node processes the transaction request.
Step 304, the agent application service sends a transaction request to the first block link node.
After receiving the transaction request, the first blockchain node broadcasts the transaction request to the blockchain network, so that the agent application service sends the transaction request to the blockchain network through the first blockchain node.
In addition, the proxy application service may increase the number of processed transactions of the first blockchain node in the node information corresponding to the first blockchain node. Taking table 1 as an example, if the proxy application service determines the block link node 4 as the first block link node, the proxy application service adds 1 to the processed transaction number of the block link node 4 in the node information corresponding to the block link node 4, that is, the processed transaction number of the block link node 4 is 6.
In the technical scheme, the blockchain application service generates a transaction request, sends the transaction request to the proxy application service, determines a first blockchain node by the proxy application service, and sends the transaction request to the first blockchain node. The block chain application service does not need to record node information corresponding to the block chain link points and determine the first block chain node, and the requirement of a block chain application system on the block chain application service is favorably reduced.
In a specific implementation, the blockchain application service may be deployed in a business system, such as a banking business system, and this helps to reduce the complexity of the blockchain application service in the business system, and further helps to reduce the complexity of the business system.
In addition, the block link points to which the proxy application services are connected may be dynamically changed. Illustratively, the dynamic change may include any one of adding a node, deleting a node, recovering a service from a node, and disconnecting a service from a node. Accordingly, the node registration record in the proxy application service may be dynamically changed.
With the architecture shown in fig. 2, the dynamic change of the blockchain node connected to the proxy application service and the dynamic change of the node registration record may correspond to the following four cases:
in case 1, if a block link is newly added to connect with the proxy application service, the node information corresponding to the block link is newly added to the node registration record. For example, if a blockchain node 5 is newly added to the blockchain network and the blockchain node 5 is connected to the proxy application service, the node information corresponding to the blockchain node 5 may be newly added to the node registration record. For another example, if the blockchain node 4 in the blockchain network is connected to the proxy application service, the node information corresponding to the blockchain node 4 may be newly added in the node registration record.
In case 2, if a certain blockchain node connected to the proxy application service is deleted, the node information corresponding to the blockchain node is deleted from the node registration record. For example, if the blockchain node 2 in the blockchain network is deleted, that is, the blockchain node 2 is deleted from the blockchain link point connected to the proxy application service, the node information corresponding to the blockchain node 2 may be deleted in the node registration record. For another example, the node information corresponding to the blockchain node 2 may be deleted in the node registration record, while the blockchain node 2 is not deleted from the blockchain network, but the blockchain node 2 may be deleted from the blockchain node connected to the proxy application service.
In case 3, if there is a certain block link node connected to the proxy application service but the operation is abnormal in the plurality of block link nodes connected to the proxy application service, the proxy application service sets the operation state of the block link node in the node registration record to be abnormal. For example, when the proxy application service detects that the blockchain node 2 runs abnormally, the running state in the node information corresponding to the blockchain node 2 in the node registration record is set to be abnormal.
And 4, in a plurality of block chain nodes connected with the proxy application service, if a certain block chain link point is connected with the proxy application service and the operation is recovered to be normal from abnormal operation, the proxy application service sets the operation state of the block chain link point in the node registration record to be normal. For example, when the agent application service detects that the blockchain node 2 is restored from abnormal operation to normal operation, the operation state in the node information corresponding to the blockchain node 2 in the node registration record is set to normal.
It should be noted that, in the above case 3, it should be understood that the block link point is not disconnected from the proxy application service, or the node information corresponding to the block link point is not deleted from the node registration record of the proxy application service, and the block link point simply cannot receive the transaction request from the proxy application service. Further, in case 4, it should be understood that, when the blockchain node resumes normal operation, the blockchain node may receive a transaction request from the proxy application service, so that the proxy application service may set the operation state in the node information corresponding to the blockchain node to be normal.
In the embodiment of the application, the proxy application service may be set to detect respective heartbeat information of the N block link points, so as to determine the running states of the block link nodes in the node information respectively corresponding to the N block link points according to the respective heartbeat information of the N block link points.
Taking any one of the N block chain nodes as an example for illustration, the proxy application service determines heartbeat information of the block chain node in a preset time period; and updating the running state of the block chain nodes in the node information corresponding to the block chain node points according to the heartbeat information.
In the embodiment of the present application, if node information is newly added to the node registration record, the proxy application service may also detect heartbeat information of the newly added blockchain node. Specifically, the agent application service determines a second block link node to be added to the block link nodes according to the node record information; and establishing connection between the proxy application service and the second block link point, and updating the node information corresponding to the second block link point in the node record information.
The agent application service may determine an operating state of the second blockchain node according to the heartbeat information of the second blockchain node, and set the processed transaction number of the second blockchain node as an initial value. Illustratively, the number of processed transactions for the second blockchain node is set to an initial value of 0.
Illustratively, fig. 5 is a schematic flow chart provided by an embodiment of the present application, where the flow is executed by the proxy application service as follows:
step 501, acquiring a node registration record;
step 502, judging whether node information corresponding to the link point of the newly added block exists in the node registration record; if yes, go to step 503, otherwise go to step 504;
step 503, establishing heartbeat connection for the link points of the newly added block;
step 504, receiving heartbeat information of each block chain node in the N block chain nodes according to the heartbeat time length;
step 505, judging whether heartbeat information of N block chain nodes is received; if yes, go to step 506, otherwise go to step 508;
step 506, judging whether a block link point with an abnormal operation state exists in the node registration record, if so, executing step 507, otherwise, executing step 501;
step 507, setting the running state of the block chain node with abnormal running state in the node registration record as normal;
step 508, judge whether the running state of the block chain link point that has not received the heartbeat information in the node registration record is normal; if yes, go to step 509, otherwise go to step 501;
in step 509, the running status of the block link point that has not received the heartbeat information in the node registration record is set as abnormal.
According to the technical scheme, the heartbeat connection with the N blockchain nodes is established in the proxy application service, and the heartbeat information of each blockchain node in the N blockchain nodes is obtained, so that the running states of the N blockchain nodes are determined and updated to the node registration record, the running states of the N blockchain nodes in the node registration record are maintained to be the latest running states, and the proxy application service is favorably prevented from sending the transaction request to the blockchain node in the abnormal running state.
Further, when detecting that the node registration record contains the newly added node information, the proxy application service may perform heartbeat detection on the newly added blockchain node corresponding to the newly added node information, and update the running state of the newly added blockchain node to the node registration record in time.
Based on the same inventive concept, fig. 6 exemplarily shows a schematic structural diagram of a proxy application service provided by an embodiment of the present application. The proxy application service may include node registration records 601, load balancing 602, node listening 603, and transaction request proxy 604.
Illustratively, the node registration record 601 is used to store N pieces of node information corresponding to N block link points, respectively.
The node monitor 603 is configured to obtain N pieces of node information corresponding to the N block link points of the node registration record 601. The node monitor 603 is further configured to communicate with the N block link points, detect heartbeat information of the N block link points, and further determine whether the block link points are in a normal operating state. When a node of a blockchain is abnormal, which causes a heartbeat timeout of the blockchain, the node monitor 603 updates the running status of the blockchain node in the node registration record 601 to be abnormal. And when the heartbeat of the newly added block chain node or the block chain link point in the abnormal operation state is recovered, updating the operation state of the block chain node to be normal.
The load balancing 602 is configured to obtain an available node record of the node registration record 601, and determine a block chain node (i.e., a first block chain node) whose processed transaction number meets the condition of the processed transaction number according to the processed transaction number in the node information corresponding to each block chain node in the available node record.
The transaction request agent 604 is configured to receive a transaction request from a blockchain application service and send the transaction request to the first blockchain node. The transaction request agent 604 is also used to update the number of transactions processed for the first blockchain node.
In the embodiment of the application, the decoupling between the blockchain application service and the blockchain network is realized through the proxy application service, so that the blockchain application service does not directly interact with the blockchain network, and because the access address of the proxy application service is fixed and unchangeable, the blockchain application service cannot be influenced no matter how the blockchain nodes in the blockchain network change, and the normal operation of the blockchain application service is ensured.
Based on the same inventive concept, fig. 7 exemplarily shows a structure of a transaction processing apparatus provided in an embodiment of the present application, and the apparatus can execute a flow of a transaction processing method.
A processing unit 701 and a transmitting/receiving unit 702;
the transceiver unit 702 is configured to receive a transaction request of a blockchain application service; the transceiver unit 702 is connected to N block link points in a block chain network; n is a positive integer;
the processing unit 701 determines a first blockchain node from the N blockchain nodes;
the transceiver unit 702 sends the transaction request to the blockchain network through the first blockchain link point.
In an optional implementation manner, the processing unit 701 is specifically configured to: acquiring a node registration record; the node registration records comprise node information corresponding to each block link point; and determining the first block chain node according to the node information corresponding to the N block chain nodes.
In an optional implementation manner, the node information corresponding to each block link point includes an operation state of the block link node and a processed transaction number of the block link point; the processing unit 701 is specifically configured to: and determining a block chain link point which is in a normal operation state and has the least processed transaction number from the N block chain nodes as the first block chain node.
In an optional implementation manner, the processing unit 701 is further configured to: for any one of the N blockchain nodes, performing the following operations: determining heartbeat information of the block chain nodes in a preset time period; and updating the running state of the block chain node according to the heartbeat information.
In an optional implementation manner, the processing unit 701 is further configured to: increasing the number of transactions processed by the first blockchain node.
In an optional implementation manner, the processing unit 701 is further configured to: determining a second block chain node newly added in the block chain link points according to the node record information; and establishing connection with the second block link point, and updating the node information corresponding to the second block link point in the node record information.
In an optional implementation manner, the processing unit 701 is specifically configured to: determining the running state of the second blockchain node according to the heartbeat information of the second blockchain node; setting the number of processed transactions of the second blockchain node to an initial value.
Based on the same inventive concept, an embodiment of the present application further provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the transaction processing method according to the obtained program.
Based on the same inventive concept, the embodiment of the present application further provides a computer-readable non-volatile storage medium, which includes computer-readable instructions, and when the computer reads and executes the computer-readable instructions, the computer is caused to execute the above transaction processing method.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A transaction processing method, comprising:
the method comprises the steps that a proxy application service receives a transaction request of a block chain application service; the proxy application service is respectively connected with N block chain nodes in a block chain network; n is a positive integer;
the proxy application service determining a first blockchain node from the N blockchain nodes;
the proxy application service sends the transaction request to the blockchain network through the first blockchain link point.
2. The method of claim 1, wherein the proxy application service determining a first blockchain node from the N blockchain nodes, comprises:
the proxy application service acquires a node registration record; the node registration records comprise node information corresponding to each block link point;
and the agent application service determines the first block chain node according to the node information corresponding to the N block chain nodes.
3. The method of claim 2, wherein the node information corresponding to each block link point includes an operation state of the block link node and a processed transaction number of the block link point;
the determining, by the proxy application service, the first block chain node according to the node information corresponding to the N block chain nodes includes:
and the agent application service determines the block chain link point which is in a normal operation state and has the least processed transaction number from the N block chain nodes as the first block chain node.
4. The method of claim 3, further comprising:
for any one of the N blockchain nodes, performing the following operations:
the proxy application service determines heartbeat information of the blockchain node in a preset time period;
and the proxy application service updates the running state of the block chain node according to the heartbeat information.
5. The method of claim 3, wherein after the proxy application service determines a first blockchain node from the N blockchain nodes, further comprising:
the proxy application service increases the number of transactions processed by the first blockchain node.
6. The method of any of claims 1 to 5, further comprising:
the agent application service determines a second block link node to be added in the block link nodes according to the node record information;
and the proxy application service establishes connection with the second block link point and updates the node information corresponding to the second block link point in the node record information.
7. The method of claim 6, wherein the updating the node information corresponding to the second block link point in the node record information comprises:
the proxy application service determines the running state of the second blockchain node according to the heartbeat information of the second blockchain node;
the proxy application service sets the number of processed transactions of the second blockchain node to an initial value.
8. A transaction processing device, comprising:
a processing unit and a transceiver unit;
the receiving and sending unit is used for receiving a transaction request of the blockchain application service; the receiving and sending unit is respectively connected with N block chain link points in a block chain network; n is a positive integer;
the processing unit is configured to determine a first blockchain node from the N blockchain nodes;
the transceiver unit is further configured to send the transaction request to the blockchain network through the first blockchain link point.
9. A computing device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to perform the method of any of claims 1 to 7 in accordance with the obtained program.
10. A computer-readable non-transitory storage medium including computer-readable instructions which, when read and executed by a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202010551815.4A 2020-06-17 2020-06-17 Transaction processing method and device Pending CN111652728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010551815.4A CN111652728A (en) 2020-06-17 2020-06-17 Transaction processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010551815.4A CN111652728A (en) 2020-06-17 2020-06-17 Transaction processing method and device

Publications (1)

Publication Number Publication Date
CN111652728A true CN111652728A (en) 2020-09-11

Family

ID=72350010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010551815.4A Pending CN111652728A (en) 2020-06-17 2020-06-17 Transaction processing method and device

Country Status (1)

Country Link
CN (1) CN111652728A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288577A (en) * 2020-10-29 2021-01-29 中国工商银行股份有限公司 Transaction processing method and device for distributed service, electronic equipment and medium
CN112507387A (en) * 2021-02-04 2021-03-16 北京全息智信科技有限公司 Distributed data and model calculation method and device based on block chain
WO2022257656A1 (en) * 2021-06-07 2022-12-15 腾讯科技(深圳)有限公司 Transaction processing method and apparatus, medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117097A (en) * 2018-09-05 2019-01-01 深圳正品创想科技有限公司 A kind of date storage method and system based on block chain
CN109559227A (en) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 A kind of method of commerce, device and the storage medium of transregional piece of chain network
CN109636427A (en) * 2019-01-29 2019-04-16 深圳市智税链科技有限公司 Method for processing business, device, medium and electronic equipment based on block catenary system
CN110149323A (en) * 2019-05-06 2019-08-20 山东公链信息科技有限公司 A kind of processing unit with millions TPS contract processing capacity
CN111080449A (en) * 2019-12-03 2020-04-28 深圳前海微众银行股份有限公司 Block chain cross-chain transaction method, management node and block chain network
CN111163129A (en) * 2019-12-05 2020-05-15 深圳前海微众银行股份有限公司 Resource processing method and device based on cross-link network
WO2020106845A1 (en) * 2018-11-23 2020-05-28 Amazon Technologies, Inc. Enabling access across private networks for a managed blockchain service

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117097A (en) * 2018-09-05 2019-01-01 深圳正品创想科技有限公司 A kind of date storage method and system based on block chain
WO2020106845A1 (en) * 2018-11-23 2020-05-28 Amazon Technologies, Inc. Enabling access across private networks for a managed blockchain service
CN109559227A (en) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 A kind of method of commerce, device and the storage medium of transregional piece of chain network
CN109636427A (en) * 2019-01-29 2019-04-16 深圳市智税链科技有限公司 Method for processing business, device, medium and electronic equipment based on block catenary system
CN110149323A (en) * 2019-05-06 2019-08-20 山东公链信息科技有限公司 A kind of processing unit with millions TPS contract processing capacity
CN111080449A (en) * 2019-12-03 2020-04-28 深圳前海微众银行股份有限公司 Block chain cross-chain transaction method, management node and block chain network
CN111163129A (en) * 2019-12-05 2020-05-15 深圳前海微众银行股份有限公司 Resource processing method and device based on cross-link network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
段进东;段义鑫;: "基于区块链技术的银行国际结算业务经营创新", 金融经济, no. 02, pages 30 - 32 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288577A (en) * 2020-10-29 2021-01-29 中国工商银行股份有限公司 Transaction processing method and device for distributed service, electronic equipment and medium
CN112288577B (en) * 2020-10-29 2023-09-12 中国工商银行股份有限公司 Transaction processing method, device, electronic equipment and medium for distributed service
CN112507387A (en) * 2021-02-04 2021-03-16 北京全息智信科技有限公司 Distributed data and model calculation method and device based on block chain
WO2022257656A1 (en) * 2021-06-07 2022-12-15 腾讯科技(深圳)有限公司 Transaction processing method and apparatus, medium and electronic device

Similar Documents

Publication Publication Date Title
US10873622B2 (en) Call chain-based concurrency control method and apparatus, and control node
CN111652728A (en) Transaction processing method and device
CN112671928B (en) Equipment centralized management architecture, load balancing method, electronic equipment and storage medium
CN106941420B (en) cluster application environment upgrading method and device
CN107612950A (en) A kind of method, apparatus, system, electronic equipment that service is provided
CN115297124B (en) System operation and maintenance management method and device and electronic equipment
CN111400041A (en) Server configuration file management method and device and computer readable storage medium
EP4030776A1 (en) Method and apparatus for triggering vomci function from olt to send omci messages
CN109995585B (en) Exception handling method, device and storage medium
CN109639755B (en) Associated system server decoupling method, device, medium and electronic equipment
WO2023124302A1 (en) Data processing method and apparatus, terminal device and storage medium
CN115037653B (en) Service flow monitoring method, device, electronic equipment and storage medium
CN113630317B (en) Data transmission method and device, nonvolatile storage medium and electronic device
CN104699799A (en) Data transmission method based on cross system
CN114598700A (en) Communication method and communication system
CN113242292A (en) Message transmission method, device, equipment, medium and product
CN107454021B (en) Communication method and device
CN111416852A (en) Method for session synchronization among multiple load balancers and load balancer
CN112688984A (en) Method, device and medium for issuing and executing instruction to network node
CN111464520B (en) Data processing method and device, storage medium and electronic equipment
CN114036235A (en) Block chain system and method for block chain system
CN116455963A (en) Cluster node registration method, medium, device and computing equipment
CN112100008B (en) Cross-node multilink redundancy protection method and system
CN110784532B (en) Bidirectional data synchronization method and system
CN114422352A (en) Service node updating method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination