WO2023109040A1 - Procédé et appareil de génération de bloc de chaîne d'alliance, dispositif électronique et support - Google Patents

Procédé et appareil de génération de bloc de chaîne d'alliance, dispositif électronique et support Download PDF

Info

Publication number
WO2023109040A1
WO2023109040A1 PCT/CN2022/098136 CN2022098136W WO2023109040A1 WO 2023109040 A1 WO2023109040 A1 WO 2023109040A1 CN 2022098136 W CN2022098136 W CN 2022098136W WO 2023109040 A1 WO2023109040 A1 WO 2023109040A1
Authority
WO
WIPO (PCT)
Prior art keywords
empty
block
alliance chain
consortium
chain
Prior art date
Application number
PCT/CN2022/098136
Other languages
English (en)
Chinese (zh)
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 WO2023109040A1 publication Critical patent/WO2023109040A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the present application relates to the technical field of blockchain, in particular to a method, device, electronic equipment and medium for consortium chain block generation.
  • Blockchain technology uses block chain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, uses cryptography to ensure the security of data transmission and access, and utilizes intelligence composed of automated script codes.
  • a new distributed infrastructure and computing paradigm that uses contracts to program and manipulate data.
  • the form of alliance chain is more and more widely used in various enterprises and organizations.
  • the block generation cycle of the blockchain is usually reduced.
  • the block generation cycle is, for example, 1 second, that is, a block is generated every 1 second.
  • the transaction volume in the consortium chain is not particularly large, or the transaction time is relatively fixed, so a large number of empty blocks will be generated, and the generation of a large number of empty blocks will not only waste computing power, but also waste a lot of storage space.
  • Various aspects of the present application provide a method, device, electronic device and medium for consortium chain block generation, which are used to reduce the waste of computing power generated by generating a large number of empty blocks and save storage space.
  • the embodiment of the present application provides a method for generating a block of a consortium chain, which is applied to the first consortium chain node in the consortium chain network.
  • the current block generation period arrives, generate an empty block and broadcast the empty block to the alliance chain network for each alliance chain node in the alliance chain network to verify the validity of the empty block and send the empty block when the empty block is valid
  • the empty block is added to the alliance chain; when the empty block is added to the alliance chain, the number of empty blocks that appear consecutively after the last non-empty block on the alliance chain is obtained as the first number; if the first If the quantity is equal to the preset quantity threshold, and no transaction data is received in the next block generation period, it is forbidden to generate new empty blocks when the next block generation period arrives.
  • the embodiment of the present application also provides a consortium chain block generation device, including: a processing module, used to generate an empty block when the current block generation period arrives if the first consortium chain node does not receive transaction data within the current block generation period. block, and broadcast the empty block to the alliance chain network for each alliance chain node in the alliance chain network to verify the validity of the empty block and add the empty block to the alliance chain when the empty block is valid;
  • the acquisition module is used to obtain the number of empty blocks that appear consecutively after the last non-empty block on the alliance chain when the empty block is added to the alliance chain, as the first number;
  • the processing module is also used if The first number is equal to the preset number threshold, and no transaction data is received within the next block generation cycle, then the generation of new empty blocks is prohibited when the next block generation cycle arrives.
  • the embodiment of the present application also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory, and is used to execute the computer program to execute the consortium chain block generation method.
  • the embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor is caused to realize the consortium chain block generation method.
  • any consortium chain node if any consortium chain node does not receive transaction data within the current block generation cycle, it will generate an empty block when the current block generation cycle arrives, and broadcast the empty block to the consortium chain network, In order to add the empty block to the alliance chain when the alliance chain network verifies that the generated empty block is valid. After the empty block is added to the consortium chain, count the number of consecutive empty blocks that appear after the last non-empty block on the consortium chain. If the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain is large, and no transaction data is received in the next block generation cycle, it is forbidden to generate new blocks when the next block generation cycle arrives. Empty block.
  • empty blocks are generated on the consortium chain to ensure the security of the consortium chain, and the number of consecutive empty blocks appearing on the consortium chain is limited to limit the high-frequency generation of empty blocks, thereby reducing the generation of a large number of Empty blocks waste computing power, save storage space, and realize efficient and safe control of the number of empty blocks on the alliance chain.
  • Fig. 1 is an architecture diagram of a consortium chain network provided by an exemplary embodiment of the present application
  • Fig. 2 is a schematic flow diagram of a method for producing blocks in an alliance chain provided by an exemplary embodiment of the present application
  • Fig. 3 is a diagram of an application scenario applicable to the alliance chain block generation method provided by an exemplary embodiment of the present application
  • Fig. 4 is another application scenario diagram applicable to the consortium chain block generation method provided by an exemplary embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a consortium chain block generation device provided by an exemplary embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
  • the embodiment of this application provides a method, device, electronic equipment and medium for consortium chain block generation.
  • any consortium chain node does not receive transaction data within the current block generation cycle, then When the current block generation period arrives, generate an empty block and broadcast the empty block to the alliance chain network, so that the empty block can be added to the alliance chain when the alliance chain network verifies that the generated empty block is valid superior.
  • empty block After the empty block is added to the consortium chain, count the number of consecutive empty blocks that appear after the last non-empty block on the consortium chain. If the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain is large, and no transaction data is received in the next block generation cycle, it is forbidden to generate new blocks when the next block generation cycle arrives. Empty block. As a result, empty blocks are generated on the consortium chain to ensure the security of the consortium chain, and the number of consecutive empty blocks appearing on the consortium chain is limited to limit the high-frequency generation of empty blocks, thereby reducing the generation of a large number of Empty blocks waste computing power, save storage space, and realize efficient and safe control of the number of empty blocks on the alliance chain.
  • Fig. 1 is an architecture diagram of a consortium chain network provided by an exemplary embodiment of the present application.
  • the consortium chain network may include a plurality of consortium chain nodes 10, and all consortium chain nodes 10 jointly form a consortium chain network.
  • the alliance chain node 10 can be a terminal device 20 or a server, and the status of each alliance chain node 10 in the alliance chain network is equal, and each alliance chain node 10 jointly maintains an alliance chain 30 .
  • the alliance user 40 can initiate a transaction request to the alliance chain node 10 in the alliance chain network through the terminal device 20, and submit the transaction data.
  • the alliance chain node 10 performs corresponding data processing on the transaction data, such as requesting other alliance chain Nodes 10 perform consensus processing on transaction data, generate blocks, store on chain, and so on.
  • the alliance users 40 include but are not limited to institutional users, enterprise users or individual users who jointly participate in the management of the alliance chain 30 .
  • the terminal device may be hardware or software.
  • the terminal device is, for example, a mobile phone, a tablet computer, a desktop computer, a wearable smart device, a smart home device, and the like.
  • the terminal device is software, it can be installed in the hardware devices listed above.
  • the terminal device is, for example, multiple software modules or a single software module, which is not limited in this embodiment of the present application.
  • Servers can be hardware or software.
  • the server is hardware, the server is a single server or a distributed server cluster composed of multiple servers.
  • the server is software, it may be multiple software modules or a single software module, which is not limited in this embodiment of the present application.
  • consortium chain nodes 10 terminal devices 20 and consortium users 40 in FIG. 1 are only illustrative. In practical applications, any number of alliance chain nodes 10, terminal devices 20 and alliance users 40 are deployed according to actual needs.
  • Fig. 2 is a schematic flow chart of a method for generating blocks in an alliance chain provided by an exemplary embodiment of the present application. Referring to Figure 2, the method may include the following steps:
  • the consortium chain block generation method provided in this embodiment can be executed by any consortium chain node 10 in the consortium chain network.
  • any consortium chain node 10 is referred to as the first consortium chain node.
  • the alliance chain network can set the block generation cycle according to the actual application requirements, for example, the block generation cycle is 1 second. If the first consortium chain node receives transaction data within the current block generation cycle, it will package the transaction data to generate a non-empty block when the current block generation cycle arrives, and broadcast it to the consortium chain network for the consortium chain Each alliance chain node 10 in the network verifies the validity of the non-empty block and adds the non-empty block to the alliance chain 30 when the non-empty block is valid.
  • the first alliance chain node If the first alliance chain node does not receive transaction data within the current block generation cycle, it will generate an empty block when the current block generation cycle arrives, and broadcast it to the alliance chain network for all alliance chains in the alliance chain network
  • the 30 nodes verify the validity of the empty block and add the empty block to the alliance chain 30 when the empty block is valid.
  • each consortium chain 30 nodes in the consortium chain network may verify the validity of empty blocks.
  • each alliance chain 30 nodes may generate empty blocks and broadcast them to the alliance chain network.
  • each alliance chain 30 node takes the empty block with the highest difficulty value as an effective empty block based on the consensus protocol and adds the effective empty block to the alliance chain 30, that is, the effective empty block is processed. winding. Among them, the corresponding difficulty value is recorded in the empty block.
  • a non-empty block is generated based on the transaction data when the transaction data submitted by the alliance user 40 is received, and an empty block is generated when the transaction data submitted by the alliance user 40 is not received.
  • a block containing transaction data is generated based on the transaction data when the transaction data submitted by the alliance user 40 is received, and an empty block is generated when the transaction data submitted by the alliance user 40 is not received.
  • empty blocks are generated on the consortium chain 30 to ensure the security of the consortium chain 30, and the number of consecutive empty blocks on the consortium chain 30 is limited to limit the high-frequency generation of empty blocks , thereby reducing the waste of computing power generated by generating a large number of empty blocks and saving storage space. Therefore, it is understandable that even in low-frequency transaction scenarios, as time goes by, the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain 30 will not be many. In addition, limiting the number of consecutive empty blocks on the consortium chain 30 does not affect the consortium chain 30 can set a smaller block generation period to ensure that the consortium chain 30 has higher transaction execution efficiency and throughput.
  • the number of consecutive empty blocks appearing after the last non-empty block on the consortium chain 30 is counted.
  • the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain 30 is taken as the first number. If the first number is less than or equal to the preset number threshold, it means that the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain 30 is small, and if no transaction data is received in the next block generation cycle , then continue to generate new empty blocks when the next block generation cycle arrives.
  • the preset quantity threshold is set according to actual application requirements.
  • the alliance chain network has not received the transaction data submitted by the alliance user 40 for a long time, it will not generate empty blocks on the alliance chain 30 without limit, but the last block on the alliance chain 30
  • the number of consecutive empty blocks following a non-empty block is at most a preset number threshold.
  • the consortium chain 30 is limited to a maximum of 6 consecutive empty blocks.
  • an alliance chain node 10 receives the transaction data Tx0 and transaction data Tx1 submitted by the alliance user 40, and broadcasts to the alliance chain network, and the alliance chain network will effectively include the transaction data Tx0 and the non-empty blocks of the transaction data Tx1 are added to the alliance chain 30.
  • the entire consortium chain network did not receive new transaction data submitted by consortium user 40.
  • an empty block is generated every 1 second and added to the alliance chain 30 until six empty blocks are continuously added to the alliance chain 30.
  • each alliance chain node 10 stops generating empty blocks. blocks and continue to add new empty blocks on the consortium chain 30.
  • another consortium chain node 10 receives the transaction data Tx2 and broadcasts it to the consortium chain network, and the consortium chain network will add valid non-empty blocks including transaction data Tx2 to the consortium Chain 30 on. It can be seen from this that in the low-frequency transaction scenario where alliance users 40 only submit two transaction requests within one hour, although the block generation period is 1 second, only 6 empty blocks are generated on the alliance chain 30, greatly It greatly reduces the number of generated empty blocks and saves computing power and storage space.
  • any alliance chain node does not receive transaction data within the current block generation cycle, when the current block generation cycle arrives, an empty block is generated and the empty block is broadcast to
  • the consortium chain network if the consortium chain network verifies that the generated empty block is valid, the empty block will be added to the consortium chain. After the empty block is added to the consortium chain, count the number of consecutive empty blocks that appear after the last non-empty block on the consortium chain. If the number of empty blocks that appear consecutively after the last non-empty block on the consortium chain is large, and no transaction data is received in the next block generation cycle, it is forbidden to generate new blocks when the next block generation cycle arrives. Empty block.
  • empty blocks are generated on the consortium chain to ensure the security of the consortium chain, and the number of consecutive empty blocks on the consortium chain is limited to limit the high-frequency generation of empty blocks, thereby reducing the generation of a large number of Empty blocks waste computing power, save storage space, and realize efficient and safe control of the number of empty blocks on the alliance chain.
  • an implementation process of generating an empty block is: to determine whether the current time is within the preset transaction time period; if so, when the current block generation cycle arrives, an empty block is generated. If not, when the current block generation period arrives, refuse to generate an empty block.
  • the computing power of each consortium chain node 10 may be the same or different. It should be understood that the higher the computing power, the greater the processing capability of the consortium chain node 10. Further optionally, in order to efficiently and safely control the number of empty blocks on the alliance chain 30, the alliance chain node 10 with larger computing power can be selected to generate empty blocks. Based on this, when the current block generation period arrives, an implementation process of generating an empty block is: when the block generation period arrives, the first consortium chain node judges whether its current computing power is greater than or equal to the preset computing power value; , an empty block is generated. If not, when the current block generation period arrives, refuse to generate an empty block.
  • an implementation process of generating an empty block is: when the current block generation period arrives, determine the alliance whose current computing power is not less than the preset computing power value in the alliance chain network Chain nodes 10 and their number, as the second number; if the second number is greater than or equal to the specified number, select a specified number of alliance chain nodes 10 from the alliance chain nodes 10 whose current computing power is greater than or equal to the preset computing power value, And send the first notification to the specified number of alliance chain nodes 10 to notify the specified number of alliance chain nodes 10 to generate an empty block.
  • the second number is less than the specified number, then subtract the second number from the specified number to obtain the third number, and select the third number of alliance chain nodes 10 from the alliance chain nodes 10 whose current computing power is less than the preset computing power value;
  • the second number of alliance chain nodes 10 and the third number of alliance chain nodes 10 send a second notification to notify the second number of alliance chain nodes 10 and the third number of alliance chain nodes 10 to generate an empty block.
  • the specified number is set according to the actual application requirements. It is required that the number of alliance chain nodes 10 participating in the generation of empty blocks reaches the specified number, and the alliance chain nodes 10 with high computing power are selected to participate in the generation of empty blocks, which can ensure efficient block generation in the alliance chain. 30 consecutively generate multiple empty blocks.
  • the alliance chain network is a decentralized network, and the status of each alliance chain node 10 in the alliance chain network is equal.
  • Any consortium chain node 10 can send the first notification or the second notification, and execute the empty block generation task after receiving the first notification or the second notification. That is to say, the first notification or the second notification that the first consortium chain node can send to the second consortium chain node 10, or the first notification or the second notification that the second consortium chain node 10 can send to the first consortium chain node .
  • the second consortium chain node 10 is other consortium chain nodes 10 not including the first consortium chain node in the consortium chain network.
  • an implementation process of generating an empty block is to receive the first block sent by the second alliance chain node 10 in the alliance chain network. notification or the second notification, and generate an empty block according to the first notification or the second notification; wherein, the first notification is that the second consortium chain node 10 recognizes that the current computing power in the consortium chain network is not less than the preset computing power value
  • the second notification is that the second consortium chain node 10 recognizes that the consortium chain node 10 whose current computing power is less than the preset computing power value in the consortium chain network Sent if the quantity is less than the specified quantity.
  • the first consortium chain node can perform the empty block generation task taking into account the transaction time period and computing power. Therefore, as an example, when the current block generation period arrives, an implementation process of generating an empty block is: to determine whether the current time is in the preset transaction time period; if the current time is in the preset transaction time period, When the block generation period arrives, the first consortium chain node judges whether its current computing power is greater than or equal to the preset computing power value; if its current computing power is greater than or equal to the preset computing power value, an empty block will be generated. If the current time is not in the preset transaction time period, or if the current time is in the preset transaction time period and its current computing power is less than the preset computing power value, it will refuse to generate an empty block when the current block generation period arrives.
  • the first consortium chain node can perform an empty block generation task taking into account the transaction period, computing power, and the number of consortium chain nodes 10. Therefore, as an example, when the current block generation period arrives, an implementation process of generating an empty block is: to determine whether the current time is in the preset transaction time period; if the current time is in the preset transaction time period, When the block generation period arrives, determine the alliance chain nodes 10 and their number whose current calculation power is not less than the preset calculation power value in the alliance chain network as the second number; if the second number is greater than or equal to the specified number, then start from the current calculation Select a specified number of alliance chain nodes 10 from the alliance chain nodes 10 whose force is greater than or equal to the preset computing power value, and send the first notification to the specified number of alliance chain nodes 10 to notify the specified number of alliance chain nodes 10 to generate an empty area piece.
  • the second number is less than the specified number, then subtract the second number from the specified number to obtain the third number, and select the third number of alliance chain nodes 10 from the alliance chain nodes 10 whose current computing power is less than the preset computing power value;
  • the second number of alliance chain nodes 10 and the third number of alliance chain nodes 10 send a second notification to notify the second number of alliance chain nodes 10 and the third number of alliance chain nodes 10 to generate an empty block. If the current time is not in the preset transaction time period, when the current block generation period arrives, it will refuse to generate an empty block.
  • the alliance chain network will identify whether the transaction data submitted by the alliance user 40 has passed the number of multiple alliance users 40 sign.
  • the transaction data digitally signed by multiple alliance users 40 can be packaged into a block, and has the possibility of being uploaded to the alliance chain 30 .
  • Transaction data that has not been digitally signed by multiple alliance users 40 is discarded by the alliance chain network and will not be packaged into blocks.
  • the first consortium chain node receives the first transaction data broadcast by other consortium chain nodes 10 in the consortium chain network during the current block generation cycle or receives its corresponding consortium chain node within the current block generation cycle
  • the user 40 submits the second transaction data
  • Signature processing then generate a non-empty block according to the first transaction data or the second transaction data, and broadcast the non-empty block to the alliance chain network for each alliance chain node 10 in the alliance chain network to verify the non-empty block validity and add the non-empty block to the consortium chain 30 when the non-empty block is valid.
  • any consortium chain node 10 After any consortium chain node 10 receives the transaction data submitted by its corresponding consortium user 40, it will also broadcast the transaction data to the consortium chain network for other consortium chain nodes 10 in the consortium chain network to continue based on the transaction data. Transaction data generates non-empty blocks.
  • the node identification of the alliance chain node 10 with transaction data sending authority is added to the white list.
  • any consortium chain node 10 broadcasts transaction data to the consortium chain network, it will judge whether its own node ID is in the white list. If it is in the white list, it is determined that it has the authority to broadcast the transaction data to the alliance chain network; if it is not in the white list, it is determined that it does not have the authority to broadcast the transaction data to the alliance chain network.
  • the alliance chain node 10 corresponding to the node identification in the whitelist has transaction data transmission authority; broadcast the second transaction data to the alliance chain network, so that each alliance chain node 10 in the alliance chain network can judge whether the second transaction data has passed Signature processing of multiple consortium chain 30 users.
  • each consortium chain node 10 judges that the second transaction data has been signed by multiple consortium chain 30 users, it will generate a non-empty block according to the second transaction data, and broadcast the non-empty block to the consortium chain
  • each alliance chain node 10 in the alliance chain network can verify the validity of the non-empty block and add the non-empty block to the alliance chain 30 when the non-empty block is valid.
  • consortium chain 30 is limited to a maximum of 6 consecutive empty blocks.
  • Alliance user A digitally signs the transaction data Tx0 and Tx1 with its own identity information, and obtains the signed transaction data Tx0(S1), Tx1(S1).
  • the alliance user A requests the alliance user B to continue to digitally sign the transaction data Tx0(S1), and the alliance user B uses its own identity information to digitally sign Tx0(S1) to obtain the signed transaction data Tx0(S1, S2) .
  • alliance user A provides transaction data Tx0 (S1, S2) and transaction data Tx1 (S1) to its corresponding alliance chain node 10, and the alliance chain node 10 corresponding to alliance user A identifies Tx0 (S1, S2) is digitally signed by multiple alliance users 40, and a non-empty block is generated according to Tx0 (S1, S2). If the non-empty block is verified to be valid by the alliance network, the non-empty block will be added To the alliance chain 30.
  • the alliance chain node 10 corresponding to the alliance user A recognizes that the transaction data Tx1(S1) has not been digitally signed by multiple alliance users 40, and then discards the transaction data Tx1(S1).
  • the transaction data Tx1(S1) will not be packed into blocks.
  • the entire consortium chain network did not receive new transaction data submitted by consortium user 40.
  • an empty block is generated every 1 second and added to the alliance chain 30 until six empty blocks are continuously added to the alliance chain 30.
  • each alliance chain node 10 stops generating empty blocks. blocks and continue to add new empty blocks on the consortium chain 30.
  • another consortium chain node 10 receives the transaction data Tx2 (S1, S2) submitted by consortium user 40B, and another consortium chain node 10 verifies the transaction data Tx2 (S1, S2) submitted by consortium user B ( S1, S2) are digitally signed by multiple alliance users 40, and a non-empty block is generated according to Tx2 (S1, S2). If the non-empty block is verified to be valid by the alliance network, the non-empty block is added to the alliance chain 30 on.
  • a non-empty block is obtained.
  • the alliance chain network can continue to verify whether the transaction data recorded in the non-empty block has been signed by multiple alliance users 40 . If the transaction data recorded in the non-empty block has not been signed by multiple alliance users 40, the alliance chain network will confirm that the non-empty block is an invalid block, and the non-empty block still cannot be added to the alliance chain 30. If the transaction data recorded in the non-empty block is signed by multiple alliance users 40, then the non-empty block has the possibility of being added to the alliance chain 30.
  • each step of the method may be the same device, or the method may also be executed by different devices.
  • the execution subject of steps 201 to 203 may be device A; for another example, the execution subject of steps 201 and 202 may be device A, and the execution subject of step 203 may be device B; and so on.
  • Fig. 5 is a schematic structural diagram of a consortium chain block generation device provided by an exemplary embodiment of the present application. As shown in FIG. 5 , the device includes: a processing module 51 and an obtaining module 52 .
  • the processing module 51 is used to generate an empty block and broadcast the empty block to the alliance chain network if the first alliance chain node does not receive transaction data within the current block generation cycle, when the current block generation cycle arrives, For each alliance chain node in the alliance chain network to verify the validity of the empty block and add the empty block to the alliance chain when the empty block is valid.
  • the acquiring module 52 is configured to acquire the number of consecutive empty blocks appearing after the last non-empty block on the alliance chain as the first number when the empty block is added to the alliance chain.
  • the processing module 51 is further configured to prohibit the generation of new empty blocks when the next block generation cycle arrives if the first amount is equal to the preset amount threshold and no transaction data is received within the next block generation cycle.
  • processing module 51 when the processing module 51 generates an empty block when the current block generation period arrives, it is specifically used to: determine whether the current time is in the preset transaction time period; if so, generate an empty block when the current block generation period arrives. blocks.
  • the processing module 51 when the processing module 51 generates an empty block when the current block generation cycle arrives, it is specifically used for: when the block generation cycle arrives, the first consortium chain node judges whether its current computing power is greater than or equal to the pre-calculated Force value; if so, an empty block is generated.
  • the processing module 51 when the processing module 51 generates an empty block when the current block generation cycle arrives, it is specifically used to: determine that the current computing power in the consortium chain network is not less than the preset computing power value when the current block generation cycle arrives.
  • Consortium chain nodes and their number are used as the second number; if the second number is greater than or equal to the specified number, select the specified number of alliance chain nodes from the alliance chain nodes whose current computing power is greater than or equal to the preset computing power value, and send to The specified number of consortium chain nodes send the first notification to notify the specified number of consortium chain nodes to generate empty blocks.
  • the processing module 51 is also used to: if the second amount is less than the specified amount, then subtract the second amount from the specified amount to obtain the third amount, and obtain the third amount from the consortium chain nodes whose current computing power is less than the preset computing power value Select the third number of alliance chain nodes; send the second notification to the second number of alliance chain nodes and the third number of alliance chain nodes to notify the second number of alliance chain nodes and the third number of alliance chain nodes Generate empty blocks.
  • the processing module 51 is specifically configured to: receive the first notification or the second notification sent by the second consortium chain node in the consortium chain network when the current block generation period arrives, and generate an empty block; A notification or a second notification to generate an empty block; wherein, the first notification is that the second consortium chain node recognizes that the number of consortium chain nodes whose current computing power is not less than the preset computing power value in the consortium chain network is greater than or equal to the specified
  • the second notification is sent when the second consortium chain node recognizes that the number of consortium chain nodes whose current computing power is not less than the preset computing power value in the consortium chain network is less than the specified number.
  • the processing module 51 is also used for: if the first consortium chain node receives the first transaction data broadcast by other consortium chain nodes in the consortium chain network within the current block generation cycle or receives its transaction data within the current block generation cycle When the corresponding alliance user submits the second transaction data, it is judged whether the first transaction data or the second transaction data has been signed by multiple alliance chain users; if the first transaction data or the second transaction data has been signed by multiple alliance chain users Signature processing, generate a non-empty block according to the first transaction data or the second transaction data, and broadcast the non-empty block to the alliance chain network for each alliance chain node in the alliance chain network to verify the identity of the non-empty block Validity and add the non-empty block to the alliance chain when the non-empty block is valid.
  • the processing module 51 is also used for: if the first consortium chain node receives the second transaction data submitted by its corresponding consortium user within the current block generation cycle, determine that the node identifier of the first consortium chain node is within the preset In the white list, the alliance chain nodes corresponding to the node identifiers in the white list have transaction data transmission authority; broadcast the second transaction data to the alliance chain network for each alliance chain node in the alliance chain network to judge whether the second transaction data After the signature processing of multiple alliance chain users.
  • consortium chain block generation device shown in FIG. 5 has been described in detail in the above embodiment of the consortium chain block generation method, and will not be described in detail here.
  • Fig. 6 is a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
  • the electronic device includes: a memory 61 and a processor 62 .
  • the memory 61 is used to store computer programs, and can be configured to store other various data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, pictures, videos, etc.
  • Memory 61 can be realized by any type of volatile or nonvolatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk any type of volatile or nonvolatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • Processor 62 coupled with memory 61, for executing the computer program in memory 61, for: if the first consortium chain node does not receive transaction data within the current block generation cycle, when the current block generation cycle arrives, Generate an empty block and broadcast the empty block to the alliance chain network for each alliance chain node in the alliance chain network to verify the validity of the empty block and add the empty block to the alliance chain when the empty block is valid Middle; when an empty block is added to the consortium chain, obtain the number of consecutive empty blocks that appear after the last non-empty block on the consortium chain as the first number; if the first number is equal to the preset number threshold, And if no transaction data is received in the next block generation cycle, it is prohibited to generate new empty blocks when the next block generation cycle arrives.
  • the processor 62 when the processor 62 generates an empty block when the current block generation period arrives, it is specifically used to: determine whether the current time is in the preset transaction time period; if so, generate an empty block when the current block generation period arrives. blocks.
  • the processor 62 when the processor 62 generates an empty block when the current block generation period arrives, it is specifically used for: when the block generation period arrives, the first consortium chain node judges whether its current computing power is greater than or equal to the pre-calculated Force value; if so, an empty block is generated.
  • the processor 62 when the processor 62 generates an empty block when the current block generation cycle arrives, it is specifically used to: determine that the current computing power in the consortium chain network is not less than the preset computing power value when the current block generation cycle arrives.
  • Consortium chain nodes and their number are used as the second number; if the second number is greater than or equal to the specified number, select the specified number of alliance chain nodes from the alliance chain nodes whose current computing power is greater than or equal to the preset computing power value, and send to The specified number of consortium chain nodes send the first notification to notify the specified number of consortium chain nodes to generate empty blocks.
  • the processor 62 is also used to: if the second amount is less than the specified amount, then subtract the specified amount from the second amount to obtain the third amount, and obtain the third amount from the consortium chain nodes whose current computing power is less than the preset computing power value Select the third number of alliance chain nodes; send the second notification to the second number of alliance chain nodes and the third number of alliance chain nodes to notify the second number of alliance chain nodes and the third number of alliance chain nodes Generate empty blocks.
  • the processor 62 is specifically configured to: receive the first notification or the second notification sent by the second consortium chain node in the consortium chain network when the current block generation period arrives, and generate an empty block; A notification or a second notification to generate an empty block; wherein, the first notification is that the second consortium chain node recognizes that the number of consortium chain nodes whose current computing power is not less than the preset computing power value in the consortium chain network is greater than or equal to the specified
  • the second notification is sent when the second consortium chain node recognizes that the number of consortium chain nodes whose current computing power is not less than the preset computing power value in the consortium chain network is less than the specified number.
  • the processor 62 is also used for: if the first consortium chain node receives the first transaction data broadcast by other consortium chain nodes in the consortium chain network within the current block generation cycle or receives its transaction data within the current block generation cycle When the corresponding alliance user submits the second transaction data, it is judged whether the first transaction data or the second transaction data has been signed by multiple alliance chain users; if the first transaction data or the second transaction data has been signed by multiple alliance chain users Signature processing, generate a non-empty block according to the first transaction data or the second transaction data, and broadcast the non-empty block to the alliance chain network for each alliance chain node in the alliance chain network to verify the identity of the non-empty block Validity and add the non-empty block to the alliance chain when the non-empty block is valid.
  • the processor 62 is also configured to: if the first consortium chain node receives the second transaction data submitted by its corresponding consortium user within the current block generation period, determine that the node identifier of the first consortium chain node is within the preset In the white list, the alliance chain nodes corresponding to the node identifiers in the white list have transaction data transmission authority; broadcast the second transaction data to the alliance chain network for each alliance chain node in the alliance chain network to judge whether the second transaction data After the signature processing of multiple alliance chain users.
  • the electronic device also includes: a communication component 63, a display 64, a power supply component 65, an audio component 66 and other components.
  • FIG. 6 only schematically shows some components, which does not mean that the electronic device only includes the components shown in FIG. 6 .
  • the components in the dotted line box in FIG. 6 are optional components, not mandatory components, which may depend on the product form of the electronic device.
  • the electronic device in this embodiment can be implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone, or an IOT device, or as a server device such as a conventional server, a cloud server, or a server array.
  • the electronic equipment of this embodiment is implemented as terminal equipment such as desktop computers, notebook computers, smart phones, etc., it can include the components in the dashed box in Figure 6; if the electronic equipment of this embodiment is implemented as a conventional server, cloud server or server array, etc.
  • the server device may not include the components in the dashed box in FIG. 6 .
  • an embodiment of the present application further provides a computer-readable storage medium storing a computer program.
  • the computer program When the computer program is executed, the steps that can be executed by the electronic device in the above method embodiments can be implemented.
  • an embodiment of the present application further provides a computer program product, including a computer program, which, when the computer program is executed by a processor, causes the processor to implement the steps executable by the electronic device in the foregoing method embodiments.
  • the above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices.
  • the device where the communication component is located can access a wireless network based on communication standards, such as WiFi, 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof.
  • the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication assembly also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID Radio Frequency Identification
  • IrDA Infrared Data Association
  • UWB Ultra Wideband
  • Bluetooth Bluetooth
  • the above-mentioned display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation.
  • a power supply component provides power for various components of the equipment where the power supply component is located.
  • a power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component resides.
  • the aforementioned audio components may be configured to output and/or input audio signals.
  • the audio component includes a microphone (MIC), which is configured to receive an external audio signal when the device on which the audio component is located is in an operation mode, such as a calling mode, a recording mode, and a speech recognition mode.
  • the received audio signal may be further stored in a memory or sent via a communication component.
  • the audio component further includes a speaker for outputting audio signals.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
  • the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Selon des modes de réalisation, la présente invention concerne un procédé et un appareil de génération de bloc de chaîne d'alliance, un dispositif électronique et un support. Dans les modes de réalisation de la présente invention, si un nœud de chaîne d'alliance ne reçoit aucune donnée de transaction dans une période de génération de bloc actuelle, un bloc vide est généré lorsque la période de génération de bloc actuelle s'achève, et le bloc vide est diffusé dans un réseau de chaîne d'alliance, de telle sorte que le bloc vide soit ajouté sur une chaîne d'alliance à condition que le réseau de chaîne d'alliance vérifie que le bloc vide généré est valide. Après que le bloc vide a été ajouté sur la chaîne d'alliance, le nombre de blocs vides présents en continu derrière le dernier bloc non vide sur la chaîne d'alliance est compté. S'il existe un grand nombre de blocs vides présents en continu derrière le dernier bloc non vide sur la chaîne d'alliance, dans le cas où aucune donnée de transaction n'est reçue dans une période de génération de bloc suivante, la génération d'un nouveau bloc vide est interdite lorsque la période de génération de bloc suivante s'achève. Par conséquent, le gaspillage de puissance de calcul pour générer un grand nombre de blocs vides est réduit, l'espace de stockage est économisé, et le nombre de blocs vides sur la chaîne d'alliance est régulé de manière efficace et sûre.
PCT/CN2022/098136 2021-12-15 2022-06-10 Procédé et appareil de génération de bloc de chaîne d'alliance, dispositif électronique et support WO2023109040A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111537592.7 2021-12-15
CN202111537592.7A CN114385647B (zh) 2021-12-15 2021-12-15 联盟链出块方法、装置、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2023109040A1 true WO2023109040A1 (fr) 2023-06-22

Family

ID=81197087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098136 WO2023109040A1 (fr) 2021-12-15 2022-06-10 Procédé et appareil de génération de bloc de chaîne d'alliance, dispositif électronique et support

Country Status (2)

Country Link
CN (1) CN114385647B (fr)
WO (1) WO2023109040A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114385647B (zh) * 2021-12-15 2023-04-07 达闼科技(北京)有限公司 联盟链出块方法、装置、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322350A (zh) * 2019-06-25 2019-10-11 北京众享比特科技有限公司 裁剪共识网络中空区块的方法、装置、设备和存储介质
CN110493148A (zh) * 2019-08-12 2019-11-22 深圳前海微众银行股份有限公司 一种区块处理、区块共识和区块同步方法及装置
CN112633879A (zh) * 2020-12-18 2021-04-09 上海万向区块链股份公司 应用于区块链中能够在无交易时不出空块的共识系统及方法
CN112783976A (zh) * 2021-01-05 2021-05-11 上海特高信息技术有限公司 一种联盟区块链柔性打包出块的共识算法
CN114385647A (zh) * 2021-12-15 2022-04-22 达闼科技(北京)有限公司 联盟链出块方法、装置、电子设备及介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109964446B (zh) * 2018-06-08 2022-03-25 北京大学深圳研究生院 一种基于投票的共识方法
CN109165324A (zh) * 2018-08-20 2019-01-08 深圳市元征科技股份有限公司 一种交易数据封装方法及相关装置
CN109255057B (zh) * 2018-09-18 2021-05-07 百度在线网络技术(北京)有限公司 区块生成方法、装置、设备及存储介质
CN110213046A (zh) * 2019-05-30 2019-09-06 全链通有限公司 基于联盟区块链的身份验证方法、设备及存储介质
CN111506655B (zh) * 2020-04-20 2022-06-21 腾讯科技(深圳)有限公司 区块链系统的同步处理方法、装置及智能设备、存储介质
CN111507717B (zh) * 2020-04-20 2022-08-12 腾讯科技(深圳)有限公司 数据处理方法、装置、区块节点及计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110322350A (zh) * 2019-06-25 2019-10-11 北京众享比特科技有限公司 裁剪共识网络中空区块的方法、装置、设备和存储介质
CN110493148A (zh) * 2019-08-12 2019-11-22 深圳前海微众银行股份有限公司 一种区块处理、区块共识和区块同步方法及装置
CN112633879A (zh) * 2020-12-18 2021-04-09 上海万向区块链股份公司 应用于区块链中能够在无交易时不出空块的共识系统及方法
CN112783976A (zh) * 2021-01-05 2021-05-11 上海特高信息技术有限公司 一种联盟区块链柔性打包出块的共识算法
CN114385647A (zh) * 2021-12-15 2022-04-22 达闼科技(北京)有限公司 联盟链出块方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN114385647A (zh) 2022-04-22
CN114385647B (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
US11259178B2 (en) Bluetooth mesh network provisioning authentication
WO2020238751A1 (fr) Procédé d'accès à des ressources sous une architecture sans serveur, dispositif, système et support de stockage
US11611863B2 (en) Method and apparatus for low energy discovery
JP2021511561A (ja) 資産管理方法および装置ならびに電子デバイス
US11323492B2 (en) Managing data communications based on phone calls between mobile computing devices
US9569607B2 (en) Security verification method and apparatus
CN110266582B (zh) 一种消息推送方法、系统、服务器及通信终端
WO2020216204A1 (fr) Procédé et appareil d'acquisition d'informations
JP7300799B2 (ja) コンピューティング・デバイス、データを保護する方法、およびコンピュータ・プログラム
CN111953648A (zh) 基于区块链预言机的数据处理方法、装置及电子设备
WO2023109040A1 (fr) Procédé et appareil de génération de bloc de chaîne d'alliance, dispositif électronique et support
US8984078B2 (en) Systems and methods for device-to-cloud message delivery
US20160182685A1 (en) Mobile cloud proxy apparatus and method
CN113420007B (zh) 数据库访问的审计处理方法、装置及电子设备
US11716415B2 (en) Suppressing indications of events in user interfaces
CN117319086B (zh) 不经意传输系统、方法、电子设备及存储介质
CN109660579B (zh) 数据处理方法、系统及电子设备
CN112217873B (zh) 设备共享方法、相关设备及存储介质
JP7300800B2 (ja) コンピューティング・デバイス、データを保護する方法、およびコンピュータ・プログラム
US20210011710A1 (en) Electronic device management
WO2022121524A1 (fr) Procédé et dispositif de suppression de relation ami
CN115623057A (zh) 基于rdma的建连方法、装置、设备及存储介质
KR20150054636A (ko) 복수의 전자 디바이스 사이에서 애플리케이션을 공유하는 방법 및 전자 디바이스
CN114430410A (zh) 基于虚拟域名的系统访问方法、装置及设备
CN116755842B (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: 22905806

Country of ref document: EP

Kind code of ref document: A1