WO2020182134A1 - 区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质 - Google Patents

区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质 Download PDF

Info

Publication number
WO2020182134A1
WO2020182134A1 PCT/CN2020/078692 CN2020078692W WO2020182134A1 WO 2020182134 A1 WO2020182134 A1 WO 2020182134A1 CN 2020078692 W CN2020078692 W CN 2020078692W WO 2020182134 A1 WO2020182134 A1 WO 2020182134A1
Authority
WO
WIPO (PCT)
Prior art keywords
consensus task
consensus
nodes
node
blockchain
Prior art date
Application number
PCT/CN2020/078692
Other languages
English (en)
French (fr)
Inventor
齐禹
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2020182134A1 publication Critical patent/WO2020182134A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the embodiments of the present disclosure relate to a blockchain consensus task coordination method, a blockchain consensus task coordination device, a blockchain consensus task processing method, a blockchain node device, a blockchain system, and a storage medium.
  • Blockchain technology is an emerging technology that has emerged in the field of information technology in recent years.
  • Unique attributes such as decentralization, non-tamperable information, multi-node collective maintainability, openness, and privacy protection enable blockchain technology to record and provide credible transaction information data in the untrusted Internet.
  • At least one embodiment of the present disclosure provides a blockchain consensus task coordination method.
  • a blockchain system running the blockchain consensus task coordination method includes M nodes, and the method includes: receiving N of the M nodes Resource capability data fed back by the N nodes, the resource capability data fed back by the N nodes are evaluated to determine L nodes among the N nodes to perform the consensus task, and feed back to the L nodes to execute the The information of the consensus task, 0 ⁇ L ⁇ N ⁇ M, M, N, L are all positive integers.
  • the blockchain consensus task coordination method further includes: receiving processing action parameters fed back by the N nodes, and determining the N according to the processing action parameters of each of the N nodes. Whether each node performs the consensus task.
  • the resource capability data includes time constraint information and storage capacity information.
  • the time constraint information is expressed as:
  • DT j represents the time required for the jth node among the N nodes to execute the consensus task
  • ST j represents the start time of the jth node to execute the consensus task
  • ET j represents the jth node
  • Nt represents the N nodes at time t
  • j is an integer greater than 0 and less than or equal to N
  • t is a natural number greater than 0.
  • the storage capacity information is expressed as:
  • cssr j represents the storage capacity required by the j-th node among the N nodes to execute the consensus task, Represents the remaining storage capacity of the j-th node after removing the storage capacity required to perform other consensus tasks, Indicates the maximum storage capacity of the j-th node.
  • evaluating the resource capability data fed back by the N nodes includes: obtaining information required by the N nodes to perform the consensus task The time value and the trust value of the N nodes, where the trust value represents the reliability of the N nodes in performing the consensus task; comprehensively consider the time value and trust value of the N nodes to determine the L nodes.
  • the blockchain consensus task coordination method provided by at least one embodiment of the present disclosure, comprehensively considering the time value and trust value of the N nodes to determine the L nodes, including: among the N nodes The L nodes that have the shortest completion time and whose trust value for realizing the consensus task is greater than the standard trust value for executing the consensus task are selected to execute the consensus task.
  • the blockchain consensus task coordination method further includes: receiving resource capacity data of the L nodes again to determine whether other consensus tasks can be performed; based on the current consensus task and the other consensus The priority of the task determines whether the current consensus task needs to be terminated with some of the L nodes; if the contract needs to be terminated, the current consensus task request request for termination is sent to the node that needs to be terminated; The resource capability data fed back by other nodes among the M nodes except the node that needs to be terminated are evaluated, so as to re-determine the node that executes the current consensus task among the M nodes.
  • the blockchain consensus task coordination method provided by at least one embodiment of the present disclosure further includes: performing trust value evaluation on each node that executes the consensus task.
  • the trust value evaluation is expressed as:
  • c represents the attributes of trust value evaluation, including accurate attributes, time-sensitive attributes, and resource attributes,
  • w(t) represents the weight of the attribute of node b at time t
  • At least one embodiment of the present disclosure also provides a block chain consensus task coordination device.
  • the block chain system includes M nodes.
  • the block chain consensus task coordination device includes a block central processing unit. It is configured to receive resource capability data fed back by N nodes among the M nodes, and evaluate the resource capability data fed back by the N nodes, so as to determine L nodes among the N nodes to perform consensus tasks , And feedback the information of executing the consensus task to the L nodes, 0 ⁇ L ⁇ N ⁇ M, M, N, L are all positive integers.
  • the blockchain consensus task coordination device provided by at least one embodiment of the present disclosure further includes a trust value management unit; the trust value management unit is configured to perform a trust value evaluation on each node performing the consensus task.
  • At least one embodiment of the present disclosure also provides a blockchain consensus task processing method.
  • the blockchain system includes M nodes.
  • the method is applicable to the first node among the M nodes in the blockchain system, and includes : Receive the first consensus task request corresponding to the first consensus task sent by the second node among the M nodes; determine whether to feed back the resource capability data of the first node to the block center processing unit for all The coordination of the first consensus task.
  • determining whether to feed back the resource capability data of the first node to the block center processing unit includes: The resource capability data determines whether the first consensus task can be executed; at least in the case that the first consensus task can be executed, the resource capability data of the first node is fed back to the block center processing unit.
  • the block chain consensus task processing method further includes: the first node receives feedback information from the block center processing unit, executes the first consensus task, and records the obtained The first consensus result corresponding to the first consensus task.
  • the blockchain consensus task processing method further includes: receiving a third of the M nodes when the first node executes or is to be executed.
  • the second consensus task request issued by the node determining that the second consensus task request issued by the third node corresponds to the first consensus task currently being executed or to be executed by the first node Priority of the task request; determining whether to respond to the second consensus task request based on the judgment result.
  • the method for processing a blockchain consensus task further includes: determining whether the time required for the first node to execute the first consensus task corresponds to the first request for executing the second consensus task. Second, the time required for the consensus task conflicts; if there is no conflict, it is determined that the priority of the first consensus task is higher than the second consensus task; otherwise, the second consensus task request is first responded to.
  • the block chain consensus task processing method in the case where it is determined based on the judgment result that the first node first responds to the second consensus task request, in response to the cancellation request, the first consensus task corresponding to the executed or to-be-executed first consensus task requests cancellation of the contract, so that the second consensus task corresponding to the second consensus task request is executed first.
  • the blockchain consensus task processing method further includes: determining whether the time required for the first node to execute the first consensus task corresponds to the request to execute the second consensus task Before the time required for the second consensus task conflicts, determine whether the first node can execute the second consensus task according to the resource capability data of the first node; at least before the second consensus task can be executed first In the case of, the first node feeds back its source capability data to the block center processing unit for the coordination of the first consensus task; after receiving the feedback information from the block center processing unit, the first node Perform the second consensus task.
  • the block chain consensus task processing method further includes: when the first node is selected as the accounting node, the first node creates a new block or executes a predetermined transaction.
  • the block chain consensus task processing method provided by at least one embodiment of the present disclosure further includes: structurally processing the first consensus task request.
  • the first consensus task request and the second consensus task request are consensus task requests corresponding to product quality certification.
  • At least one embodiment of the present disclosure also provides a blockchain node device.
  • the blockchain system includes M nodes.
  • the device is suitable for the first node among the M nodes in the blockchain system and includes: information A receiving unit and a feedback unit; the information receiving unit is configured to receive a first consensus task request corresponding to a first consensus task sent by a second node among the M nodes; the feedback unit is configured to determine whether to The block center processing unit feeds back the resource capability data of the first node; M is a positive integer.
  • the blockchain node device provided in at least one embodiment of the present disclosure further includes a state unit and an accounting unit; the state unit is configured to determine whether the first node can execute the first node based on the resource capability data of the first node.
  • a consensus task the accounting unit is configured to receive feedback information from the block center processing unit, execute the first consensus task, and record the obtained first consensus result corresponding to the first consensus task.
  • At least one embodiment of the present disclosure also provides a blockchain node device, including: a processor; a memory, storing one or more computer program modules, and the one or more computer program modules are configured to be run by the processor Execution, the one or more computer program modules include instructions for executing the blockchain consensus task coordination method provided by any embodiment of the present disclosure or the blockchain consensus task processing method provided by any embodiment of the present disclosure.
  • At least one embodiment of the present disclosure further provides a storage medium for non-transitory storage of computer-readable instructions, wherein when the non-transitory computer-readable instructions are executed by a computer, the Instructions for the blockchain consensus task coordination method or the blockchain consensus task processing method provided by any embodiment of the present disclosure.
  • At least one embodiment of the present disclosure further provides a blockchain system, including a plurality of blockchain node devices provided in any embodiment of the present disclosure.
  • the blockchain system provided by at least one embodiment of the present disclosure further includes a block center processing unit configured to receive resource capability data fed back by N nodes among the M nodes, and Evaluate the resource capability data fed back by the N nodes to determine L nodes among the N nodes to perform the consensus task, and feed back information on the execution of the consensus task to the L nodes, 0 ⁇ L ⁇ N ⁇ M, M, N, L are all positive integers.
  • FIG. 1A is a schematic diagram of a blockchain device provided by some embodiments of the present disclosure.
  • FIG. 1B is a network architecture of a blockchain-based product quality certification device provided by some embodiments of the present disclosure
  • FIG. 1C is a schematic block diagram of a computing device for managing product quality certification tasks based on blockchain according to some embodiments of the present disclosure
  • FIG. 1D is a flowchart of some examples of a blockchain consensus task coordination method provided by some embodiments of the present disclosure
  • FIG. 2 is a flowchart of an example of step S120 shown in FIG. 1D;
  • FIG. 3 is a flowchart of other examples of a blockchain consensus task coordination method provided by some embodiments of the present disclosure
  • FIG. 4 is a schematic block diagram of a block chain consensus task coordination device provided by some embodiments of the present disclosure.
  • FIG. 5 is a flowchart of some examples of a blockchain consensus task processing method provided by some embodiments of the present disclosure
  • FIG. 6 is a flowchart of an example of step S220 shown in FIG. 5;
  • FIG. 7 is a flowchart of other examples of a blockchain consensus task processing method provided by some embodiments of the present disclosure.
  • FIG. 8 is a flowchart of an example of step S250 shown in FIG. 7;
  • FIG. 9 is a flowchart of still other examples of a blockchain consensus task processing method provided by some embodiments of the present disclosure.
  • FIG. 10 is a schematic block diagram of a blockchain node device provided by some embodiments of the present disclosure.
  • FIG. 11 is a schematic block diagram of another blockchain node device provided by some embodiments of the present disclosure.
  • FIG. 12 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure.
  • FIG. 13 is a schematic block diagram of a blockchain system provided by some embodiments of the present disclosure.
  • Blockchain technology is a method of data storage, transmission and certification that is decentralized and resides in a distributed structure. Blocks can replace the current dependence of the Internet on central servers. For example, all data changes or transaction items can be recorded. On a cloud system, the self-certification of data in data transmission is theoretically realized.
  • Each block is a container data structure that is contained in the blockchain and aggregates data. It consists of a block header containing metadata and a long series of transaction data that form the main body of the block.
  • the block specifically includes: the block size field, usually 4 bytes; the block header field, usually 80 bytes; the transaction counter field, usually 1-9 bytes, which records the number of transactions; the transaction field, usually Variable length, record transaction details.
  • the block header consists of three sets of metadata.
  • the first set of metadata is a set of data referencing the hash value of the parent block. This set of metadata is used to connect the block with the previous block in the blockchain.
  • the second set of metadata includes difficulty, timestamp, and a number used once (Number used once, referred to as "Nonce" for short).
  • the third set of metadata is the Merkle number root (a data structure used to effectively summarize all transactions in the block).
  • the block header may include the following fields: (1) Version field, usually 4 bytes; (2) Parent block hash value field, usually 32 bytes, used to refer to the parent block in the blockchain (ie The hash value of the previous block); (3) Merkle root field, used to record the hash value of the Merkle tree root of the transaction in the block; (4) Timestamp field, usually 4 fields, used to identify the area The approximate time of block generation can be accurate to the second; (5)
  • the Nonce field is a counter (such as a random number) used for the proof of work algorithm.
  • Each block can refer to the previous block through the "parent block hash value field" of its block header.
  • the header of each block contains the hash value of its parent block.
  • each block has only one parent block, but there can be multiple child blocks temporarily. The occurrence of multiple sub-blocks in a block is called “blockchain bifurcation".
  • a blockchain fork indicates a temporary state, and eventually only one sub-block will become part of the blockchain.
  • the block chain is a data structure linked by blocks in an orderly manner from back to front, and each block points to the previous block. It can be stored as a file containing records of non-relative relationships or in a simple database. You can think of the blockchain as a stack.
  • the height of the blockchain indicates the distance between the block and the first block, and the top or top indicates the latest block.
  • Encrypting each block header (for example, Secure Hash Algorithm ("SHA")) can generate a hash value. Through this hash value, the corresponding block in the blockchain can be identified, that is, the hash value is used to construct a hash pointer. Accordingly, the blockchain can be regarded as a linked list using hash pointers.
  • SHA algorithms include SHA256 algorithm.
  • Blockchains can generally be divided into public chains, alliance chains, and private chains according to access rights.
  • Public chain refers to a blockchain that anyone can access and participate in consensus according to the agreement;
  • consortium chain refers to a blockchain whose consensus process is controlled by preselected nodes;
  • private chain refers to that all permissions are in an organization and are subject to Blockchain arbitrarily controlled by the organization.
  • the essence of proof of work is to add cost to information transmission, reduce the rate of information transmission, and add a random element to ensure that only one device can be authorized to broadcast information within a period of time.
  • This random element is for the device to calculate a random hash value.
  • the block device calculates a string of 64-bit random numbers and letters according to the obtained input data, but only the hash value that meets the requirements can be accepted by the blockchain network as a proof of work.
  • the block device obtains the accounting right corresponding to the task (transaction) of the consensus request, creates a new block and broadcasts the new block in the blockchain network, and other nodes verify and verify the new block. Add to their respective saved blockchains.
  • the hash algorithm of the workload proof also realizes the serialization of historical information by using the information in each new block as the input value of the next hash algorithm, forming a traceable chain (blockchain) .
  • Proof of equity is a consensus mechanism that requires nodes to provide proof of possession of a certain number of tokens to obtain the accounting authority of competing blockchains.
  • the share authorization certificate is similar to the voting mechanism of the board of directors.
  • Distributed consensus algorithms are based on traditional distributed consensus technologies and can be divided into: Byzantine fault-tolerant algorithms that solve the Byzantine Generals problem, such as the Practical Byzantine Fault Tolerance ("PBFT"); solve the non-Byzantine Generals problem Algorithm, for example, Raft algorithm.
  • PBFT Practical Byzantine Fault Tolerance
  • Raft algorithm for example, Raft algorithm.
  • the certificate of share authorization is also called the certificate of authorized rights and interests, and the certificate of authorized rights can solve the problems of the performance and energy consumption of the blockchain network.
  • the appointment of proof of rights uses the witness mechanism to solve the centralization problem. Due to the use of a decentralized voting mechanism, the appointment of proof of equity is more democratic than other consensus mechanisms. However, the delegated proof of stake does not completely remove the requirement for trust, so this method needs further optimization, such as optimizing the centralization problem to improve consensus efficiency.
  • a smart contract is a piece of executable code stored in a blockchain (such as a blockchain node in a blockchain network).
  • This executable code specifies the execution conditions and business processing logic of the smart contract, that is, it specifies The conditions for starting the smart contract and how to process the received business processing requests after the smart contract is started.
  • a smart contract is written by the user and published to the blockchain, it cannot be edited or modified.
  • the execution of smart contracts can be triggered based on events.
  • the execution of a smart contract will be recorded as a transaction on the blockchain and recorded in the blockchain.
  • the working process of a blockchain network can include the following seven processes: transaction generation, transaction broadcasting, node calculation, obtaining accounting rights, accounting rights broadcasting, receiving blocks, verifying blocks, and completing accounting.
  • the seven processes are described as follows:
  • Node calculation The node that receives the transaction information calculates through the consensus algorithm, and determines which node obtains the accounting right for the transaction information through the calculation result;
  • Obtaining the accounting right According to different consensus algorithms, one of the nodes will obtain the accounting right. For example, in the case of using PoW, the node that calculates the hash value that meets the requirements the fastest will obtain the accounting right;
  • Verify block The node that receives the broadcast information verifies the transaction information contained in the new block, and after confirming that it is valid, receives the block and links the new block at the end of the respective version of the blockchain;
  • this part of human work can be saved through the blockchain and the smart contract system derived from the blockchain.
  • a smart contract can be regarded as an automatic account.
  • the smart contract is executed to release and transfer the corresponding funds, and for example, it is necessary to create a block in the corresponding blockchain To record the transaction. Therefore, in view of the characteristics of the consensus task in this context, how to improve the efficiency of processing the consensus task corresponding to product quality certification in this context is an urgent problem to be solved.
  • the blockchain is used as a globally public ledger data structure, which contains blocks of several transactions.
  • the content of the blocks cannot be tampered with, so as to realize the proof of the existence of blockchain data, and with the help of intelligence
  • the contract can realize the management of product delivery, especially the openness, transparency, and automatic delivery of the product quality certification process, so as to better protect the interests of consumers.
  • each node providing product quality certification services executes a consensus algorithm to form a consensus
  • each node providing certification services performs consensus processing
  • the consensus processing for the same product quality certification task is not carried out at the same time, which makes the time points for each node to reach a consensus inconsistent, prolongs the time for the entire blockchain network to reach a consensus on the same transaction, and with other consensus
  • the arrival of tasks creates a large backlog of tasks at each node, resulting in a low efficiency of consensus processing
  • At least one embodiment of the present disclosure provides a blockchain consensus task coordination method.
  • a blockchain system (such as a blockchain network) includes M nodes, and the method includes: receiving resource capability data fed back by N nodes among the M nodes , Evaluate the resource capability data fed back by N nodes to determine L nodes among the N nodes to perform the consensus task, and feed back information for the execution of the consensus task to the L nodes, 0 ⁇ L ⁇ N ⁇ M, M, N, and L are all positive integers.
  • At least one embodiment of the present disclosure also provides a block chain consensus task coordination device, a block chain consensus task processing method, a block chain node device, a block chain system, and a storage medium corresponding to the aforementioned block chain consensus task coordination method .
  • the blockchain consensus task coordination method can evaluate the resource capacity data of nodes in the blockchain system, and select a group of nodes with a shorter completion time to perform the consensus task, thereby improving the processing capacity of the consensus task. Efficiency and flexibility.
  • the embodiments of the present disclosure have regard to the type of blockchain to be applied (e.g. public chain, private chain, alliance chain, etc.), the specific structure of the blocks in the blockchain (e.g. block header and block body), and the consensus adopted Mechanisms (such as PoW, PoS, DPoS, etc.) are not restricted.
  • the type of blockchain to be applied e.g. public chain, private chain, alliance chain, etc.
  • the specific structure of the blocks in the blockchain e.g. block header and block body
  • the consensus adopted Mechanisms such as PoW, PoS, DPoS, etc.
  • Figures 1A-1C are a device provided by some embodiments of the present disclosure that can implement the above-mentioned blockchain consensus task coordination method and blockchain consensus task processing method.
  • the blockchain device provided by some embodiments of the present disclosure will be exemplarily described below based on FIGS. 1A-1C.
  • FIG. 1A is a schematic block diagram of a blockchain device provided by some embodiments of the present disclosure.
  • the blockchain device 100 includes a blockchain processing device 101, a consensus task accepting device 102, an interactive device 103, and a client 104.
  • the interactive device 103 and the client 104 are connected through a wired or wireless connection.
  • the interactive device 103 can receive a transaction request from the client 104 for accounting for a transaction, and send the transaction information of the transaction (for example, through the blockchain processing device 101).
  • the interaction device 103 can (for example, through the blockchain processing device 101 or directly) the transaction processing results obtained from the blockchain network (that is, whether consensus is achieved and whether the corresponding block is created ) Feed back to the client 104, thereby confirming that the transaction is substantially completed.
  • the blockchain device 100 can be used to implement a blockchain product quality certification device in product quality certification (for example, product quality certification for liquid crystal display panels, organic light emitting diode display panels, etc.).
  • product quality certification for example, product quality certification for liquid crystal display panels, organic light emitting diode display panels, etc.
  • the product delivery client 104 is an example of the client 104.
  • the following uses the application of the blockchain device in the product quality certification process as an example for introduction, but the embodiment of the present disclosure does not make this limit.
  • the blockchain-based blockchain device (product quality certification device) 100 includes a blockchain node device (for example, includes a blockchain processing device 101, a consensus task accepting device 102, and an interactive device 103) And product delivery client 104.
  • the blockchain processing device 101 can be any trusted node that forms a peer-to-peer (P2P) network, or it can be a complete Any node on an open P2P network, the P2P network constitutes a blockchain network.
  • the blockchain processing device 101 can be deployed on a general-purpose computing device, such as a local area network, a wide area network, or a “cloud”. Each computing device is called a “node”.
  • the computing device can be an actual computing device or a virtual computing device. Machine waiting.
  • the consensus task accepting device 102 and the interaction device 103 and the blockchain processing device 101 can be integrated on the same device.
  • the integrated device is the aforementioned node, and this device can be called a blockchain node device at this time.
  • the blockchain node device includes a blockchain processing device 101, a consensus task accepting device 102, and an interactive device 103.
  • the interaction process between the blockchain processing device 101 and the consensus task accepting device 102 in the following processes, or the interaction process between the blockchain processing device 101 and the interactive device 103 can be regarded as an area.
  • the interaction process between the internal modules of the block chain node device for the convenience and brevity of description, in some embodiments of the present disclosure, the interaction process between the internal modules of the blockchain node device is not specifically described.
  • the consensus task accepting device 102 receives transaction information sent (broadcast) by other nodes in the blockchain system and the resulting consensus task.
  • the blockchain processing device 101 can be used to perform calculations based on the consensus task and the consensus algorithm adopted by the blockchain system after receiving the consensus task sent from the consensus task accepting device 102. If the node where the blockchain node device is located (the current node) obtains the accounting right through the calculation of the blockchain processing device 101, the blockchain processing device 101 will package the received transaction information to construct a new block, and Broadcast the new block to the blockchain system.
  • the consensus task accepting device 102 may instruct the blockchain processing device 101 to stop after receiving the information that other nodes have obtained the accounting right and the generated new block
  • the current consensus task is processed (for example, calculation), and the information contained in the corresponding new block is verified to determine whether to link the new block in the blockchain of the current node.
  • the blockchain processing device 101 may also broadcast a verification success message in the blockchain system.
  • the product delivery client 104 is used to receive product certification processing requests, such as functional testing, reliability testing, or packaging testing of product quality, and verify the product quality to determine whether it is qualified. If it is qualified, then A transaction is generated (for example, the corresponding smart contract is triggered to generate a transaction), and a transaction request corresponding to the transaction is sent to the interactive device 103.
  • product certification processing requests such as functional testing, reliability testing, or packaging testing of product quality
  • the product delivery client 104 when a manufacturer and a consumer (for example, the consumer may be a downstream manufacturer or a buyer who directly uses the product, etc.) performs product delivery through the product delivery client 104, the product delivery client 104 is the manufacturer Generate a pair of unique public and private keys with the consumer.
  • the public and private key generation process is as follows: The product delivery client 104 first generates a pair of random public and private keys, and then generates the public key or the public key. The address of is sent to the interactive device 103, and the interactive device 103 queries the blockchain processing device 101 whether the public key or address is unique. If the public key or address already exists in the blockchain processing device 101, the product is required to be delivered to the client 104 regenerate a pair of random public key and private key until it is confirmed that the public key or address is unique.
  • the interactive device 103 can also be used to query whether the transferor has the delivery certificate of the product to be transferred based on the product certification transaction identifier, so as to determine whether the transferor has the required delivery certificate based on the transferor's delivery certificate. The right to transfer.
  • the product delivery client 104 may allow consumers or manufacturers to issue product certification transactions through the product delivery client 104, and perform product certification transactions (for example, product performance, price, and settlement) verification, and the verification is successful After that, a certificate of delivery is issued to the consumer.
  • the certificate of delivery carries the key of the digital content, and the consumer uses this key to decrypt the relevant digital content.
  • the product certification transaction also includes creating smart contracts for product delivery, etc., and storing the smart contracts in the blockchain network through the blockchain processing device 101, for example, in one or more nodes in the blockchain network For example, the ID number of the smart contract (protecting the information of the storage node) is generated, so that when the conditions of the smart contract are met and triggered, the smart contract can be retrieved and executed through the ID number.
  • the product delivery client 104 is a client for product delivery management, and may be provided in the form of an application program (APP) or a software development kit (SDK), for example.
  • the APP can be a complete product delivery management software.
  • the APP can run on a variety of computing devices 101 and can directly interact with the consensus task accepting device 102 or the interactive device 103. These computing devices Including mobile phones, tablet computers, personal computers, laptops, servers, etc.
  • the SDK method can be integrated with third-party software, and provide rich functions together with third-party software.
  • the functions of the product delivery client 104 may include product registration management functions, product transfer management functions, product usage management functions, and so on.
  • the product delivery clients 104 installed by them may be the same, and corresponding functional modules can be called or activated as needed.
  • the product delivery client 104 may also only include one or more specific functions.
  • the versions of the product delivery client 104 installed by them may be different, and these versions include the corresponding need to call Or activated function module.
  • the system/network architecture of a blockchain-based product quality certification device includes multiple blockchain node devices, and each blockchain node device includes a blockchain processing device 101 , The consensus task accepting device 102 and the interactive device 103.
  • the blockchain processing devices 101 of each blockchain node device are connected to each other through a network (for example, the Internet), that is, they are all connected to the network so as to realize that all the blockchain processing devices are connected to each other, and respectively serve as nodes of the blockchain network.
  • the consensus task accepting device 102 and the interaction device 103 may be independent of the blockchain processing device 101, so the consensus task accepting device 102 and the interaction device 103 correspond to the blockchain processing device 101 respectively. .
  • FIG. 1C shows a schematic block diagram of a computing device for managing product quality certification tasks on the blockchain.
  • the blockchain processing device 101, the consensus task accepting device 102, the interaction device 103, and the product delivery client 104 in FIGS. 1A and 1B can all be implemented in the form of a computer device (or system) in FIG. 1C.
  • the device 300 for managing product quality certification on the blockchain includes a central processing unit (CPU) 301, which can be based on computer program instructions stored in a read-only memory (ROM) 302 or The computer program instructions loaded from the storage unit 308 into the random access memory (RAM) 303 perform various appropriate actions and processing.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required during the operation of the device 300 can also be stored.
  • the CPU 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304, and an input/output (I/O) interface 305 is also connected to the bus 304.
  • I/O input/output
  • the I/O interface 305 Multiple components in the data processing device 300 are connected to the I/O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; and a storage unit 308, such as a disk, Optical disc, etc.; and communication unit 309, such as network card, modem, wireless communication transceiver, etc.
  • the communication unit 309 allows the device 300 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks (for example, 3G/4G/5G mobile communication network, WIFI, Bluetooth, ZigBee, etc.).
  • the system/network architecture for the product quality certification device as shown in FIG. 1B can be various appropriate network modes, such as a trusted network or a public network.
  • the trusted network the blockchain processing device 101, the consensus task accepting device 102, and the interaction device 103 all require authentication. Only after the authentication is passed can they be added to the network.
  • the trusted network is equivalent to a semi-open network.
  • the blockchain processing device 101, the consensus task accepting device 102, and the interaction device 103 can be any computing device in the Internet, and this type of network is a completely public network.
  • FIG. 1D is a flowchart of an example of a blockchain consensus task coordination method provided by some embodiments of the present disclosure.
  • the method is executed by a blockchain consensus task coordination device in a blockchain system.
  • the blockchain system may be a blockchain system as shown in FIG. 1B.
  • the blockchain system includes M nodes, and each node includes, for example, a blockchain node device as shown in FIG. 1A.
  • the blockchain consensus task coordination method of some embodiments of the present disclosure may be implemented in software, loaded and executed by a processor in the blockchain, for example, loaded and executed by a blockchain processing device in the blockchain; or, It is at least partially implemented in software, hardware, firmware, or any combination thereof, which is not limited in the embodiments of the present disclosure.
  • the blockchain consensus task coordination method includes step S110 to step S120.
  • the blockchain consensus task coordination method further includes step S130.
  • the steps S110 to S130 of the blockchain consensus task coordination method and their respective exemplary implementation manners are respectively introduced below.
  • Step S110 Receive resource capability data fed back by N nodes among M nodes.
  • Step S120 Evaluate the resource capability data fed back by the N nodes to determine L nodes among the N nodes to perform the consensus task, and feed back information for performing the consensus task to the L nodes.
  • Step S130 Receive processing action parameters fed back by N nodes, and determine whether each of the N nodes performs a consensus task according to the processing action parameters of each of the N nodes.
  • the blockchain system includes a block central processing unit for executing the above steps of the blockchain consensus task coordination method provided by some embodiments of the present disclosure.
  • the block central processing unit may be located on any node of the blockchain system, which is not limited in the embodiment of the present disclosure.
  • each node in the blockchain system can be implemented as a software unit, a hardware unit, and any combination thereof, which is not limited in the embodiments of the present disclosure.
  • N nodes that can perform this type of consensus task are selected from the M nodes included in the blockchain system.
  • different or the same nodes can be selected from M nodes to execute the consensus tasks of transactions generated by different product quality certifications.
  • some nodes are used for the consensus tasks of transactions generated by product certification for functional testing, some nodes are used for consensus tasks for transactions generated by product certification for reliability testing, and some nodes are used for product certification generated by packaging testing.
  • Consensus tasks of transactions they are calculated according to the consensus tasks performed by the corresponding consensus algorithm, thereby determining the node that obtains the accounting right of the transaction corresponding to the consensus task, and the node that obtains the accounting right is in the block A new block is added to the chain.
  • the block center processing unit receives the resource capacity data of the N nodes that perform the consensus task in the blockchain system, so as to determine the resource capacity of each group of nodes according to the resource capacity data of each node.
  • the data is evaluated to select L nodes with a shorter time required to execute the consensus task to execute the consensus task, thereby improving the efficiency of the blockchain system in executing the consensus task.
  • the resource capability data of each node received by the block center processing unit may be fed back by the feedback unit of each node performing the consensus task.
  • the feedback unit will be described in detail below and will not be repeated here.
  • the resource capacity data includes time constraint information and storage capacity information.
  • the resource capability data of each node may be stored in the storage device of each node.
  • time constraint information can be expressed as:
  • DT j represents the time required for the jth node among the N nodes to perform the consensus task
  • ST j represents the start time of the jth node to perform the consensus task
  • ET j represents the end time of the jth node to perform the consensus task
  • Nt Represents N nodes at time t
  • j is an integer greater than 0 and less than or equal to N
  • t is a natural number greater than 0.
  • storage capacity information can be expressed as:
  • cssr j represents the storage capacity required by the j-th node among the N nodes to perform the consensus task, Indicates the remaining storage capacity of the j-th node after removing the storage capacity required to perform other consensus tasks, Indicates the maximum storage capacity of the jth node.
  • each node performing a consensus task can provide a state unit for computing resource capacity data, and the state unit can determine whether the consensus task can be performed based on the resource capacity data of each node.
  • the state unit can be realized by a central processing unit (CPU), a field programmable logic gate array (FPGA), or other forms of processing units with data processing capabilities and/or instruction execution capabilities and corresponding computer instructions.
  • the resource capacity data of each node can be determined in real time through the state unit, and the processing capacity of each node can be fed back to the block center processing unit through the feedback unit, thereby improving the blockchain system's ability to process consensus tasks. Flexibility and accuracy improve the processing efficiency of subsequent consensus tasks, and achieve accurate and efficient processing of consensus tasks.
  • step S120 the resource capability data fed back by the N nodes in step S110 are evaluated, so as to determine L nodes among the N nodes to perform the consensus task, and feed back information for performing the consensus task to the L nodes.
  • the L nodes After the L nodes receive the feedback information about the execution of the consensus task, they start to execute the consensus task, calculate according to the corresponding consensus algorithm, and determine which node obtains the accounting right for the transaction corresponding to the consensus task.
  • the node that obtains the accounting right may belong to the L nodes or not belong to the L nodes.
  • the N nodes can be divided into multiple groups, for example, H (H is an integer greater than 1) group, and each group includes multiple nodes that can perform the consensus task.
  • step S120 a group of nodes with the shortest execution time and a trust value greater than the standard trust value (for example, including L nodes) is selected from the H group of nodes to execute the consensus task, thereby improving the execution of the consensus task effectiveness.
  • the specific selection process can refer to the example shown in FIG. 2.
  • FIG. 2 is a flowchart of an example of step S120 shown in FIG. 1D.
  • the method for evaluating resource capability data fed back by N nodes includes step S121 to step S122.
  • the blockchain consensus task coordination method of the embodiment of the present disclosure will be described.
  • Step S121 Obtain the time value required by the N nodes to execute the consensus task and the trust value of the N nodes.
  • Step S122 Comprehensively consider the time value and trust value of the N nodes, and determine L nodes.
  • the block central processing unit determines the selection strategy of the L nodes that perform the consensus task may include two aspects: time value and trust value.
  • the trust value may indicate the reliability of N nodes in performing a consensus task, for example, it may be obtained through a trust value management unit. It should be noted that the trust value management unit will be described in detail below, and will not be repeated here.
  • the time value may be the end time parameter for each node to finish executing the current consensus task.
  • the time value of each node that does not need to perform the consensus task is recorded as 0, and the node that needs to perform the consensus task records the actual end time of the consensus task as the node The time value. That is, the time required for each node to complete an existing consensus task is calculated as the time value of the node.
  • the time value of a node that does not currently have a consensus task is recorded as 0, and a node that has a consensus task records the end time of the consensus task as The time value of the node, so that the end time for a group of nodes to execute the consensus task can be calculated as the time value of the group of nodes, and the time value of the H group of nodes can be sorted.
  • step S122 for example, among N nodes, the L nodes with the shortest completion time and the trust value of achieving the consensus task greater than the standard trust value of the consensus task are selected to execute the consensus task.
  • multiple groups of nodes whose trust values of each group of nodes are greater than the standard trust value are selected, and sorted according to the time value of the multiple groups of nodes.
  • a group of nodes with the smallest time value can be selected to perform the consensus task of product quality certification, that is, according to the completion time of the consensus task, the group of nodes that completed the consensus task earliest can be used, that is, from Among the N nodes that perform all the consensus tasks of product quality certification, select L nodes that have qualified trust values and can complete the consensus task of product quality certification earliest to perform the consensus task.
  • the comprehensive selection strategy of the block center processing unit can be expressed as:
  • EB r represents the evaluation criteria of each group of nodes that perform the consensus task
  • a i represents the time weight
  • a e represents the trust value weight
  • the feedback unit of each node obtains the processing action parameter of each node according to the resource capability data of each node.
  • the processing action parameters include whether each node can handle the consensus task and the processing opinions of each node.
  • the block center processing unit receives processing action parameters fed back by N nodes, and determines whether each of the N nodes performs a consensus task according to the processing action parameters of each of the N nodes.
  • the feedback unit of each node sends information about whether the node can process the consensus task (that is, processing action parameters) to the block center processing unit, and the block center processing unit sends feedback to the nodes that can perform the consensus task based on the feedback information Information to perform the consensus task (for example, functional test, reliability test or packaging test in product quality certification, etc.), so that each node performs the consensus task according to the information sent by the block center processing unit, and realizes the implementation of consensus on each node
  • the coordination of tasks ensures the orderliness and efficiency of the blockchain system.
  • FIG. 3 is a flowchart of other examples of a blockchain consensus task coordination method provided by some embodiments of the present disclosure.
  • the blockchain consensus task coordination method further includes step S140-step S170.
  • step S140-step S170 the blockchain consensus task coordination method provided by the embodiment of the present disclosure will be described.
  • Step S140 Receiving resource capability data of L nodes to determine whether other consensus tasks can be performed.
  • Step S150 Based on the priority of the current consensus task and other consensus tasks, it is determined whether the current consensus task needs to be cancelled with some of the L nodes.
  • Step S160 If the contract needs to be cancelled, send the contract cancellation application of the current consensus task request to the node that needs to cancel the contract.
  • Step S170 Re-evaluate the resource capability data fed back by other nodes among the M nodes except the node that needs to be terminated, so as to re-determine the node that performs the current consensus task among the M nodes.
  • step S140 for example, after determining the L nodes that perform the consensus task according to steps S121 and S122, the block center processing unit again receives the resource capability data of the L nodes fed back from the feedback unit of the L nodes to determine whether it can Performing other consensus tasks (the consensus task that arrives at the node later) is to perform constraint detection on each node again, that is, to detect time constraint information and storage capacity information.
  • step S150 for example, based on the priority of the current consensus task and other consensus tasks, it is determined whether it is necessary to cancel the current consensus task with some of the L nodes. If there is no conflict in the time of the multiple consensus tasks that each node needs to perform and the ability to complete it is ensured, a confirmation signal is sent to confirm that the node performs the multiple consensus tasks and a consensus task contract is established; otherwise, the block center processing unit sends the corresponding The node at, sends an instruction to remove the consensus task, that is, sends the cancellation request of the consensus task that needs to be cancelled to the corresponding node, that is, step S160 is executed.
  • step S170 for example, after the consensus task after contract cancellation becomes a dynamic task, re-evaluate the resource capacity data fed back by other nodes among the M nodes except the node that needs to be cancelled, so as to re-determine the execution of the current task among the M nodes.
  • the nodes of the consensus task that is, re-select a suitable group of nodes to execute the consensus task after the termination of the contract, which can improve the efficiency of the blockchain in processing the consensus task and avoid the accumulation of tasks.
  • the trust level of each node in the implementation of consensus tasks is inconsistent, especially when the blockchain system adopts the consensus mechanism of delegated equity proof.
  • the trust value of each node needs to be dynamically adjusted and evaluated to determine whether to select the node to perform the consensus task according to the size of the trust value of each node.
  • the blockchain consensus task coordination method further includes: performing trust value evaluation on each node performing the consensus task. For example, after the consensus task is completed, the block center processing unit can evaluate the trust value of each node based on the consensus result of each node and the mutual influence between each node, so as to adjust the trust value of each node. For example, a node with a greater trust value is more likely to be selected to perform a consensus task during the process of consensus task processing, and thus has a greater chance of obtaining accounting rights.
  • the trust value of each node is based on the expectations of the future behavior of other nodes based on the observation or collection of the node's past behavior. For example, after the conclusion of the consensus task of the t-th batch of product quality certification, the trust value evaluation of the consensus behavior of the response endpoint of the consensus task corresponding to the product quality certification should include three attributes (for example, accuracy attribute, timeliness attribute, resource Attributes). For example, the trust value evaluation of other nodes a to node b can be expressed as:
  • c represents the attributes of trust value evaluation, including accurate attributes, time-sensitive attributes, and resource attributes,
  • w(t) represents the weight of the attribute of node b at time t
  • the blockchain consensus task coordination method may include more or fewer operations, and these operations may be executed sequentially or in parallel.
  • the process of the blockchain consensus task coordination method described above includes multiple operations in a specific order, it should be clearly understood that the order of multiple operations is not limited.
  • the blockchain consensus task coordination method described above can be executed once or multiple times according to predetermined conditions.
  • the blockchain consensus task coordination method can evaluate the resource capacity data of nodes in the blockchain system, and select a group of nodes with a shorter completion time to perform the consensus task, thereby improving the processing capacity of the consensus task. Efficiency and flexibility.
  • Fig. 4 is a schematic block diagram of a block chain consensus task coordination device provided by some embodiments of the present disclosure.
  • the blockchain consensus task coordination device 1000 includes a block central processing unit 110.
  • the block center processing unit 110 is configured to receive resource capability data fed back by N nodes among the M nodes in the blockchain system, and evaluate the resource capability data fed back by the N nodes to determine among the N nodes L nodes perform consensus tasks, and feed back information on performing consensus tasks to L nodes.
  • the block central processing unit 110 can implement step S110 and step S120, and the specific implementation method can refer to the related description of step S110 and step S120, which will not be repeated here.
  • the block center processing unit provided by the embodiment of the present disclosure can coordinate the M nodes included in the blockchain system to determine the corresponding nodes (for example, L nodes) to execute the consensus task corresponding to each transaction (for example, product quality certification), And can dynamically update the priority of each consensus task, thus ensuring the rationality of the consensus task processing process, and differentiate the update speed of the consensus task, ensuring the orderly operation of the overall mechanism and improving The processing efficiency of consensus tasks is improved.
  • the blockchain consensus task coordination device 1000 further includes a trust value management unit 120.
  • the block central processing unit 110 and the trust value management unit 120 can be implemented in the form of hardware (for example, circuit) modules or software modules, and any combination thereof.
  • the trust value management unit 120 is configured to evaluate the trust value of each node performing the consensus task.
  • the trust value management unit 120 can implement the relevant steps of the trust value evaluation in the blockchain consensus task coordination method.
  • the specific implementation method please refer to the relevant description of the trust value evaluation in the blockchain consensus task coordination method. No longer.
  • the trust value management unit 120 can revise the trust value of each node that provides product quality certification services to ensure that the trust value of each node can be automatically adjusted, thereby improving the implementation of consensus by each node Task processing efficiency.
  • the blockchain consensus task coordination device 1000 may include more or fewer circuits or units, and the connection relationship between the circuits or units is not limited, and can be based on actual needs. Depends.
  • the specific structure of each circuit is not limited, and may be composed of analog devices according to the circuit principle, or may be composed of digital chips, or be composed in other suitable manners.
  • Some embodiments of the present disclosure also provide a blockchain consensus task processing method. Based on the blockchain consensus task coordination method, the block center processing unit feeds back information on the execution of the consensus task to the L nodes, and each node performs the consensus task Consensus processing to obtain consensus results.
  • FIG. 5 is a flowchart of some examples of a blockchain consensus task processing method provided by some embodiments of the disclosure.
  • “application-response-optimization” can be formed according to the response characteristics of each node (for example, automated detection equipment) in the blockchain system to the consensus task. Consensus mechanism.
  • the interaction process of each automated device (ie each node) in the blockchain system forms an optimized consensus mechanism for product certification.
  • the blockchain consensus task processing method is executed by the blockchain node device in the blockchain system.
  • the blockchain consensus task processing method includes step S210 to step S220, and in other examples, the blockchain consensus task processing method further includes step S230.
  • the steps S210 to S230 of the blockchain consensus task processing method and their respective exemplary implementation manners are respectively introduced below.
  • Step S210 Receive the first consensus task request corresponding to the first consensus task sent by the second node among the M nodes.
  • Step S220 Determine whether to feed back the resource capability data of the first node to the block center processing unit for the coordination of the first consensus task.
  • Step S230 The first node receives the feedback information of the block center processing unit, executes the first consensus task, and records the obtained first consensus result corresponding to the first consensus task.
  • the blockchain system includes M nodes, the above-mentioned blockchain consensus task processing method is applicable to any node among the M nodes, and the corresponding current node that executes the method is called the first node.
  • the M nodes in the blockchain system further include a second node and other nodes.
  • the second node is used to issue a first consensus task request corresponding to the first consensus task during operation.
  • the first consensus task corresponds to the second node broadcasting to the blockchain system
  • the first transaction For example, the first node receives the first consensus task request sent by the second node, and processes the first consensus task request. If it feeds back information to the block center processing unit to indicate that it can perform the first consensus task, it is receiving After the information that the first node can perform the first consensus task determined by the block center processing unit, the first consensus task is executed based on the first consensus task information sent by the block center processing unit.
  • the first consensus task request may include task specific information, required time, capacity, etc., which are not limited in the embodiment of the present disclosure.
  • step S220 for example, after the first node receives the first consensus task request sent by the second node, it determines whether to feed back the resource capability data of the first node to the block center processing unit through its feedback unit for the first consensus Coordination of tasks.
  • the specific judgment method is shown in Figure 6.
  • FIG. 6 is a flowchart of an example of step S220 shown in FIG. 5.
  • the method for the first node to determine whether to feed back the resource capability data of the first node to the block central processing unit includes steps S221 to S222.
  • the blockchain consensus task processing method of the embodiment of the present disclosure will be described.
  • Step S221 Determine whether the first consensus task can be executed according to the resource capability data of the first node.
  • Step S222 At least in the case where the first consensus task can be executed, the resource capability data of the first node is fed back to the block center processing unit.
  • the N nodes can determine whether they can perform the first consensus task. For example, if the above formula (1) and formula (2) are satisfied at the same time, the first node determines that it can perform the first consensus task; if not, the first node gives up executing the consensus.
  • the consensus task of the same level can be assigned in batches by the block center processing unit according to the priority of the consensus task, which can reduce the response of rejecting the consensus task The number of nodes can thereby reduce the number of times each node in the blockchain system negotiates whether to perform the consensus task and reduce communication costs.
  • the N nodes that can perform the first consensus task respectively feed back their resource capacity data to the block central processing unit. Therefore, the block center processing unit can determine L nodes among the N nodes to perform the first consensus task according to the resource capacity data they feed back, and feed back information for performing the first consensus task to the L nodes.
  • the first node may include a feedback unit that feeds back resource capacity data to the block central processing unit, and the feedback unit realizes the feedback of the first node information to the block central processing unit; for example, the central processing unit ( CPU), Field Programmable Logic Gate Array (FPGA), or other forms of processing units with data processing capabilities and/or instruction execution capabilities and corresponding computer instructions implement the feedback unit.
  • the central processing unit CPU
  • Field Programmable Logic Gate Array FPGA
  • the first node receives the feedback information of the block center processing unit, executes the first consensus task, and records the obtained first consensus result corresponding to the first consensus task.
  • the first consensus result is, for example, proof of workload, proof of rights, and witnesses (bookkeeping nodes) selected by voting.
  • the first node sends the first consensus result to the blockchain system according to the consensus algorithm adopted by the blockchain system. Therefore, the L nodes selected by the block central processing unit respectively execute the corresponding first consensus task according to the feedback information of the block central processing unit.
  • the blockchain system selects a billing node from the L nodes, and uses the billing node, for example, the blockchain processing device 101 shown in FIG.
  • the quality-certified transaction is packaged into a block, and the block is broadcast to all nodes in the blockchain system to link the block to the global blockchain.
  • the first node may include an accounting unit that records the first consensus result.
  • FIG. 7 is a flowchart of other examples of a blockchain consensus task processing method provided by some embodiments of the disclosure.
  • the blockchain consensus task processing method in this example is based on the block in the blockchain system.
  • the chain node device executes.
  • the blockchain consensus task processing method further includes step S240-step S260.
  • step S240-step S260 the blockchain consensus task processing method provided by the embodiment of the present disclosure will be described.
  • Step S240 In a situation where the first node executes or is to be executed the first consensus task, receive the second consensus task request sent by the third node among the M nodes.
  • Step S250 Determine the priority of the first consensus task request corresponding to the second consensus task request sent by the third node and the first consensus task currently being executed or to be executed by the first node.
  • Step S260 Determine whether to respond to the second consensus task request based on the judgment result.
  • the M nodes of the blockchain system further include a third node.
  • the third node issues a second consensus task request to the first node during operation, and the second consensus task request corresponds to the third node The second transaction broadcast to the blockchain system.
  • the blockchain system may also include a fourth node, a fifth node, etc., which correspond to nodes that issue other consensus task requests corresponding to other transactions.
  • the embodiments of the present disclosure do not limit this.
  • the second node that issued the first consensus task request and the third node that issued the second consensus task request may be the same node.
  • step S250 for example, the priorities of the first consensus task and the second consensus task are judged to determine whether the first node needs to terminate the contract with the first consensus task.
  • the specific judgment process is shown in FIG. 8.
  • FIG. 8 is a flowchart of an example of step S250 shown in FIG. 7.
  • the method of judging the priority of the first consensus task request corresponding to the first consensus task currently being executed or to be executed by the second consensus task request issued by the third node includes Step S251 to Step S253.
  • the blockchain consensus task processing method of the embodiment of the present disclosure will be described.
  • Step S251 Determine whether the time required by the first node to execute the first consensus task conflicts with the time required to execute the second consensus task corresponding to the second consensus task request; if so, proceed to step S252; if not, proceed to step S253.
  • Step S252 In response to the cancellation request, the first node cancels the first consensus task request corresponding to the first consensus task being executed or to be executed, and preferentially executes the second consensus task corresponding to the second consensus task request.
  • Step S253 It is determined that the priority of the first consensus task is higher than the second consensus task, that is, after the first node has executed the first consensus task, it will respond to the second consensus task request.
  • the first node evaluates the time required for each consensus task executed by it. That is, first, according to the above formula (1) and formula (2), the first node judges whether it can perform the first consensus task and the second consensus task. If it can, the first node calculates the resource time occupied by each consensus task and feeds it back to the block center processing unit, and then the block center processing unit calculates the process and time generated by the overall consensus task combination, and all its processes follow The overall time mechanism is sorted to determine the nodes with the least time required to execute the consensus task.
  • step S252 for example, after the first node receives the contract cancellation request sent by the block center processing unit, in response to the contract cancellation request, the first consensus task request corresponding to the first consensus task being executed or to be executed is cancelled, with priority Execute the second consensus task corresponding to the second consensus task request.
  • the block center processing unit re-determines the node that can execute the first consensus task request after the contract is terminated based on the received resource capacity data of each node.
  • the specific process can refer to step S170 in the blockchain consensus task coordination method shown in FIG. 3, which will not be repeated here.
  • the first node may respond to the second consensus task request to execute the second task request after executing the first consensus task.
  • FIG. 9 is a flowchart of further examples of a blockchain consensus task processing method provided by some embodiments of the present disclosure.
  • the blockchain consensus task processing method in this example is based on the block in the blockchain system.
  • the chain node device executes.
  • the blockchain consensus task processing method further includes step S270-step S290.
  • step S270-step S290 the blockchain consensus task processing method provided by the embodiment of the present disclosure will be described.
  • Step S270 Determine whether the second consensus task can be executed according to the resource capability data of the first node.
  • Step S280 At least in the case that the second consensus task can be executed, the resource capability data of the first node is fed back to the block center processing unit for the coordination of the first consensus task.
  • Step S290 After receiving the feedback information from the central processing unit of the block, execute the second consensus task.
  • step S270 for example, before judging whether the time required for the first node to execute the first consensus task conflicts with the time required to execute the second consensus task corresponding to the second consensus task request, the first node determines its own resource capacity Data to determine whether the second consensus task can be performed. For example, for the second consensus task, when the time constraint and storage capacity constraint of the first node both satisfy the above formula (1) and formula (2), the first node can execute the second consensus task.
  • the first node may feed back the resource capability data of the first node to the block center processing unit for coordination of the first consensus task.
  • the first node may feed back the resource capability data of the first node to the block center processing unit for coordination of the first consensus task.
  • the contract cancellation operation or not to perform the contract cancellation operation on the first consensus task refer to the blockchain consensus task processing method shown in FIG. 7 and FIG. 8 for details, which will not be repeated here.
  • step S290 for example, under the coordination of the block central processing unit, multiple nodes that can perform the second consensus task are re-determined, and information about the second consensus task is sent to multiple nodes that can perform the second consensus task Therefore, the multiple nodes perform the second consensus task after receiving the feedback information from the block center processing unit.
  • the above-mentioned first consensus task request is structured.
  • the above-mentioned second consensus task request or other various consensus task requests can also be structured, so as to transform the content of different consensus task requests into a unified form, realize unified information expression, and facilitate the blockchain The understanding of the consensus task information of each node.
  • an information receiving unit for receiving a consensus task request may be included, and through the information receiving unit, the second node among the M nodes can receive the first consensus task.
  • the information receiving unit can also be used to structure each consensus task request, which is not limited in the embodiment of the present disclosure.
  • information transmission between various nodes may be through wired transmission or wireless transmission, and may be through a computer network such as the Internet and/or various telecommunication networks (such as 3G/4G/5G mobile communication network, WIFI, Bluetooth, ZigBee, etc.) exchange information/data with other nodes, and the following embodiments are the same as this, and will not be repeated.
  • a computer network such as the Internet and/or various telecommunication networks (such as 3G/4G/5G mobile communication network, WIFI, Bluetooth, ZigBee, etc.) exchange information/data with other nodes, and the following embodiments are the same as this, and will not be repeated.
  • the first consensus task request and the second consensus task request are corresponding to the consensus task request for product quality certification of liquid crystal display panels, OLED display panels, etc.
  • the product quality certification task request is taken as an example to systematically explain the above-mentioned blockchain consensus task coordination method and blockchain consensus task processing method, which is not limited in the embodiments of the present disclosure.
  • a set of information models describing product quality certification tasks are preset in the M nodes included in the blockchain system to describe the content of the product quality certification tasks and structured.
  • the product quality certification task may include functional testing (for example, testing whether the display is clear, normal, no display, blurred, black, white, color dots, missing lines, vertical bars, etc.), reliability testing (for example, testing performance Whether it is dropped, constant temperature, high temperature operation, etc.) and packaging tests, etc., are used for quality certification of products submitted by users and produce quality certification results (ie transactions).
  • Table 1 shows a structured description of the product quality certification task.
  • the consensus task request corresponding to the above-mentioned product quality certification result can be issued by a certain node in the blockchain system (that is, the second node in the above method) in the order of priority, and after other nodes receive the consensus task request Perform corresponding operations (these nodes and the first node in the above method), and the block center processing unit in the blockchain system selects nodes according to the task classification descriptions fed back by each node.
  • each node may be each block chain node device shown in FIG. 1B, which may be connected through a computer network (such as a local area network, a wide area network, the Internet, etc.).
  • a computer network such as a local area network, a wide area network, the Internet, etc.
  • each node in the blockchain system performs constraint calculations based on its own resource capacity data to determine whether the node itself can handle the consensus task, that is, each node determines whether it can meet the above formula (1) and formula ( 2), N nodes satisfying the above formula (1) and formula (2) at the same time feedback their own resource capacity data to the block center processing unit, and the block center processing unit receives feedback from N nodes among the M nodes
  • the resource capability data is to evaluate the resource capability data fed back by the N nodes to determine L nodes among the N nodes to perform the consensus task, and to feed back information about the execution of the consensus task to the L nodes.
  • performing consensus tasks through the L nodes can reach a consensus in the shortest time, and the trust value is not lower than the standard trust value.
  • the specific selection process can refer to the blockchain consensus task coordination method provided by some embodiments of the present disclosure shown in FIG. 2 to FIG. 3, which will not be repeated here.
  • the block central processing unit can run at any node of the block chain system.
  • the block center processing unit performs constraint detection on the consensus task of each node again. If the consensus tasks corresponding to each product quality certification executed in sequence at the same stage do not conflict in time and have the ability to complete, the node sends a confirmation signal to the block center processing unit to confirm information; otherwise, the block center processing unit sends the first A node and a consensus task with a lower priority apply for cancellation of a contract to a node that needs to be cancelled, and the node that needs to cancel the contract removes the consensus task with a lower priority from its task list.
  • the first node selected through the above process receives the feedback consensus task information of the block center processing unit (for example, the above-mentioned structured information), executes the consensus task corresponding to product quality certification, and records the obtained consensus result.
  • the feedback consensus task information of the block center processing unit for example, the above-mentioned structured information
  • the trust value of each node is evaluated based on the consensus result of product quality certification and the mutual influence of each node, and the node with the greater trust value is processed in other consensus tasks In the process, the more likely it is to be selected to perform the consensus task, the more chance it is to obtain the right to bookkeeping.
  • the blockchain system reaches a consensus on the consensus task request for product quality certification, that is, after the accounting node is selected from the L nodes, it passes the block shown in Figure 1A through the accounting node.
  • the chain processing device 101 packages, for example, transaction transactions related to product quality certification into a block, broadcasts the block to all nodes in the blockchain system, and links the block to the global blockchain.
  • FIG. 10 is a schematic block diagram of a blockchain node device provided by some embodiments of the disclosure.
  • the blockchain node device 200 includes an information receiving unit 210 and a feedback unit 220.
  • these units may be implemented in the form of hardware (for example, circuit) modules, software modules, and any combination thereof.
  • the blockchain system includes M nodes, the blockchain node device is applicable to any node of the M nodes, and the current node corresponding to the blockchain node device is the first node.
  • the information receiving unit 210 may belong to the interaction device 103 in the blockchain device 100 shown in FIG. 1A to receive the second node of the M nodes in the blockchain system corresponding to the first consensus task.
  • the information receiving unit 210 can implement step S210, and the specific implementation method can refer to the related description of step S210, which will not be repeated here.
  • the information receiving unit 210 may also receive consensus task requests corresponding to other consensus tasks sent by other nodes, and perform structured processing on each consensus task request.
  • the information receiving unit provided by the embodiments of the present disclosure can clarify the prerequisite preparations required by the consensus task from the qualitative and quantitative aspects, and realize the description of any task, so that the consensus task can be processed before the consensus task is processed without affecting the processing efficiency Preprocessing to improve the processing efficiency of consensus tasks.
  • the feedback unit 220 may belong to the consensus task accepting device 103 in the blockchain device 100 shown in FIG. 1A, so as to be configured to determine whether to feed back the first node to the block center processing unit in the blockchain system.
  • Resource capacity data For example, the feedback unit 220 can implement step S220, and the specific implementation method can refer to the related description of step S220, which will not be repeated here.
  • the blockchain node device 200 further includes a state unit 230 and an accounting unit 240.
  • the state unit 230 may belong to the consensus task accepting device 103 in the blockchain device 100 shown in FIG. 1A, and is configured to determine whether the first consensus task can be executed according to the resource capability data of the first node.
  • the status unit 230 can implement step S230, and the specific implementation method can refer to the related description of step S230, which will not be repeated here.
  • the accounting unit 240 may belong to the blockchain processing device 101 in the blockchain device 100 shown in FIG. 1A, and is configured to receive feedback information from the block central processing unit 110, perform the first consensus task, and Record the first consensus achievement corresponding to the first consensus task obtained.
  • the blockchain node device may include more or fewer circuits or units, and the connection relationship between the various circuits or units is not limited, and may be determined according to actual requirements.
  • the specific structure of each circuit is not limited, and may be composed of analog devices according to the circuit principle, or may be composed of digital chips, or be composed in other suitable manners.
  • FIG. 11 is a schematic block diagram of another blockchain node device provided by some embodiments of the present disclosure.
  • the blockchain node device 3000 includes a processor 310, a memory 320, and one or more computer program modules 321.
  • the processor 310 and the memory 320 are connected through a bus system 330.
  • one or more computer program modules 321 are stored in the memory 320.
  • one or more computer program modules 321 include instructions for executing the blockchain consensus task coordination method provided by any embodiment of the present disclosure or instructions for the blockchain consensus task processing method provided by any embodiment of the present disclosure.
  • instructions in one or more computer program modules 321 may be executed by the processor 310.
  • the bus system 330 may be a commonly used serial or parallel communication bus, etc., which is not limited in the embodiments of the present disclosure.
  • the processor 310 may be a central processing unit (CPU), a field programmable logic gate array (FPGA), or another form of processing unit with data processing capability and/or instruction execution capability, and may be a general-purpose processor or a dedicated processing unit. It can also control other components in the blockchain node device 3000 to perform desired functions.
  • CPU central processing unit
  • FPGA field programmable logic gate array
  • the memory 320 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
  • the non-volatile memory may include read-only memory (ROM), hard disk, flash memory, etc., for example.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 310 may run the program instructions to implement the functions (implemented by the processor 210) and/or other desired functions in the embodiments of the present disclosure, For example, the blockchain consensus task coordination method.
  • the computer-readable storage medium may also store various application programs and various data, such as resource capability data and various data used and/or generated by the application programs.
  • the embodiments of the present disclosure do not provide all the constituent units of the blockchain node device 3000.
  • those skilled in the art can provide and set other unshown component units according to specific needs, which are not limited in the embodiments of the present disclosure.
  • FIG. 12 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure.
  • the storage medium 400 non-transitory stores computer-readable instructions 401.
  • the blockchain consensus task provided by any embodiment of the present disclosure can be executed. Coordination method or blockchain consensus task processing method.
  • the storage medium may be any combination of one or more computer-readable storage media.
  • one computer-readable storage medium contains the computer-readable program code of the blockchain consensus task coordination method, and another computer-readable storage medium The computer-readable program code containing the blockchain consensus task processing method.
  • the computer can execute the program code stored in the computer storage medium, and execute, for example, the blockchain consensus task coordination method or the blockchain consensus task processing method provided by any embodiment of the present disclosure .
  • the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), The portable compact disk read-only memory (CD-ROM), flash memory, or any combination of the above storage media can also be other suitable storage media.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • CD-ROM compact disk read-only memory
  • flash memory or any combination of the above storage media can also be other suitable storage media.
  • FIG. 13 is a schematic block diagram of a blockchain system provided by some embodiments of the present disclosure.
  • the blockchain system can be used to construct public chains, private chains, alliance chains, and the like.
  • automated product quality certification terminals can form a consortium chain, and each terminal providing certification services in the consortium chain forms a consensus on the behavior described by the smart contract and performs corresponding tasks.
  • the blockchain system 500 includes a plurality of blockchain node devices 510 provided in any embodiment of the present disclosure.
  • the blockchain node device may adopt the blockchain node device 200 shown in FIG. 10 or the blockchain node device 3000 shown in FIG. 11, which will not be repeated here.
  • the multiple blockchain node devices 510 are connected through a computer network (such as a local area network, a wide area network, the Internet, etc.).
  • the blockchain system 500 further includes a block central processing unit 520.
  • the block center processing unit 520 is configured to receive the resource capability data fed back by N nodes among the M nodes of the blockchain system 500, and evaluate the resource capability data fed back by the N nodes, so that the N nodes Determine L nodes to perform consensus tasks, and feed back information to L nodes to perform consensus tasks.
  • the block central processing unit 520 may adopt the block central processing unit 100 shown in FIG. 4, which will not be repeated here.

Abstract

一种区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质。该区块链系统包括M个节点,该区块链共识任务协调方法包括:接收M个节点中N个节点反馈的资源能力数据,对N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行共识任务的信息,0<L≤N≤M,M、N、L均为正整数。该区块链共识任务协调方法可以根据各个节点的资源能力数据对执行共识任务的节点进行协调,提高执行共识任务的灵活度和处理效率。

Description

区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质
本申请要求于2019年3月11日递交的中国专利申请第201910179834.6号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开的实施例涉及一种区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质。
背景技术
区块链(Block Chain)技术是近年来在信息技术领域出现的一种新兴技术。独特的去中心化、信息不可篡改、多节点集体维护性、公开性、隐私保护等属性,使得区块链技术在基于不可信的互联网中能够记录并提供可信的交易信息数据。
发明内容
本公开至少一实施例提供一种区块链共识任务协调方法,运行所述区块链共识任务协调方法的区块链系统包括M个节点,所述方法包括:接收所述M个节点中N个节点反馈的资源能力数据,对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行所述共识任务的信息,0<L≤N≤M,M、N、L均为正整数。
例如,本公开至少一实施例提供的区块链共识任务协调方法,还包括:接收所述N个节点反馈的处理动作参数,并且根据所述N个节点每个的处理动作参数确定所述N个节点每个是否执行所述共识任务。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,所述资源能力数据包括时间约束信息和存储容量信息。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,所述时间约束信息表示为:
ST j≤DT j≤ET j,1≤j≤N t
其中,DT j表示所述N个节点中第j个节点执行所述共识任务所需要的时间,ST j表示所述第j个节点执行所述共识任务的开始时间;ET j表示所述第j个节点执行所述共识任务的结束时间,Nt表示t时刻的所述N个节点,j为大于0且小于等于N的整数,t为大于0的自然数。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,所述存储容量信息表示为:
Figure PCTCN2020078692-appb-000001
其中,cssr j表示所述N个节点中第j个节点执行所述共识任务所需要的存储容量,
Figure PCTCN2020078692-appb-000002
表示所述第j个节点在除去执行其他共识任务所需要的存储容量后剩余的存储容量,
Figure PCTCN2020078692-appb-000003
表示所述第j个节点的最大存储容量。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,对所述N个节点反馈的资源能力数据进行评估包括:获取所述N个节点的执行所述共识任务所需要的时间值以及所述N个节点的信任值,其中,所述信任值表示所述N个节点执行所述共识任务的可靠度;综合考虑所述N个节点的时间值和信任值,确定所述L个节点。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,综合考虑所述N个节点的时间值和信任值,确定所述L个节点,包括:在所述N个节点中选取完成时间最短,且实现所述共识任务的信任值大于执行所述共识任务的标准信任值的L个节点,来执行所述共识任务。
例如,本公开至少一实施例提供的区块链共识任务协调方法,还包括:再次接收所述L个节点的资源能力数据以确定是否能够执行其他共识任务;基于当前共识任务与所述其他共识任务的优先级确定是否需要将所述当前共识任务与所述L个节点中的某些节点解约;如果需要解约,则发送所述当前共识任务请求的解约申请至需要解约的节点;重新对所述M个节点中除需要解约的节点之外的其他节点反馈的资源能力数据进行评估,以在所述M个节点中重新确定执行所述当前共识任务的节点。
例如,本公开至少一实施例提供的区块链共识任务协调方法,还包括:对执行所述共识任务的各个节点进行信任值评估。
例如,在本公开至少一实施例提供的区块链共识任务协调方法中,所述信任值评估表示为:
Figure PCTCN2020078692-appb-000004
其中,
Figure PCTCN2020078692-appb-000005
表示节点a对节点b的某个属性的信任值评估,
c表示信任值评估的属性,包括准确属性、时效属性、资源属性,
w(t)表示t时刻所述节点b的属性的权重,
Figure PCTCN2020078692-appb-000006
表示t时刻所述节点b的属性值。
本公开至少一实施例还提供一种区块链共识任务协调装置,区块链系统包括M个节点,所述区块链共识任务协调装置包括区块中心处理单元,所述区块中心处理单元配置为接收所述M个节点中的N个节点反馈的资源能力数据,并对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行共识任务的信息,0<L≤N≤M,M、N、L均为正整数。
例如,本公开至少一实施例提供的区块链共识任务协调装置,还包括信任值管理单元;所述信任值管理单元配置为对执行共识任务的所述各个节点进行信任值评估。
本公开至少一实施例还提供一种区块链共识任务处理方法,区块链系统包括M个节点,所述方法适用于所述区块链系统中M个节点中的第一节点,且包括:接收所述M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求;判断是否向区块中心处理单元反馈所述第一节点的资源能力数据,以用于所述第一共识任务的协调。
例如,在本公开至少一实施例提供的区块链共识任务处理方法中,判断是否向所述区块中心处理单元反馈所述第一节点的资源能力数据,包括:根据所述第一节点的资源能力数据,确定是否能够执行所述第一共识任务;至少在能够执行所述第一共识任务的情形,向所述区块中心处理单元反馈所述第一节点的资源能力数据。
例如,本公开至少一实施例提供的区块链共识任务处理方法,还包括:所述第一节点接收所述区块中心处理单元的反馈信息,执行所述第一共识任务,并记录获得的与所述第一共识任务对应的第一共识成果。
例如,本公开至少一实施例提供的区块链共识任务处理方法,还包括:在所述第一节点执行或待执行所述第一共识任务的情形,接收所述M个节点中的第三节点发出的第二共识任务请求;判断所述第三节点发出的所述第二共识任务请求与所述第一节点当前正在执行或待执行的所述第一共识任务对应的所述第一共识任务请求的优先级;基于判断结果确定是否对所述第二共识任务请求进行响应。
例如,本公开至少一实施例提供的区块链共识任务处理方法还包括:判断所述第一节点执行所述第一共识任务所需的时间是否与执行所述第二共识任务请求对应的第二共识任务所需的时间冲突;如果不冲突,则确定所述第一共识任务的优先级高于第二共识任务,否则,先对所述第二共识任务请求进行响应。
例如,在本公开至少一实施例提供的区块链共识任务处理方法中,在基于判断结果确定所述第一节点先对所述第二共识任务请求进行响应的情形,响应于解约申请对在执行或待执行的所述第一共识任务对应的所述第一共识任务请求进行解约,以优先执行与所述第二共识任务请求对应的第二共识任务。
例如,本公开至少一实施例提供的区块链共识任务处理方法,还包括:在判断所述第一节点执行所述第一共识任务所需的时间是否与执行所述第二共识任务请求对应的第二共识任务所需的时间冲突之前,根据所述第一节点的资源能力数据,确定所述第一节点是否能够执行所述第二共识任务;至少在能够先执行所述第二共识任务的情形,所述第一节点向所述区块中心处理单元反馈其源能力数据以用于第一共识任务协调;所述第一节点在接收所述区块中心处理单元的反馈信息后,再执行所述第二共识任务。
例如,本公开至少一实施例提供的区块链共识任务处理方法,还包括:当所述第一节点被选作记账节点后,所述第一节点创建新的区块或执行预定事务。
例如,本公开至少一实施例提供的区块链共识任务处理方法,还包括: 对所述第一共识任务请求进行结构化处理。
例如,在本公开至少一实施例提供的区块链共识任务处理方法中,所述第一共识任务请求和所述第二共识任务请求为对应于产品品质认证的共识任务请求。
本公开至少一实施例还提供一种区块链节点装置,区块链系统包括M个节点,所述装置适用于所述区块链系统中M个节点中的第一节点,且包括:信息接收单元和反馈单元;所述信息接收单元被配置为接收所述M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求;所述反馈单元被配置为判断是否向区块中心处理单元反馈所述第一节点的资源能力数据;M为正整数。
例如,在本公开至少一实施例提供的区块链节点装置,还包括状态单元和记账单元;所述状态单元配置为根据所述第一节点的资源能力数据,确定是否能够执行所述第一共识任务;所述记账单元配置为接收所述区块中心处理单元的反馈信息,执行所述第一共识任务,并记录获得的与所述第一共识任务对应的第一共识成果。
本公开至少一实施例还提供一种区块链节点装置,包括:处理器;存储器,存储有一个或多个计算机程序模块,所述一个或多个计算机程序模块被配置为由所述处理器执行,所述一个或多个计算机程序模块包括用于执行实现本公开任一实施例提供的区块链共识任务协调方法或本公开任一实施例提供的区块链共识任务处理方法的指令。
本公开至少一实施例还提供一种存储介质,非暂时性地存储计算机可读指令,其中,当所述非暂时性计算机可读指令由计算机执行时可以执行根据本公开任一实施例提供的区块链共识任务协调方法或本公开任一实施例提供的区块链共识任务处理方法的指令。
本公开至少一实施例还提供一种区块链系统,包括多个本公开任一实施例提供的区块链节点装置。
例如,本公开至少一实施例提供的区块链系统,还包括区块中心处理单元,所述区块中心处理单元配置为接收所述M个节点中的N个节点反馈的资源能力数据,并对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行共识任 务的信息,0<L≤N≤M,M、N、L均为正整数。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例的附图作简单地介绍,显而易见地,下面描述中的附图仅仅涉及本公开的一些实施例,而非对本公开的限制。
图1A为本公开一些实施例提供的一种区块链装置的示意图;
图1B为本公开一些实施例提供的一种基于区块链的产品品质认证装置的网络架构;
图1C为本公开一些实施例提供的一种基于区块链对产品品质认证任务进行管理的计算设备的示意性框图;
图1D为本公开一些实施例提供的一种区块链共识任务协调方法的一些示例的流程图;
图2为图1D中所示的步骤S120的一个示例的流程图;
图3为本公开一些实施例提供的一种区块链共识任务协调方法的另一些示例的流程图;
图4为本公开一些实施例提供的一种区块链共识任务协调装置的示意框图;
图5为本公开一些实施例提供的一种区块链共识任务处理方法的一些示例的流程图;
图6为图5中所示的步骤S220的一个示例的流程图;
图7为本公开一些实施例提供的一种区块链共识任务处理方法的另一些示例的流程图;
图8为图7中所示的步骤S250的一个示例的流程图;
图9为本公开一些实施例提供的一种区块链共识任务处理方法的又一些示例的流程图;
图10为本公开一些实施例提供的一种区块链节点装置的示意框图;
图11为本公开一些实施例提供的另一种区块链节点装置的示意框图;
图12为本公开一些实施例提供的一种存储介质的示意图;以及
图13为本公开一些实施例提供的一种区块链系统的示意框图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例的附图,对本公开实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于所描述的本公开的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
除非另外定义,本公开使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,“一个”、“一”或者“该”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。“上”、“下”、“左”、“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。
下面通过一些具体的实施例对本公开进行说明。为了保持本公开实施例的以下说明清楚且简明,可省略已知功能和已知部件的详细说明。当本公开实施例的任一部件在一个以上的附图中出现时,该部件在每个附图中由相同或类似的参考标号表示。
区块链技术是去中心化且寓于分布式结构的数据存储、传输和证明的方法,用区块(Block)可以取代目前互联网对中心服务器的依赖,例如可以使得所有数据变更或者交易项目都记录在一个云系统之上,理论上实现了数据传输中对数据的自我证明。
每个区块是一个被包含在区块链中聚合了数据的容器数据结构,它由一个包含元数据的区块头和紧跟其后的构成区块主体的一长串交易数据组成。区块具体包括:区块大小字段,通常为4个字节;区块头字段,通常为80个字节;交易计数器字段,一般为1-9个字节,记录交易数量;交易字段,通常为可变长度,记录交易详情。
区块头由三组元数据组成,第一组元数据是一组引用父区块哈希值的数据,这组元数据用于将该区块与区块链中的前一区块相连接。第二组元数据包括难度、时间戳和只是用一次的数字(Number used once,简称为“Nonce”)。第三组元数据是梅克尔(Merkle)数根(一种用来有效总结区块中所有交易的数据结构)。例如,区块头可以包括以下字段:(1)版本字段,通常为4字节;(2)父区块哈希值字段,通常为32字节,用于引用区块链中父区块(即前一区块)的哈希值;(3)Merkle根字段,用于记录该区块中交易的Merkle树根的哈希值;(4)时间戳字段,通常为4字段,用于标识区块产生的近似时间,可精确到秒;(5)Nonce字段,是用于工作量证明算法的计数器(例如一个随机数)。
每个区块都可以通过其区块头的“父区块哈希值字段”引用前一个区块。也就是说,每个区块头部包含它的父区块的哈希值。并且,每个区块只有一个父区块,但是可以临时有多个子区块。一个区块出现多个子区块的情况称为“区块链分叉”。区块链分叉指示一个暂时状态,最终只有一个子区块会成为区块链的一部分。
区块链是由区块从后向前有序链接起来的数据结构,每个区块都指向前一个区块。它可以被存储为一种包含非相对关系记录的文件,或是存储在一个简单的数据库中。可以将区块链看成一个堆栈,区块链高度就表示区块与首区块之间的距离,以及顶部或顶端表示最新的区块。对每个区块头进行加密(例如,安全哈希算法(Secure Hash Algorithm,简称为“SHA”)),可生成一个哈希值。通过这个哈希值可以识别区块链中的对应区块,也即该哈希值用于构建一个哈希指针,相应地,区块链可以看作一种使用哈希指针的链表。目前,常用的SHA算法包括SHA256算法。
区块链根据访问权限通常可以划分为公有链、联盟链和私有链。公有链是指任何人都可以根据协议接入并且参与共识的区块链;联盟链是指其共识过程受到预选节点控制的区块链;私有链是指所有权限都在一个组织中,并受该组织任意控制的区块链。
对于整个区块链网络,需要达到的目标是所有设备共同同意某一个信息并将它更新到总的共享账本中。为此,区块链网络中引入了共识机制。例如,共识机制中典型的算法包括工作量证明(Proof Of Work,简称“PoW”)、权 益证明(Proof Of Stake,简称“PoS”)、股份授权证明(Delegated Proof of Stake,简称“DPoS”)、分布式一致性算法,由此实现区块链的共识机制以及区块链网络中记账权的分配。
例如,工作量证明的本质是为信息传递加入成本,降低信息传输的速率,并加入一个随机元素保证一个时间段内只有一个设备可以有权进行信息广播。这个随机元素就是让设备去计算一个随机哈希值。具体就是区块设备根据获得的输入数据,计算得到一串64位的随机数字和字母的字符串,但只有得到满足要求的哈希值可以被区块链网络接受为工作量证明,由此该区块设备获得对应于进行共识请求的任务(交易)的记账权,创建新的区块并将该新的区块在区块链网络中广播,其他节点对该新的区块进行验证并添加到各自保存的区块链中。并且,工作量证明的哈希算法还通过将每一个新生区块中的信息作为下一次哈希算法的输入值的方式,实现了历史信息的串联,形成了可追溯的链条(区块链)。权益证明是要求节点提供拥有一定数量的代币证明来获取竞争区块链记账权限的共识机制。股份授权证明则类似于董事会投票机制。分布式一致性算法基于传统的分布式一致性技术,可以划分为:解决拜占庭将军问题的拜占庭容错算法,例如实用拜占庭容错算法(Practical Byzantine Fault Tolerance,简称“PBFT”);解决非拜占庭将军问题的算法,例如,Raft算法。
例如,股份授权证明又叫做委任权益证明,委任权益证明可以很好地解决区块链网络的性能和能耗的问题。委任权益证明使用见证人机制解决中心化问题。由于使用了去中心化的投票机制,委任权益证明相比其他的共识机制更加民主化。但是,委任权益证明并没有完全去除对于信任的要求,因此该方法还需要进一步优化,例如优化中心化问题,以提高共识效率。
智能合约是存储在区块链(例如区块链网络中某一区块链节点)中的一段可执行代码,这段可执行代码中规定了智能合约的执行条件以及业务处理逻辑,即规定了启动智能合约的条件以及在该智能合约启动后如何处理接收到的业务处理请求。通常,智能合约由用户编写好且发布到区块链之后,就无法再被编辑或者修改。例如,智能合约的执行操作可以根据事件进行触发。例如,智能合约的执行会在区块链上被记录为一个交易,并记录在区块链中。
综上所述,区块链网络的工作过程可以包括如下七个过程:交易产生、 交易广播、节点计算、获取记账权、记账权广播、接收区块、验证区块和完成记账。对这七个过程分别说明如下:
1)交易产生:用户(包括智能合约)在区块链网络的节点发出交易请求,产生新的交易;
2)交易广播:当一笔新的交易产生时,节点在区块链网络中广播该交易信息,区块链网络中的其它节点都会收到该交易信息;
3)节点计算:收到交易信息的节点通过共识算法进行计算,通过计算结果决定哪个节点获得针对该交易信息的有记账权;
4)获取记账权:根据不同的共识算法,其中一个节点将获取记账权,例如,在使用PoW的情况下,最快计算出满足要求的哈希值的节点将获取记账权;
5)记账权广播:获取记账权的节点,将该交易打包构建新的区块,然后把该新的区块广播给区块链网络中的所有节点;
6)验证区块:收到广播信息的节点对新的区块所包含的交易信息进行验证,确认有效后,接收该区块,在各自版本的区块链尾部链接该新的区块;
7)完成记账:在所有节点全部接受该新的区块后,实现了区块链的更新,区块链网络中的节点等待下一个交易的产生。
在制造业中,例如在液晶显示屏幕产业,对于量产的大量同质且具有唯一编码的显示屏幕来说,当显示屏幕需要得到双方、三方甚至多方认证时,产品交付后的对账结算需要大量的人力工作。例如,在本公开一些实施例中,可以通过区块链以及由区块链衍生的智能合约系统节省这部分人力工作。例如,智能合约可以看作是一个自动账户,当显示屏幕的产品交付满足特定条件时,智能合约被执行从而释放和转移相应的资金,并且由此例如需要在相应的区块链中创建区块以记录该交易。因此,针对该情境下共识任务的特点,如何提高该情境下处理对应于产品品质认证的共识任务的效率是亟需解决的问题。
在本公开的一些实施例中,区块链被作为一个全局公开的账本数据结构,包含着若干事务的区块,区块的内容无法被篡改,实现区块链数据存在性证明,并且借助智能合约,可以实现产品交付的管理尤其是产品品质认证过程的公开、透明、自动交付等,从而更好地维护消费者的利益。
然而,基于传统区块链技术的共识方法,存在诸多问题,这些问题例如包括:
(1)在自动化产品品质认证终端形成的区块链(例如,联盟链)网络中,各个提供产品品质认证服务的节点在执行共识算法以形成共识时,每个提供认证服务的节点执行共识处理的能力不一致,这样导致针对同一产品品质认证任务的共识处理不在同一时间进行,使得各个节点达成共识的时间点不一致,延长了整个区块链网络就同一交易达成共识的时间,且随着其他共识任务的到来,在各个节点形成大量的任务积压,从而导致共识处理的效率较低;
(2)由于实现智能合约的区块链技术是去中心化的,提高产品认证的信任度的同时,缺少中心资源的协调和任务调度,因此,会造成资源浪费,影响认证任务的时间进程;
(3)基于区块链技术对液晶显示屏进行产品品质认证的方法或系统,未对区块链所要处理的共识任务的配置项信息进行与实际的认证场景相匹配的结构化描述,从而无法适配该情境下的共识任务。
本公开至少一实施例提供一种区块链共识任务协调方法,区块链系统(例如区块链网络)包括M个节点,该方法包括:接收M个节点中N个节点反馈的资源能力数据,对N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行所述共识任务的信息,0<L≤N≤M,M、N、L均为正整数。
本公开至少一实施例还提供一种对应于上述区块链共识任务协调方法的区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质。
本公开上述实施例提供的区块链共识任务协调方法,可以对区块链系统中节点的资源能力数据进行评估,选取完成时间较短的一组节点执行共识任务,从而提高了处理共识任务的效率和灵活度。
本公开的实施例对于所应用的区块链的类型(例如公有链、私有链、联盟链等)、区块链中区块的具体构成(例如区块头与区块体)、所采用的共识机制(例如PoW、PoS、DPoS等)等不作限制。
下面结合附图对本公开的实施例及其示例进行详细说明。
图1A-图1C为本公开一些实施例提供的一种可以实现上述区块链共识任 务协调方法、区块链共识任务处理方法的装置。为了便于对方法的理解和说明,下面首先基于图1A-图1C对本公开一些实施例提供的区块链装置进行示例性说明。
图1A为本公开一些实施例提供的一种区块链装置的示意框图。例如,如图1A所示,该区块链装置100包括区块链处理装置101、共识任务受理装置102、交互装置103和客户端104。例如,交互装置103与客户端104通过有线或无线连接,交互装置103可以接收客户端104提出关于对交易进行记账的交易请求,并将该交易的交易信息(例如通过区块链处理装置101或直接)广播到区块链网络中,交互装置103可以将(例如通过区块链处理装置101或直接)从区块链网络获得的交易处理结果(即是否实现共识以及对应的区块是否创建)反馈给客户端104,由此确认交易实质上完成。
例如,该区块链装置100可以用于在产品品质认证(例如用于液晶显示面板、有机发光二极管显示面板等的产品品质认证)处理中实施区块链的产品品质认证装置。在该应用中,例如,产品交付客户端104为客户端104的一个示例,下面以将该区块链装置应用至该产品品质认证处理中为例进行介绍,但是本公开的实施例对此不作限制。
如图1A所示,该基于区块链的区块链装置(产品品质认证装置)100包括区块链节点装置(例如,包括区块链处理装置101、共识任务受理装置102和交互装置103)和产品交付客户端104。例如,对应于图1A所示的基于区块链的产品品质认证装置,区块链处理装置101可以是组成对等(Peer to Peer,简称P2P)网络上的任意可信节点,也可以是完全开放的P2P网络上的任意节点,该P2P网络构成区块链网络。区块链处理装置101可以部署在通用计算设备上,例如部署在局域网、广域网或“云”上,每个计算设备称为“节点”,该计算设备可以为实际的计算装置,也可以是虚拟机等。
例如,共识任务受理装置102和交互装置103与区块链处理装置101可以集成在同一个设备上,该集成设备就是上述节点,并且此时可以称这个装置为区块链节点装置。即在本公开的一些实施例中,区块链节点装置包括区块链处理装置101、共识任务受理装置102和交互装置103。在这种情况下,下面各个流程中关于区块链处理装置101和共识任务受理装置102之间的交互流程,或者区块链处理装置101和交互装置103之间的交互流程,可以看 作区块链节点装置内部模块之间的交互流程。为了描述方便与简洁,在本公开的一些实施例中,没有将区块链节点装置内部模块之间的交互流程具体描述出来。
共识任务受理装置102接收到区块链系统中其他节点发出(广播)的交易信息,以及由此产生的共识任务。区块链处理装置101可以用于在接收到来自共识任务受理装置102发送的共识任务后,可以根据该共识任务并且基于该区块链系统采用的共识算法进行计算。如果区块链节点装置所在的节点(当前节点)通过区块链处理装置101的计算获得了记账权,则区块链处理装置101将收到的交易信息打包以构建新的区块,并且将该新的区块向区块链系统中广播。或者,对于区块链处理装置101正在处理的共识任务,共识任务受理装置102收到其他节点已经获得记账权的信息以及所产生的新的区块,则可以指示区块链处理装置101停止当前共识任务的处理(例如计算),而对相应的新的区块中所包含的信息进行验证,以确定是否在当前节点的区块链中链接该新的区块。并且,区块链处理装置101还可以在区块链系统广播校验成功的信息。
例如,产品交付客户端104用于接收产品认证处理请求,例如,对产品品质的功能性检测、可靠性检测或包装测试等,对产品品质进行校验,以确定其是否合格,如果合格,则产生交易(例如,对应的智能合约被触发由此产生交易),并将对应于该交易的交易请求发送到交互装置103。
例如,在一些实施例中,厂家和消费者(例如,该消费者可以是下游厂家或直接使用该产品的买家等)通过产品交付客户端104进行产品交付时,产品交付客户端104为厂家和消费者产生一对唯一的公钥和私钥,该公钥和私钥产生过程如下:产品交付客户端104先产生一对随机的公钥和私钥,并把公钥或由公钥生成的地址发送给交互装置103,由交互装置103到区块链处理装置101中查询公钥或者地址是否唯一,如果区块链处理装置101中已存在该公钥或地址,则要求产品交付客户端104重新生成一对随机的公钥和私钥,直到确认公钥或者地址唯一。
例如,在产品转让的场景下,交互装置103还可以用于根据产品认证事务标识,查询转让人是否拥有该待转让的产品的交付证明,以根据转权人的交付证明,确定转让人拥有要转让的权利。
产品交付客户端104可以允许消费者或厂家通过产品交付客户端104发出关于产品认证的事务,并进行产品认证事务(例如,对产品的性能、价格以及结算等各方面)校验,校验成功后向消费者签发交付证明,交付证明中携带数字内容的密钥,消费者使用这个密钥来解密相关的数字内容。该产品认证事务还包括创建用于产品交付等的智能合约,并将智能合约通过区块链处理装置101存储在区块链网络中,例如存储在区块链网络中某一个或多个节点中,例如产生该智能合约的ID号(保护存储节点的信息),以便在该智能合约的条件满足而被触发时,可通过该ID号检索得到该智能合约并执行该智能合约。
产品交付客户端104是产品交付管理的客户端,例如可以以应用程序(APP)或者软件开发包(SDK)的方式提供。APP可以是一个完整的产品交付管理的软件,例如,如图1A所示,该APP可以运行在多种计算设备101中,可直接与共识任务受理装置102或者交互装置103等交互,这些计算设备包括移动电话、平板电脑、个人计算机、笔记本电脑、服务器等。SDK的方式可以集成在第三方软件上,通过和第三方软件共同提供丰富的功能。例如,产品交付客户端104的功能可以包括产品登记管理功能、产品转让管理功能、产品使用管理功能等。例如,对于消费者、厂家而言,他们安装的产品交付客户端104可以是相同的,根据需要调用或激活相应的功能模块。又例如,产品交付客户端104也可以只包括某一个或多个具体功能,对于消费者、厂家而言,他们安装的产品交付客户端104的版本可以不相同的,这些版本包括相应的需要调用或激活的功能模块即可。
如图1B所示,本公开一些实施例提供的基于区块链的产品品质认证装置的系统/网络架构包括多个区块链节点装置,每个区块链节点装置包括区块链处理装置101、共识任务受理装置102和交互装置103。每个区块链节点装置的区块链处理装置101通过网络(例如互联网)互相连接,即都连接到网络上从而实现所有的区块链处理装置相互连接,分别作为区块链网络的节点。如上所述,在一些实施例中,共识任务受理装置102和交互装置103可以分别独立于区块链处理装置101,因此共识任务受理装置102和交互装置103分别一一对应区块链处理装置101。
图1C示出了用于在区块链上对产品品质认证任务进行管理的计算设备 的示意性框图。图1A和图1B中的区块链处理装置101、共识任务受理装置102、交互装置103以及产品交付客户端104均可以以图1C中的计算机设备(或系统)的方式来实现。
从图1C中可以看出用于在区块链上对产品品质认证进行管理的设备300包括中央处理单元(CPU)301,其可以根据存储在只读存储器(ROM)302中的计算机程序指令或者从存储单元308加载到随机访问存储器(RAM)303中的计算机程序指令,来执行各种适当的动作和处理。在RAM 303中,还可存储设备300在操作过程中所需的各种程序和数据。CPU 301、ROM 302以及RAM 303通过总线304彼此相连,输入/输出(I/O)接口305也连接至总线304。
数据处理设备300中的多个部件连接至I/O接口305,包括:输入单元306,例如键盘、鼠标等;输出单元307,例如各种类型的显示器、扬声器等;存储单元308,例如磁盘、光盘等;以及通信单元309,例如网卡、调制解调器、无线通信收发机等。通信单元309允许设备300通过诸如因特网的计算机网络和/或各种电信网络(例如3G/4G/5G移动通信网、WIFI、蓝牙、ZigBee等)与其他设备交换信息/数据。
如图1B所示的例如用于产品品质认证装置的系统/网络架构可以为各种适当的网络模式,例如可以为受信网络或公开网络。在受信网络中,区块链处理装置101、共识任务受理装置102和交互装置103都是需要认证的,只有认证通过后,才能加入到网络中,受信网络相当于是一个半开放的网络。在公开网络中,区块链处理装置101、共识任务受理装置102和交互装置103可以是互联网中任意一个计算设备,该类网络是完全公开的网络。
图1D为本公开一些实施例提供的一种区块链共识任务协调方法的一个示例的流程图,该方法由区块链系统中的区块链共识任务协调装置执行。例如,该区块链系统可以是如图1B所示的区块链系统,例如,该区块链系统包括M个节点,每个节点例如包括如图1A所示的区块链节点装置。
本公开一些实施例的区块链共识任务协调方法可以以软件的方式实现,由区块链中的处理器加载并执行,例如由区块链中的区块链处理装置加载并执行;或,至少部分以软件、硬件、固件或其任意组合的方式实现,本公开的实施例对此不作限制。
下面,参考图1D对本公开一些实施例提供的区块链共识任务协调方法进行说明。如图1D所示,在一些示例中,该区块链共识任务协调方法包括步骤S110至步骤S120,在另一个些示例中,该区块链共识任务协调方法还包括步骤S130。下面对该区块链共识任务协调方法的步骤S110至步骤S130以及它们各自的示例性实现方式分别进行介绍。
步骤S110:接收M个节点中N个节点反馈的资源能力数据。
步骤S120:对N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行共识任务的信息。
步骤S130:接收N个节点反馈的处理动作参数,并且根据N个节点每个的处理动作参数确定N个节点每个是否执行共识任务。
这里,0<L≤N≤M,M、N、L均为正整数。
例如,在本公开的一些实施例中,区块链系统包括区块中心处理单元,用于执行本公开一些实施例提供的区块链共识任务协调方法的上述步骤。例如,该区块中心处理单元可以位于区块链系统的任何一个节点上,本公开的实施例对此不作限制。例如,区块链系统中的各个节点可以实现为软件单元、硬件单元及其任意组合,本公开的实施例对此不作限制。
对于步骤S110,例如,根据区块链系统要执行的共识任务,从区块链系统包括的M个节点中选取可以执行该类共识任务的N个节点。例如,在一些示例中,当该区块链系统应用于液晶显示屏的产品品质认证时,可以从M个节点中分别选取不同或相同的节点执行不同的产品品质认证所产生的交易的共识任务,例如,一部分节点用于功能检测的产品认证所产生的交易的共识任务,一部分节点用于可靠性检测的产品认证所产生的交易的共识任务,一部分节点用于包装检测的产品认证所产生的交易的共识任务,它们分别根据所执行的共识任务采用相应的共识算法进行计算,由此确定获得该共识任务所对应的交易的记账权的节点,由该获得记账权的节点在区块链中添加新的区块。
例如,在执行该共识任务时,区块中心处理单元接收区块链系统中执行该共识任务的N个节点的资源能力数据,从而根据该各个节点的资源能力数据,对各组节点的资源能力数据进行评估,以选取执行该共识任务所需的时间较短的L个节点执行该共识任务,从而提高区块链系统执行该共识任务的 效率。例如,区块中心处理单元接收的各个节点的资源能力数据可以由各个执行共识任务的节点的反馈单元反馈,该反馈单元将在下面进行详细地介绍,在此不再赘述。
例如,资源能力数据包括时间约束信息和存储容量信息。例如,各个节点的资源能力数据可以存储在各个节点的存储装置中。
例如,该时间约束信息可以表示为:
ST j≤DT j≤ET j,1≤j≤N t      (1)
其中,DT j表示N个节点中第j个节点执行共识任务所需要的时间,ST j表示第j个节点执行共识任务的开始时间;ET j表示第j个节点执行共识任务的结束时间,Nt表示t时刻的N个节点,j为大于0小于等于N的整数,t为大于0的自然数。
例如,存储容量信息可以表示为:
Figure PCTCN2020078692-appb-000007
其中,cssr j表示N个节点中第j个节点执行共识任务所需要的存储容量,
Figure PCTCN2020078692-appb-000008
表示第j个节点在除去执行其他共识任务所需要的存储容量后剩余的存储容量,
Figure PCTCN2020078692-appb-000009
表示第j个节点的最大存储容量。
例如,各个执行共识任务的节点可以提供计算资源能力数据的状态单元,该状态单元可以根据各个节点的资源能力数据,确定是否能够执行共识任务。例如,可以通过中央处理单元(CPU)、现场可编程逻辑门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元以及相应计算机指令来实现该状态单元。
在本公开的实施例中,通过该状态单元可以实时确定各个节点的资源能力数据,并通过反馈单元向区块中心处理单元反馈各个节点的处理能力,从而可以提高区块链系统处理共识任务的灵活度和精确度,提高了后续共识任务的处理效率,实现了准确、高效地处理共识任务。
对于步骤S120,对步骤S110中的N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行共识任务的信息。该L个节点收到反馈的执行共识任务的信息之后,开始执行共识任务,根据相应的共识算法进行计算,确定哪个节点获得针对该共识 任务所对应的交易的记账权。根据区块链系统所采用的不同的共识算法,该获得记账权的节点可以属于该L个节点或者不属于该L个节点。例如,可以将该N个节点分为多组,例如,H(H为大于1的整数)组,每组包括多个均可执行该共识任务的节点。
例如,在步骤S120中,从该H组节点中选取执行时间最短且信任值大于标准信任值的一组节点(例如,包括L个节点)用于执行该共识任务,从而可以提高共识任务的执行效率。例如,具体的选取过程可参考图2所示的示例。
图2为图1D中所示的步骤S120的一个示例的流程图。例如,在图2所示的示例中,对N个节点反馈的资源能力数据进行评估的方法包括步骤S121至步骤S122。下面,参考图2对本公开实施例的区块链共识任务协调方法进行说明。
步骤S121:获取N个节点的执行共识任务所需要的时间值以及N个节点的信任值。
步骤S122:综合考虑N个节点的时间值和信任值,确定L个节点。
对于步骤S121,例如,区块中心处理单元确定执行共识任务的L个节点的选择策略可以包括两个方面:时间值和信任值。
例如,该信任值可以表示N个节点执行共识任务的可靠度,例如,可以通过信任值管理单元获得。需要注意的是,该信任值管理单元将在下面进行详细地介绍,在此不再赘述。
例如,该时间值可以是各个节点执行完当前共识任务的结束时间参数。例如,在包括多个统一优先级的共识任务的情况下,各个节点中不需要执行共识任务的节点的时间值记作为0,需要执行共识任务的节点记录该共识任务实际结束的时间作为该节点的时间值。即,计算各个节点完成已有共识任务所需的时间作为该节点的时间值,例如,目前没有共识任务的节点的时间值记作0,已有共识任务的节点记录该共识任务的结束时间作为该节点的时间值,从而可以计算得到一组节点执行该共识任务的结束时间以作为该一组节点的时间值,并将H组节点的时间值进行排序。
对于步骤S122,例如,在N个节点中选取完成时间最短,且实现共识任务的信任值大于执行共识任务的标准信任值的L个节点,来执行共识任务。
例如,选取各组节点的信任值大于标准信任值的多组节点,并根据该多组节点的时间值进行排序。针对同一批次的产品品质认证的共识任务,可以选取时间值最小的一组节点执行产品品质认证的共识任务,即根据共识任务的完成时间,可以采用最早完成共识任务的一组节点,即从执行所有产品品质认证的共识任务的N个节点中,选择信任值合格且能够最早完成产品品质认证的共识任务的L个节点来执行共识任务。在本公开的一些实施例中,选取时间值较小的节点,即优先选取执行共识任务总数较少的节点,从而可以减小执行共识任务的时间,防止区块链系统中大量共识任务积压,提高区块链系统中执行共识任务的效率。
需要注意的是,不同共识任务的标准信任值不同,具体设置可视实际情况而定,本公开的实施例对此不作限制。
例如,在上述步骤S122中,区块中心处理单元的综合选取策略可以表示为:
EB r=a i×最小完成时间+a e×最低信任值
其中,EB r表示执行共识任务的各组节点的评价标准,a i表示时间权重,a e表示信任值权重。
对于步骤S130,各个节点的反馈单元根据各个节点的资源能力数据获取各个节点的处理动作参数。例如,该处理动作参数包括各个节点能否处理共识任务以及各个节点的处理意见等。例如,区块中心处理单元接收N个节点反馈的处理动作参数,并且根据N个节点每个的处理动作参数确定N个节点每个是否执行共识任务。
例如,各个节点的反馈单元向区块中心处理单元发送该节点能否处理该共识任务的信息(即处理动作参数),区块中心处理单元根据反馈的信息,向能够执行该共识任务的节点反馈执行该共识任务的信息(例如,产品品质认证中的功能性测试、可靠性测试或包装测试等),从而各个节点根据区块中心处理单元发出的信息执行共识任务,实现了对各个节点执行共识任务的协调,保证了区块链系统的有序性和高效性。
图3为本公开一些实施例提供的一种区块链共识任务协调方法的另一些示例的流程图。
例如,有时区块链系统中交易并发数量较高,导致在区块链系统中出现比较复杂的共识处理过程,在区块链系统中这些比较复杂的共识处理过程中,会同时存在多个共识任务。当出现优先级更高的共识任务时,且执行该优先级更高的共识任务所需要节点的资源被原来优先级较低的任务所占用时,需要对原来优先级较低的共识任务解约,然后在节点中添加该优先级较高的共识任务、删除队列里优先级较低的共识任务以及修改该优先级较低的共识任务的参数以及解约后的节点参数。例如,当该优先级较低的共识任务解约成为动态任务后,需要重新进行节点的选择。
如图3所示,在图1D所示的示例的基础上,该区块链共识任务协调方法还包括步骤S140-步骤S170。下面,参考图3对本公开实施例提供的区块链共识任务协调方法进行说明。
步骤S140:再次接收L个节点的资源能力数据以确定是否能够执行其他共识任务。
步骤S150:基于当前共识任务与其他共识任务的优先级确定是否需要将当前共识任务与L个节点中的某些节点解约。
步骤S160:如果需要解约,则发送当前共识任务请求的解约申请至需要解约的节点。
步骤S170:重新对M个节点中除需要解约的节点之外的其他节点反馈的资源能力数据进行评估,以在M个节点中重新确定执行当前共识任务的节点。
对于步骤S140,例如,根据步骤S121和步骤S122确定出执行共识任务的L个节点后,区块中心处理单元再次接收从L个节点的反馈单元反馈的L个节点的资源能力数据以确定是否能够执行其他共识任务(之后到达节点的共识任务),即对各个节点再次进行约束检测,即进行时间约束信息和存储容量信息的检测。
对于步骤S150,例如,基于当前共识任务与其他共识任务的优先级确定是否需要将当前共识任务与L个节点中的某些节点解约。如果各个节点需要执行的多个共识任务的时间没有冲突且确保有能力完成后,发送确认信号以确认该节点执行该多个共识任务,并建立共识任务合约;否则,区块中心处理单元向相应的节点发出去除共识任务的指令,即发送需要解约的共识任务的解约申请至相应的节点,即执行步骤S160。
对于步骤S170,例如,解约后的共识任务成为动态任务后,重新对M个节点中除需要解约的节点之外的其他节点反馈的资源能力数据进行评估,以在M个节点中重新确定执行当前共识任务的节点,即重新选择合适的一组节点来执行该解约后的共识任务,从而可以提高区块链处理共识任务的效率,避免任务堆积。
在区块链系统中,由于各个节点的资源能力数据、分布、自治的情况,导致各个节点执行共识任务的信任程度不一致,尤其是在区块链系统采用委任权益证明的共识机制下,因此在每次共识任务结束后,需要动态调整以及评估各个节点的信任值,以根据各个节点的信任值的大小确定是否选取该节点执行共识任务。
本公开一些实施例提供的区块链共识任务协调方法,还包括:对执行共识任务的各个节点进行信任值评估。例如,在共识任务完成后,区块中心处理单元可以基于各个节点的共识结果以及各个节点之间的相互影响对各个节点进行信任值评估,以对各个节点的信任值进行调整。例如,具有越大的信任值的节点在共识任务处理过程中越有可能被选取执行共识任务,从而越有机会获得记账权利。
例如,各个节点的信任值是基于其他节点对该节点过去行为观察或收集的信息,而作出的对其未来行为的期望。例如,在第t批次的产品品质认证的共识任务结束后,对产品品质认证对应的共识任务的应答端点的共识行为的信任值评估要包含三个属性(例如,准确属性、时效属性、资源属性)。例如,其他节点a对节点b的信任值评估可以表示为:
Figure PCTCN2020078692-appb-000010
其中,
Figure PCTCN2020078692-appb-000011
表示节点a对节点b的某个属性的信任值评估,
c表示信任值评估的属性,包括准确属性、时效属性、资源属性,
w(t)表示t时刻所述节点b的属性的权重,
Figure PCTCN2020078692-appb-000012
表示t时刻所述节点b的属性值。
需要说明的是,本公开的一些实施例提供的区块链共识任务协调方法可以包括更多或更少的操作,这些操作可以顺序执行或并行执行。虽然上文描 述的区块链共识任务协调方法的流程包括特定顺序出现的多个操作,但是应该清楚地了解,多个操作的顺序并不受限制。上文描述的区块链共识任务协调方法可以执行一次,也可以按照预定条件执行多次。
本公开上述实施例提供的区块链共识任务协调方法,可以对区块链系统中节点的资源能力数据进行评估,选取完成时间较短的一组节点执行共识任务,从而提高了处理共识任务的效率和灵活度。
图4为本公开一些实施例提供的一种区块链共识任务协调装置的示意框图。例如,在一些示例中,该区块链共识任务协调装置1000包括区块中心处理单元110。
该区块中心处理单元110配置为接收区块链系统中的M个节点中的N个节点反馈的资源能力数据,并对N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行共识任务的信息。例如,该区块中心处理单元110可以实现步骤S110和步骤S120,其具体实现方法可以参考步骤S110和步骤S120的相关描述,在此不再赘述。
本公开实施例提供的区块中心处理单元可以协调区块链系统包括的M个节点,以确定相应的节点(例如,L个节点)执行对应于各个交易(例如产品品质认证)的共识任务,并可以动态地更新各个共识任务的优先级,从而保证了共识任务处理过程的合理性,并对共识任务的优先级的更新速度进行了差异化处理,保证了整体机制运转的有序性,提高了共识任务的处理效率。
例如,在另一些示例中,该区块链共识任务协调装置1000还包括信任值管理单元120。例如,区块中心处理单元110和信任值管理单元120可以通过硬件(例如电路)模块或软件模块及其任意组合等形式实现。
该信任值管理单元120配置为对执行共识任务的各个节点进行信任值评估。例如,该信任值管理单元120可以实现区块链共识任务协调方法中关于信任值评估的相关步骤,其具体实现方法可以参考区块链共识任务协调方法中关于信任值评估的相关描述,在此不再赘述。
在本公开的实施例中,通过该信任值管理单元120可以对提供产品品质认证服务的各个节点的信任值进行修订,以确保各个节点的信任值可以自动进行调整,从而提高了各个节点执行共识任务的处理效率。
需要注意的是,本公开的实施例提供的区块链共识任务协调装置1000可 以包括更多或更少的电路或单元,并且各个电路或单元之间的连接关系不受限制,可以根据实际需求而定。各个电路的具体构成方式不受限制,可以根据电路原理由模拟器件构成,也可以由数字芯片构成,或者以其他适用的方式构成。
本公开的一些实施例提供的区块链共识任务协调装置1000的技术效果可以参考上述实施例中关于区块链共识任务协调方法的相应描述,这里不再赘述。
本公开一些实施例还提供一种区块链共识任务处理方法,基于区块链共识任务协调方法中区块中心处理单元向L个节点反馈的执行共识任务的信息,各个节点对该共识任务进行共识处理,以得到共识结果。
图5为本公开一些实施例提供的一种区块链共识任务处理方法的一些示例的流程图。例如,在本公开的实施例提供的区块链共识任务处理方法中,可以根据区块链系统中各个节点(例如,自动化检测设备)对共识任务的应答特点,形成“申请-应答-优化”的共识机制。在区块链系统(例如,产品认证联盟链系统)中的各自动化设备(即各个节点)的互动过程形成了产品认证的优化共识机制。
下面,参考图5对本公开一些实施例提供的区块链共识任务处理方法进行说明,该区块链共识任务处理方法系由区块链系统中的区块链节点装置执行。如图5所示,在一些示例中,该区块链共识任务处理方法包括步骤S210至步骤S220,在另一些示例中,该区块链共识任务处理方法还包括步骤S230。下面对该区块链共识任务处理方法的步骤S210至步骤S230以及它们各自的示例性实现方式分别进行介绍。
步骤S210:接收M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求。
步骤S220:判断是否向区块中心处理单元反馈第一节点的资源能力数据,以用于第一共识任务的协调。
步骤S230:第一节点接收区块中心处理单元的反馈信息,执行第一共识任务,并记录获得的与第一共识任务对应的第一共识成果。
例如,该区块链系统包括M个节点,上述区块链共识任务处理方法适用于M个节点中的任一节点,执行该方法的对应的当前节点被称为第一节点。
对于步骤S210,例如,该区块链系统中的M个节点中还包括第二节点以及其他节点。例如,第二节点在操作中用于发出与第一共识任务对应的第一共识任务请求,该方法中对于第二节点不作限制,该第一共识任务对应于第二节点向区块链系统广播第一交易。例如,第一节点接收第二节点发出的第一共识任务请求,该对第一共识任务请求进行处理,如果向区块中心处理单元反馈信息以表明自身能够执行该第一共识任务,则在收到区块中心处理单元确定的该第一节点可执行该第一共识任务的信息之后,基于该区块中心处理单元发出的第一共识任务的信息执行第一共识任务。例如,该第一共识任务请求可以包括任务的具体信息、所需时间以及容量大小等,本公开的实施例对此不作限制。
对于步骤S220,例如,第一节点接收到第二节点发出的第一共识任务请求后,判断是否通过其反馈单元向区块中心处理单元反馈第一节点的资源能力数据,以用于第一共识任务的协调。例如,具体的判断方法如图6所示。
图6为图5中所示的步骤S220的一个示例的流程图。例如,在图6所示的示例中,第一节点判断是否向区块中心处理单元反馈第一节点的资源能力数据的方法包括步骤S221至步骤S222。下面,参考图6对本公开实施例的区块链共识任务处理方法进行说明。
步骤S221:根据第一节点的资源能力数据,确定是否能够执行第一共识任务。
步骤S222:至少在能够执行第一共识任务的情形,向区块中心处理单元反馈第一节点的资源能力数据。
对于步骤S221,例如,在上述M个节点中,根据上述公式(1)和公式(2),N个节点可以确定自身是否能够执行第一共识任务。例如,如果同时满足上述公式(1)和公式(2),则第一节点确定自身能够执行第一共识任务;若不满足,则第一节点放弃执行共识。在本公开一些实施例提供的区块链共识任务处理方法中,可以依据共识任务的优先级,由区块中心处理单元将同一级别的共识任务进行成批次指派,可以减少拒绝共识任务的应答节点的数量,从而可以减少在区块链系统中各个节点协商是否执行该共识任务的次数,降低通信成本。
例如,对于步骤S122,该N个可以执行第一共识任务的节点,分别向区 块中心处理单元反馈其资源能力数据。从而,区块中心处理单元可以根据它们反馈的资源能力数据,在这N个节点中,确定出L个节点以执行第一共识任务,并向该L个节点反馈执行第一共识任务的信息。
例如,第一节点可以包括向区块中心处理单元反馈资源能力数据的反馈单元,并通过该反馈单元实现将第一节点信息向区块中心处理单元的反馈;例如,也可以通过中央处理单元(CPU)、现场可编程逻辑门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元以及相应计算机指令来实现该反馈单元。
对于步骤S230,第一节点接收区块中心处理单元的反馈信息,执行第一共识任务,并记录获得的与第一共识任务对应的第一共识成果。该第一共识成果例如为工作量证明、权益证明、投票选择出的见证人(记账节点)等。该第一节点根据区块链系统采用的共识算法向区块链系统发送该第一共识成果。因此,由区块中心处理单元选择的L个节点分别根据区块中心处理单元的反馈信息执行相应的第一共识任务。区块链系统根据L个节点的第一共识结果,在L个节点中选出记账节点后,通过该记账节点中的例如图1A中所示的区块链处理装置101将例如关于产品品质认证的交易事务打包成区块,并将该区块广播到区块链系统中的所有节点以将该区块链接到全局区块链中。
例如,第一节点可以包括记录第一共识结果的记账单元。
例如,在比较复杂的共识处理过程中,需要判断是否当前共识任务是否需要与第一节点解约。
图7为本公开一些实施例提供的一种区块链共识任务处理方法的另一些示例的流程图,同样,该示例中的区块链共识任务处理方法系由区块链系统中的区块链节点装置执行。如图7所示,该区块链共识任务处理方法还包括步骤S240-步骤S260。下面,参考图7对本公开实施例提供的区块链共识任务处理方法进行说明。
步骤S240:在第一节点执行或待执行第一共识任务的情形,接收M个节点中的第三节点发出的第二共识任务请求。
步骤S250:判断第三节点发出的第二共识任务请求与第一节点当前正在执行或待执行的第一共识任务对应的第一共识任务请求的优先级。
步骤S260:基于判断结果确定是否对第二共识任务请求进行响应。
对于步骤S240,例如,区块链系统的M个节点中还包括第三节点,该第三节点在操作中发出第二共识任务请求至第一节点,该第二共识任务请求对应于第三节点向区块链系统广播的第二交易。需要注意的是,区块链系统还可以包括第四节点、第五节点等,它们对应发出对应于其他交易的其他共识任务请求的节点,本公开的实施例对此不作限制,例如在一些实施例中,发出第一共识任务请求的第二节点与发出第二共识任务请求的第三节点可以是同一个节点。
对于步骤S250,例如,判断第一共识任务和第二共识任务的优先级以确定第一节点是否需要与第一共识任务解约,具体判断过程如图8所示。
图8为图7中所示的步骤S250的一个示例的流程图。例如,在图8所示的示例中,判断第三节点发出的第二共识任务请求与第一节点当前正在执行或待执行的第一共识任务对应的第一共识任务请求的优先级的方法包括步骤S251至步骤S253。下面,参考图8对本公开实施例的区块链共识任务处理方法进行说明。
步骤S251:判断第一节点执行第一共识任务所需的时间是否与执行第二共识任务请求对应的第二共识任务所需的时间冲突;如果是,则执行步骤S252;如果否,则执行步骤S253。
步骤S252:第一节点响应于解约申请对在执行或待执行的第一共识任务对应的第一共识任务请求进行解约,优先执行与第二共识任务请求对应的第二共识任务。
步骤S253:确定第一共识任务的优先级高于第二共识任务,即第一节点执行完第一共识任务后,再对第二共识任务请求进行响应。
对于步骤S251,例如,在判断解约过程开始前,第一节点对其执行的各个共识任务所需的时间进行评估。即,首先,根据上述公式(1)和公式(2),第一节点判断其是否能够执行第一共识任务和第二共识任务。如果能够,则第一节点计算各个共识任务占用的资源时间并将其反馈给区块中心处理单元,进而区块中心处理单元计算总体的共识任务组合产生的进程与时间,并将其所有进程按照整体时间机制进行排序,从而确定出执行共识任务所需时间最小的各个节点。如果第一节点执行第一共识任务所需的时间与执行第二共识任务请求对应的第二共识任务所需的时间不冲突,则不发生解约操作; 如果第一节点执行第一共识任务所需的时间与执行第二共识任务请求对应的第二共识任务所需的例如最小时间冲突,则产生解约操作。
对于步骤S252,例如,当第一节点接收到区块中心处理单元发送的解约申请后,响应于解约申请对在执行或待执行的第一共识任务对应的第一共识任务请求进行解约,并优先执行与第二共识任务请求对应的第二共识任务。例如,区块中心处理单元基于接收的各个节点的资源能力数据,重新确定可以执行解约后的第一共识任务请求的节点。例如,具体过程可以参考图3所示的区块链共识任务协调方法中的步骤S170,在此不再赘述。
对于步骤S253,例如,当不发生解约操作时,第一节点可以在执行完第一共识任务后,对第二共识任务请求进行响应以执行第二任务请求。
图9为本公开一些实施例提供的一种区块链共识任务处理方法的又一些示例的流程图,同样,该示例中的区块链共识任务处理方法系由区块链系统中的区块链节点装置执行。如图9所示,在图7所示的示例的基础上,该区块链共识任务处理方法还包括步骤S270-步骤S290。下面,参考图9对本公开实施例提供的区块链共识任务处理方法进行说明。
步骤S270:根据第一节点的资源能力数据,确定是否能够执行第二共识任务。
步骤S280:至少在能够执行第二共识任务的情形,向区块中心处理单元反馈第一节点的资源能力数据以用于第一共识任务协调。
步骤S290:在接收区块中心处理单元的反馈信息后,再执行第二共识任务。
对于步骤S270,例如,在判断第一节点执行第一共识任务所需的时间是否与执行第二共识任务请求对应的第二共识任务所需的时间冲突之前,第一节点根据其自身的资源能力数据,确定是否能够执行第二共识任务。例如,对于第二共识任务,当第一节点的时间约束和存储容量约束均分别满足上述公式(1)和公式(2)时,第一节点便可以执行第二共识任务。
对于步骤S280,例如,可以在第一节点能够执行第二共识任务的情形下,第一节点向区块中心处理单元反馈第一节点的资源能力数据以用于第一共识任务协调。例如,对第一共识任务进行解约操作或不进行解约操作等协调,具体可以参考图7和图8中所示的区块链共识任务处理方法,在此不再赘述。
对于步骤S290,例如,在区块中心处理单元的协调下,重新确定可以执行第二共识任务的多个节点,并将第二共识任务的相关信息发送至可以执行第二共识任务的多个节点,从而该多个节点在接收区块中心处理单元的反馈信息后,再执行第二共识任务。
例如,在本公开一些实施例提供的区块链共识任务处理方法中,对上述第一共识任务请求进行结构化处理。需要注意的是,还可以对上述第二共识任务请求或其他各个共识任务请求进行结构化处理,从而将不同共识任务请求的内容转变成统一的形式,实现统一信息表达,便于区块链中的各个节点的对共识任务信息的了解。
例如,在区块链系统的区块链节点装置中,可以包括用于接收共识任务请求的信息接收单元,并通过该信息接收单元接收M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求或其他节点发出的对应于其他共识任务的共识任务请求,并对各个共识任务请求进行结构化处理;例如,也可以通过中央处理单元(CPU)、现场可编程逻辑门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元以及相应计算机指令来实现该信息接收单元。例如,该信息接收单元还可以用于对各个共识任务请求进行结构化处理,本公开的实施例对此不作限制。
例如,在本公开一些实施例中,各个节点之间的信息传输可以通过有线传输或无线传输,可以通过诸如因特网的计算机网络和/或各种电信网络(例如3G/4G/5G移动通信网、WIFI、蓝牙、ZigBee等)与其他节点交换信息/数据,且以下实施例与此相同,不再赘述。
例如,在本公开的一些实施例中,第一共识任务请求和第二共识任务请求为对应于针对液晶显示面板、OLED显示面板等的产品品质认证的共识任务请求,且下面以液晶显示装置的产品品质认证任务请求为例对上述区块链共识任务协调方法和区块链共识任务处理方法进行系统的说明,本公开的实施例对此不作限制。
例如,首先,在区块链系统包括的M个节点预置了一套描述产品品质认证任务的信息模型,来描述产品品质认证任务的内容,并对其进行结构化处理。例如,该产品品质认证任务可以包括功能检测(例如,检测是否显示清晰、正常、无显示、花屏、黑屏、白屏、色点、缺行、竖条等)、可靠性测试 (例如,检测能否跌落、恒温、高温运行等)和包装测试等,用于对用户提交的产品进行品质认证,并产生品质认证结果(即交易)。
例如,表1示出了对该产品品质认证任务的结构化描述。
表1
Figure PCTCN2020078692-appb-000013
其次,例如,对应于上述产品品质认证结果的共识任务请求按照优先级顺序可由区块链系统中的某个节点(即上述方法中的第二节点)发出,其他节点接收到该共识任务请求之后进行相应的操作(这些节点及上述方法中的第一节点),区块链系统中的区块中心处理单元根据各个节点反馈的任务分类描述,进行节点选择。例如,该各个节点可以是图1B中所示的各个区块链节点装置,其可以通过计算机网络(例如局域网、广域网、互联网等)连接,具体可参考图1B中的描述,在此不再赘述。
例如,区块链系统中的各个节点基于其自身的资源能力数据进行约束计算,判断该节点本身能否处理该共识任务,即各个节点判断其自身能否同时满足上述公式(1)和公式(2),同时满足上述公式(1)和公式(2)的N个节点将其自身的资源能力数据反馈至区块中心处理单元,该区块中心处理单 元接收M个节点中N个节点反馈的资源能力数据,对该N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向该L个节点反馈执行共识任务的信息。例如,通过该L个节点执行共识任务可以通过最短的时间达成共识,且其信任值不低于标准信任值。例如,具体的选取过程可以参考图2-图3所示的本公开一些实施例提供的区块链共识任务协调方法,在此不再赘述。例如,该区块中心处理单元可以运行在该区块链系统的任一节点。
例如,当有对应于多个产品品质认证的共识任务需要执行时,在执行产品品质认证任务的节点在发出共识任务请求后,区块中心处理单元对各个节点的共识任务再次进行约束检测。如果同一阶段依次执行的对应于各个产品品质认证的共识任务在时间上没有冲突且有能力完成时,该节点向区块中心处理单元发送确认信号确认信息;否则,区块中心处理单元发送第一节点与优先级较低的共识任务的解约申请至需要解约的节点,该需要解约的节点从其任务列表中去除该优先级较低的共识任务。解约后的共识任务成为动态任务后,重新对N个节点中的其他节点反馈的资源能力数据进行评估,以在N个节点中重新确定L个节点以执行当前共识任务,即重新选择合适的一组合适的节点来执行该解约后的共识任务,从而可以提高区块链处理共识任务的效率,避免任务堆积。
例如,通过上述过程选取的第一节点接收区块中心处理单元的反馈共识任务的信息(例如,上述结构化后的信息),执行对应于产品品质认证的共识任务,并记录获得的共识成果。
例如,在对应于产品品质认证的共识任务完成后,基于产品品质认证的共识结果以及各个节点之间互相影响进行各个节点的信任值评估,具有越大的信任值的节点在其他的共识任务处理过程中越有可能被选取执行共识任务,从而越有机会获得记账权利。
最后,区块链系统在对产品品质认证的共识任务请求达成共识的情况下,即在L个节点中选出记账节点后,通过该记账节点中的例如图1A中所示的区块链处理装置101将例如关于产品品质认证的交易事务打包成区块,并将该区块广播到区块链系统中的所有节点以及将该区块链接到全局区块链中。
图10为本公开一些实施例提供的一种区块链节点装置的示意框图。例如, 在一些示例中,该区块链节点装置200包括信息接收单元210和反馈单元220。例如,这些单元可以通过硬件(例如电路)模块或软件模块及其任意组合等形式实现。
例如,在一些实施例中,区块链系统包括M个节点,该区块链节点装置适用于M个节点中的任一节点,且该区块链节点装置对应的当前节点为第一节点。
例如,该信息接收单元210可以属于图1A中所示的区块链装置100中的交互装置103,以接收区块链系统中的M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求。例如,该信息接收单元210可以实现步骤S210,其具体实现方法可以参考步骤S210的相关描述,在此不再赘述。
例如,该信息接收单元210还可以接收其他节点发出的对应于其他共识任务的共识任务请求,并对各个共识任务请求进行结构化处理。本公开实施例提供的信息接收单元,可以从定性和定量方面,明确共识任务所需要的前提准备,并且实现对任一任务的描述,从而可以在共识任务处理之前对共识任务进行不影响处理效率的预处理,以提高共识任务的处理效率。
例如,该反馈单元220可以属于图1A中所示的区块链装置100中的共识任务受理装置103,以被配置为判断是否向区块链系统中的区块中心处理单元反馈第一节点的资源能力数据。例如,该反馈单元220可以实现步骤S220,其具体实现方法可以参考步骤S220的相关描述,在此不再赘述。
例如,在另一些示例中,该区块链节点装置200还包括状态单元230和记账单元240。
例如,状态单元230可以属于图1A中所示的区块链装置100中的共识任务受理装置103,以配置为根据第一节点的资源能力数据,确定是否能够执行第一共识任务。例如,该状态单元230可以实现步骤S230,其具体实现方法可以参考步骤S230的相关描述,在此不再赘述。
例如,该记账单元240可以属于图1A中所示的区块链装置100中的区块链处理装置101,以配置为接收区块中心处理单元110的反馈信息,执行第一共识任务,并记录获得的与第一共识任务对应的第一共识成果。
需要注意的是,本公开的实施例提供的区块链节点装置可以包括更多或更少的电路或单元,并且各个电路或单元之间的连接关系不受限制,可以根 据实际需求而定。各个电路的具体构成方式不受限制,可以根据电路原理由模拟器件构成,也可以由数字芯片构成,或者以其他适用的方式构成。
图11为本公开一些实施例提供的另一种区块链节点装置的示意框图。如图11所示,该区块链节点装置3000包括处理器310、存储器320以及一个或多个计算机程序模块321。
例如,处理器310与存储器320通过总线系统330连接。例如,一个或多个计算机程序模块321被存储在存储器320中。例如,一个或多个计算机程序模块321包括用于执行本公开任一实施例提供的区块链共识任务协调方法的指令或本公开任一实施例提供的区块链共识任务处理方法的指令。例如,一个或多个计算机程序模块321中的指令可以由处理器310执行。例如,总线系统330可以是常用的串行、并行通信总线等,本公开的实施例对此不作限制。
例如,该处理器310可以是中央处理单元(CPU)、现场可编程逻辑门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元,可以为通用处理器或专用处理器,并且可以控制区块链节点装置3000中的其它组件以执行期望的功能。
存储器320可以包括一个或多个计算机程序产品,该计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。该易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。该非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器310可以运行该程序指令,以实现本公开实施例中(由处理器210实现)的功能以及/或者其它期望的功能,例如区块链共识任务协调方法等。在该计算机可读存储介质中还可以存储各种应用程序和各种数据,例如资源能力数据以及应用程序使用和/或产生的各种数据等。
需要说明的是,为表示清楚、简洁,本公开实施例并没有给出该区块链节点装置3000的全部组成单元。为实现区块链节点装置3000的必要功能,本领域技术人员可以根据具体需要提供、设置其他未示出的组成单元,本公开的实施例对此不作限制。
关于本公开一些实施例中的区块链节点装置3000的技术效果可以参考本 公开一些实施例提供的区块链共识任务协调方法或区块链共识任务处理方法的技术效果,这里不再赘述。
本公开的一些实施例还提供一种存储介质。图12为本公开一些实施例提供的一种存储介质的示意图。例如,该存储介质400非暂时性地存储计算机可读指令401,当非暂时性计算机可读指令401由计算机(包括处理器)执行时可以执行本公开任一实施例提供的区块链共识任务协调方法或区块链共识任务处理方法。
例如,该存储介质可以是一个或多个计算机可读存储介质的任意组合,例如一个计算机可读存储介质包含区块链共识任务协调方法的计算机可读的程序代码,另一个计算机可读存储介质包含区块链共识任务处理方法的计算机可读的程序代码。例如,当该程序代码由计算机读取时,计算机可以执行该计算机存储介质中存储的程序代码,执行例如本公开任一实施例提供的区块链共识任务协调方法或区块链共识任务处理方法。
例如,存储介质可以包括智能电话的存储卡、平板电脑的存储部件、个人计算机的硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、闪存、或者上述存储介质的任意组合,也可以为其他适用的存储介质。
本公开的实施例提供的存储介质的技术效果可以参考上述实施例中关于区块链共识任务协调方法或区块链共识任务处理方法的相应描述,这里不再赘述。
本公开一些实施例还提供一种区块链系统。图13为本公开一些实施例提供的一种区块链系统的示意框图,该区块链系统可以用于构建公有链、私有链、联盟链等。例如,自动化产品品质认证终端可以形成联盟链,该联盟链中各提供认证服务的终端对智能合约所描述的行为形成共识,执行相应的任务。如图13所示,在一些示例中,该区块链系统500包括多个本公开任一实施例提供的区块链节点装置510。例如,该区块链节点装置可以采用图10所示的区块链节点装置200或图11中所示的区块链节点装置3000,在此不再赘述。例如,如图1B所示,该多个区块链节点装置510之间通过计算机网络(例如局域网、广域网、互联网等)连接。
例如,在另一些示例中,区块链系统500还包括区块中心处理单元520。 例如,该区块中心处理单元520配置为接收区块链系统500的M个节点中的N个节点反馈的资源能力数据,并对N个节点反馈的资源能力数据进行评估,以在N个节点中确定L个节点以执行共识任务,并向L个节点反馈执行共识任务的信息。例如,区块中心处理单元520可以采用图4所示的区块中心处理单元100,在此不再赘述。
本公开的一些实施例提供的区块链系统500的技术效果可以参考上述实施例中关于区块链共识任务协调方法或区块链共识任务处理方法的相应描述,这里不再赘述。
有以下几点需要说明:
(1)本公开实施例附图只涉及到与本公开实施例涉及到的结构,其他结构可参考通常设计。
(2)在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合以得到新的实施例。
以上所述仅是本公开的示范性实施方式,而非用于限制本公开的保护范围,本公开的保护范围由所附的权利要求确定。

Claims (28)

  1. 一种区块链共识任务协调方法,运行所述区块链共识任务协调方法的区块链系统包括M个节点,所述方法包括:
    接收所述M个节点中N个节点反馈的资源能力数据,
    对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行所述共识任务的信息,
    其中,0<L≤N≤M,M、N、L均为正整数。
  2. 根据权利要求1所述的区块链共识任务协调方法,还包括:
    接收所述N个节点反馈的处理动作参数,并且根据所述N个节点每个的处理动作参数确定所述N个节点每个是否执行所述共识任务。
  3. 根据权利要求1或2所述的区块链共识任务协调方法,其中,所述资源能力数据包括时间约束信息和存储容量信息。
  4. 根据权利要求3所述的区块链共识任务协调方法,其中,所述时间约束信息表示为:
    ST j≤DT j≤ET j,1≤j≤N t
    其中,DT j表示所述N个节点中第j个节点执行所述共识任务所需要的时间,ST j表示所述第j个节点执行所述共识任务的开始时间;ET j表示所述第j个节点执行所述共识任务的结束时间,Nt表示t时刻的所述N个节点,j为大于0且小于等于N的整数,t为大于0的自然数。
  5. 根据权利要求3所述的区块链共识任务协调方法,其中,所述存储容量信息表示为:
    Figure PCTCN2020078692-appb-100001
    其中,cssr j表示所述N个节点中第j个节点执行所述共识任务所需要的存储容量,
    Figure PCTCN2020078692-appb-100002
    表示所述第j个节点在除去执行其他共识任务所需要的存储容量后剩余的存储容量,
    Figure PCTCN2020078692-appb-100003
    表示所述第j个节点的最大存储容量。
  6. 根据权利要求1-5任一所述的区块链共识任务协调方法,其中,对所述N个节点反馈的资源能力数据进行评估包括:
    获取所述N个节点的执行所述共识任务所需要的时间值以及所述N个节点的信任值,其中,所述信任值表示所述N个节点执行所述共识任务的可靠度;
    综合考虑所述N个节点的时间值和信任值,确定所述L个节点。
  7. 根据权利要求6所述的区块链共识任务协调方法,其中,综合考虑所述N个节点的时间值和信任值,确定所述L个节点,包括:
    在所述N个节点中选取完成时间最短,且实现所述共识任务的信任值大于执行所述共识任务的标准信任值的L个节点,来执行所述共识任务。
  8. 根据权利要求1-7任一所述的区块链共识任务协调方法,还包括:
    再次接收所述L个节点的资源能力数据以确定是否能够执行其他共识任务;
    基于当前共识任务与所述其他共识任务的优先级确定是否需要将所述当前共识任务与所述L个节点中的某些节点解约;
    如果需要解约,则发送所述当前共识任务请求的解约申请至需要解约的节点;
    重新对所述M个节点中的除需要解约的节点之外的其他节点反馈的资源能力数据进行评估,以在所述M个节点中重新确定执行所述当前共识任务的节点。
  9. 根据权利要求1-8任一所述的区块链共识任务协调方法,还包括:
    对执行所述共识任务的各个节点进行信任值评估。
  10. 根据权利要求9所述的区块链共识任务协调方法,其中,所述信任值评估表示为:
    Figure PCTCN2020078692-appb-100004
    其中,
    Figure PCTCN2020078692-appb-100005
    表示节点a对节点b的某个属性的信任值评估,
    c表示信任值评估的属性,包括准确属性、时效属性、资源属性,
    w(t)表示t时刻所述节点b的属性的权重,
    Figure PCTCN2020078692-appb-100006
    表示t时刻所述节点b的属性值。
  11. 一种区块链共识任务协调装置,区块链系统包括M个节点,所述区 块链共识任务协调装置包括区块中心处理单元,
    其中,所述区块中心处理单元配置为接收所述M个节点中的N个节点反馈的资源能力数据,并对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行共识任务的信息,
    其中,0<L≤N≤M,M、N、L均为正整数。
  12. 根据权利要求11所述的区块链共识任务协调装置,还包括信任值管理单元;
    其中,所述信任值管理单元配置为对执行共识任务的所述各个节点进行信任值评估。
  13. 一种区块链共识任务处理方法,区块链系统包括M个节点,所述方法适用于所述区块链系统中M个节点中的第一节点,且包括:
    接收所述M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求;
    判断是否向区块中心处理单元反馈所述第一节点的资源能力数据,以用于所述第一共识任务的协调。
  14. 根据权利要求13所述的区块链共识任务处理方法,其中,判断是否向所述区块中心处理单元反馈所述第一节点的资源能力数据,包括:
    根据所述第一节点的资源能力数据,确定是否能够执行所述第一共识任务;
    至少在能够执行所述第一共识任务的情形,向所述区块中心处理单元反馈所述第一节点的资源能力数据。
  15. 根据权利要求13所述的区块链共识任务处理方法,还包括:
    所述第一节点接收所述区块中心处理单元的反馈信息,执行所述第一共识任务,并记录获得的与所述第一共识任务对应的第一共识成果。
  16. 根据权利要求13所述的区块链共识任务处理方法,还包括:
    在所述第一节点执行或待执行所述第一共识任务的情形,接收所述M个节点中的第三节点发出的第二共识任务请求;
    判断所述第三节点发出的所述第二共识任务请求与所述第一节点当前正在执行或待执行的所述第一共识任务对应的所述第一共识任务请求的优先 级;
    基于判断结果确定是否对所述第二共识任务请求进行响应。
  17. 根据权利要求16所述的区块链共识任务处理方法,还包括:
    判断所述第一节点执行所述第一共识任务所需的时间是否与执行所述第二共识任务请求对应的第二共识任务所需的时间冲突;
    如果不冲突,则确定所述第一共识任务的优先级高于所述第二共识任务,否则,先对所述第二共识任务请求进行响应。
  18. 根据权利要求17所述的区块链共识任务处理方法,其中,在基于判断结果确定所述第一节点先对所述第二共识任务请求进行响应的情形,响应于解约申请对在执行或待执行的所述第一共识任务对应的所述第一共识任务请求进行解约,以优先执行与所述第二共识任务请求对应的第二共识任务。
  19. 根据权利要求17或18所述的区块链共识任务处理方法,还包括:
    在判断所述第一节点执行所述第一共识任务所需的时间是否与执行所述第二共识任务请求对应的第二共识任务所需的时间冲突之前,根据所述第一节点的资源能力数据,确定所述第一节点是否能够执行所述第二共识任务;
    至少在能够先执行所述第二共识任务的情形,所述第一节点向所述区块中心处理单元反馈其资源能力数据以用于第一共识任务协调;
    所述第一节点在接收所述区块中心处理单元的反馈信息后,再执行所述第二共识任务。
  20. 根据权利要求13-17任一所述的区块链共识任务处理方法,还包括:
    当所述第一节点被选作记账节点后,所述第一节点创建新的区块或执行预定事务。
  21. 根据权利要求13-17任一所述的区块链共识任务处理方法,还包括:
    对所述第一共识任务请求进行结构化处理。
  22. 根据权利要求16或17所述的区块链共识任务处理方法,其中,所述第一共识任务请求和所述第二共识任务请求为对应于产品品质认证的共识任务请求。
  23. 一种区块链节点装置,区块链系统包括M个节点,所述装置适用于所述区块链系统中M个节点中的第一节点,且包括:信息接收单元和反馈单元,
    其中,所述信息接收单元被配置为接收所述M个节点中的第二节点发出的与第一共识任务对应的第一共识任务请求;
    所述反馈单元被配置为判断是否向区块中心处理单元反馈所述第一节点的资源能力数据;
    其中,M为正整数。
  24. 根据权利要求23所述的区块链节点装置,还包括状态单元和记账单元;其中,
    所述状态单元配置为根据所述第一节点的资源能力数据,确定是否能够执行所述第一共识任务;
    所述记账单元配置为接收所述区块中心处理单元的反馈信息,执行所述第一共识任务,并记录获得的与所述第一共识任务对应的第一共识成果。
  25. 一种区块链节点装置,包括:
    处理器;
    存储器,存储有一个或多个计算机程序模块,其中,
    所述一个或多个计算机程序模块被配置为由所述处理器执行,所述一个或多个计算机程序模块包括用于执行实现权利要求1-10任一所述的区块链共识任务协调方法或权利要求13-22任一所述的区块链共识任务处理方法的指令。
  26. 一种存储介质,非暂时性地存储计算机可读指令,其中,当所述非暂时性计算机可读指令由计算机执行时可以执行根据权利要求1-10任一所述的区块链共识任务协调方法或权利要求13-22任一所述的区块链共识任务处理方法的指令。
  27. 一种区块链系统,包括多个权利要求23-25任一所述的区块链节点装置。
  28. 根据权利要求27所述的区块链系统,还包括区块中心处理单元,其中,
    所述区块中心处理单元配置为接收所述M个节点中的N个节点反馈的资源能力数据,并对所述N个节点反馈的资源能力数据进行评估,以在所述N个节点中确定L个节点以执行共识任务,并向所述L个节点反馈执行共识任务的信息,
    其中,0<L≤N≤M,M、N、L均为正整数。
PCT/CN2020/078692 2019-03-11 2020-03-11 区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质 WO2020182134A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910179834.6 2019-03-11
CN201910179834.6A CN109871279B (zh) 2019-03-11 2019-03-11 共识任务协调方法及装置、区块链系统、存储介质

Publications (1)

Publication Number Publication Date
WO2020182134A1 true WO2020182134A1 (zh) 2020-09-17

Family

ID=66920130

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078692 WO2020182134A1 (zh) 2019-03-11 2020-03-11 区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质

Country Status (2)

Country Link
CN (1) CN109871279B (zh)
WO (1) WO2020182134A1 (zh)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132579A (zh) * 2020-09-30 2020-12-25 深圳前海微众银行股份有限公司 一种区块链共识节点更新方法及装置
CN112364317A (zh) * 2020-11-17 2021-02-12 中国传媒大学 一种基于区块链技术的物联网雾环境管理架构及方法
CN112437049A (zh) * 2020-11-06 2021-03-02 深圳前海微众银行股份有限公司 一种基于bft的区块链共识方法及装置
CN112532713A (zh) * 2020-11-25 2021-03-19 深圳前海微众银行股份有限公司 一种区块链的抗分叉检测方法及装置
CN112735551A (zh) * 2021-01-15 2021-04-30 山东科技大学 基于H-Algorand共识机制的医疗记录存储共享模型及其实现方法
CN112764897A (zh) * 2020-12-31 2021-05-07 杭州趣链科技有限公司 任务请求的处理方法、装置、系统及计算机可读存储介质
CN112887391A (zh) * 2021-01-21 2021-06-01 北京工业大学 一种基于贡献值的高可靠性区块链共识方法及系统
CN113301117A (zh) * 2021-04-21 2021-08-24 广东电网有限责任公司 节点加入共识及退出共识方法、装置、计算机设备
CN113610660A (zh) * 2021-07-01 2021-11-05 国网浙江宁海县供电有限公司 基于区块链的电力系统结算方法及相关装置
CN113987017A (zh) * 2021-10-26 2022-01-28 北京华宜信科技有限公司 基于区块链的科技成果评估服务网络平台构建方法
US20220318122A1 (en) * 2021-04-05 2022-10-06 Mastercard International Incorporated Method and system for blockchain performance testing
CN115577983A (zh) * 2022-11-24 2023-01-06 神华上航疏浚有限责任公司 基于区块链的企业任务匹配方法、服务器及存储介质
CN116151826A (zh) * 2023-04-04 2023-05-23 广东电力交易中心有限责任公司 一种高效可靠的基于区块链的电力交易终端信任管理方法

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871279B (zh) * 2019-03-11 2021-10-01 京东方科技集团股份有限公司 共识任务协调方法及装置、区块链系统、存储介质
CN110427763B (zh) * 2019-07-24 2021-07-23 上海朝夕网络技术有限公司 一种基于预定义执行代码的分布式系统的共识方法
CN110825810B (zh) * 2019-10-28 2023-05-19 天津理工大学 一种基于区块链的群智感知双重隐私保护方法
CN110933627B (zh) * 2019-11-15 2021-04-27 北京三快在线科技有限公司 业务处理方法、装置、设备及存储介质
CN111245886B (zh) * 2019-11-29 2022-06-17 武汉烽火信息集成技术有限公司 一种基于区块链的多方协作系统、方法及存储介质
CN111416843A (zh) * 2020-03-06 2020-07-14 厦门区块链云科技有限公司 一种区块链社群超级节点竞选方法
CN113256426B (zh) * 2020-05-29 2023-08-04 支付宝(杭州)信息技术有限公司 一种数据处理方法、装置、设备及介质
CN112003903A (zh) * 2020-07-29 2020-11-27 北京小米松果电子有限公司 一种集群任务调度方法、装置及存储介质
CN112020018B (zh) * 2020-08-26 2022-05-17 山东浪潮科学研究院有限公司 区块链记账组生成方法、共识方法及区块链系统
CN111930847B (zh) * 2020-09-16 2021-01-08 深圳壹账通智能科技有限公司 基于区块链的数据处理方法、装置及存储介质
CN112150029A (zh) * 2020-10-09 2020-12-29 浙江专线宝网阔物联科技有限公司 一种支持动态与分散任务分配的区块链弹性架构设计方法
CN113157444B (zh) * 2021-03-29 2023-12-01 中国联合网络通信集团有限公司 一种算力服务认证方法、设备以及可读存储介质
CN114466050B (zh) * 2022-04-11 2022-11-08 国汽智控(北京)科技有限公司 基于区块链的车载数据处理方法、装置及电子设备
CN114900519B (zh) * 2022-05-06 2023-12-12 中国电信股份有限公司 能力调用方法、能力调用装置、存储介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (zh) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 一种区块链共识方法、设备及系统
CN108777704A (zh) * 2018-05-16 2018-11-09 横琴密达科技有限责任公司 一种区块链共识方法及系统
US20180365686A1 (en) * 2017-06-19 2018-12-20 Hitachi, Ltd. Smart contract lifecycle management
CN109086139A (zh) * 2018-08-15 2018-12-25 昧来网络科技(上海)有限公司 动态分片方法、设备和计算机存储介质
CN109871279A (zh) * 2019-03-11 2019-06-11 京东方科技集团股份有限公司 共识任务协调方法及装置、区块链系统、存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429371B2 (en) * 2010-03-23 2013-04-23 Avaya Inc. System and method for robust and efficient free chain management
US9590875B2 (en) * 2013-04-29 2017-03-07 International Business Machines Corporation Content delivery infrastructure with non-intentional feedback parameter provisioning
US10360495B2 (en) * 2016-12-30 2019-07-23 Suggestic, Inc. Augmented reality and blockchain technology for decision augmentation systems and methods using contextual filtering and personalized program generation
CN107341702B (zh) * 2017-03-08 2020-06-23 创新先进技术有限公司 一种业务处理的方法及装置
CN107730258A (zh) * 2017-09-01 2018-02-23 上海点融信息科技有限责任公司 基于区块链的资源处理方法、装置及计算机可读存储介质
CN107832139A (zh) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 用于管理区块链节点的计算资源的方法、设备和系统
CN107943580A (zh) * 2017-11-13 2018-04-20 上海点融信息科技有限责任公司 用于管理区块链节点处的用户智能合约的方法以及设备
KR101924469B1 (ko) * 2018-03-20 2018-12-03 가온미디어 주식회사 수신제한 시스템 연동 기반의 블록체인 운용 방법
CN108712307B (zh) * 2018-05-11 2021-01-29 北京奇虎科技有限公司 一种基于区块链的带宽能力计算方法及装置
CN108960837A (zh) * 2018-06-05 2018-12-07 上海和数软件有限公司 区块链共识验证方法、装置及计算机可读存储介质
CN109242685B (zh) * 2018-08-29 2020-05-12 众安信息技术服务有限公司 基于区块链的共识和验证方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (zh) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 一种区块链共识方法、设备及系统
US20180365686A1 (en) * 2017-06-19 2018-12-20 Hitachi, Ltd. Smart contract lifecycle management
CN108777704A (zh) * 2018-05-16 2018-11-09 横琴密达科技有限责任公司 一种区块链共识方法及系统
CN109086139A (zh) * 2018-08-15 2018-12-25 昧来网络科技(上海)有限公司 动态分片方法、设备和计算机存储介质
CN109871279A (zh) * 2019-03-11 2019-06-11 京东方科技集团股份有限公司 共识任务协调方法及装置、区块链系统、存储介质

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112132579B (zh) * 2020-09-30 2022-08-12 深圳前海微众银行股份有限公司 一种区块链共识节点更新方法及装置
CN112132579A (zh) * 2020-09-30 2020-12-25 深圳前海微众银行股份有限公司 一种区块链共识节点更新方法及装置
CN112437049A (zh) * 2020-11-06 2021-03-02 深圳前海微众银行股份有限公司 一种基于bft的区块链共识方法及装置
CN112364317A (zh) * 2020-11-17 2021-02-12 中国传媒大学 一种基于区块链技术的物联网雾环境管理架构及方法
CN112364317B (zh) * 2020-11-17 2024-04-19 中国传媒大学 一种基于区块链技术的物联网雾环境管理架构及方法
CN112532713A (zh) * 2020-11-25 2021-03-19 深圳前海微众银行股份有限公司 一种区块链的抗分叉检测方法及装置
CN112532713B (zh) * 2020-11-25 2023-05-16 深圳前海微众银行股份有限公司 一种区块链的抗分叉检测方法及装置
CN112764897A (zh) * 2020-12-31 2021-05-07 杭州趣链科技有限公司 任务请求的处理方法、装置、系统及计算机可读存储介质
CN112764897B (zh) * 2020-12-31 2024-03-22 杭州趣链科技有限公司 任务请求的处理方法、装置、系统及计算机可读存储介质
CN112735551B (zh) * 2021-01-15 2023-01-31 山东科技大学 基于H-Algorand共识机制的医疗记录存储共享模型及其实现方法
CN112735551A (zh) * 2021-01-15 2021-04-30 山东科技大学 基于H-Algorand共识机制的医疗记录存储共享模型及其实现方法
CN112887391B (zh) * 2021-01-21 2022-10-25 北京工业大学 一种基于贡献值的高可靠性区块链共识方法及系统
CN112887391A (zh) * 2021-01-21 2021-06-01 北京工业大学 一种基于贡献值的高可靠性区块链共识方法及系统
US20220318122A1 (en) * 2021-04-05 2022-10-06 Mastercard International Incorporated Method and system for blockchain performance testing
CN113301117A (zh) * 2021-04-21 2021-08-24 广东电网有限责任公司 节点加入共识及退出共识方法、装置、计算机设备
CN113610660A (zh) * 2021-07-01 2021-11-05 国网浙江宁海县供电有限公司 基于区块链的电力系统结算方法及相关装置
CN113987017A (zh) * 2021-10-26 2022-01-28 北京华宜信科技有限公司 基于区块链的科技成果评估服务网络平台构建方法
CN115577983A (zh) * 2022-11-24 2023-01-06 神华上航疏浚有限责任公司 基于区块链的企业任务匹配方法、服务器及存储介质
CN115577983B (zh) * 2022-11-24 2023-04-18 神华上航疏浚有限责任公司 基于区块链的企业任务匹配方法、服务器及存储介质
CN116151826A (zh) * 2023-04-04 2023-05-23 广东电力交易中心有限责任公司 一种高效可靠的基于区块链的电力交易终端信任管理方法

Also Published As

Publication number Publication date
CN109871279B (zh) 2021-10-01
CN109871279A (zh) 2019-06-11

Similar Documents

Publication Publication Date Title
WO2020182134A1 (zh) 区块链共识任务协调方法、区块链共识任务协调装置、区块链共识任务处理方法、区块链节点装置、区块链系统和存储介质
CN108846659B (zh) 基于区块链的转账方法、装置及存储介质
Tan et al. A blockchain-empowered crowdsourcing system for 5G-enabled smart cities
US11418510B2 (en) Systems, methods, and apparatuses for implementing a role based access control and authorization validator via blockchain smart contract execution using distributed ledger technology (DLT)
CN113056760B (zh) 多租户环境中具有去中心化分类账的高级智能合约
Zhu et al. Applications of distributed ledger technologies to the internet of things: A survey
US10938567B2 (en) Parallel-chain architecture for blockchain systems
US11488176B2 (en) Systems, methods, and apparatuses for implementing certificates of authenticity of digital twins transacted onto a blockchain using distributed ledger technology (DLT)
JP7304118B2 (ja) 自己監視ブロックチェーンのための安全な合意に基づくエンドースメント
US11244313B2 (en) Systems, methods, and apparatuses for implementing declarative smart actions for coins and assets transacted onto a blockchain using distributed ledger technology (DLT)
CN113039568B (zh) 多租户区块链网络中的轻量级节点
US11057225B2 (en) Enforcing compute equity models in distributed blockchain
US11823120B2 (en) System or method of verifying an asset using blockchain and collected asset and device information
CN109218079B (zh) 一种区块链网络、部署方法及存储介质
US20200073987A1 (en) Technologies for runtime selection of query execution engines
US20190179672A1 (en) Enforcing compute equity models in distributed blockchain
US11405183B2 (en) Using cache objects to store events for adding corresponding objects in a blockchain
US11893002B2 (en) System or method to run distributed validation of workflows across a network in a shared distributed ledger in multi-tenant cloud environment
US20190182254A1 (en) Enforcing compute equity models in distributed blockchain
US8635250B2 (en) Methods and systems for deleting large amounts of data from a multitenant database
CN113168622A (zh) 区块链网络中的基于字段的对等许可
US10685034B2 (en) Systems, methods, and apparatuses for implementing concurrent dataflow execution with write conflict protection within a cloud based computing environment
US11488162B2 (en) Automatically storing metrics relating to payments in a blockchain
US20150052585A1 (en) Systems and Methods for Managing Digital Content Entitlements
WO2023040453A1 (zh) 一种交易信息处理方法及装置

Legal Events

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

Ref document number: 20769509

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20769509

Country of ref document: EP

Kind code of ref document: A1

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 20769509

Country of ref document: EP

Kind code of ref document: A1