CN112926981B - Transaction information processing method, device and medium for block chain and electronic equipment - Google Patents

Transaction information processing method, device and medium for block chain and electronic equipment Download PDF

Info

Publication number
CN112926981B
CN112926981B CN202110293026.XA CN202110293026A CN112926981B CN 112926981 B CN112926981 B CN 112926981B CN 202110293026 A CN202110293026 A CN 202110293026A CN 112926981 B CN112926981 B CN 112926981B
Authority
CN
China
Prior art keywords
transaction information
block
transaction
verified
queue
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.)
Active
Application number
CN202110293026.XA
Other languages
Chinese (zh)
Other versions
CN112926981A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110293026.XA priority Critical patent/CN112926981B/en
Publication of CN112926981A publication Critical patent/CN112926981A/en
Application granted granted Critical
Publication of CN112926981B publication Critical patent/CN112926981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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

Abstract

The embodiment of the application provides a transaction information processing method, a transaction information processing device, a transaction information processing medium and electronic equipment for a block chain. The transaction information processing method comprises the following steps: after target transaction information to be processed is received, detecting whether the target transaction information exists in a queue to be packaged and a queue to be verified of a transaction pool, wherein the queue to be packaged is used for storing the transaction information which passes verification and is not written into a block chain account book; if the target transaction information does not exist in the queue to be packaged and the queue to be verified of the transaction pool, adding the target transaction information into the queue to be verified of the transaction pool; after the target transaction information is verified, deleting the target transaction information from the to-be-verified queue of the transaction pool, and adding the target transaction information into the to-be-packaged queue; and performing block uplink processing based on the transaction information in the queue to be packaged. The technical scheme of the embodiment of the application can avoid increasing the consumption of computing resources due to the fact that repeated transaction information is verified.

Description

Transaction information processing method, device and medium for block chain and electronic equipment
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for processing transaction information of a blockchain.
Background
In the blockchain network, the transaction information in the node transaction pool has multiple sources, such as may be from an external RPC (Remote Procedure Call) interface of the node, or may also be broadcast from other nodes in the blockchain network. In this case, the node may receive the repeated transaction information, but the related art does not consider the problem, and further, multiple times of repeated verification may occur on the same transaction information, which not only increases the consumption of computing resources, but also causes a large response delay in the processing of the transaction information.
Disclosure of Invention
Embodiments of the present application provide a transaction information processing method, apparatus, medium, and electronic device for a block chain, so that at least to some extent, it is possible to avoid increasing consumption of computing resources due to verification of repeated transaction information, and at the same time, response delay can be reduced.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a transaction information processing method for a blockchain, including: after target transaction information to be processed is received, detecting whether the target transaction information exists in a queue to be packaged and a queue to be verified of a transaction pool, wherein the queue to be packaged is used for storing the transaction information which passes verification and is not written into a block chain account book; if the target transaction information does not exist in the queue to be packaged and the queue to be verified of the transaction pool, adding the target transaction information into the queue to be verified of the transaction pool; after the target transaction information is verified, deleting the target transaction information from the to-be-verified queue of the transaction pool, and adding the target transaction information into the to-be-packaged queue; and performing block uplink processing based on the transaction information in the queue to be packaged.
According to an aspect of an embodiment of the present application, there is provided a transaction information processing apparatus for a blockchain, including: the system comprises a detection unit, a block chain account book processing unit and a block chain account book processing unit, wherein the detection unit is configured to detect whether target transaction information exists in a queue to be packaged and a queue to be verified of a transaction pool after the target transaction information to be processed is received, and the queue to be packaged is used for storing the transaction information which passes verification and is not written in the block chain account book; the first processing unit is configured to add the target transaction information into the transaction pool to-be-verified queue if the target transaction information does not exist in the to-be-packaged queue and the transaction pool to-be-verified queue; the second processing unit is configured to delete the target transaction information from the to-be-verified queue of the transaction pool after the target transaction information passes verification, and add the target transaction information into the to-be-packaged queue; and the third processing unit is configured to perform block uplink processing based on the transaction information in the queue to be packaged.
In some embodiments of the present application, based on the foregoing solution, the detecting unit is further configured to: before adding the target transaction information into the to-be-verified queue of the transaction pool, detecting whether the target transaction information exists in a block written with a block chain account book; the first processing unit is further configured to: and if the target transaction information does not exist in the block written with the block chain account book and the target transaction information does not exist in the transaction pool to-be-verified queue and the to-be-packaged queue, adding the target transaction information into the transaction pool to-be-verified transaction queue.
In some embodiments of the present application, based on the foregoing scheme, the target transaction information includes transaction information included in the received proposal block; the detection unit is further configured to: acquiring the latest block height of a local block chain account book; after the proposal block is received, if the height of the preamble block of the proposal block is consistent with the height of the latest block of the local block chain account book, detecting whether the transaction information in the proposal block exists in the queue to be packed and the queue to be verified of the transaction pool.
In some embodiments of the present application, based on the foregoing solution, the detecting unit is further configured to: and if the height of the preamble block of the proposal block is not consistent with the height of the latest block of the local block chain book, returning error information.
In some embodiments of the present application, based on the foregoing solution, the target transaction information includes transaction information contained in the received proposal block; the device further comprises: the acquisition unit is configured to acquire a transaction list to be verified of the proposal block and a verified transaction list of the proposal block; and the fourth processing unit is configured to add the first transaction information into the proposed block to-be-verified transaction list if the first transaction information in the proposed block does not exist in the proposed block to-be-verified transaction list and the proposed block verified transaction list after the proposed block is received, and is configured to delete the first transaction information from the proposed block to-be-verified transaction list and add the first transaction information into the proposed block verified transaction list after the first transaction information is verified.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: before adding the first transaction information into the proposed block to-be-verified transaction list, detecting whether the first transaction information exists in the to-be-packaged queue; and if the first transaction information does not exist in the queue to be packaged, adding the first transaction information into the transaction list to be verified of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: and if the first transaction information exists in the queue to be packaged, directly adding the first transaction information into the verified transaction list of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: if the first transaction information exists in the queue to be packaged, detecting whether the first transaction information needs to be re-verified; if the first transaction information does not need to be verified again, directly adding the first transaction information into the verified transaction list of the proposal block; and if the first transaction information needs to be re-verified, adding the first transaction information into the transaction list to be verified of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: and if the proposal block is successfully identified in the blockchain network, deleting the transaction information contained in the proposal block from the verified transaction list of the proposal block and the queue to be packed.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: if the proposal block is not successfully identified, the transaction information which is contained in the proposal block and passes the verification is kept in the queue to be packaged.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: after the proposal block is received, if the first transaction information in the proposal block exists in a transaction list to be verified of the proposal block or a verified transaction list of the proposal block, determining that the first transaction information is repeated transaction information.
In some embodiments of the present application, based on the foregoing solution, the obtaining unit is configured to: after receiving the proposal block, creating a proposal block to-be-verified transaction list and a proposal block verified transaction list corresponding to the proposal block.
According to an aspect of an embodiment of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing the transaction information processing method as described in the above embodiment.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the transaction information processing method as described in the above embodiments.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the transaction information processing method provided in the above-mentioned various optional embodiments.
In the technical solutions provided by some embodiments of the present application, after target transaction information to be processed is received, when it is detected that the target transaction information does not exist in the queue to be packaged and the queue to be verified of the transaction pool, the target transaction information is added to the queue to be verified of the transaction pool, so that it is possible to avoid increasing consumption of computing resources due to verification of repeated transaction information. After the target transaction information is verified, the target transaction information is deleted from the to-be-verified queue of the transaction pool and added into the to-be-packaged queue, and the transaction information which passes verification and is not written into the block chain account book is stored through the to-be-packaged queue, so that even if the proposal blocks are not successfully identified and the common identification processing needs to be carried out again in the next round, the same transaction information does not need to be verified repeatedly, the block chain linking efficiency can be improved, and the response delay caused by multiple times of verification is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic structural diagram of a blockchain network.
Fig. 2 is a schematic diagram illustrating a connection relationship between blocks in a block chain.
Fig. 3 shows a schematic diagram of a process of generating a tile.
FIG. 4 shows a flow diagram of a transaction information processing method for a blockchain according to one embodiment of the present application;
FIG. 5 shows a flow diagram of a transaction information processing method for a blockchain according to an embodiment of the present application;
FIG. 6 shows a flow diagram of a transaction information processing method for a blockchain according to one embodiment of the present application;
FIG. 7 shows a block diagram of a transaction information processing device for a blockchain according to an embodiment of the present application;
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The technical scheme of the embodiment of the application is mainly to process transaction information in a blockchain system, and before the technical scheme of the embodiment of the application is introduced, basic knowledge of blockchain technology is introduced.
The Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The blockchain is essentially a decentralized database, which is a series of data blocks (i.e., blocks) associated by using cryptography, and each data block contains information of a batch of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node point devices and used for verifying the effectiveness of the service request, recording the effective request after consensus is completed on storage, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the encrypted service information to a shared account (network communication) completely and consistently, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of canceling contract upgrading logout; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
Referring to the blockchain network shown in fig. 1, a plurality of nodes 101 may be included in the blockchain network, and the plurality of nodes 101 may be respective clients forming the blockchain network. Each node 101 may receive input information and maintain shared data within the blockchain network based on the received input information while operating normally. In order to ensure information intercommunication in the blockchain network, information connection can exist between each node in the blockchain network, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network acquire the input information according to a consensus algorithm, and store the input information as shared data, so that the data stored on all the nodes in the blockchain network are consistent.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes, so that the generated blocks can be broadcasted to other nodes in the blockchain network according to the node identifiers of other nodes. Each node can maintain a node identification list, and the node name and the node identification are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node.
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, as shown in fig. 2, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp, a difficulty value and the like, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp, the difficulty value and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 3, when a node where the block chain is located receives input information, the input information is verified, after the verification is completed, the input information is stored in a memory pool, and a hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identifications of the other nodes in the data sharing system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
Each node in the blockchain network may be a server or a terminal device. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a Cloud server providing basic Cloud Computing services such as a Cloud service, a Cloud database, cloud Computing (Cloud Computing), a Cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The nodes may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The cloud computing refers to a delivery and use mode of an IT infrastructure, and specifically refers to acquiring required resources in an on-demand and easily-extensible manner through a network; the generalized cloud computing refers to a delivery and use mode of a service, and refers to obtaining a required service in an on-demand and easily-extensible manner through a network. Such services may be IT and software, internet related, or other services. Cloud Computing is a product of development and fusion of traditional computers and Network Technologies, such as Grid Computing (Grid Computing), distributed Computing (Distributed Computing), parallel Computing (Parallel Computing), utility Computing (Utility Computing), network Storage (Network Storage Technologies), virtualization (Virtualization), load balancing (Load Balance), and the like. With the development of diversification of internet, real-time data stream and connecting equipment and the promotion of demands of search service, social network, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Different from the prior parallel distributed computing, the generation of cloud computing can promote the revolutionary change of the whole internet mode and the enterprise management mode in concept.
In the blockchain network, since the transaction information in the node transaction pool has multiple sources, for example, the transaction information may come from an external RPC interface of the node, or may also come from broadcasts of other nodes in the blockchain network, the node may receive repeated transaction information, however, such a problem is not considered in the related art, and further multiple repeated verifications may occur to the same transaction information, which not only increases consumption of computing resources, but also causes a large response delay in processing the transaction information. Based on this, the embodiment of the present application proposes a new transaction information processing scheme for a blockchain, and the following describes in detail the technical scheme of the embodiment of the present application:
fig. 4 shows a flowchart of a transaction information processing method for blockchains, which may be performed by any one blockchain node in a blockchain network, according to an embodiment of the present application. Referring to fig. 4, the transaction information processing method for blockchains at least includes steps S410 to S440, which are described in detail as follows:
in step S410, after receiving the target transaction information to be processed, it is detected whether the target transaction information exists in a queue to be packaged and a queue to be verified of the transaction pool, where the queue to be packaged is used to store the transaction information that passes verification and is not written into the blockchain ledger.
In one embodiment of the present application, the target transaction message may be any transaction message received by the blockchain node, such as a transaction message received by the blockchain node through an external RPC interface, or a transaction message broadcast by other nodes in the blockchain network.
Meanwhile, for a block chain node, a queue to be packaged and a queue to be verified of a transaction pool can be created in a local transaction pool, the queue to be verified of the transaction pool is used for storing transaction information needing verification, and the queue to be packaged is used for storing the transaction information which passes verification and is not written into a block chain account book.
In step S420, if the target transaction information does not exist in the queue to be packaged and the queue to be verified in the transaction pool, the target transaction information is added to the queue to be verified in the transaction pool.
In an embodiment of the present application, if no target transaction information exists in both the queue to be packaged and the queue to be verified of the transaction pool, it indicates that the target transaction information is transaction information that is not duplicated with the transaction information in the queue to be packaged and the queue to be verified of the transaction pool, and then the target transaction information may be added to the queue to be verified of the transaction pool to prepare for transaction verification.
Optionally, in an embodiment of the present application, in addition to detecting whether the target transaction information exists in the queue to be packaged and the queue to be verified in the transaction pool, the block link point may also detect whether the target transaction information exists in a block to which the block chain ledger has been written after receiving the target transaction information. If the target transaction information is detected to exist in the block written with the blockchain ledger, the target transaction information is indicated to be the repeated transaction information, and in this case, an error prompt message can be returned. If the target transaction information is detected not to exist in the block written with the block chain account book, and meanwhile, the target transaction information is also determined not to exist in the queue to be packaged and the transaction pool queue to be verified, the target transaction information can be added into the transaction pool queue to be verified.
In an embodiment of the present application, if the target transaction information is from a proposed block received by the block link point, the block link point may further obtain a latest block height of the local block chain ledger, and then, after receiving the proposed block, detect whether a preamble block height of the proposed block is consistent with the latest block height of the local block chain ledger, and if the preamble block height of the proposed block is consistent with the latest block height of the local block chain ledger, then detect whether the transaction information in the proposed block exists in the queue to be packed and the queue to be verified of the transaction pool.
If the height of the preamble block of the proposed block is not consistent with the height of the latest block of the local block link ledger, it may be described that the local block link ledger is not updated in time due to delay or the proposed block is illegal due to other reasons, in which case, an error message may be returned and the transaction information in the proposed block is not processed.
With continued reference to fig. 4, in step S430, after the target transaction information is verified, the target transaction information is deleted from the transaction pool to-be-verified queue and added to the to-be-packaged queue.
Alternatively, the verification of the target transaction information may be to verify a signature of the target transaction information, to verify transaction data included in the target transaction information, or the like.
In step S440, a block uplink process is performed based on the transaction information in the queue to be packed.
In an embodiment of the present application, the performing of uplink block processing based on the transaction information in the queue to be packaged may be packaging the transaction information in the queue to be packaged into a block, and then performing uplink processing. If the block consensus obtained by packaging is successful, the uplink transaction information can be deleted from the queue to be packaged.
The technical scheme of the embodiment shown in fig. 4 enables the target transaction information to be added into the queue to be verified of the transaction pool when it is detected that the target transaction information does not exist in the queue to be packaged and the queue to be verified of the transaction pool, thereby avoiding the increase of consumption of computing resources caused by verification of repeated transaction information. After the target transaction information is verified, the target transaction information is deleted from the to-be-verified queue of the transaction pool and added into the to-be-packaged queue, and the transaction information which passes verification and is not written into the block chain account book is stored through the to-be-packaged queue, so that even if the proposal blocks are not successfully identified and the common identification processing needs to be carried out again in the next round, the same transaction information does not need to be verified repeatedly, the block chain linking efficiency can be improved, and the response delay caused by multiple times of verification is reduced.
Fig. 5 shows a flowchart of a transaction information processing method for blockchains, which may be performed by any one blockchain node in a blockchain network according to one embodiment of the present application. Referring to fig. 5, the transaction information processing method for blockchains at least includes the following steps S510 to S530, which are described in detail as follows:
in step S510, a proposed block to-be-verified transaction list and a proposed block verified transaction list are obtained.
In an embodiment of the present application, the process of obtaining the proposed block verified transaction list and the proposed block verified transaction list in step S510 may be to create a proposed block verified transaction list and a proposed block verified transaction list corresponding to the proposed block after receiving the proposed block. The transaction list to be verified in the proposal block can be used for storing transaction information which needs to be verified in the proposal block, and the verified transaction list in the proposal block can be used for storing the transaction information which passes the verification in the proposal block. That is, in this embodiment, the proposed block to-be-verified transaction list and the proposed block verified transaction list are for each proposed block and may be created after the proposed block is received.
Alternatively, a proposed block to-be-verified transaction list and a proposed block verified transaction list may be created before the proposed block is received. That is, the proposed block transaction-to-be-verified list and the proposed block verified transaction list may be created in advance, and after a proposed block is received, the created proposed block transaction-to-be-verified list and the proposed block verified transaction list are associated with the proposed block, so as to store transaction information to be verified and verified transaction information.
In step S520, after the proposal block is received, if the first transaction information in the proposal block does not exist in the transaction list to be verified of the proposal block and the verified transaction list of the proposal block, the first transaction information is added to the transaction list to be verified of the proposal block.
In an embodiment of the present application, the first transaction information may be any transaction information in the proposal block, in other words, the processing procedures shown in step S520 and step S530 may be performed on each transaction information in the proposal block.
In one embodiment of the present application, if the first transaction information does not exist in the proposed block to-be-verified transaction list and the proposed block verified transaction list, it indicates that the first transaction information is transaction information that does not duplicate the transaction information in both the proposed block to-be-verified transaction list and the proposed block verified transaction list, and then the first transaction information may be added to the proposed block to-be-verified transaction list.
It should be noted that: if the first transaction information in the proposal block exists in the transaction list to be verified of the proposal block or in the verified transaction list of the proposal block, the first transaction information may be determined to be the duplicate transaction information. In which case an error message may be returned to indicate that there is duplicate transaction information in the proposal block.
In step S530, after the first transaction information is verified, the first transaction information is deleted from the transaction list to be verified of the proposal block and added to the verified transaction list of the proposal block.
Alternatively, the verification of the first transaction information may be to verify a signature of the target transaction information, to verify transaction data included in the target transaction information, or the like.
In one embodiment of the present application, if the consensus on the proposal block in the blockchain network is successful, the transaction information contained in the proposal block may be deleted from the list of validated transactions for the proposal block.
The technical solution of the embodiment shown in fig. 5 enables that when it is detected that the first transaction information does not exist in the transaction list to be verified of the proposal block and the verified transaction list of the proposal block, the first transaction information is added to the transaction list to be verified of the proposal block, thereby avoiding the increase of the consumption of computing resources due to the verification of repeated transaction information.
In the foregoing technical solutions, the embodiment shown in fig. 4 is mainly used for processing the target transaction information entering the transaction pool, and the embodiment shown in fig. 5 is mainly used for verifying the transaction information in the proposal block. And the target transaction information may include the transaction information in the proposed block, in this case, the technical solutions of the embodiments shown in fig. 4 and fig. 5 may be combined, that is, the block link point not only maintains the queue to be packaged and the transaction pool queue to be verified, but also maintains a proposed block transaction list to be verified and a proposed block verified transaction list.
Based on this, in an embodiment of the present application, before adding the first transaction information to the proposed block to-be-verified transaction list, the block chain node may further detect whether the first transaction information exists in the to-be-packaged queue, and since the transaction information in the to-be-packaged queue is verified transaction information, if the first transaction information exists in the to-be-packaged queue, the first transaction information may be directly added to the proposed block verified transaction list, so that the transaction information may be prevented from being repeatedly verified to increase consumption of computing resources.
If the first transaction information does not exist in the to-be-packaged queue, the first transaction information may be added to a proposed block to-be-verified transaction list for verification by the transaction verifier.
Optionally, if the first transaction information exists in the queue to be packaged, it may also be detected whether the first transaction information needs to be re-verified, for example, if a long time has passed after the first transaction information is verified, the first transaction information may be re-verified, or if an instruction for re-verification is received, the first transaction information may also be re-verified. When it is determined that the first transaction information does not need to be re-verified, then the first transaction information may be directly added to the proposed block verified transaction list; if it is determined that the first transaction information requires re-verification, the first transaction information may be added to a proposed block list of transactions to be verified for verification by the transaction verifier.
In an embodiment of the present application, in combination with the technical solutions shown in fig. 4 and fig. 5, if the consensus on the proposal block in the block chain network is successful, the transaction information included in the proposal block may be deleted from the verified transaction list and the to-be-packaged queue of the proposal block.
Optionally, if the proposal block is not successfully identified, the transaction information that is included in the proposal block and passes the verification may be retained in the queue to be packaged, so that when the consensus process needs to be performed again, the same transaction information does not need to be repeatedly verified, thereby improving the efficiency of block chaining and reducing the response delay caused by multiple verifications.
In an embodiment of the present application, a specific embodiment combining technical solutions of the embodiments shown in fig. 4 and fig. 5 may be as shown in fig. 6, and includes the following steps:
step S601, after receiving the proposed block, determining whether the height of the preamble block of the proposed block is consistent with the height of the latest block of the local account book, if so, performing step S602; and if the height of the preamble block of the proposal block is inconsistent with the height of the latest block of the local account book, returning error information.
Optionally, the transaction pool may maintain a temporary state, i.e., a to-be-verified state pendingBlock, for the proposed block, and information of the to-be-verified state may include a block height, a block content, a proposed block to-be-verified transaction list unprocessadTxQueue, and the like, so as to verify transaction information in the proposed block subsequently.
Step S602, judging whether the transaction information in the proposal block is in the to-be-verified transaction list unprocessdTxQueue of the proposal block, if not, executing step S603; if the transaction list unproceseddTxQueue to be verified in the proposal block indicates that repeated transaction information occurs, the verification can be stopped and error information can be returned at the moment.
Step S603, determining whether the transaction information in the proposal block is in the validated transaction list ProcessedTxQueue of the proposal block, if not, executing step S604; if in the proposal block verified transaction list ProcessedTxQueue, it indicates that duplicate transaction information is present, at which point verification may be stopped and an error message returned.
Step S604, judging whether the transaction information in the proposal block is in the block written with the account book, if not, executing step S605; if in the block in which the ledger has been written, it is indicated that duplicate transaction information has occurred, at which point validation may be stopped and an error message returned.
It should be noted that, before the step S601 to the step S604, the determination may not be performed in a sequential order, the step S601 to the step S604 may be sequentially performed according to the technical solution of the embodiment shown in fig. 6, the step S601 to the step S604 may be simultaneously performed, the execution order of the step S601 to the step S604 may be arbitrarily set, and the technical solution of the embodiment of the present application is not limited thereto.
Step S605, judging whether the transaction information in the proposal block is in the TxPoint to be packaged, if so, directly adding the transaction information into a verified transaction list ProcessdTexQueue of the proposal block, thus being unnecessary to repeatedly verify the transaction information; if the transaction information in the proposal block is not in the queue to be packed txport, step S606 is executed.
Step S606, determining whether the transaction information in the proposal block is in the transaction pool pending verification queue pendingTxQueue, and if the transaction information is in the transaction pool pending verification queue pendingTxQueue, executing step S607; if not in the transaction pool pending verification queue pendingTxQueue, step S608 is executed.
Step S607, add the transaction information to the transaction list unproceseddtxqueue to be verified of the proposal block, and wait for the transaction verifier to verify.
Step S608, adding the transaction information into the transaction pool pending verification queue pendingTxQueue and the proposal block pending verification transaction list unproceseddtxqueue, and waiting for the transaction verifier to perform verification.
It should be noted that steps S602 to S608 are required to be executed for each transaction information in the proposal block, and specific execution may be sequentially executed, or multiple transaction information may be simultaneously executed.
Step S609, after the transaction verifier verifies the transaction to be verified (for example, verifies the transaction information in the proposed block to-be-verified transaction list unproceseddtxqueue), determining whether there is any transaction unprocessed in the proposed block to-be-verified transaction list unproceseddtxqueue, and if yes, continuing to wait for the transaction verifier to verify; if not, a verification result is returned.
Step S610, after obtaining the verification result of the transaction, moving the transaction after verification from the proposed block to-be-verified transaction list unprocessdtxqueue to the proposed block verified transaction list ProcessedTxQueue, and moving the transaction from the transaction pool to-be-verified queue pendingTxQueue to the to-be-packed list TxPool.
In one embodiment of the present application, if the proposal block is successfully identified in the blockchain network, the transaction pool may be notified to delete the transaction information in the proposal block from the to-be-packaged list TxPool and the proposal block verified transaction list ProcessedTxQueue. If the proposal block does not have the consensus success, the transaction information in the TxPoint to be packed can continue to wait for packing, and if the proposal block needs to be packed again, the repeated transaction information does not need to be verified again, so that the transaction settlement can be accelerated, the consumption of CPU (Central Processing Unit) and IO (Input/Output) resources caused by the repeated verification of the transaction by the block link points is greatly reduced, and the response delay of the block link network to the outside is reduced. Meanwhile, according to the technical scheme of the embodiment of the application, when the same transaction information (which may be caused by network transmission delay or time difference of the verification process) is received, the blockchain node can be discarded without performing multiple verification processes, and the increase of resource consumption caused by the processing of the same transaction information can also be avoided.
Embodiments of the apparatus of the present application are described below, which may be used to execute the transaction information processing method for blockchains in the above embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the transaction information processing method for blockchain described above in the present application.
Fig. 7 shows a block diagram of a transaction information processing device for blockchains, which may be disposed in any one of blockchain nodes in a blockchain network according to an embodiment of the present application.
Referring to fig. 7, a transaction information processing apparatus 700 for a blockchain according to an embodiment of the present application includes: a detection unit 702, a first processing unit 704, a second processing unit 706 and a third processing unit 708.
After receiving target transaction information to be processed, the detecting unit 702 is configured to detect whether the target transaction information exists in a queue to be packaged and a queue to be verified of a transaction pool, where the queue to be packaged is used to store transaction information that passes verification and is not written in a block chain ledger; the first processing unit 704 is configured to add the target transaction information into the transaction pool to-be-verified queue if the target transaction information does not exist in the to-be-packaged queue and the transaction pool to-be-verified queue; the second processing unit 706 is configured to delete the target transaction information from the to-be-verified queue of the transaction pool and add the target transaction information into the to-be-packaged queue after the target transaction information passes verification; the third processing unit 708 is configured to perform block uplink processing based on the transaction information in the queue to be packed.
In some embodiments of the present application, based on the foregoing solution, the detecting unit 702 is further configured to: before adding the target transaction information into the to-be-verified queue of the transaction pool, detecting whether the target transaction information exists in a block written with a block chain account book; the first processing unit is further configured to: and if the target transaction information does not exist in the block written with the block chain account book and the target transaction information does not exist in the transaction pool to-be-verified queue and the to-be-packaged queue, adding the target transaction information into the transaction pool to-be-verified transaction queue.
In some embodiments of the present application, based on the foregoing scheme, the target transaction information includes transaction information included in the received proposal block; the detection unit 702 is further configured to: acquiring the latest block height of a local block chain account book; after the proposal block is received, if the height of the preamble block of the proposal block is consistent with the height of the latest block of the local block chain account book, detecting whether the transaction information in the proposal block exists in the queue to be packed and the queue to be verified of the transaction pool.
In some embodiments of the present application, based on the foregoing solution, the detecting unit 702 is further configured to: and if the height of the preamble block of the proposal block is inconsistent with the height of the latest block of the local block chain account book, returning error information.
In some embodiments of the present application, based on the foregoing solution, the target transaction information includes transaction information contained in the received proposal block; the apparatus 700 further comprises: the acquisition unit is configured to acquire a transaction list to be verified of the proposal block and a verified transaction list of the proposal block; and the fourth processing unit is configured to add the first transaction information into the proposed block to-be-verified transaction list if the first transaction information in the proposed block does not exist in the proposed block to-be-verified transaction list and the proposed block verified transaction list after the proposed block is received, and is configured to delete the first transaction information from the proposed block to-be-verified transaction list and add the first transaction information into the proposed block verified transaction list after the first transaction information is verified.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: before adding the first transaction information into the proposed block to-be-verified transaction list, detecting whether the first transaction information exists in the to-be-packaged queue; and if the first transaction information does not exist in the queue to be packaged, adding the first transaction information into the transaction list to be verified of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: and if the first transaction information exists in the queue to be packaged, directly adding the first transaction information into the verified transaction list of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: if the first transaction information exists in the queue to be packaged, detecting whether the first transaction information needs to be verified again; if the first transaction information does not need to be verified again, directly adding the first transaction information into the verified transaction list of the proposal block; and if the first transaction information needs to be verified again, adding the first transaction information into the transaction list to be verified of the proposal block.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: and if the proposal block is successfully identified in the block chain network, deleting the transaction information contained in the proposal block from the verified transaction list of the proposal block and the queue to be packed.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: if the proposal block is not successfully identified, the transaction information which is contained in the proposal block and passes the verification is kept in the queue to be packed.
In some embodiments of the present application, based on the foregoing solution, the fourth processing unit is further configured to: after the proposal block is received, if the first transaction information in the proposal block exists in a transaction list to be verified of the proposal block or a verified transaction list of the proposal block, determining that the first transaction information is repeated transaction information.
In some embodiments of the present application, based on the foregoing solution, the obtaining unit is configured to: after receiving the proposal block, creating a proposal block to be verified transaction list and a proposal block verified transaction list corresponding to the proposal block.
FIG. 8 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 800 of the electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, a computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for system operation are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An Input/Output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. When the computer program is executed by the Central Processing Unit (CPU) 801, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiment; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (13)

1. A transaction information processing method for a blockchain, comprising:
after target transaction information to be processed is received, detecting whether the target transaction information exists in a queue to be packaged in a transaction pool and a queue to be verified in the transaction pool, wherein the queue to be packaged is used for storing the transaction information which passes verification and is not written into a block chain account book;
if the target transaction information does not exist in the queue to be packaged and the queue to be verified of the transaction pool, adding the target transaction information into the queue to be verified of the transaction pool;
after the target transaction information is verified, deleting the target transaction information from the to-be-verified queue of the transaction pool, and adding the target transaction information into the to-be-packaged queue;
after receiving a proposal block, if first transaction information in the proposal block exists in the queue to be packaged, directly adding the first transaction information into a verified transaction list of the proposal block corresponding to the proposal block;
if the proposal block is not successfully identified, the transaction information which is contained in the proposal block and passes the verification is kept in the queue to be packed.
2. The transaction information processing method according to claim 1, wherein before adding the target transaction information to the transaction pool queue to be verified, the method further comprises:
after receiving the target transaction information, detecting whether the target transaction information exists in a block written with a block chain account book;
and if the target transaction information does not exist in the block written with the block chain account book and the target transaction information does not exist in the transaction pool to-be-verified queue and the to-be-packaged queue, adding the target transaction information into the transaction pool to-be-verified transaction queue.
3. The transaction information processing method according to claim 1, wherein the target transaction information includes transaction information contained in the received proposal block; the method further comprises the following steps:
acquiring the latest block height of a local block chain account book;
after the proposal block is received, if the height of a preamble block of the proposal block is consistent with the height of the latest block of the local block chain account book, detecting whether transaction information in the proposal block exists in the queue to be packed and the queue to be verified of the transaction pool.
4. The transaction information processing method according to claim 3, wherein the method further comprises:
and if the height of the preamble block of the proposal block is inconsistent with the height of the latest block of the local block chain account book, returning error information.
5. The transaction information processing method according to claim 1, wherein the target transaction information includes transaction information contained in the received proposal block; the method further comprises the following steps:
acquiring a proposed block to-be-verified transaction list and a proposed block verified transaction list corresponding to the proposed block;
after receiving the proposal block, detecting whether first transaction information in the proposal block exists in the queue to be packed or not;
and if the first transaction information does not exist in the queue to be packaged, adding the first transaction information into the transaction list to be verified of the proposal block.
6. The transaction information processing method of claim 5, wherein before adding the first transaction information to the proposal block to-be-verified transaction list, the method further comprises:
detecting whether the first transaction information exists in the proposed block to-be-verified transaction list and the proposed block verified transaction list;
and if the first transaction information does not exist in the queue to be packaged and does not exist in the proposed block transaction list to be verified and the proposed block verified transaction list, adding the first transaction information into the proposed block transaction list to be verified.
7. The transaction information processing method according to claim 1, further comprising:
if the first transaction information exists in the queue to be packaged, detecting whether the first transaction information needs to be verified again;
if the first transaction information does not need to be verified again, directly adding the first transaction information into the verified transaction list of the proposal block;
and if the first transaction information needs to be verified again, adding the first transaction information into a transaction list to be verified of the proposal block corresponding to the proposal block.
8. The transaction information processing method according to claim 1, further comprising:
and if the proposal block is successfully identified in the blockchain network, deleting the transaction information contained in the proposal block from the verified transaction list of the proposal block and the queue to be packed.
9. The transaction information processing method according to claim 1, further comprising:
after the proposal block is received, if the first transaction information in the proposal block exists in a to-be-verified transaction list of the proposal block corresponding to the proposal block or a verified transaction list of the proposal block, determining that the first transaction information is repeated transaction information.
10. The transaction information processing method of claim 5 or 6, wherein obtaining the transaction list to be verified for the proposal block and the transaction list verified for the proposal block corresponding to the proposal block comprises:
after receiving the proposal block, creating a proposal block to be verified transaction list and a proposal block verified transaction list corresponding to the proposal block.
11. A transaction information processing apparatus for a blockchain, comprising:
the system comprises a detection unit, a block chain account book processing unit and a block chain account book processing unit, wherein the detection unit is configured to detect whether target transaction information exists in a queue to be packaged in a transaction pool and a queue to be verified in the transaction pool after the target transaction information to be processed is received, and the queue to be packaged is used for storing the transaction information which passes verification and is not written in the block chain account book;
the first processing unit is configured to add the target transaction information into the transaction pool to-be-verified queue if the target transaction information does not exist in the to-be-packaged queue and the transaction pool to-be-verified queue;
the second processing unit is configured to delete the target transaction information from the to-be-verified queue of the transaction pool after the target transaction information passes verification, and add the target transaction information into the to-be-packaged queue;
and after receiving a proposal block, if the first transaction information in the proposal block exists in the queue to be packaged, the fourth processing unit is configured to directly add the first transaction information into a verified transaction list of the proposal block corresponding to the proposal block, and if the proposal block is not successfully identified, keep the transaction information contained in the proposal block and passing verification in the queue to be packaged.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a transaction information processing method according to any one of claims 1 to 10.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the transaction information processing method of any one of claims 1 to 10.
CN202110293026.XA 2021-03-18 2021-03-18 Transaction information processing method, device and medium for block chain and electronic equipment Active CN112926981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110293026.XA CN112926981B (en) 2021-03-18 2021-03-18 Transaction information processing method, device and medium for block chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110293026.XA CN112926981B (en) 2021-03-18 2021-03-18 Transaction information processing method, device and medium for block chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN112926981A CN112926981A (en) 2021-06-08
CN112926981B true CN112926981B (en) 2022-10-28

Family

ID=76175783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110293026.XA Active CN112926981B (en) 2021-03-18 2021-03-18 Transaction information processing method, device and medium for block chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN112926981B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116542668A (en) * 2022-01-25 2023-08-04 腾讯科技(深圳)有限公司 Block chain-based data processing method, equipment and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685508B (en) * 2018-12-27 2020-06-30 北京微播视界科技有限公司 Transaction data processing method and device, electronic equipment and readable storage medium
CN110276688B (en) * 2019-06-14 2024-02-06 深圳前海微众银行股份有限公司 Method and device for processing transactions in blockchain
CN110597839A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN111488626A (en) * 2020-04-09 2020-08-04 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium based on block chain

Also Published As

Publication number Publication date
CN112926981A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN113711536B (en) Extracting data from a blockchain network
CN112733174B (en) Authentication management method and system of block chain system and electronic equipment
CN112632629B (en) Voting management method, device, medium and electronic equipment based on block chain
CN112861190B (en) Data cross-chain cooperation method, system and device
CN110598434B (en) House information processing method and device based on blockchain network, electronic equipment and storage medium
CN110838065A (en) Transaction data processing method and device
CN111291060A (en) Method, device and computer readable medium for managing block chain nodes
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN110601896B (en) Data processing method and equipment based on block chain nodes
CN112291372B (en) Asynchronous posting method, device, medium and electronic equipment for block chain
KR102569409B1 (en) Systems and methods for virtual distributed ledger networks
CN112231741B (en) Data processing method, device, medium and electronic equipment based on block chain system
CN111488372A (en) Data processing method, device and storage medium
CN112862487A (en) Digital certificate authentication method, equipment and storage medium
CN111274597A (en) Data processing method and equipment
CN112926981B (en) Transaction information processing method, device and medium for block chain and electronic equipment
CN112231414B (en) Data synchronization method and device of block chain system, readable medium and electronic equipment
CN113869901B (en) Key generation method, key generation device, computer-readable storage medium and computer equipment
CN112995357B (en) Domain name management method, device, medium and electronic equipment based on cloud hosting service
CN113014540B (en) Data processing method, device, equipment and storage medium
CN115701078A (en) Cross-chain transaction processing method and device, electronic equipment and storage medium
CN114329368A (en) Transaction account management method and device, computer readable medium and electronic equipment
CN115563205A (en) Block chain system deployment method, device, medium and electronic equipment
CN115115360A (en) Cross-chain resource transfer method, device, medium and electronic equipment
CN115577382A (en) Intelligent contract deployment method based on block chain and related equipment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40045476

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant