CN111639129A - Transaction processing method and device, electronic equipment and computer-readable storage medium - Google Patents

Transaction processing method and device, electronic equipment and computer-readable storage medium Download PDF

Info

Publication number
CN111639129A
CN111639129A CN202010445520.9A CN202010445520A CN111639129A CN 111639129 A CN111639129 A CN 111639129A CN 202010445520 A CN202010445520 A CN 202010445520A CN 111639129 A CN111639129 A CN 111639129A
Authority
CN
China
Prior art keywords
transaction request
nodes
target node
node set
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.)
Granted
Application number
CN202010445520.9A
Other languages
Chinese (zh)
Other versions
CN111639129B (en
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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202010445520.9A priority Critical patent/CN111639129B/en
Publication of CN111639129A publication Critical patent/CN111639129A/en
Application granted granted Critical
Publication of CN111639129B publication Critical patent/CN111639129B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F16/275Synchronous replication
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • 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
    • 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
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a transaction processing method, a transaction processing device, electronic equipment and a computer-readable storage medium. The method comprises the following steps: when the transaction request is forwarded, a target node set is determined in a node set pre-divided in a block chain based on the urgency degree of the transaction request; and forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain the block to be verified. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.

Description

Transaction processing method and device, electronic equipment and computer-readable storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a transaction processing method, apparatus, electronic device, and computer-readable storage medium.
Background
The blockchain is a novel decentralized protocol, can safely store bitcoin transactions or other data, and information cannot be forged or falsified. The data of all nodes in the block chain are synchronized, so that the block chain can keep the consistency of the stored data.
Currently, a node in a blockchain broadcasts a received transaction request in the whole blockchain network, so that all the nodes in the blockchain synchronously store the transaction request. Some of the blockchains have numerous nodes, and synchronization of transaction requests across the blockchain can consume significant communication resources as well as storage resources.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks. The technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a transaction processing method, including:
when the transaction request is forwarded, a target node set is determined in a node set pre-divided in a block chain based on the urgency degree of the transaction request;
and forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain the block to be verified.
Optionally, the set of nodes is divided in the blockchain based on the probability of each node performing a block out operation.
Optionally, the sum of the probabilities of performing the out-of-block operation by the nodes in each node set is equal.
Optionally, determining a target node set from the node sets pre-divided in the blockchain based on the urgency of the transaction request includes:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
Optionally, forwarding the transaction request to a node in the target node set includes:
determining a target number based on the occurrence probability of the malicious nodes in the nodes;
the transaction request is forwarded to a target number of nodes in the set of target nodes.
Optionally, after the packaging node packages the transaction data corresponding to the transaction request to obtain a block to be verified, the block to be verified is sent to other nodes in the block chain except the packaging node, so that the other nodes verify the block to be verified, the block to be verified which is successfully verified is linked, and after each node in the block chain is linked to the block to be verified which is successfully verified, the cache corresponding to the transaction request is cleared.
In a second aspect, an embodiment of the present application provides a transaction processing apparatus, including:
the target node set determining module is used for determining a target node set in a node set pre-divided in a block chain based on the urgency degree of a transaction request when the transaction request is forwarded;
and the processing module is used for forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain the block to be verified.
Optionally, the set of nodes is divided in the blockchain based on the probability of each node performing a block out operation.
Optionally, the sum of the probabilities of performing the out-of-block operation by the nodes in each node set is equal.
Optionally, the target node set determining module is specifically configured to, when determining the target node set in the node sets pre-partitioned in the block chain based on the urgency of the transaction request:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
Optionally, when forwarding the transaction request to a node in the target node set, the processing module is specifically configured to:
determining a target number based on the occurrence probability of the malicious nodes in the nodes;
the transaction request is forwarded to a target number of nodes in the set of target nodes.
Optionally, after the packaging node packages the transaction data corresponding to the transaction request to obtain a block to be verified, the block to be verified is sent to other nodes in the block chain except the packaging node, so that the other nodes verify the block to be verified, the block to be verified which is successfully verified is linked, and after each node in the block chain is linked to the block to be verified which is successfully verified, the cache corresponding to the transaction request is cleared.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;
a memory for storing operating instructions;
a processor for executing the transaction processing method as shown in any of the embodiments of the first aspect of the present application by calling the operation instruction.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the transaction processing method shown in any implementation of the first aspect of the present application.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
according to the scheme provided by the embodiment of the application, when the transaction request is forwarded, the transaction request is forwarded to the nodes in the target node set in the blockchain based on the urgency degree of the transaction request, and the transaction request is synchronized in the target node set. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flow chart of a transaction processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a transaction processing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart illustrating a transaction processing method according to an embodiment of the present application, and as shown in fig. 1, the method mainly includes:
step S110: when the transaction request is forwarded, a target node set is determined in a node set pre-divided in a block chain based on the urgency of the transaction request.
Step S120: and forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain the block to be verified.
The execution subject of the method shown in the embodiment of the present application may be a node in a block chain as a transaction initiator.
In the embodiment of the application, the nodes in the block chain can be divided into a plurality of node sets according to a predetermined division rule, and the division results of the node sets are shared in the whole block chain. By the division rule pair, when the nodes in the block chain are subjected to set division, the division result of the node set has uniqueness.
As an example, the total number of the node set may be modulo by a value corresponding to a public key of the node, and the node set may be divided according to a difference of a remainder after the modulo. For example, the blockchain includes 15 nodes, and all the nodes in the blockchain are divided into 4 node sets. The specific division mode can be as follows: and performing modulus operation on 4 through numerical values corresponding to public keys of all nodes in the block chain, classifying the nodes with the remainder of 1 into the node set 1, classifying the nodes with the remainder of 2 into the node set 2, classifying the nodes with the remainder of 3 into the node set 3, and classifying the nodes with the remainder of 0 into the node set 4.
In the embodiment of the present application, the urgency level of the transaction request may be determined in advance, for example, the urgency level of the transaction request is divided into: very urgent, general, and non-urgent.
In the embodiment of the application, the target node set can be determined according to the urgency degree of the transaction request, the transaction request is forwarded to the target node set, and the target node set can synchronize all nodes of the transaction request in the set. Based on a consensus mechanism, a packaging node is randomly determined in all nodes of a block chain, and when the determined packaging node exists in a target node set, transaction data corresponding to a transaction request can be packaged through the packaging node to obtain a block to be verified; and when the determined packing node does not exist in the target node set, determining the packing node for multiple times based on a consensus mechanism until the determined packing node exists in the target node set.
In the embodiment of the application, the transaction request is forwarded to the target node set and is limited to be synchronized in the target node set, so that compared with synchronization in a full block chain, the sending amount of the transaction request is reduced, communication resources are saved, the transaction request is stored in the nodes of the target node set, and is not stored in all nodes of the full block chain, and storage resources are saved.
In the embodiment of the application, the synchronization of the transaction request in the target node set can be realized based on the gossip protocol.
According to the method provided by the embodiment of the application, when the transaction request is forwarded, the transaction request is forwarded to the nodes in the target node set in the blockchain based on the urgency degree of the transaction request, and the transaction request is synchronized in the target node set. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.
In an optional manner of the embodiment of the present application, the node set is divided in the block chain based on a probability that each node performs a block out operation.
In an optional manner of the embodiment of the present application, the sum of probabilities of performing the block output operation on the nodes in each node set is equal.
In the embodiment of the present application, the probability of performing the block out operation by each node in the block chain may be determined, for example, the probability of performing the block out operation by each node may be determined through a Proof of entitlement (POS) mechanism.
The sum of the block output probabilities of the nodes in the node set can be used as the block output probability of the node set, and in actual use, when the set is divided, the block output probabilities of the node sets can be equal, so that a basis is provided for subsequently determining the number of the target node sets.
In an optional manner of the embodiment of the present application, determining a target node set in a node set pre-divided in a block chain based on an urgency level of a transaction request includes:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
In the embodiment of the application, when the probability of performing the block outputting operation on each node set is equal, the probability of the existence of the packing node in the target node set can be represented by the number of the target node sets.
In the embodiment of the application, a corresponding relation between the urgency degree of the transaction request and the number of the target node sets can be pre-established, and as an example, when the urgency degree of the transaction request is very urgent, the number of the corresponding target node sets is 100% of the number of all the node sets in the block chain; when the urgency degree of the transaction request is urgent, the number of the corresponding target node sets is 70% of the number of all the node sets in the block chain; when the urgency degree of the transaction request is general, the number of the corresponding target node sets is 50% of the number of all the node sets in the block chain; when the urgency degree of the transaction request is non-urgency, the number of the corresponding target node sets is 20% of the number of all the node sets in the block chain.
By presetting the corresponding relation between the emergency degree of the transaction requests and the number of the target node sets, the transaction requests with high emergency degree can be ensured to be synchronized by more nodes in the target node sets, and the probability that the synchronized target node sets have packing nodes is higher, so that the transaction with high emergency degree can be processed more quickly.
As an example, when the urgency level of the transaction request is very urgent and the number of the corresponding target node sets is 100% of the number of all the node sets in the blockchain, the transaction request is forwarded to all the node sets in the blockchain, that is, all the nodes synchronize the transaction request, and at this time, the packaging node determined based on the consensus mechanism also synchronizes the transaction request, thereby realizing a fast packaging operation of the transaction request.
As an example, when the urgency of the transaction request is general, and the number of the corresponding target node sets is 50% of the number of all the node sets in the blockchain, the transaction request may be forwarded to 50% of the node sets in the blockchain, and at this time, the probability that the packing node exists in the target node set is 50% based on the packing node determined by the consensus mechanism. When the determined packaging node exists in the target node set, packaging operation can be carried out on the transaction request; and if the determined packing node does not exist in the target node set, waiting for determining the packing node based on the consensus mechanism for the next time until the determined packing node exists in the target node set. Because the urgency of the transaction is general, the transaction can be processed when the packaging node exists in the target node set under the condition that the timely processing of the transaction request is not influenced. In this example, transaction requests are forwarded to only 50% of the node sets, rather than being synchronized across all nodes of the blockchain, reducing the use of communication resources as well as storage resources.
In an optional manner of the embodiment of the present application, forwarding the transaction request to a node in the target node set includes:
determining a target number based on the occurrence probability of the malicious nodes in the nodes;
the transaction request is forwarded to a target number of nodes in the set of target nodes.
In the embodiment of the application, malicious nodes may exist in the block chain, and the block chain is attacked by Sybil. In order to avoid the influence of Sybil attack on the transaction, the occurrence probability of the malicious nodes can be specified, and the number of nodes for forwarding the transaction request is determined in the target node set according to the occurrence probability of the malicious nodes.
As an example, the probability of occurrence of a malicious node is 30%, and generally speaking, in order to ensure successful forwarding of a transaction request, the transaction request needs to be sent to 95% of the nodes within a valid time.
Based on the drawer principle, as 30% of the 3 rd power is less than 5%, at least 3 nodes are sent in each node set, and the transaction request can be guaranteed to be successfully sent to the target node set.
In implementation and use, after the node serving as the transaction initiator forwards the transaction request, feedback information of the transaction request may be collected, and if the number of the received feedback information is less than the target number within the effective time, the transaction request may be continuously forwarded to other nodes in the target node set until the received feedback information is not less than the target number.
In an optional manner of the embodiment of the application, after the packaging node packages the transaction data corresponding to the transaction request to obtain the block to be verified, the block to be verified is sent to other nodes except the packaging node in the block chain, so that the other nodes verify the block to be verified, the block to be verified which is successfully verified is linked, and after each node in the block chain is linked to the block to be verified which is successfully verified, the cache corresponding to the transaction request is cleared.
In the embodiment of the application, a plurality of transactions to be packaged may exist in the packaging node, and then the transactions with high urgency degree can be packaged preferentially based on the urgency degree of the transaction request.
In the embodiment of the application, after the packaging node packages the transaction data corresponding to the transaction request to obtain the block to be verified, the block to be verified is sent to other nodes except the packaging node in the block chain, and the other nodes verify the block to be verified.
In the embodiment of the application, after the block to be verified is successfully verified and linked, the transaction is completed, and at this time, the cache corresponding to the transaction request in each node can be cleaned in time, so that the storage resources of the nodes can be released in time.
Based on the same principle as the method shown in fig. 1, fig. 2 shows a schematic structural diagram of a transaction processing device provided by an embodiment of the present application, and as shown in fig. 2, the transaction processing device 20 may include:
a target node set determining module 210, configured to determine a target node set in a node set pre-divided in a block chain based on an urgency level of a transaction request when the transaction request is forwarded;
the processing module 220 is configured to forward the transaction request to the nodes in the target node set, so that the transaction request is synchronized in the target node set, and a packing node in the target node set packs transaction data corresponding to the transaction request to obtain a block to be verified.
When the device provided by the embodiment of the application forwards the transaction request, the transaction request is forwarded to the nodes in the target node set in the blockchain based on the urgency degree of the transaction request, and the transaction request is synchronized in the target node set. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.
Optionally, the set of nodes is divided in the blockchain based on the probability of each node performing a block out operation.
Optionally, the sum of the probabilities of performing the out-of-block operation by the nodes in each node set is equal.
Optionally, the target node set determining module is specifically configured to, when determining the target node set in the node sets pre-partitioned in the block chain based on the urgency of the transaction request:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
Optionally, when forwarding the transaction request to a node in the target node set, the processing module is specifically configured to:
determining a target number based on the occurrence probability of the malicious nodes in the nodes;
the transaction request is forwarded to a target number of nodes in the set of target nodes.
Optionally, after the packaging node packages the transaction data corresponding to the transaction request to obtain a block to be verified, the block to be verified is sent to other nodes in the block chain except the packaging node, so that the other nodes verify the block to be verified, the block to be verified which is successfully verified is linked, and after each node in the block chain is linked to the block to be verified which is successfully verified, the cache corresponding to the transaction request is cleared.
It is understood that the above modules of the transaction processing device in the embodiment have functions of implementing the corresponding steps of the transaction processing method in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the transaction processing apparatus, reference may be specifically made to the corresponding description of the transaction processing method in the embodiment shown in fig. 1, and details are not repeated here.
The embodiment of the application provides an electronic device, which comprises a processor and a memory;
a memory for storing operating instructions;
and the processor is used for executing the transaction processing method provided by any embodiment of the application by calling the operation instruction.
As an example, fig. 3 shows a schematic structural diagram of an electronic device to which an embodiment of the present application is applicable, and as shown in fig. 3, the electronic device 2000 includes: a processor 2001 and a memory 2003. Wherein the processor 2001 is coupled to a memory 2003, such as via a bus 2002. Optionally, the electronic device 2000 may also include a transceiver 2004. It should be noted that the transceiver 2004 is not limited to one in practical applications, and the structure of the electronic device 2000 is not limited to the embodiment of the present application.
The processor 2001 is applied to the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 2004 may include a receiver and a transmitter, and the transceiver 2004 is applied to the embodiments of the present application to implement the functions of the electronic device of the embodiments of the present application to communicate with other devices when executed.
The Processor 2001 may be a CPU (Central Processing Unit), general Processor, DSP (Digital Signal Processor), ASIC (Application specific integrated Circuit), FPGA (Field Programmable Gate Array) or other Programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 2001 may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
Bus 2002 may include a path that conveys information between the aforementioned components. The bus 2002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (extended industry Standard Architecture) bus, or the like. The bus 2002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
The Memory 2003 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically erasable programmable Read Only Memory), a CD-ROM (Compact disk Read Only Memory) or other optical disk storage, optical disk storage (including Compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these.
Optionally, the memory 2003 is used for storing application program code for performing the disclosed aspects, and is controlled in execution by the processor 2001. The processor 2001 is configured to execute application program codes stored in the memory 2003 to implement the transaction processing method provided in any of the embodiments of the present application.
The electronic device provided by the embodiment of the application is applicable to any embodiment of the method, and is not described herein again.
Compared with the prior art, when the transaction request is forwarded, the transaction request is forwarded to the nodes in the target node set in the blockchain based on the urgency degree of the transaction request, and the transaction request is synchronized in the target node set. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.
The embodiment of the present application provides a computer-readable storage medium, which stores a computer program thereon, and when the program is executed by a processor, the computer program implements the transaction processing method shown in the above method embodiment.
The computer-readable storage medium provided in the embodiments of the present application is applicable to any of the embodiments of the foregoing method, and is not described herein again.
Compared with the prior art, when the transaction request is forwarded, the transaction request is forwarded to the nodes in the target node set in the blockchain based on the urgency degree of the transaction request, and the transaction request is synchronized in the target node set. In the scheme, because the transaction request is limited to be synchronized in the target node set, compared with the case that the transaction request is forwarded to all nodes of the block chain and stored, the occupation of communication resources and the occupation of storage resources can be reduced.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A transaction processing method, comprising:
when a transaction request is forwarded, determining a target node set in a node set pre-divided in a block chain based on the urgency degree of the transaction request;
and forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain a block to be verified.
2. The method of claim 1, wherein the set of nodes is partitioned in the block chain based on a probability that each of the nodes performs a block out operation.
3. The method of claim 2, wherein the sum of the probabilities of performing the block out operation by the nodes in each of the node sets is equal.
4. The method of claim 1, wherein determining a target set of nodes among a set of nodes pre-partitioned in a blockchain based on the urgency of the transaction request comprises:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
5. The method of claim 1, wherein forwarding the transaction request to a node in the set of target nodes comprises:
determining a target number based on the probability of occurrence of a malicious node in the nodes;
forwarding the transaction request to a target number of nodes in the set of target nodes.
6. The method according to any of claims 1-5, wherein the packing node, after packing the transaction data corresponding to the transaction request to obtain a block to be verified, sends the block to be verified to other nodes in the block chain except the packing node, so that the other nodes verify the block to be verified, chains the block to be verified that is successfully verified, and allows each node in the block chain to clear the cache corresponding to the transaction request after chaining the block to be verified that is successfully verified.
7. A transaction processing device, comprising:
the target node set determining module is used for determining a target node set in a node set pre-divided in a block chain based on the urgency degree of a transaction request when the transaction request is forwarded;
and the processing module is used for forwarding the transaction request to the nodes in the target node set so as to synchronize the transaction request in the target node set, and packaging the transaction data corresponding to the transaction request by the packaging nodes in the target node set to obtain a block to be verified.
8. The apparatus of claim 7, wherein the target node set determination module, when determining the target node set among the node sets pre-partitioned in the blockchain based on the urgency of the transaction request, is specifically configured to:
and determining a target node set in the node sets pre-divided in the block chain based on the urgency degree of the transaction request and the preset corresponding relation between the urgency degree and the number of the target node sets.
9. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method of any one of claims 1-6 by calling the operation instruction.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1-6.
CN202010445520.9A 2020-05-24 2020-05-24 Transaction processing method, device, electronic equipment and computer readable storage medium Active CN111639129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010445520.9A CN111639129B (en) 2020-05-24 2020-05-24 Transaction processing method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010445520.9A CN111639129B (en) 2020-05-24 2020-05-24 Transaction processing method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111639129A true CN111639129A (en) 2020-09-08
CN111639129B CN111639129B (en) 2023-07-11

Family

ID=72332159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010445520.9A Active CN111639129B (en) 2020-05-24 2020-05-24 Transaction processing method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111639129B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627996A (en) * 2021-09-17 2021-11-09 平安普惠企业管理有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678865A (en) * 2017-09-20 2018-02-09 中国银行股份有限公司 The verification method and system of block chain based on transaction packet
CN107807984A (en) * 2017-10-31 2018-03-16 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing subregion common recognition
CN108540536A (en) * 2018-03-16 2018-09-14 深圳前海微众银行股份有限公司 Network magnanimity method for processing business, equipment and storage medium based on block chain
US20190149325A1 (en) * 2017-11-16 2019-05-16 International Business Machines Corporation Blockchain transaction privacy enhancement through broadcast encryption
WO2019125814A1 (en) * 2017-12-21 2019-06-27 Eland Blockchain Fintech Inc. Blockchain based information security system and method
CN110276688A (en) * 2019-06-14 2019-09-24 深圳前海微众银行股份有限公司 The method and device of trading processing in a kind of block chain
CN110298757A (en) * 2019-07-05 2019-10-01 北京艾摩瑞策科技有限公司 It is related to the common recognition method and device thereof of DPoS
CN110380919A (en) * 2019-08-30 2019-10-25 北京东软望海科技有限公司 Processing method, device, electronic equipment and the readable storage medium storing program for executing of block chain request
CN110597839A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN110751563A (en) * 2019-10-31 2020-02-04 辽宁振兴银行股份有限公司 Novel block chain consensus mechanism
US20200092084A1 (en) * 2018-09-18 2020-03-19 TERNiO, LLC System and methods for operating a blockchain network

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678865A (en) * 2017-09-20 2018-02-09 中国银行股份有限公司 The verification method and system of block chain based on transaction packet
CN107807984A (en) * 2017-10-31 2018-03-16 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing subregion common recognition
US20190149325A1 (en) * 2017-11-16 2019-05-16 International Business Machines Corporation Blockchain transaction privacy enhancement through broadcast encryption
WO2019125814A1 (en) * 2017-12-21 2019-06-27 Eland Blockchain Fintech Inc. Blockchain based information security system and method
CN108540536A (en) * 2018-03-16 2018-09-14 深圳前海微众银行股份有限公司 Network magnanimity method for processing business, equipment and storage medium based on block chain
US20200092084A1 (en) * 2018-09-18 2020-03-19 TERNiO, LLC System and methods for operating a blockchain network
CN110276688A (en) * 2019-06-14 2019-09-24 深圳前海微众银行股份有限公司 The method and device of trading processing in a kind of block chain
CN110298757A (en) * 2019-07-05 2019-10-01 北京艾摩瑞策科技有限公司 It is related to the common recognition method and device thereof of DPoS
CN110380919A (en) * 2019-08-30 2019-10-25 北京东软望海科技有限公司 Processing method, device, electronic equipment and the readable storage medium storing program for executing of block chain request
CN110597839A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN110751563A (en) * 2019-10-31 2020-02-04 辽宁振兴银行股份有限公司 Novel block chain consensus mechanism
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DANA YANG等: ""Randomly Elected Blockchain System based on Grouping Verifiers for Efficiency and Security"" *
柳智权: ""基于区块链的区域能源互联网能源交易方法的研究"", 《万方》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627996A (en) * 2021-09-17 2021-11-09 平安普惠企业管理有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium
CN113627996B (en) * 2021-09-17 2023-10-31 黑龙江粮食交易市场股份有限公司 Transaction resource amount prediction method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111639129B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN110750341B (en) Task scheduling method, device, system, terminal equipment and storage medium
CN110163609B (en) Method and device for processing data in block chain
CN108600315B (en) Block link route processing method, device and storage medium
CN110659905B (en) Transaction verification method, device, terminal equipment and storage medium
CN110046994B (en) Method and system for accepting block link deposit certificate transaction
CN109189509B (en) Interface calling method, interface calling response method and server
CN113783935A (en) Byzantine fault-tolerant method and device
US20040143691A1 (en) Sender to receiver request retry method and apparatus
CN114035987A (en) Data transmission method and device based on message queue, electronic equipment and medium
CN111639129A (en) Transaction processing method and device, electronic equipment and computer-readable storage medium
CN110928952A (en) Data synchronization method and device based on block chain
CN104270287A (en) Message disorder detecting method and device
CN111897826A (en) Parameter information updating method and device, electronic equipment and readable storage medium
CN112994891A (en) Transaction request consensus method and system based on threshold signature
CN116112507A (en) Hierarchical blockchain-based multitasking asynchronous execution method and device
CN112132583A (en) Transaction processing method and device of block chain, electronic equipment and readable storage medium
CN113656374A (en) Method and device for processing service message with attachment
CN112927075A (en) Processing method and device for cross-chain transaction, electronic equipment and readable storage medium
CN113691632A (en) Dynamic scheduling method and system for block chain computing resources
CN112541041A (en) Data processing method, device, server and storage medium
CN111917572B (en) Transaction request processing method and device, electronic equipment and readable storage medium
CN113342275B (en) Method, apparatus and computer readable storage medium for accessing data at block link points
CN116634025B (en) Method, equipment, system and storage medium for determining transaction sequence
CN117453422B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN111786965B (en) RPC message processing method and device, electronic equipment and readable 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
GR01 Patent grant
GR01 Patent grant