CN115118425A - Block processing method, device, equipment and storage medium - Google Patents

Block processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115118425A
CN115118425A CN202210239587.6A CN202210239587A CN115118425A CN 115118425 A CN115118425 A CN 115118425A CN 202210239587 A CN202210239587 A CN 202210239587A CN 115118425 A CN115118425 A CN 115118425A
Authority
CN
China
Prior art keywords
block
block chain
target
signature
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210239587.6A
Other languages
Chinese (zh)
Inventor
谢辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shanghai Robotics Co Ltd
Original Assignee
Cloudminds Shanghai Robotics 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 Cloudminds Shanghai Robotics Co Ltd filed Critical Cloudminds Shanghai Robotics Co Ltd
Priority to CN202210239587.6A priority Critical patent/CN115118425A/en
Publication of CN115118425A publication Critical patent/CN115118425A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application provides a block processing method, a block processing device, a block processing equipment and a storage medium. In the embodiment of the application, the whole block generation task is completed by the mutual cooperation of the first block link point and the first block generation node, the first block link point executes the block generation task of generating the pre-signed block based on the target transaction data, the first block generation node executes the block generation task of generating the complete new block based on the pre-signed block, and the mutual cooperation of the first block link point and the first block generation node is favorable for improving the block generation efficiency and generating the legal new block. Furthermore, the first block chain node performs validity verification on the received candidate new block from the block granularity, selects a target new block which can be uplinked and stored from the valid candidate new blocks based on the matching degree of the random number and the difficulty target, further ensures that the safe and reliable new block is added into the block chain, and ensures the data safety and reliability of the block chain system.

Description

Block processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of block chaining technologies, and in particular, to a block processing method, apparatus, device, and storage medium.
Background
The blockchain technology is a brand new distributed infrastructure and computing paradigm that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, cryptographically secures data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
Currently, the blockchain system mainly includes clients and blockchain nodes. The user submits a transaction request through the client, the block chain node connected with the client verifies the transaction data in the transaction request, and after the verification is passed, the transaction data is broadcasted to the block chain system, so that the block chain node with the function of generating the block in the block chain system packs the transaction data into the block, and the block is broadcasted to the block chain system, so that other block chain nodes in the block chain system add the block to the block chain for storage.
Generally, to ensure the security of the blockchain, the validity of the block is verified from the verification of the transaction data and difficulty target in the block before the block is added to the blockchain. However, the block validity verification method is not safe enough, and a block with low data security is easily generated, so that the data security of the blockchain system is reduced, and even the reliability of the blockchain system is affected. Therefore, how to guarantee the data security of the blockchain system becomes an urgent technical problem to be solved.
Disclosure of Invention
Aspects of the present application provide a block processing method, apparatus, device, and storage medium, which are used to ensure that a safe and trusted new block is added to a block chain, thereby ensuring data security and reliability of the block chain system, and making the block chain system a trusted block chain system to a certain extent.
The embodiment of the present application provides a block processing method, which is applied to a first block chain node in a block chain system, and the method includes:
acquiring target transaction data, and generating a difficulty target required by block processing and first block chain account information corresponding to a first block chain link point; according to a first account parameter in the first block chain account information, carrying out digital signature on the difficulty target and the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and target transaction data; sending the first pre-signature block to a first block generation node connected with a link point of the first block, and receiving a first candidate new block obtained by the first block generation node through block generation processing based on the first pre-signature block, wherein the first candidate new block at least comprises first block chain account information and a first signature result; according to the first block chain account information and the first signature result, carrying out validity verification on the first candidate new block; and under the condition that the first candidate new block passes the validity verification, selecting a target new block from the first candidate new block and a second candidate new block which passes the validity verification and corresponds to the target transaction data according to the matching degree of the random number and the difficulty target, and adding the target new block to the block chain for storage.
The embodiment of the application provides a block processing method, which is applied to a first block generation node in a block chain system and comprises the following steps: receiving a first pre-signature block sent by a first block chain node, and analyzing a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block; according to a second account parameter in the first block chain account information, signature verification is carried out on the first signature result; if the first signature result passes the signature verification, performing consensus calculation according to the difficulty target to obtain a random number meeting the difficulty target; and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data, and sending the first candidate new block to a first block chain node so that the first block chain node uploads the first candidate new block to a block chain after the first candidate new block passes the validity check.
An embodiment of the present application provides a block processing apparatus, including: the acquisition module is used for acquiring target transaction data, generating a difficulty target required by block processing and first block chain account information corresponding to the first block chain link point; the digital signature module is used for digitally signing the difficulty target and the first block chain account information according to a first account parameter in the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and target transaction data; a sending module, configured to send the first pre-signature block to a first block generation node connected to a first block link point; the receiving module is used for receiving a first candidate new block obtained by the first block generation node performing block generation processing based on the first pre-signed block, wherein the first candidate new block at least comprises first block chain account information and a first signature result; the verification module is used for verifying the validity of the first candidate new block according to the first block chain account information and the first signature result; and the uplink module is used for selecting the target new block from the first candidate new block and a second candidate new block which corresponds to the target transaction data and passes the validity verification under the condition that the first candidate new block passes the validity verification, and adding the target new block to the block chain for storage.
An embodiment of the present application provides a block processing apparatus, including: the receiving module is used for receiving the pre-signature block sent by the first block chain node and analyzing a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block; the verification module is used for performing signature verification on the first signature result according to a second account parameter in the first block chain account information; the consensus computing module is used for carrying out consensus computing according to the difficulty target if the first signature result passes the signature verification, and obtaining a random number meeting the difficulty target; the generating module is used for generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data; and the sending module is used for sending the first candidate new block to the first block chain node so that the first block chain node uploads the first candidate new block to the block chain after the first candidate new block passes the validity check.
An embodiment of the present application provides an electronic device, including: a memory and a processor; a memory for storing a computer program; the processor is coupled to the memory for executing the computer program for performing the steps in the block processing method.
Embodiments of the present application provide a computer storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the block processing method.
In the embodiment of the application, the whole block generation task is completed by the mutual cooperation of the first block link point and the first block generation node, the first block link point executes the block generation task of generating the pre-signed block based on the target transaction data, the first block generation node executes the block generation task of generating the complete new block based on the pre-signed block, and the mutual cooperation of the first block link point and the first block generation node is favorable for improving the block generation efficiency and generating the legal new block. Furthermore, the first block chain link point pair carries out validity verification on the received candidate new block from the block granularity, selects a target new block which can be stored in an uplink mode from the valid candidate new blocks based on the matching degree of the random number and the difficulty target, further ensures that the safe and reliable new block is added into the block chain, ensures the data safety and the reliability of the block chain system, and enables the block chain system to become a reliable block chain system to a certain extent.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a block processing method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another block processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a block processing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of another block processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiments of the present application provide a block processing method, an apparatus, a device, and a storage medium, for solving the technical problem that the data security of the existing block chain system is not high. In the embodiment of the application, the whole block generating task is completed by the mutual cooperation of the first block link point and the first block generating node, the first block link point executes the block generating task for generating the pre-signature block based on the target transaction data, the first block generating node executes the block generating task for generating the complete new block based on the pre-signature block, and the mutual cooperation of the first block link point and the first block generating node is favorable for improving the block generating efficiency and generating the legal new block. Furthermore, the first block chain node performs validity verification on the received candidate new block from the block granularity, selects a target new block which can be uplinked and stored from the valid candidate new blocks based on the matching degree of the random number and the difficulty target, further ensures that the safe and reliable new block is added into the block chain, ensures the data security and the reliability of the block chain system, and enables the block chain system to become a reliable block chain system to a certain extent.
The terms referred to in this application are explained first:
P2P (Peer-to-Peer networking) network: also known as Peer-to-Peer networks, or Peer-to-Peer networks, participants in the network share a portion of the hardware resources (such as processing power, storage power, network connectivity, printers, etc.) they own, and these shared resources provide services and content over the network and can be accessed directly by other Peer nodes (peers) without going through intermediate entities.
Smart contract (Smart contract): is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. Essentially, the working principle of these automatic contracts is similar to if-then statements of other computer programs. Smart contracts interact with real-world assets only in this manner. When a pre-programmed condition is triggered, the intelligent contract executes the corresponding contract clause.
The block chain system provided by the embodiment of the present application is described with reference to fig. 1. In the embodiment of the present application, the objects of the blockchain system are mainly: client, block chain node, block generation node. Wherein, each blockchain node establishes connection through P2P (Peer to Peer) Peer-to-Peer network to form blockchain network. It should be noted that in the embodiment of the present application, the tile generation node is a working node exclusively responsible for generating tiles, unlike the tile chain node that establishes a connection through the P2P (Peer-to-Peer) Peer-to-Peer network. Each block generation node may be communicatively coupled to an associated block link node, and each block generation node is independent of the block link network and does not belong to a node in the block link network.
The workflow of the blockchain system is roughly as follows: a user sends a transaction request to a block chain link point in a block chain network through a client; the block chain node in the block chain network responds to the transaction request to verify the transaction data, and after the verification is successful, the block chain node in the block chain network sends a block generation request to the block generation node; the block generation node generates a block according to the transaction data in response to the block generation request to generate a block including the transaction data, and transmits the block to block nodes in a block chain network, which add the block to the block chain.
In the embodiment of the present application, the blockchain node or the blockgeneration node may be a terminal device or a server. The terminal device may be hardware or software. When the terminal device is hardware, the terminal device is, for example, a mobile phone, a tablet computer, a desktop computer, a wearable smart device, a smart home device, or the like. When the terminal device is software, it may be installed in the above listed hardware devices, in this case, the terminal device is, for example, a plurality of software modules or a single software module, and the embodiments of the present application are not limited. The server may be hardware or software. When the server is hardware, the server is a single server or a distributed server cluster composed of a plurality of servers. When the server is software, the server may be a plurality of software modules or a single software module, and the embodiments of the present application are not limited.
It should be understood that the number of clients, block link points, and block generation nodes in fig. 1 is merely illustrative. In practical application, any number of clients, block link points and block generation nodes are deployed according to actual requirements. In fig. 1, n is a positive integer.
In this embodiment of the present application, the type of the Block chain network is not limited, and for example, the Block chain network may be a Public Block chain (Public Block Chains), a Private Block chain (Private Block Chains), a federation Block chain, a licensed Block chain, and the like. The public block chain has the characteristic of public deployment, and any person can participate randomly; the private block chain has the characteristic of private deployment and is limited to be used in a certain organization; the block chain of alliance and the block chain of permission have the characteristic of private deployment, and multiple organizations use together and have admission and authority management mechanisms.
In the embodiment of the present application, objects with different roles, such as the client, the block link node, and the block generation node, are responsible for different tasks. For example, the tasks for which the client is responsible may include, but are not limited to: 1) generating and signing transaction data; 2) transmitting the transaction data to the node; 3) and calling a block chain access interface provided by the block chain node according to the service requirement so as to realize the required service capability. For example, the tasks for which the block link points are responsible may be, but are not limited to: 1) receiving transaction data generated by a client or the transaction data forwarded by other block chain nodes, verifying the transaction data, and caching or forwarding the transaction data to other block chain nodes; 2) constructing a pre-signature block and sending the pre-signature block to a block generation node, receiving a complete block processed and signed by the block generation node or a complete block forwarded by other block link nodes, verifying the complete block and then storing or forwarding the complete block to other block chain nodes; 3) various interfaces are provided for clients to access the blockchain network. For example, the task for which the block generation node is responsible may be, but is not limited to: 1) receiving a pre-signed block sent by a block chain node, and verifying the pre-signed block; 2) performing consensus calculation on the pre-signed blocks passing the verification to form complete blocks and signing; 3) and returning the complete block to the block chain node.
In the embodiment of the application, in order to further enhance the reliability of the blockchain system, factors such as the role of the object and the task for which the object is responsible are considered, and the chain uplink of each object of the blockchain system is controlled. The uplink refers to an operation behavior that an object can perform in the blockchain system, and the category of the uplink behavior substantially includes: read, call, create block, deploy, manage, etc. Correspondingly, the uplink permission includes a reading permission, a calling permission, a block generation permission, a deployment permission and a management permission.
The object with the read right can read information in the blockchain system, for example, including a read type interface for acquiring transaction data, acquiring a block, accessing a system-level intelligent contract or a service-level intelligent contract;
the object with the calling authority can call a write type interface of the service level intelligent contract; an object with the right to generate a chunk can generate a chunk; for example, a pre-signature block may be generated or a complete block generated based on the pre-signature block may be generated; the object with the deployment authority can deploy a service-level intelligent contract; the object with management rights may invoke a write type interface of the system level intelligent contract to complete the management operation of the blockchain system.
Further optionally, the configurable authority range of the block link point may include: read permissions and generate block permissions. The client-configurable scope of permissions may include: read permissions, call permissions, deployment permissions, and management permissions. The configurable scope of authority of the block generation node may include: a block is generated.
In the embodiment of the application, a system-level intelligent contract and a service-level intelligent contract can be provided on the blockchain node. The system-level intelligent contract is an intelligent contract written in a created block on a block chain and used for managing the intelligent contract of the block chain system, and is divided according to a management range. The service-level intelligent contract refers to an intelligent contract which is deployed in other blocks except the created block on the block chain through transactions by a client. The service level intelligent contract can be an intelligent contract with any function and can be developed according to the actual application requirement.
The system-level account management intelligent contract is mainly used for maintaining and managing the link uplink of the client, the block link points and the block generation nodes as the authority. For example, a write-type interface provided by the system-level account management intelligent contract is called, and the blockchain account identifier and the chain uplink authority of each object in the blockchain system can be configured in the system-level account management intelligent contract. And calling a reading type interface provided by the system level account management intelligent contract, and inquiring the block chain account identification and the chain uplink of each object in the block chain system pre-configured in the system level account management intelligent contract to be the authority.
The system level cryptographic parameter management intelligent contract is mainly used for maintaining and managing trusted cryptographic parameters. In this embodiment, at least one cryptographic parameter ID, and a cryptographic parameter ciphertext and a blockchain account ID corresponding to the cryptographic parameter ID are stored in a system-level cryptographic parameter management intelligent contract in advance. It is noted that the same cryptographic parameter ID may be associated with multiple blockchain account IDs and the cryptographic parameter cryptogram associated with each blockchain account ID. The client side can send a read request to a block chain node which is provided with a system-level password parameter management intelligent contract corresponding to a first intelligent contract ID, the read request at least comprises a target block chain account identification of the client side and the first intelligent contract ID, the node executes the system-level password parameter management intelligent contract according to the read request, and the system-level password parameter management intelligent contract calls a read type interface to obtain a target password parameter ID corresponding to the target block chain account identification and a first password parameter ciphertext thereof from at least one saved password parameter ID and a corresponding password parameter ciphertext and a block chain account identification.
The system level alliance management intelligent contract is mainly used for maintaining and managing a trusted alliance network. It is noted that the entire blockchain system can be divided into a plurality of different alliance networks isolated from each other. For example, a trusted federation identifier may be configured in a system-level federation management intelligence contract by invoking a write-type interface provided by the system-level federation management intelligence contract. And calling a reading type interface provided by the system-level alliance management intelligent contract to inquire a trusted alliance identifier pre-configured in the system-level alliance management intelligent contract. The block chain system comprises a block chain system, a block chain system and alliances, wherein the alliances are used for identifying the uniqueness of different alliances in the same block chain system, and the different alliances have different alliances.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a block processing method according to an embodiment of the present disclosure. The method is executed by a first blockchain node in the blockchain system, and the first blockchain node can be any blockchain node with block generation permission in the blockchain system. As shown in fig. 2, the method may include the steps of:
201. and acquiring target transaction data, and generating a difficulty target required by block processing and first block chain account information corresponding to the first block chain link point.
In this embodiment, the first block link point locally pre-caches valid transaction data, where the valid transaction data may be derived from transaction data submitted by the client, may also be derived from transaction data in a block sent by the first block generation node connected to the first block link point, and may also be derived from transaction data forwarded by other block link points in the block link system or transaction data in a forwarded block, but not limited thereto.
In this embodiment, when a new block needs to be generated and added to the block chain, the first block chain link point may request to acquire target transaction data from locally cached legal transaction data. A new block refers to a block that needs to be added to the blockchain relative to an existing block on the blockchain. Optionally, because the transaction data carries an alliance ID (chain ID), part or all of the valid transaction data associated with the target alliance network may be obtained from the valid transaction data cached locally according to the alliance ID of the target alliance network as the target transaction data.
In this embodiment, the first blockchain node is also responsible for assuming part of the function of generating blocks, including but not limited to: the Difficulty Target (diffiuncty Target) and the information of the parent block required to generate the block are determined.
The difficulty target representation block generation node finds out how many times the random number meeting the difficulty target needs to execute the hash operation, namely the calculation power needed by the representation block generation node. The larger the difficulty target, the more hash operations the block generation node performs, and the more computing power it takes. Generally, the difficulty target can be set according to actual requirements and supports dynamic adjustment. For example, the time interval between two adjacent blocks is counted according to the generation time of the two adjacent blocks. If the time interval becomes larger, the difficulty target is adjusted to be lower; the time interval becomes smaller and the difficulty target is adjusted larger.
The information of the parent block refers to information of a block at the end of the block chain, and the block at the end of the block chain is a parent block of a new block, relative to the new block to be generated. Optionally, the information of the Parent Block may be a Parent Block identifier (Parent Block ID), and the Parent Block identifier may be a hash value of part or all of Block data of the Parent Block, but is not limited thereto.
It should be noted that the first block link node participates in part of the block generating task, so as to improve the block generating efficiency of the first block generating node.
In this embodiment, when a new block needs to be generated and added to the blockchain, the first blockchain node needs to acquire own blockchain account information. For ease of understanding, the blockchain account information of the first blockchain link point itself is referred to as first blockchain account information. The first blockchain account information may include, for example, but is not limited to, a public cryptographic parameter, a private cryptographic parameter, or a blockchain address. The public password parameter is a password parameter which can be disclosed, and the private password parameter is a password parameter which cannot be disclosed. For ease of understanding, the public cryptographic parameter dedicated to the first blockchain node is referred to as a first public cryptographic parameter, and the private cryptographic parameter dedicated to the first blockchain node is referred to as a first private cryptographic parameter. As an example, the first public cryptographic parameter may be a public key (public key) in the asymmetric key and the first private cryptographic parameter may be a private key (private key) in the asymmetric key. Alternatively, the first public cryptographic parameter and the first private cryptographic parameter may be symmetric keys. Further alternatively, the blockchain address may be a blockchain address calculated based on a public key (public key) in the asymmetric key.
202. And according to the first account parameter in the first block chain account information, performing digital signature on the difficulty target and the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and the target transaction data.
In this embodiment, the whole block generation task is completed by the first block link point and the first block generation node in cooperation, the first block link point executes the block generation task of generating the pre-signed block based on the target transaction data, and the first block generation node executes the block generation task of generating the complete new block based on the pre-signed block.
Specifically, the first block link point first generates a signature result, and for the convenience of understanding, the signature result is referred to as the first signature result. The first block chaining point encapsulates the first signature result as part of a pre-signature block into a pre-signature block, and a subsequent first block generating node needs to verify the first signature result in the pre-signature block before generating the block based on the pre-signature block to generate a complete new block. In other words, the first signature result may help the first tile generating node to confirm the validity of the pre-signed tile.
The embodiment does not limit the way of obtaining the first signature result from the first block link point. For example, the first blockchain link point may digitally sign the difficulty target and the first blockchain account information according to a first account parameter in the first blockchain account information, so as to obtain a first signature result. Wherein the first account parameter may be a private key of the first blockchain node. For another example, the first blockchain link point may digitally sign the difficulty target, the first blockchain account information, and the first blockchain account information according to the first account parameter in the first blockchain account information, so as to obtain a first signature result. For another example, the first blockchain link point may digitally sign the difficulty target, the first blockchain account information, the target transaction data, the parent blockchain identifier, and the target alliance ID of the target alliance network according to the first account parameter in the first blockchain account information, so as to obtain a first signature result.
In this embodiment, the pre-signature block generated by the link point of the first block is referred to as the first pre-signature block. The present embodiment does not limit the data content of the first pre-signature block. For example, the first block link point performs data encapsulation on the difficulty target, the first block link account information, the first signature result, and the target transaction data to generate a first pre-signed block. For another example, the first block link node performs data encapsulation on the difficulty target, the first block link account information, the first signature result, the target transaction data, and the parent block identifier to generate a first pre-signed block. For another example, the first block chaining point data encapsulates the difficulty target, the first block chaining account information, the first signature result, the target transaction data, the parent block identification, and the target federation network ID of the federation network to generate a first pre-signed block.
203. And sending the first pre-signed block to a first block generation node connected with a link point of the first block, and receiving a first candidate new block obtained by the first block generation node performing block generation processing based on the first pre-signed block, wherein the first candidate new block at least comprises first block chain account information and a first signature result.
204. And carrying out validity verification on the first candidate new block according to the first block chain account information and the first signature result.
In this embodiment, the first block link point sends the generated first pre-signed block to the first block generation node connected to the first block generation node, and the first block link point continues to perform the block generation processing based on the first pre-signed block to obtain a complete new block. For ease of understanding, the complete new block sent by the first block generation node is referred to as a first candidate new block.
And when the first block link node receives the first candidate new block, carrying out validity verification on the first candidate new block, wherein if the first candidate new block passes the validity verification, the first candidate new block has the probability of being a target new block which can be added to the block chain. If the first candidate new block fails the validity verification, the first candidate new block is discarded, that is, the first candidate new block may not be stored on the block chain.
When the first candidate new block is generated, the first block generation node also packages the first block chain account information and the first signature result acquired from the first pre-signature block in the first candidate new block, so that the first block chain link point can perform validity verification on the first candidate new block according to the first block chain account information and the first signature result acquired from the first candidate new block.
Further optionally, one implementation of the step 204 executed by the first block link point is: resolving a difficulty target, a random number determined based on consensus calculation and the difficulty target, first block chain account information and a first signature result from the first candidate new block; the first blockchain account information further comprises a second account parameter corresponding to the first account parameter; judging whether the random number meets the difficulty target or not, and performing signature verification on the first signature result according to the second account parameter; and if the random number meets the difficulty target and the first signature result passes the signature verification, determining that the first candidate new block passes the validity verification.
It should be noted that, if the first account parameter required for generating the first signature result and the second account parameter required for verifying the first signature result correspond to each other. For example, if the first account parameter is a private cryptographic parameter (e.g., a private key or a symmetric key) of the first blockchain node, the second account parameter is a public cryptographic parameter (e.g., a public key or a symmetric key) of the first blockchain node.
Further optionally, before the first block link point determines that the first candidate new block passes the validity verification, at least one of the following determination operations may be further performed:
determination operation 1: the first candidate new block further comprises second block chain account information and a second signature result, the second signature result is subjected to signature verification according to a third account parameter in the second block chain account information, and whether the second signature result passes the signature verification is determined.
It should be noted that, the first block generation node performs digital signature on the difficulty target, the random number, the first block chain account information, the first signature result, and the second block chain account information according to a fourth account parameter in the second block chain account information of the first block generation node, so as to obtain a second signature result.
The fourth account parameter required to generate the second signature result and the third account parameter required to verify the first signature result correspond to each other. For example, if the fourth account parameter is a private cryptographic parameter (e.g., a private key or a symmetric key) of the first block generation node, the third account parameter is a public cryptographic parameter (e.g., a public key or a symmetric key) of the first block generation node.
And if the second signature result passes the signature verification, the validity of the first candidate new block is further verified on the dimension. If the second signature result fails to pass the signature verification, it indicates that the non-validity of the first candidate new block is further verified in the dimension.
Determination operation 2: and calling a system level account management intelligent contract according to a first block chain account identifier in the first block chain account information to determine whether a chain uplink corresponding to the first block chain link point is an authority or not, wherein the system level account management intelligent contract stores different block chain account identifiers and chain uplinks corresponding to the different block chain account identifiers.
In the embodiment of the application, a management client with management authority calls a write type interface provided by a system-level account management intelligent contract, each blockchain account identifier and a corresponding chain uplink thereof are configured in the system-level account management intelligent contract in advance as authority, different blockchain account identifiers identify different objects, and the objects can be clients, blockchain link points or block generation nodes.
Specifically, the management client sends a write request to any blockchain node, where the write request includes: the block chain account mark of the object to be configured and the corresponding chain uplink are the writing type interface mark of the authority and system level account management intelligent contract; and the block chain node responds to the write request, executes the system level account management intelligent contract according to the write type interface identifier of the system level account management intelligent contract, and operates the write interface corresponding to the write type interface identifier so as to write the block chain account identifier of the object to be configured and the chain uplink corresponding to the block chain account identifier into the system level account management intelligent contract.
Therefore, the first block link point first acquires first block chain account information from the first candidate new block, acquires a first block chain account identifier corresponding to the first block link point from the first block chain account information, calls a system level account management intelligent contract to acquire a chain uplink right of the first block chain node, and if the chain uplink right corresponding to the first block link point is determined to include the block right, the validity of the first candidate new block is further verified in the dimension. If the chain uplink corresponding to the first block link point is determined not to include the block authority, the non-validity of the first candidate new block is further verified on the dimension.
Determination operation 3: and calling a system level account management intelligent contract according to a second block chain account identifier in the second block chain account information to determine whether a chain uplink corresponding to the first block generation node comprises generation block authority.
In this embodiment, the first block link point first obtains second block chain account information of the first block generation node from the first new candidate block, obtains a second block chain account identifier corresponding to the first block generation node from the second block chain account information, and invokes a system level account management intelligent contract to determine whether a chain link corresponding to the first block generation node includes generation block right. If the chain uplink corresponding to the first block generation node is determined to be the authority including the block generation authority, the validity of the first candidate new block is further verified on the dimension. If the chain uplink corresponding to the first block generation node is determined to be not to include the block generation permission, it indicates that the non-validity of the first candidate new block is further verified in the dimension.
Determination operation 4: and carrying out validity verification on the target transaction data analyzed from the first candidate new block, and determining whether the target transaction data passes validity verification.
Specifically, the first block link point may be validated according to data information included in the target transaction data. For example, if the target transaction data is analyzed to include the following data information: and if the signature result in the target transaction data, the block chain account information of the client, the target password parameter ID corresponding to the block chain account information and the first intelligent contract ID are combined with the data information to perform signature verification, calling a system-level password parameter management intelligent contract to verify the validity of the target password parameter ID, and determining that the target transaction data passes validity verification after the signature verification result is verification pass and the target password parameter ID is verified to be legal. In this embodiment, the account parameters used for signature verification of the first block link point are determined according to the account parameters used for digital signature by the client. Specifically, when the client uses the second account parameter to perform digital signature, the first blockchain node acquires a third account parameter corresponding to the second account parameter from the blockchain account information of the client to perform signature verification on the signature result. The signature result may be obtained by the client digitally signing one or more of the first smart contract ID, the target password parameter ID, and the second password parameter ciphertext with the second account parameter. Of course, the more data information that participates in the digital signature, the more likely it is to improve data security.
In this embodiment, at least one cryptographic parameter ID, and a cryptographic parameter cipher text and a block chain account ID corresponding to the cryptographic parameter ID are stored in a system-level cryptographic parameter management intelligent contract in advance. After the first block chain node acquires the target password parameter ID, the first intelligent contract ID and the block chain account information of the client from the target transaction data, the system-level password parameter management intelligent contract corresponding to the first intelligent contract ID is called according to the target block chain account identification and the target password parameter ID in the block chain account information of the client, so that whether the system-level password parameter management intelligent contract comprises the target password parameter ID and a first password parameter ciphertext corresponding to the target password parameter ID is judged.
Determination operation 5: and calling the system level block chain network management intelligent contract according to the alliance identification of the target alliance network contained in the first candidate new block so as to determine whether the target alliance network is a credible alliance network stored in the system level block chain network management intelligent contract.
In this embodiment, when the first pre-signed block is generated at the first block link point, the federation identity of the target federation network to which the target transaction data belongs is encapsulated in the first pre-signed block. Likewise, when the first block generation node generates a complete first candidate new block, the federation identification of the target federation network carried in the first pre-signed block is also encapsulated into the first candidate new block. After the first candidate new block is analyzed by the first block link point to obtain the alliance identification of the target alliance network, a system level block link network management intelligent contract can be called to determine whether the target alliance network is a credible alliance network stored in the system level block link network management intelligent contract. If the alliance identification of the target alliance network is stored in the system level block chain network management intelligent contract, the target alliance network is a credible alliance network, and the legality of the first candidate new block is further verified on the dimension. If the system level block chain network management intelligent contract does not store the alliance identification of the target alliance network, the target alliance network is not a credible alliance network, and the non-legality of the first candidate new block is further verified on the dimension.
Determination operation 6: determining whether the data structure of the first candidate new block is a preset data structure.
Specifically, the preset data structure is determined according to actual requirements, and taking the fields shown in table 1 as an example, the preset data structure for setting a new Block may include all the fields in table 1 for the new Block generated by the Block generation node, or the preset data structure for setting a new Block may include all the fields except for a Chain ID field, a Parent Block ID, a minepara field, and a finalsignation field in table 1. For a pre-signed block generated from block chain nodes, the pre-set data structure for setting the pre-signed block may include all fields except the Nonce field, the MinerPara field, and the FinalSignature field in table 1.
TABLE 1
Figure RE-GDA0003809489400000111
In this embodiment, in a case that the determination result of the at least one determination operation is yes, the first block link point determines that the first candidate new block passes the validity verification.
It is noted that the more determination operations are performed on the first block node, the more trustworthy the validity verification result of the first candidate new block is. Of course, in practical application, more determination operations can be added according to the requirements, and the method is not limited.
205. And under the condition that the first candidate new block passes the validity verification, selecting a target new block from the first candidate new block and a second candidate new block which passes the validity verification and corresponds to the target transaction data according to the matching degree of the random number and the difficulty target, and adding the target new block to the block chain for storage.
In practice, the first blockchain node receives a candidate new block sent by a second blockchain node in the blockchain system in addition to the first candidate new block sent by the first blockchain node. It is noted that the second blockchain node is any blockchain node in the blockchain system except the first blockchain node. For convenience of understanding, the candidate new block sent by the second blockchain node is referred to as a second candidate new block which passes validity verification and corresponds to the target transaction data.
Thus, further optionally, before the first blockchain node selects the target new block, the first blockchain node receives a second candidate new block sent by a second blockchain node in the blockchain system, where the second candidate new block is obtained by performing, by a second block generation node connected with the second blockchain node, block generation processing on a second pre-signed block generated by the second blockchain node; and performing validity verification on the second candidate new block.
It is worth noting that after the first block link point acquires the target transaction data, the target transaction data is broadcasted to the block link network, so that the second block link point acquires the target transaction data; the second block chain link point acquires a difficulty target required for generating block processing and the block chain account information of the second block chain link point; and digitally signing the difficulty target and the corresponding block chain account information according to a fifth account parameter in the third block chain account information corresponding to the second block chain link point to obtain a third signature result, and generating a second pre-signature block according to the difficulty target, the corresponding block chain account information, the third signature result and target transaction data. And the second pre-signature block is sent to a second block generation node connected with the link point of the second block, and the second block generation node performs block generation processing on the basis of the second pre-signature block to obtain a second candidate new block and returns the second candidate new block to the second block chain node. The second blockchain node broadcasts a second candidate new block to the blockchain network, and the second candidate new block is received by the first blockchain node.
In the embodiment of the present application, the first block link point performs validity verification on the first candidate new block by using information in the first candidate new block. Similarly, the first block link point performs validity verification on the second candidate new block by using the information in the second candidate new block. The validity verification of the different candidate new blocks by the first block node using the information in the different candidate new blocks is the same, and is not repeated herein.
In this embodiment, after acquiring the first candidate new block and the second candidate new block, the first block link point calculates the matching degree between the random number and the difficulty target, and selects the candidate new block with the largest matching degree from the first candidate new block and the second candidate new block as the target new block according to the matching degree between the random number and the difficulty target; or selecting a candidate new block with the matching degree larger than a preset matching degree threshold value as the target new block.
It should be noted that each candidate new block carries a random number satisfying the difficulty target obtained by performing the generated block processing by the respective block generating node. The difficulty targets of the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty target. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
According to the block processing method provided by the embodiment of the application, the whole block generating task is completed by the mutual cooperation of the first block link point and the first block generating node, the first block link point executes the block generating task for generating the pre-signed block based on the target transaction data, the first block generating node executes the block generating task for generating the complete new block based on the pre-signed block, and the mutual cooperation of the first block link point and the first block generating node is favorable for improving the block generating efficiency and generating the legal new block. Furthermore, the first block chain link point pair carries out validity verification on the received candidate new block from the block granularity, selects a target new block which can be stored in an uplink mode from the valid candidate new blocks based on the matching degree of the random number and the difficulty target, further ensures that the safe and reliable new block is added into the block chain, ensures the data safety and the reliability of the block chain system, and enables the block chain system to become a reliable block chain system to a certain extent.
Fig. 3 is a flowchart of another block processing method according to an embodiment of the present disclosure. The method is executed by a first block generation node in the blockchain system, and the first block generation node can be any block generation node in the blockchain system. As shown in fig. 3, the method may include the steps of:
301. and receiving a first pre-signature block sent by a first block chain node, and analyzing a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block.
302. And according to the second account parameter in the first block chain account information, performing signature verification on the first signature result.
303. And if the first signature result passes the signature verification, performing consensus calculation according to the difficulty target to obtain a random number meeting the difficulty target.
304. And generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data.
305. And sending the first candidate new block to the first block chain node so that the first block chain node uploads the first candidate new block to the block chain after the first candidate new block passes the validity check.
In this embodiment, the first block generation node continues to perform block generation processing based on the first pre-signed block sent by the first blockchain node to obtain a complete first candidate new block. After receiving the first pre-signature block, the first block generation node parses the first pre-signature block to obtain block information of the first pre-signature block, where the block information of the first pre-signature block includes, but is not limited to: generating a difficulty target required for block processing, first block chain account information corresponding to the first block chain link point, a first signature result, target transaction data, a parent block identifier, a target alliance ID of the target alliance network and the like.
And the first block generation node performs signature verification on the first signature result, and if the first signature result passes the signature verification, the first block generation node determines that the first pre-signature block is legal and can execute a subsequent complete new block generation step. If the first signature result fails the signature verification, the first block generation node determines that the first pre-signature block is illegal, directly returns verification failure information of the first pre-signature block to the first block generation node, and ends the whole process.
It should be noted that, if the first account parameter required for generating the first signature result and the second account parameter required for verifying the first signature result correspond to each other. For example, if the first account parameter is a private cryptographic parameter (e.g., a private key or a symmetric key) of the first blockchain node, the second account parameter is a public cryptographic parameter (e.g., a public key or a symmetric key) of the first blockchain node.
And after the first block generation node determines that the first signature result passes the signature verification, consensus calculation is carried out according to the difficulty target to obtain a random number meeting the difficulty target, and a first candidate new block is generated according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data.
In practical cases, more data content may be packed in the first candidate new block as needed. For example, data content that may be packaged includes, but is not limited to: the target alliance network alliance identification, the father block identification, the second block chain account information and the second signature result. The federation identity and the parent block identity of the target federation network are obtained from the first pre-signed block.
Further optionally, the specific implementation manner of the first block generating node performing step 304 is as follows: acquiring second block chain account information corresponding to the first block generation node; according to a fourth account parameter in the second block chain account information, carrying out digital signature on the difficulty target, the random number, the first block chain account information, the first signature result and the second block chain account information to obtain a second signature result; and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result, the second block chain account information, the second signature result and the target transaction data.
It is noted that, when the first block generation node generates the first candidate new block, the first block generation node packages the second block chain account information and the second signature result, which can help the first block chain node verify the validity of the first candidate new block from more dimensions.
It should be noted that, in the above embodiment, the block processing method shown in fig. 3 is described by taking the first block generation node as an example, the first block generation node may be understood as a node for implementing the method according to the embodiment, and it may be any block generation node in the block chain system, and the second block generation node may be understood as any block generation node except the first block generation node. Therefore, if the second block generation node is mainly described, it can also be used as the first block generation node to implement the method according to the present embodiment.
According to the block processing method provided by the embodiment of the application, the whole block generating task is completed by the mutual cooperation of the first block link point and the first block generating node, the first block link point executes the block generating task for generating the pre-signed block based on the target transaction data, the first block generating node executes the block generating task for generating the complete new block based on the pre-signed block, and the mutual cooperation of the first block link point and the first block generating node is favorable for improving the block generating efficiency and generating the legal new block. Furthermore, the first block chain link point pair carries out validity verification on the received candidate new block from the block granularity, selects a target new block which can be stored in an uplink mode from the valid candidate new blocks based on the matching degree of the random number and the difficulty target, further ensures that the safe and reliable new block is added into the block chain, ensures the data safety and the reliability of the block chain system, and enables the block chain system to become a reliable block chain system to a certain extent.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of step 201 to step 206 may be device a; for another example, the execution subject of steps 201 and 202 may be device a, and the execution subject of steps 203 to 206 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, etc., are merely used for distinguishing different operations, and the sequence numbers do not represent any execution order per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Fig. 4 is a schematic structural diagram of a block processing apparatus according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
the obtaining module 41 is configured to obtain target transaction data, generate a difficulty target required for block processing, and first block chain account information corresponding to the first block chain link point.
The digital signature module 42 is configured to digitally sign the difficulty target and the first blockchain account information according to a first account parameter in the first blockchain account information to obtain a first signature result, and generate a first pre-signature block according to the difficulty target, the first blockchain account information, the first signature result, and the target transaction data;
a sending module 43, configured to send the first pre-signature block to a first block generation node connected to a first block link point;
a receiving module 44, configured to receive a first candidate new block obtained by a first block generation node performing block generation processing based on a first pre-signed block, where the first candidate new block at least includes first block chain account information and a first signature result;
the verification module 45 is configured to perform validity verification on the first candidate new block according to the first block chain account information and the first signature result;
an uplink module 46, configured to select a target new block from the first candidate new block and a second candidate new block corresponding to the target transaction data and passing the validity verification if the first candidate new block passes the validity verification, and add the target new block to the block chain for storage;
further optionally, before the uplink module 46 selects the target new block, the receiving module 44 is further configured to: receiving a second candidate new block sent by a second block chain node in the block chain system, wherein the second candidate new block is obtained by performing block generation processing on a second pre-signed block generated by a second block generation node connected with the second block chain node based on the second block chain node;
the verifying module 45 is further configured to perform validity verification on the second candidate new block.
Further optionally, when the verifying module 45 performs validity verification on the first candidate new block according to the first block chain account information and the first signature result, the verifying module is specifically configured to: analyzing a difficulty target, a random number determined based on consensus calculation and the difficulty target, first block chain account information and a first signature result from the first candidate new block; the first blockchain account information further comprises a second account parameter corresponding to the first account parameter; judging whether the random number meets the difficulty target or not, and performing signature verification on the first signature result according to the second account parameter; and if the random number meets the difficulty target and the first signature result passes the signature verification, determining that the first candidate new block passes the validity verification.
Further optionally, before determining that the first candidate new tile passes the validity verification, the verification module 45 may further perform at least one of the following determination operations: the first candidate new block further comprises second block chain account information and a second signature result, the second signature result is subjected to signature verification according to a third account parameter in the second block chain account information, and whether the second signature result passes the signature verification is determined; calling a system level account management intelligent contract according to a first block chain account identifier in the first block chain account information to determine whether a chain uplink corresponding to the first block chain link point is an authority or not, wherein the chain uplink corresponding to the first block chain link point is an authority for generating a block authority, and different block chain account identifiers and the chain uplinks corresponding to the block chain account identifiers are stored in the system level account management intelligent contract; calling a system level account management intelligent contract according to a second block chain account identifier in the second block chain account information to determine whether a chain uplink corresponding to the first block generation node comprises a generation block authority or not; carrying out validity verification on the target transaction data analyzed from the first candidate new block, and determining whether the target transaction data passes validity verification;
calling a system level block chain network management intelligent contract according to the alliance identification of the target alliance network contained in the first candidate new block so as to determine whether the target alliance network is a credible alliance network stored in the system level block chain network management intelligent contract or not; determining whether the data structure of the first candidate new block is a preset data structure; and in the case that the determination result of at least one determination operation is yes, determining that the first candidate new block passes the validity verification.
The block processing apparatus shown in fig. 4 can execute the block processing method of the embodiment shown in fig. 2, and the implementation principle and the technical effect are not repeated. The specific manner in which each module and unit of the block processing apparatus shown in fig. 4 in the above-described embodiment perform operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 5 is a schematic structural diagram of another block processing apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus includes:
the receiving module 51 is configured to receive a pre-signature block sent by a first block chain node, and analyze a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result, and target transaction data from the pre-signature block;
the verification module 52 is configured to perform signature verification on the first signature result according to the second account parameter in the first blockchain account information;
a consensus calculation module 53, configured to perform consensus calculation according to the difficulty target if the first signature result passes signature verification, to obtain a random number that meets the difficulty target;
a generating module 54, configured to generate a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result, and the target transaction data;
a sending module 55, configured to send the first candidate new block to the first block chain node, so that the first block chain node uploads the first candidate new block to the block chain after passing the validity check.
Further optionally, when the generating module 54 generates the first candidate new chunk according to the difficulty target, the random number, the first blockchain account information, the first signature result, and the target transaction data, the generating module is specifically configured to: acquiring second block chain account information corresponding to the first block generation node; according to a fourth account parameter in the second block chain account information, performing digital signature on the difficulty target, the random number, the first block chain account information, the first signature result and the second block chain account information to obtain a second signature result; and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result, the second block chain account information, the second signature result and the target transaction data.
The block processing apparatus shown in fig. 5 can execute the block processing method of the embodiment shown in fig. 4, and the implementation principle and the technical effect are not repeated. The specific manner in which each module and unit of the block processing apparatus shown in fig. 5 in the above embodiment perform operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the apparatus includes: a memory 61 and a processor 62;
the memory 61 is used to store computer programs and may be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 61 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 62, coupled to the memory 61, for executing computer programs in the memory 61 for: acquiring target transaction data, generating a difficulty target required by block processing and first block chain account information corresponding to a first block chain link point; according to a first account parameter in the first block chain account information, carrying out digital signature on the difficulty target and the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and target transaction data; sending the first pre-signed block to a first block generation node connected with a link point of the first block, and receiving a first candidate new block obtained by the first block generation node performing block generation processing based on the first pre-signed block, wherein the first candidate new block at least comprises first block chain account information and a first signature result; according to the first block chain account information and the first signature result, carrying out validity verification on the first candidate new block; under the condition that the first candidate new block passes the validity verification, selecting a target new block from the first candidate new block and a second candidate new block which passes the validity verification and corresponds to the target transaction data according to the matching degree of the random number and the difficulty target, and adding the target new block to a block chain for storage; alternatively, the first and second electrodes may be,
a processor 62, coupled to the memory 61, for executing computer programs in the memory 61 for: receiving a first pre-signature block sent by a first block chain node, and analyzing a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block; according to a second account parameter in the first block chain account information, signature verification is carried out on the first signature result; if the first signature result passes the signature verification, performing consensus calculation according to the difficulty target to obtain a random number meeting the difficulty target; and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data, and sending the first candidate new block to a first block chain node so that the first block chain node uploads the first candidate new block to a block chain after the first candidate new block passes the validity check.
Further, as shown in fig. 6, the electronic device further includes: communication components 63, display 64, power components 65, audio components 66, and the like. Only some of the components are schematically shown in fig. 6, and the electronic device is not meant to include only the components shown in fig. 6. In addition, the components within the dashed box in fig. 6 are optional components, not necessary components, and may be determined according to the product form of the scheduling equipment. The electronic device of this embodiment may be implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone, or an IOT device, or may be a server device such as a conventional server, a cloud server, or a server array. If the electronic device of this embodiment is implemented as a terminal device such as a desktop computer, a notebook computer, or a smart phone, the electronic device may include components within a dashed line frame in fig. 6; if the electronic device of this embodiment is implemented as a server device such as a conventional server, a cloud server, or a server array, the components in the dashed box in fig. 6 may not be included.
For details of the implementation process of each action performed by the processor, reference may be made to the foregoing method embodiment or the related description in the device embodiment, and details are not described herein again.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program is capable of implementing the steps that can be executed by the electronic device in the foregoing method embodiments when executed.
Accordingly, the present application also provides a computer program product, which includes a computer program/instruction, when the computer program/instruction is executed by a processor, the processor is enabled to implement the steps that can be executed by an electronic device in the above method embodiments.
In this embodiment, the block chain system may configure, by using a write type interface provided by a system-level account management intelligent contract, a link uplink of the client, the block link point, or the block generation node as an authority, so that the client, the block link node, or the block generation node can only execute an uplink behavior within the link uplink as the authority. Further, the block chain system itself may read the link uplink of the client, the block chain node, or the block generation node as the right by using the read type interface provided by the system level account management intelligent contract, so as to determine whether the link uplink of the client, the block chain node, or the block generation node is capable of executing the link uplink. The uplink is a management mode, a third-party management system is not required to be introduced, the reliability of the block chain system is guaranteed, the complexity of the block chain system is reduced, and the convenience in use of the block chain system is guaranteed.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The terms referred to in this application are explained first:
P2P (Peer-to-Peer networking) network: also known as Peer-to-Peer networks, or Peer-to-Peer networks, participants in the network share a portion of the hardware resources (such as processing power, storage power, network connectivity, printers, etc.) they own, and these shared resources provide services and content over the network and can be accessed directly by other Peer nodes (peers) without going through intermediate entities.
Smart contract (Smart contract): is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. Essentially, the working principle of these automatic contracts is similar to if-then statements of other computer programs. Smart contracts interact with real-world assets only in this manner. When a pre-programmed condition is triggered, the intelligent contract executes the corresponding contract clause.
Fig. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present disclosure. As shown in fig. 1, the objects of the blockchain system are mainly divided into: client, block chain node, block generation node. Wherein, each blockchain node establishes connection through a P2P (Peer to Peer) Peer-to-Peer network to form a blockchain network. It should be noted that in the embodiment of the present application, the tile generation node is a working node exclusively responsible for generating tiles, unlike the tile chain node that establishes a connection through the P2P (Peer-to-Peer) Peer-to-Peer network. Each block generation node may be in communication with an associated block link node, and each block generation node is independent of the block link network and does not belong to a node in the block link network.
In the embodiment of the present application, the blockchain node or the blockgeneration node may be a terminal device or a server. The terminal device may be hardware or software. When the terminal device is hardware, the terminal device is, for example, a mobile phone, a tablet computer, a desktop computer, a wearable smart device, a smart home device, or the like. When the terminal device is software, it may be installed in the above listed hardware devices, in this case, the terminal device is, for example, a plurality of software modules or a single software module, and the embodiment of the present application is not limited. The server may be hardware or software. When the server is hardware, the server is a single server or a distributed server cluster composed of a plurality of servers. When the server is software, the server may be a plurality of software modules or a single software module, and the embodiments of the present application are not limited.
It should be understood that the number of clients, tile chain link points, and tile generation nodes in fig. 1 is merely illustrative. In practical application, any number of clients, block link points and block generation nodes are deployed according to actual requirements. In fig. 1, n is a positive integer.
In this embodiment of the present application, the type of the Block chain network is not limited, and may be, for example, a Public Block chain (Public Block Chains), a Private Block chain (Private Block Chains), a federation Block chain, a permission Block chain, and the like. The public block chain has the characteristic of public deployment, and any person can participate randomly; the private block chain has the characteristic of private deployment and is limited to be used in a certain organization; the block chain of alliance and the block chain of permission have the characteristic of private deployment, and multiple organizations use together and have admission and authority management mechanisms.
In the embodiment of the present application, objects with different roles, such as the client, the block link node, and the block generation node, are responsible for different tasks.
For example, the tasks for which the client is responsible may include, but are not limited to: 1) generating and signing transaction data; 2) sending the transaction data to the blockchain node; 3) and calling a block chain access interface provided by the block chain node according to the service requirement so as to realize the required service capability.
For example, the tasks for which the block link points are responsible may be, but are not limited to: 1) receiving transaction data generated by a client or the transaction data forwarded by other block chain nodes, and after carrying out security verification on the transaction data, locally caching or forwarding the transaction data to other block chain nodes; 2) constructing a pre-signature block and sending the pre-signature block to a block generation node, receiving a complete new block obtained by the block generation node through block generation processing based on the pre-signature block or a complete new block forwarded by other block link points, and locally storing or forwarding the complete new block to other block link nodes after carrying out security verification on the complete new block; 3) various interfaces are provided for clients to access the blockchain network.
For example, the task for which the block generation node is responsible may be, but is not limited to: 1) receiving a pre-signature block sent by a block chain node, and carrying out security verification on the pre-signature block; 2) performing consensus calculation on the pre-signed blocks passing the security verification to generate complete new blocks; 3) and returning the complete new block to the block link point.
In the embodiment of the application, in order to further enhance the reliability of the blockchain system, factors such as the role of the object and the task for which the object is responsible are considered, and the chain uplink of each object of the blockchain system is controlled. The uplink refers to an operation behavior that an object can perform in the blockchain system, and the category of the uplink behavior substantially includes: read, call, create block, deploy, manage, etc. Correspondingly, the uplink permission includes a reading permission, a calling permission, a block generation permission, a deployment permission and a management permission.
The object with the read right can read information in the blockchain system, for example, including a read type interface for acquiring transaction data, acquiring a block, accessing a system-level intelligent contract or a service-level intelligent contract;
the object with the calling authority can call a write type interface of the service level intelligent contract; an object with the right to generate a chunk can generate a chunk; for example, a pre-signature block may be generated or a complete new block generated based on the pre-signature block may be generated; the object with the deployment authority can deploy a service-level intelligent contract; the object with management rights may invoke a write type interface of the system level intelligent contract to complete the management operation of the blockchain system.
Further optionally, the configurable authority range of block link points may include: read permissions and generate block permissions. The client-configurable scope of permissions may include: read permissions, call permissions, deployment permissions, and management permissions. The configurable scope of authority of the block generation node may include: a block is generated.
In the embodiment of the application, a system-level intelligent contract and a service-level intelligent contract can be provided on the blockchain node. The system-level intelligent contract is an intelligent contract written in a created block on a block chain and used for managing the intelligent contract of the block chain system, and is divided according to a management range. The service-level intelligent contract refers to an intelligent contract which is deployed in other blocks except the created block on the block chain through transactions by a client. The service level intelligent contract can be an intelligent contract with any function and can be developed according to the actual application requirement.
The system-level account management intelligent contract is mainly used for maintaining and managing the link uplink of the client, the block link points and the block generation nodes as the authority. For example, a write-type interface provided by the system-level account management intelligent contract is called, and the blockchain account identifier and the chain uplink authority of each object in the blockchain system can be configured in the system-level account management intelligent contract. And calling a reading type interface provided by the system level account management intelligent contract, and inquiring the block chain account identification and the chain uplink of each object in the block chain system pre-configured in the system level account management intelligent contract to be the authority.
The system level cryptographic parameter management intelligent contract is mainly used for maintaining and managing trusted cryptographic parameters. And calling a write type interface provided by the system-level password parameter management intelligent contract, and configuring at least one password parameter ID and a password parameter ciphertext and a block chain account identifier corresponding to the password parameter ID in the system-level password parameter management intelligent contract. It is noted that the same cryptographic parameter ID may be associated with multiple blockchain account IDs and the cryptographic parameter cryptogram associated with each blockchain account ID. And calling a reading type interface of the system-level password parameter management intelligent contract to query the password parameter ID and the first password parameter ciphertext related to each block chain account identifier.
The system level alliance management intelligent contract is mainly used for maintaining and managing a trusted alliance network. It is noted that the entire blockchain system can be divided into a plurality of different alliance networks isolated from each other. For example, a trusted federation identifier may be configured in a system-level federation management intelligence contract by invoking a write-type interface provided by the system-level federation management intelligence contract. And calling a reading type interface provided by the system-level alliance management intelligent contract to inquire a trusted alliance identifier pre-configured in the system-level alliance management intelligent contract. The block chain system comprises a block chain system, a block chain system and a federation identifier, wherein the federation identifier is used for identifying the uniqueness of different federation networks in the same block chain system, and the different federation networks have different federation identifiers.
It should be noted that when any one of the blockchain nodes in the blockchain network receives transaction data provided by the client, the validity of the transaction data is verified. The block chain node with the block generation authority in the block chain network can execute a pre-signature block generation process on the transaction data passing the validity verification to obtain a pre-signature block comprising the transaction data, and provides the pre-signature block to the block generation node, so that the block generation node performs block generation processing based on the pre-signature block to generate a complete new block and returns the new block to the block chain node with the block generation authority. And broadcasting the complete new block to a block chain network by the block chain node with the generated block authority, verifying the legality of the complete new block by any block chain node in the block chain network, and adding the legal new block to the block chain.
The following describes the uplink of the blockchain system as authority management based on the system-level account management intelligent contract.
Specifically, the first client with management authority is configured to send first transaction data to a first blockchain node, so that the first blockchain node broadcasts the first transaction data to a blockchain network, where the first transaction data at least includes a blockchain account identifier of a target object, a chain uplink authority, an intelligent contract ID of a system-level account management intelligent contract, and a write interface identifier of a write-type interface thereof; the second block chain node is used for generating a first pre-signature block according to the first transaction data, sending the first pre-signature block to the first block generation node, receiving a first candidate new block returned by the first block generation node and acquiring a second candidate new block related to the first transaction data; selecting a first new block from the first candidate new block and the second candidate new block, and calling a write type interface of the system level account management intelligent contract according to the intelligent contract ID and the write interface identification in the first new block so as to write the block chain account identification and the chain uplink of the target object in the new block into the system level account management intelligent contract in an associated manner by taking the block chain account identification and the chain uplink as authority; the first block generation node is used for performing generation block processing on the first pre-signed block to generate a first candidate new block.
In an embodiment of the present application, a blockchain system includes: a plurality of clients, a plurality of block link points, and at least one block generation node; the first client is any one of a plurality of clients with management authority; the first blockchain node is any one of the plurality of blockchain nodes which is in communication connection with the first client; the second block chain node is any one of the plurality of block chain nodes with the block generation authority; the first block generation node is any one of the at least one block generation node that is in communication with the first block link node.
Optionally, before generating the first pre-signature block according to the first transaction data, the second block chain node performs validity verification on the first transaction data, if the first transaction data passes the validity verification, generates a first pre-signature block according to the first transaction data, and sends the first pre-signature block to the first block generation node for block generation processing, so as to obtain a complete first candidate new block, which is obtained by the first block generation node based on the first pre-signature block generation block. Meanwhile, a complete second candidate new block generated by interaction of other block chain nodes except the second block chain node and the corresponding block generation node is received, and the second candidate new block is also a candidate new block associated with the first transaction data. It should be noted that other block chain nodes also perform validity verification on the first transaction data, and if the first transaction data passes the validity verification, generate a pre-signature block according to the first transaction data, and send the pre-signature block to the corresponding block generation node to perform block generation processing, so as to obtain a complete second candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select the first new block from the first candidate new block and the second candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty target. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
Further optionally, before the second blockchain node selects the first new block, validity verification may be performed on the first candidate new block and the second candidate new block, and the first new block may be selected from candidate new blocks that pass validity verification.
After the second block chain node selects the first new block, the write type interface of the system-level account management intelligent contract is called according to the intelligent contract ID and the write interface identification in the first new block, so that the block chain account identification and the chain uplink of the target object in the new block are written into the system-level account management intelligent contract in an associated mode by taking the block chain account identification and the chain uplink as the authority.
Further optionally, the write-type interface of the system-level account management intelligent contract includes at least one of: the system comprises a first write type interface used for setting the chain uplink of a block chain node as the authority, a second write type interface used for setting the chain uplink of a client side as the authority and a third write type interface used for setting the chain uplink of a block generation node as the permission.
It should be noted that, when the type of the target object is a blockchain node, the first new block includes a write interface identifier of the first write type interface. And when the type of the target object is the client, the first new block comprises a writing interface identifier of the second writing type interface. And when the type of the target object is the block generation node, the first new block comprises a write interface identifier of the third write type interface.
Then, when the type of the target object is a blockchain node, the second blockchain node is used to invoke a first write type interface of the system-level account management intelligent contract, so as to write the blockchain account identifier and the uplink as the authority of the target object in the first new block into the system-level account management intelligent contract in an associated manner, where the uplink as the authority of the target object includes at least one of the following: read permissions and generate block permissions.
When the type of the target object is a client, the second block chain link point is used for calling a second write type interface of the system-level account management intelligent contract so as to write the block chain account identification and the chain uplink of the target object in the first new block into the system-level account management intelligent contract in an associated manner, wherein the chain uplink of the target object comprises at least one of the following permissions: reading authority, calling authority, deploying authority and generating block authority;
when the type of the target object is a block generation node, the second block chain node is used for calling a third write type interface of the system level account management intelligent contract so as to write the block chain account identifier and the chain uplink of the target object in the first new block into the system level account management intelligent contract in an associated manner, wherein the chain uplink of the target object is an authority, and the method comprises the following steps: a block right is generated.
After the chain uplinks of the objects are configured as the permissions in the system-level account management intelligent contract, the configured chain uplinks of the objects can be read as the permissions by calling a read-type interface of the system-level account management intelligent contract.
Optionally, the second block chain node is further configured to receive second transaction data sent by the second client, generate a second pre-signature block according to the second transaction data, send the second pre-signature block to the first block generation node, receive a third candidate new block returned by the first block generation node, and obtain a fourth candidate new block associated with the second transaction data; selecting a second new block from the third candidate new block and the fourth candidate new block, and acquiring a block chain account identifier and a read interface identifier of a read type interface of a block chain account and a chain uplink which are authorities, system level account management intelligent contracts and chain uplink of a first target object in the second new block; calling a read type interface of the system-level account management intelligent contract according to the intelligent contract ID and the read interface identification in the second new block, and reading a chain uplink of the first target object from the system-level account management intelligent contract according to the block chain account identification of the first target object; and returning the chain uplink of the first target object as the authority to the second client.
It is noted that the second client is any one of the plurality of clients, and the second client may request any block chain node in which the system-level account management intelligent contract is deployed to invoke the read-type interface of the system-level account management intelligent contract. The embodiment of the present application is merely an example of the second client requesting the second block link point to invoke the read-type interface of the system-level account management intelligent contract, but the block link point requested by the second client is not limited.
In the embodiment of the present application, the second transaction data includes, but is not limited to: and the block chain account identification of the first target object, the intelligent contract ID of the intelligent contract with the authority for system-level account management and the read interface identification of the read type interface of the intelligent contract are arranged on the chain. The types of the first target object may be a client, a blockchain node, and a blockgeneration node.
Further optionally, the second block link node performs validity verification on the second transaction data before generating the second pre-signature block according to the second transaction data, and if the second transaction data passes the validity verification, generates the second pre-signature block according to the second transaction data, and sends the second pre-signature block to the first block generation node for block generation processing, so as to obtain a complete third candidate new block obtained by the first block generation node based on the second pre-signature block generation block. Meanwhile, a complete fourth candidate new block generated by interaction of other block chain nodes except the second block chain node and the corresponding block generation node is received, and the fourth candidate new block is also a candidate new block associated with the second transaction data. It should be noted that other block chain nodes also perform validity verification on the second transaction data, and if the second transaction data passes the validity verification, generate a pre-signature block according to the second transaction data, and send the pre-signature block to the corresponding block generation node to perform block generation processing, so as to obtain a complete fourth candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select the second new block from the third candidate new block and the fourth candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty target. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
Further optionally, before the second blockchain node selects the second new block, validity verification may be performed on the third candidate new block and the fourth candidate new block, and the second new block may be selected from candidate new blocks that pass validity verification.
After a second new block is selected by a second block chain node, acquiring a block chain account identifier and a read interface identifier of a read type interface of an intelligent contract and an intelligent contract ID of the intelligent contract, wherein the chain uplink is the authority and the system level account management intelligent contract from the second new block; calling a read type interface of the system-level account management intelligent contract according to the intelligent contract ID and the read interface identification in the second new block, and reading a chain uplink of the first target object from the system-level account management intelligent contract according to the block chain account identification of the first target object as a permission; and returning the chain uplink of the first target object as the authority to the second client.
Further optionally, the read-type interface of the system-level account management smart contract comprises at least one of: the system comprises a first reading type interface for reading the link uplink of the block link node as the authority, a second reading type interface for reading the link uplink of the client as the authority and a third reading type interface for reading the link uplink of the block generation node as the authority.
It should be noted that, when the type of the first target object is a block chain node, the second new block includes the read interface identifier of the first read type interface. And when the type of the first target object is the client, the second new block comprises a read interface identifier of the second read type interface. And when the type of the first target object is the block generation node, the second new block comprises a read interface identifier of a third read type interface.
Thus, when the type of the first target object is a blockchain node, the second blockchain node is specifically configured to: calling a first read type interface of a system level account management intelligent contract according to the block chain account identification of the first target object, and reading a chain uplink of the first target object as a permission from the system level account management intelligent contract;
when the type of the first target object is the client, the second block link point is specifically configured to: and calling a second read type interface of the system level account management intelligent contract according to the block chain account identification of the first target object, and reading the chain uplink of the first target object as the authority from the system level account management intelligent contract.
When the type of the first target object is a block generation node, the second block link point is specifically configured to: and calling a third read type interface of the system level account management intelligent contract according to the block chain account identification of the first target object, and reading the chain uplink of the first target object from the system level account management intelligent contract as the authority.
According to the block chain system provided by the embodiment of the application, the block chain system can configure the uplink of the client, the block chain link point or the block generation node as the authority by means of the write type interface provided by the system-level account management intelligent contract, so that the client, the block chain node or the block generation node can only execute the uplink action within the uplink as the authority. Further, the block chain system itself may read the link uplink of the client, the block chain node, or the block generation node as the right by using the read type interface provided by the system level account management intelligent contract, so as to determine whether the link uplink of the client, the block chain node, or the block generation node is capable of executing the link uplink.
The uplink is a management mode, a third-party management system is not required to be introduced, the reliability of the block chain system is guaranteed, the complexity of the block chain system is reduced, and the convenience in use of the block chain system is guaranteed.
In some embodiments, the blockchain system manages cryptographic parameters using system-level cryptographic parameter management intelligence contracts. The following describes the link up of the blockchain system as rights management based on the system level account management intelligent contract.
Specifically, the first client is further configured to send third transaction data to the first blockchain node, so that the first blockchain node broadcasts the third transaction data to the blockchain network, where the third transaction data at least includes at least one cipher parameter ID and its corresponding cipher parameter ciphertext and blockchain account identifier, an intelligent contract ID of a system-level cipher parameter management intelligent contract, and a write interface identifier of a write-type interface thereof;
the second block chain node is used for generating a third pre-signature block according to third transaction data, sending the third pre-signature block to the first block generation node, receiving a fifth candidate new block returned by the first block generation node and acquiring a sixth candidate new block related to the third transaction data; selecting a third new block from the fifth candidate new block and the sixth candidate new block; and calling a write type interface of the system-level password parameter management intelligent contract according to the intelligent contract ID and the write interface identification in the third new block so as to write at least one password parameter ID in the third new block, and a password parameter ciphertext and a block chain account identification corresponding to the password parameter ID into the system-level account management intelligent contract.
In the embodiment of the present application, when it is required to configure the cryptographic parameters corresponding to different objects in the system-level account management smart contract, the third transaction data may include, but is not limited to, the following data contents: at least one password parameter ID and the corresponding password parameter ciphertext and the block chain account identification, the intelligent contract ID of the system level password parameter management intelligent contract and the writing interface identification of the writing type interface.
Optionally, before generating the third pre-signature block according to the third transaction data, the second block chain node performs validity verification on the third transaction data, if the third transaction data passes the validity verification, generates a third pre-signature block according to the third transaction data, and sends the third pre-signature block to the first block generation node for block generation processing, so as to obtain a complete fifth candidate new block, which is obtained by the first block generation node based on the third pre-signature block generation block. Meanwhile, a complete sixth candidate new block generated by interaction of the block chain nodes except the second block chain node and the corresponding block generation node is received, and the sixth candidate new block is also a candidate new block associated with the third transaction data. It should be noted that other block chain nodes also perform validity verification on the third transaction data, and if the third transaction data passes validity verification, generate a pre-signature block according to the third transaction data, and send the pre-signature block to the corresponding block generation node for block generation processing, so as to obtain a complete sixth candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select a third new block from the fifth candidate new block and the sixth candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty target. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
Further optionally, before the second blockchain node selects the third new block, validity verification may be performed on the fifth candidate new block and the sixth candidate new block, and the third new block may be selected from candidate new blocks that pass validity verification.
And after the second block chain node selects a third new block, acquiring an intelligent contract ID and a write interface identifier in the system-level account management intelligent contract from the third new block, and calling a write type interface of the system-level password parameter management intelligent contract according to the intelligent contract ID and the write interface identifier in the third new block so as to write at least one password parameter ID in the third new block, and a password parameter ciphertext and a block chain account identifier corresponding to the password parameter ID into the system-level password parameter management intelligent contract.
And the second block chain link point writes at least one password parameter ID and the corresponding password parameter ciphertext and block chain account identification in the system-level password parameter management intelligent contract, and can call a read type interface provided by the system-level password parameter management intelligent contract to view the password parameter ID and the password parameter ciphertext of an object corresponding to different block chain account identifications.
Optionally, the second block chain node is further configured to receive fourth transaction data sent by the third client, generate a fourth pre-signature block according to the fourth transaction data, send the fourth pre-signature block to the first block generation node, receive a seventh candidate new block returned by the first block generation node, and obtain an eighth candidate new block associated with the fourth transaction data; selecting a fourth new block from the seventh candidate new block and the eighth candidate new block; acquiring a target password parameter ID in a fourth new block, a block chain account identifier of a second target object, an intelligent contract ID of a system-level password parameter management intelligent contract and a read interface identifier of a read type interface of the intelligent contract; calling a read type interface of the system-level password parameter management intelligent contract according to the intelligent contract ID and the read interface identification in the fourth new block, and reading a password parameter ciphertext corresponding to the second target object from the system-level password parameter management intelligent contract according to the target password parameter ID and the block chain account identification of the second target object; and returning the cipher parameter ciphertext corresponding to the second target object to the third client.
It is noted that the third client is any one of the plurality of clients, and the third client may request that any second chunk link point deployed with the system-level cryptographic parameter management smart contract invoke the read-type interface of the system-level cryptographic parameter management smart contract. In the embodiment of the present application, the third client requests the second block link point to call the read type interface of the system level cipher parameter management intelligent contract, but the block link point requested by the third client is not limited, and other block link points may also request the second block chain node.
In this embodiment, the fourth transaction data includes, but is not limited to: the target password parameter ID, the block chain account identification of the second target object, the intelligent contract ID of the system-level password parameter management intelligent contract and the read interface identification of the read type interface. The type of the second target object may be a client, a tile link node, or a tile generation node.
Optionally, before generating the fourth pre-signature block according to the fourth transaction data, the second block chain node performs validity verification on the fourth transaction data, if the fourth transaction data passes the validity verification, the second block chain node generates the fourth pre-signature block according to the fourth transaction data, and sends the fourth pre-signature block to the first block generation node for block generation processing, so as to obtain a complete seventh candidate new block, which is obtained by the first block generation node based on the fourth pre-signature block generation block. Meanwhile, a complete eighth candidate new block generated by interaction of other block chain nodes except the second block chain node and the corresponding block generation node is received, and the eighth candidate new block is also a candidate new block associated with the fourth transaction data. It should be noted that other block link nodes also perform validity verification on the fourth transaction data, and if the fourth transaction data passes the validity verification, generate a pre-signature block according to the fourth transaction data, and send the pre-signature block to the corresponding block generation node for block generation processing, so as to obtain an eighth candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select a fourth new block from the seventh candidate new block and the eighth candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of all the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty targets. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
And after the second blockchain node selects a fourth new block, acquiring the target password parameter ID, the blockchain account identification of the second target object, the intelligent contract ID of the system-level password parameter management intelligent contract and the read interface identification of the read type interface thereof from the fourth new block. Calling a read type interface of the system-level password parameter management intelligent contract according to the intelligent contract ID and the read interface identification in the fourth new block, and reading a password parameter ciphertext corresponding to the second target object from the system-level password parameter management intelligent contract according to the target password parameter ID and the block chain account identification of the second target object; and returning the cipher parameter ciphertext corresponding to the second target object to the third client.
In the blockchain system provided by the embodiment of the application, the blockchain system can also configure the trusted cryptographic parameters for the client, the blockchain node or the block generation node by using the write type interface provided by the system-level cryptographic parameter management intelligent contract, so that the client, the blockchain node or the block generation node can perform data processing by using the trusted cryptographic parameters. Furthermore, the blockchain system can read the cryptographic parameters of the client, the blockchain nodes or the block generation nodes by means of a read-type interface provided by the system-level cryptographic parameter management intelligent contract, so that the client, the blockchain nodes or the block generation nodes can perform data processing by using the trusted cryptographic parameters. The password parameter management mode does not need to introduce a third-party management system, ensures the reliability of the block chain system, reduces the complexity of the block chain system and ensures the use convenience of the block chain system.
In some embodiments, the blockchain system manages trusted federation networks using a system level federation management intelligence contract. Federation management of a blockchain system based on a system-level federation management intelligence contract is described below.
Specifically, the first client is further configured to send fifth transaction data to the first blockchain node, so that the first blockchain node broadcasts the fifth transaction data to the blockchain network, where the fifth transaction data at least includes an alliance identifier of at least one alliance network, an intelligent contract ID of a system-level alliance management intelligent contract, and a write interface identifier of a write-type interface thereof;
the second block chain node is used for generating a fifth pre-signature block according to the fifth transaction data, sending the fifth pre-signature block to the first block generation node, receiving a ninth candidate new block returned by the first block generation node and acquiring a tenth candidate new block related to the fifth transaction data; selecting a fifth new block from the ninth candidate new block and the tenth candidate new block; and calling a write type interface of the system-level alliance management intelligent contract according to the intelligent contract ID and the write interface identification in the fifth new block so as to write the alliance identification of at least one alliance network in the fifth new block into the system-level alliance management intelligent contract.
In this embodiment, when the federation identity of the trusted federation network needs to be configured at the system level for the intelligent contract management, the fifth transaction data may include, but is not limited to, the following data contents: the system level alliance management intelligent contract comprises an alliance identification of at least one alliance network, an intelligent contract ID of a system level alliance management intelligent contract and a writing interface identification of a writing type interface of the intelligent contract ID.
Optionally, before generating the fifth pre-signature block according to the fifth transaction data, the second block chain node performs validity verification on the fifth transaction data, if the fifth transaction data passes validity verification, generates a fifth pre-signature block according to the fifth transaction data, and sends the fifth pre-signature block to the first block generation node for block generation processing, so as to obtain a complete ninth candidate new block, which is obtained by the first block generation node based on the fifth pre-signature block generation block. Meanwhile, a tenth candidate new block generated by interaction of other block chain nodes except the second block chain node and the corresponding block generation node is received, and the tenth candidate new block is also a candidate new block associated with the fifth transaction data. It should be noted that other blockchain nodes also perform validity verification on the fifth transaction data, and if the fifth transaction data passes the validity verification, generate a pre-signature block according to the fifth transaction data, and send the pre-signature block to the corresponding block generation node for block generation processing, so as to obtain a complete tenth candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select a fifth new block from the ninth candidate new block and the tenth candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of all the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty targets. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
Further optionally, before the second blockchain node selects the fifth new block, validity verification may be performed on the ninth candidate new block and the tenth candidate new block, and the fifth new block may be selected from candidate new blocks that pass validity verification.
And after the second block chain node selects a fifth new block, acquiring an intelligent contract ID and a write interface identifier of the system-level alliance management intelligent contract from the fifth new block, and calling a write type interface of the system-level alliance management intelligent contract according to the intelligent contract ID and the write interface identifier in the fifth new block so as to write the alliance identifier of at least one alliance network in the fifth new block into the system-level alliance management intelligent contract.
In the case where the second block link point has written a federation identification of at least one trusted federated network in the system level federation management intelligence contract, a read-type interface provided by the system level federation management intelligence contract may be invoked to determine whether the federated network is trusted.
Further optionally, the second block chain node is further configured to receive sixth transaction data sent by the fourth client, generate a sixth pre-signature block according to the sixth transaction data, send the sixth pre-signature block to the first block generation node, receive an eleventh candidate new block returned by the first block generation node, and obtain a twelfth candidate new block associated with the sixth transaction data; selecting a sixth new block from the eleventh candidate new block and the twelfth candidate new block; acquiring a target alliance identification, an intelligent contract ID of a system-level alliance management intelligent contract and a read interface identification of a read type interface of the intelligent contract ID in a sixth new block; calling a read type interface of the system-level alliance management intelligent contract according to the intelligent contract ID and the read interface identification in the sixth new block, and reading whether the system-level alliance management intelligent contract comprises a target alliance identification; and returning the reading result of the target alliance identification to the fourth client.
In the embodiment of the present application, the sixth transaction data may include, but is not limited to, the following data contents: the target alliance identification, the intelligent contract ID of the system level alliance management intelligent contract and the read interface identification of the read type interface. The target federation identity is an identity of the federation network that needs to be confirmed as to whether trusted or not.
Further optionally, the second block chain node performs validity verification on the sixth transaction data before generating the sixth pre-signature block according to the sixth transaction data, and if the sixth transaction data passes the validity verification, generates the sixth pre-signature block according to the sixth transaction data, and sends the sixth pre-signature block to the first block generation node for block generation processing, so as to obtain an integral eleventh candidate new block, which is obtained by the first block generation node based on the sixth pre-signature block generation block. Meanwhile, a complete twelfth candidate new block generated by interaction of other block chain nodes except the second block chain node and the corresponding block generation node is received, and the twelfth candidate new block is also a candidate new block associated with the sixth transaction data. It should be noted that other block chain nodes also perform validity verification on the sixth transaction data, and if the sixth transaction data passes validity verification, generate a pre-signature block according to the sixth transaction data, and send the pre-signature block to the corresponding block generation node for block generation processing, so as to obtain a twelfth candidate new block obtained by the corresponding block generation node based on the pre-signature block generation block.
The second block link point may select a sixth new block from the eleventh candidate new block and the twelfth candidate new block according to a matching degree of the random number and the difficulty target. Each candidate new block carries a random number which meets the difficulty target and is obtained by carrying out block generation processing on each block generation node. The difficulty targets of the candidate new blocks are the same, and the optimal candidate new block can be selected according to the matching degree of the random number and the difficulty target. The matching degree of the random number and the difficulty target can refer to the approaching degree of the random number and the difficulty target, and the closer the random number is to the difficulty target, the higher the matching degree is; the closer the random number is to the difficulty target, the lower the degree of matching.
Further optionally, before the second blockchain node selects the sixth new block, validity verification may be performed on the eleventh candidate new block and the twelfth candidate new block, and the sixth new block may be selected from candidate new blocks that pass validity verification.
And after the sixth new block is selected by the second block chain node, acquiring the intelligent contract ID and the writing interface identifier of the system-level alliance management intelligent contract from the sixth new block, calling the writing type interface of the system-level alliance management intelligent contract according to the intelligent contract ID and the writing interface identifier in the sixth new block to read whether the target alliance identifier is a pre-written credible alliance identifier, and returning the reading result to the fourth client.
In the blockchain system provided by the embodiment of the present application, the blockchain system may also configure a federation identifier of a trusted federation network by using a write-type interface provided by a system-level federation management intelligent contract. Further, the blockchain system itself can identify whether the federation network is trusted by means of a read-type interface provided by a system-level federation management intelligence contract. The alliance network management mode does not need to introduce a third-party management system, ensures the reliability of the block chain system, reduces the complexity of the block chain system and ensures the use convenience of the block chain system.
The communication component is configured to facilitate wired or wireless communication between the device in which the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The power supply assembly provides power for various components of the device in which the power supply assembly is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The audio component may be configured to output and/or input an audio signal. For example, the audio component includes a Microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A block processing method applied to a first blockchain node in a blockchain system, the method comprising:
acquiring target transaction data, and generating a difficulty target required by block processing and first block chain account information corresponding to the first block chain link point;
according to a first account parameter in the first block chain account information, performing digital signature on the difficulty target and the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and the target transaction data;
sending the first pre-signed block to a first block generation node connected with a link point of the first block, and receiving a first candidate new block obtained by the first block generation node through block generation processing based on the first pre-signed block, wherein the first candidate new block at least comprises the first block chain account information and the first signature result; and
according to the first block chain account information and the first signature result, carrying out validity verification on the first candidate new block;
and under the condition that the first candidate new block passes the validity verification, selecting a target new block from the first candidate new block and a second candidate new block which passes the validity verification and corresponds to the target transaction data according to the matching degree of a random number and the difficulty target, and adding the target new block to a block chain for storage.
2. The method of claim 1, further comprising, prior to selecting the target new block:
receiving a second candidate new block sent by a second block chain node in the block chain system, wherein the second candidate new block is obtained by performing block generation processing on a second pre-signature block generated by a second block generation node connected by the second block chain node based on the second block chain node; and performing validity verification on the second candidate new block.
3. The method of claim 1, wherein performing validity verification on the first candidate new block according to the first blockchain account information and the first signature result comprises:
analyzing the difficulty target, the random number determined based on consensus computation and the difficulty target, the first block chain account information and the first signature result from the first candidate new block; the first blockchain account information further comprises a second account parameter corresponding to the first account parameter;
judging whether the random number meets the difficulty target or not, and performing signature verification on the first signature result according to a second account parameter;
and if the random number meets the difficulty target and the first signature result passes the signature verification, determining that the first candidate new block passes the validity verification.
4. The method of claim 3, wherein before determining that the first candidate new block passes validity verification, at least one of the following determination operations is further performed:
the first candidate new block further comprises second block chain account information and a second signature result, the signature of the second signature result is verified according to a third account parameter in the second block chain account information, and whether the second signature result passes the signature verification is determined;
calling a system level account management intelligent contract according to a first block chain account identifier in first block chain account information to determine whether a chain uplink corresponding to the first block chain link point is an authority to generate a block authority, wherein different block chain account identifiers and the chain uplink corresponding to the different block chain account identifiers are stored in the system level account management intelligent contract;
calling a system level account management intelligent contract according to a second block chain account identifier in the second block chain account information to determine whether a chain uplink corresponding to the first block generation node comprises generation block permission or not;
carrying out validity verification on target transaction data analyzed from the first candidate new block, and determining whether the target transaction data passes validity verification;
calling a system level block chain network management intelligent contract according to the alliance identification of the target alliance network contained in the first candidate new block so as to determine whether the target alliance network is a credible alliance network stored in the system level block chain network management intelligent contract or not;
determining whether the data structure of the first candidate new block is a preset data structure;
and in the case that the determination result of the at least one determination operation is yes, determining that the first candidate new block passes validity verification.
5. A block processing method applied to a first block generation node in a block chain system, the method comprising:
receiving a first pre-signature block sent by a first block chain node, and analyzing a difficulty target required for generating block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block;
according to a second account parameter in the first block chain account information, performing signature verification on the first signature result;
if the first signature result passes signature verification, performing consensus calculation according to the difficulty target to obtain a random number meeting the difficulty target;
and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result and the target transaction data, and sending the first candidate new block to the first block chain link point so that the first block chain link point uploads the first candidate new block to a block chain after the first candidate new block passes the validity check.
6. The method of claim 5, wherein generating a first candidate new tile based on the difficulty target, the random number, the first blockchain account information, the first signature result, and the target transaction data comprises:
acquiring second block chain account information corresponding to the first block generation node;
according to a fourth account parameter in second block chain account information, performing digital signature on the difficulty target, the random number, the first block chain account information, the first signature result and the second block chain account information to obtain a second signature result;
and generating a first candidate new block according to the difficulty target, the random number, the first block chain account information, the first signature result, the second block chain account information, the second signature result and the target transaction data.
7. A block processing apparatus, comprising:
the acquisition module is used for acquiring target transaction data, generating a difficulty target required by block processing and first block chain account information corresponding to a first block chain link point;
the digital signature module is used for digitally signing the difficulty target and the first block chain account information according to a first account parameter in the first block chain account information to obtain a first signature result, and generating a first pre-signature block according to the difficulty target, the first block chain account information, the first signature result and the target transaction data;
a sending module, configured to send the first pre-signature block to a first block generation node connected to the first block link point;
a receiving module, configured to receive a first candidate new block obtained by the first block generation node performing block generation processing based on the first pre-signed block, where the first candidate new block at least includes the first blockchain account information and the first signature result;
the verification module is used for verifying the validity of the first candidate new block according to the first block chain account information and the first signature result;
and the uplink module is used for selecting a target new block from the first candidate new block and a second candidate new block which corresponds to the target transaction data and passes the validity verification under the condition that the first candidate new block passes the validity verification, and adding the target new block to a block chain for storage.
8. A block processing apparatus, comprising:
the receiving module is used for receiving a pre-signature block sent by a first block chain node, and resolving a difficulty target required for block processing, first block chain account information corresponding to the first block chain node, a first signature result and target transaction data from the pre-signature block;
the verification module is used for performing signature verification on the first signature result according to a second account parameter in the first block chain account information;
the consensus computing module is used for carrying out consensus computing according to the difficulty target if the first signature result passes the signature verification, and obtaining a random number meeting the difficulty target;
a generating module, configured to generate a first candidate new chunk according to the difficulty target, the random number, the first chunk chain account information, the first signature result, and the target transaction data;
a sending module, configured to send the first candidate new block to the first block link node, so that the first block link node uploads the first candidate new block to a block link after passing the validity check.
9. An electronic device, comprising: a memory and a processor; the memory for storing a computer program; the processor is coupled to the memory for executing the computer program for performing the steps of the method of any of claims 1-6.
10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to carry out the steps of the method of any one of claims 1 to 6.
CN202210239587.6A 2022-03-11 2022-03-11 Block processing method, device, equipment and storage medium Pending CN115118425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210239587.6A CN115118425A (en) 2022-03-11 2022-03-11 Block processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210239587.6A CN115118425A (en) 2022-03-11 2022-03-11 Block processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115118425A true CN115118425A (en) 2022-09-27

Family

ID=83324558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210239587.6A Pending CN115118425A (en) 2022-03-11 2022-03-11 Block processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115118425A (en)

Similar Documents

Publication Publication Date Title
US11387978B2 (en) Systems and methods for securing access rights to resources using cryptography and the blockchain
KR102621499B1 (en) Method and device for downloading a profile to an embedded universal integrated circuit card (eUICC) of a terminal
US11463940B2 (en) Systems and methods for distributing content in a vehicle-based wireless network
US11716207B1 (en) System and method for a dynamic-PKI for a social certificate authority
US11206534B2 (en) Method and apparatus for managing bundles of smart secure platform
US11399076B2 (en) Profile information sharing
KR102657876B1 (en) Apparatus and methods for ssp device and server to negociate digital certificates
US11483155B2 (en) Access control using proof-of-possession token
EP3598333A1 (en) Electronic device update management
CN111639369B (en) Data sharing method, device, storage medium and data sharing system
CN111897621A (en) Virtual machine migration method, device, equipment, system and storage medium
CN115114630A (en) Data sharing method and device and electronic equipment
CN115118426A (en) Data processing method, device and equipment of block chain system and storage medium
CN111937013B (en) Electronic device management
CN110825797A (en) Data exchange method and device
CN114385647B (en) Alliance link-out block method, alliance link-out block device, electronic equipment and medium
CN115118425A (en) Block processing method, device, equipment and storage medium
CN112118210B (en) Authentication key configuration method, device, system and storage medium
CN115174088A (en) Block chain system, data processing method and medium for block chain system
CN115118427A (en) Data transmission method, device and equipment of block chain system and storage medium
CN112148345A (en) Applet package transmitting method, apparatus, electronic device and computer readable medium
CN114731505A (en) Method and apparatus for setting state of packet after packet transmission between devices
CN116939011A (en) Transaction processing method and device based on blockchain, equipment and medium
CN114556887A (en) Method and apparatus for transmitting bundle package between devices
CN116962444A (en) Data storage method and device based on state channel

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