A blockchain consensus method and device

By initializing configuration and generating rules in the blockchain, and combining them with the boundary constraints of the Tile, blocks are generated and verified, solving the problem of insufficient consensus computing power in multi-dimensional space scenarios and realizing efficient blockchain consensus services.

CN115186030BActive Publication Date: 2025-10-28HANGZHOU RIVTOWER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210742005.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-10-28
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

How to combine blockchain technology in multi-dimensional space or model scenarios to improve consensus computing capabilities, especially in application scenarios such as geographic information GIS, and effectively utilize the blockchain consensus mechanism.

Method used

By initializing the blockchain configuration, setting the boundary constraints of the Tile, generating the genesis block, and generating blocks according to the Chunk generation rules, the blocks are broadcast to the blockchain nodes for consensus verification. Finally, the blocks are submitted after the consensus verification is passed.

Benefits of technology

It improves the efficiency and accuracy of blockchain consensus computation in multi-dimensional spatial or model scenarios such as geographic information, and provides reliable blockchain infrastructure services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186030B_ABST
    Figure CN115186030B_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain consensus method and apparatus, wherein the method includes: initializing a blockchain configuration, the configuration including at least a block space dimension n and a chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n The consensus mechanism of this invention incorporates the concept of block space, enabling the organization of application scenarios with geospatial attributes and providing basic blockchain services for scenarios such as geographic information, topographic maps, and virtual reality topographic maps, as well as multi-dimensional block networks. The genesis block is generated by pre-setting several tiles that carry specific characteristics of the block space and satisfy specific boundary constraints within it, and the slots include tiles that meet the boundary constraints. Blocks are generated according to chunk generation rules and broadcast to blockchain nodes. Consensus verification is performed on the blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer software technology, and in particular to a blockchain consensus method, apparatus, electronic device, and storage medium. Background Technology

[0002] Consensus mechanisms are a series of processes and rules developed to achieve distributed consensus protocols. Commonly used consensus algorithms include PBFT (Practical Byzantine Fault Tolerance), PoW (Proof of Work), PoS (Proof of Stake), DPoS (Delegate Proof of Stake), Ripple, and others. With the increasing prevalence of blockchain technology applications, a pressing technical challenge is how to integrate blockchain technology with multi-dimensional spaces or models, including Geographic Information Systems (GIS), and design solutions to leverage blockchain infrastructure services, particularly consensus mechanisms, to improve consensus computing capabilities in such scenarios. Summary of the Invention

[0003] The purpose of the embodiments in this specification is to address the above-mentioned problems by providing a blockchain consensus method, apparatus, electronic device, and storage medium.

[0004] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:

[0005] Firstly, a blockchain consensus method is proposed, including:

[0006] Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0007] After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints;

[0008] The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes;

[0009] Consensus verification is performed on the block;

[0010] After the consensus verification is passed, the block is submitted to the blockchain.

[0011] Secondly, a blockchain consensus device is proposed, including:

[0012] The first module is used to initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0013] The second module is used to generate the genesis block by pre-setting several tiles in the genesis block that are used to attach specific features of the block space and satisfy specific boundary constraints. The slot includes the tiles that meet the boundary constraints.

[0014] The third module is used to generate the block according to the Chunk generation rules and broadcast it to the blockchain nodes;

[0015] The fourth module is used to perform consensus verification on the block;

[0016] The fifth module is used to submit the block to the blockchain after the consensus verification is passed.

[0017] Thirdly, a blockchain system is proposed, including a consensus module, the implementation process of which includes:

[0018] Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0019] After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints;

[0020] The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes;

[0021] Consensus verification is performed on the block;

[0022] After the consensus verification is passed, the block is submitted to the blockchain.

[0023] Fourthly, an electronic device is proposed, comprising: a processor; and

[0024] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method described in the first aspect.

[0025] Fifthly, a computer-readable storage medium is provided that stores one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the method described in the first aspect.

[0026] This manual can achieve at least the following technical effects:

[0027] The consensus mechanism of this invention is based on block space and can organize application scenarios with geospatial attributes, providing basic blockchain services for scenarios such as geographic information, topographic maps, virtual reality topographic maps, and multi-dimensional block networks. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is one of the schematic diagrams of the blockchain consensus method provided in the embodiments of this specification.

[0030] Figure 2 This is the second schematic diagram of the blockchain consensus method provided in the embodiments of this specification.

[0031] Figure 3 This is the third schematic diagram of the blockchain consensus method provided in the embodiments of this specification.

[0032] Figure 4 The fourth schematic diagram of the blockchain consensus method provided in the embodiments of this specification.

[0033] Figure 5 The fifth schematic diagram of the blockchain consensus method provided in the embodiments of this specification.

[0034] Figure 6 This is one of the schematic diagrams of a blockchain consensus device provided in the embodiments of this specification.

[0035] Figure 7 This is the second schematic diagram of a blockchain consensus device provided in the embodiments of this specification.

[0036] Figure 8 This is a schematic diagram of the structure of an electronic device provided as an embodiment of this specification. Detailed Implementation

[0037] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0038] The following section provides a detailed description of one of the blockchain consensus schemes covered in this manual, using specific examples.

[0039] Key terms

[0040] Blockchain technology is a novel distributed infrastructure and computing paradigm that utilizes a block-chain data structure to verify and store data, distributed node consensus algorithms to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and manipulate data. Essentially, it is a shared database where the data or information stored possesses characteristics such as being unforgeable, fully traceable, auditable, transparent, and collectively maintained. Based on these characteristics, blockchain technology lays a solid foundation of trust, creates a reliable cooperation mechanism, and has broad application prospects. According to access mechanisms, blockchains are classified into public blockchains, consortium blockchains, and private blockchains.

[0041] The Proof-of-Work (PoW) consensus algorithm is a mechanism to prevent the abuse of distributed service resources and denial-of-service attacks. The PoW algorithm requires nodes to perform complex calculations that consume a reasonable amount of time and resources, and the results of these calculations must be quickly verified by other nodes. The time and energy consumed serve as a guarantee, ensuring that services and resources are used only when genuinely needed. Bitcoin was the first to use the PoW algorithm to verify transactions and broadcast blocks to the network, and many blockchains now also use it. The PoW algorithm has become a widely used consensus algorithm. Miners perform hash calculations, a process that consumes computing power, to calculate the "correct result," which is then broadcast to the entire network. Other miners or ordinary nodes synchronize blocks and verify their correctness.

[0042] Block space: A virtually defined matrix space Cm with multidimensional integer coordinates, and block distance is the distance from the geometric center of a block in the block space to the origin of the block space.

[0043] Tile: A jigsaw puzzle piece with multiple pairs of boundary constraints, the same number as the tile space dimension. The boundary conditions attached to a tile can be abstracted as defining a function f and a desired output, along with its own attribute as input to other tiles. The matching operation involves substituting two adjacent tiles into their respective f values ​​to verify if the desired output matches. The implementation of boundary conditions is not fixed here; only some possible methods are listed: 2D pixel matching, label system matching, boundary definition type attribute matching (sand, soil, water), and Berlin noise for continuity matching, etc. Tiles can carry 2D or 3D geographic location information, giving the generated tile space continuous geographic spatial properties. Tiles can also carry local images or 3D model data, giving the generated tile space continuous 2D image or 3D model attributes.

[0044] Slot: The basic unit of space in the block space. Each slot can hold one tile. The Slot's entropy is used to mark the number of tiles that meet its conditions at a certain time when the tile is not yet determined in the Slot.

[0045] A Chunk is a set of multiple slots used to represent the number of slots required for a consensus computation, i.e., the number of slots stored in a block. Its defined size, ChunkSize, adjusts the difficulty of the consensus process. A Chunk contains ChunkSize raised to the power of n slots. The genesis block is the origin of the block space, specifically the Chunk with coordinates (0,0,0,...).

[0046] Example 1

[0047] The purpose of this invention is to address the increasing prevalence of blockchain technology applications, exploring how to integrate blockchain technology with multidimensional spaces or models, including Geographic Information Systems (GIS), and design a mechanism to improve consensus computing capabilities in such scenarios by leveraging basic blockchain services, particularly blockchain consensus mechanisms. Therefore, this invention proposes a Proof-of-Work (PoW)-like blockchain consensus mechanism that effectively utilizes spatial characteristics and the continuous generation of blocks in blockchain. It should be noted that... Figure 1 The diagram shown illustrates the relationship between Chunks and Slots. It can be seen that when processing two-dimensional spatial features, as... Figure 1 As shown, assuming the block space has a dimension of n=2 and ChunkSize=3, then the Chunk consists of 3 2 That is, it consists of 9 slots. Similarly, when processing three-dimensional spatial features, assuming the dimension of the block space is n=3 and the ChunkSize=3, then the Chunk consists of 3... 3 It consists of 27 slots.

[0048] Therefore, this embodiment of the invention introduces tiles based on the chunk generation rules, forming the method of this embodiment. The block generation process of the blockchain corresponds to the block space filling process. The goal is to continuously generate blank block space from the origin outwards as blockchain blocks are continuously generated. The consensus process of the blockchain relies on whether the newly generated chunks in the block space meet the boundary conditions of the already generated chunks to achieve proof-of-work consensus. Under the given constraints and the constraints of the tile set, the block space generation algorithm conforms to random characteristics, and the verification process is easier than the generation process. (Refer to...) Figure 2 As shown, including:

[0049] Step 201: Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0050] Step 202: After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints.

[0051] Specifically, assuming the block space dimension is 2, the Tile has 2 pairs of boundary conditions (top and bottom, left and right); assuming the block space dimension is 3, the Tile has 3 pairs of boundary conditions (top and bottom, left and right, front and back).

[0052] Step 203: Generate the block according to the Chunk generation rules and broadcast it to the blockchain nodes. Optionally, the block is generated according to the Chunk generation rules, such as... Figure 3 As shown, including:

[0053] Step 311: Sequentially obtain the boundary constraints of adjacent slots to the current slot, calculate the number of tiles in the undetermined tile state that satisfy the boundary constraints of the current slot, and record it as Entropy. Optionally, the Chunk is generated in order of distance from the Chunk to the origin of the block space from near to far, and in order of coordinate indices from small to large. For example: the distance from the Chunk to the origin is from near to far, such as (0,1,0) first, (0,2,0) second; the coordinate order of the Chunk is based on the size of the coordinate indices compared sequentially, from small to large, such as (0,1,0) first, (1,0,0) second; (0,-1,0) first, (0,1,0) second; (0,1,-1) first, (0,1,1) second. It should be noted that setting Entropy can reduce the number of rollbacks when generating Chunks and improve the success rate of Chunk generation.

[0054] Step 312: If the current slot's entropy is not 0, select the slot with the smallest entropy, randomly select one tile, and set the entropy to 0;

[0055] Step 313: Repeat steps 311 and 312 until all slots have completed the selection of the tile;

[0056] Step 314: If the current Slot's Entropy is 0, then regenerate the Chunk.

[0057] Step 315: When the number of slot regenerations is k, roll back to the first k generated slots. It should be noted that the smaller k is, the fewer rollbacks are needed, and the higher the success rate of generating a chunk.

[0058] Step 204: Perform consensus verification on the block. Optionally, since this embodiment of the invention introduces block space features and tiles to perform consensus verification on the block, such as... Figure 4 As shown, it includes:

[0059] Step 411: Verify that the hash of the Tile set used by the block is correct and ensure that it is consistent with the version of the Tile set;

[0060] Step 412: Verify whether the ChunkSize is consistent;

[0061] Step 413: Verify whether the boundary constraints are consistent with the boundary constraints of the generated Chunk;

[0062] Step 414: Verify whether the tiles in all slots of the Chunk meet the boundary constraints.

[0063] Step 205: After the consensus verification is successful, submit the block to the blockchain. The block submission process is consistent with existing PoW consensus methods and will not be repeated here.

[0064] This embodiment proposes another implementation scheme for a blockchain consensus method, such as... Figure 5 As shown, it also includes:

[0065] Step 206: Adjust the chunk generation time interval by setting the ChunkSize value, and adjust the Chunk generation rule by setting the number of Tiles and boundary constraints.

[0066] It should be noted that in the above specific embodiments, any implementation of the above process within a blockchain smart contract, or the use of a blockchain network that supports smart contracts to achieve secure data sharing, all conform to the solutions of this invention.

[0067] Example 2

[0068] Figure 6 This is a schematic diagram of a blockchain consensus device 600 provided as an embodiment of this specification. Please refer to... Figure 6 In one implementation, a blockchain consensus device includes:

[0069] The first module 601 is used to initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0070] The second module 602 is used to generate the genesis block after pre-setting a number of tiles in the genesis block that are used to attach specific features of the block space and satisfy specific boundary constraints, wherein the slot includes the tiles that satisfy the boundary constraints.

[0071] The third module 603 is used to generate the block according to the Chunk generation rules and broadcast it to the blockchain nodes.

[0072] The fourth module 604 is used to perform consensus verification on the block.

[0073] The fifth module 605 is used to submit the block to the blockchain after the consensus verification is passed.

[0074] This embodiment proposes another implementation scheme for a blockchain consensus device, such as... Figure 7 As shown, it also includes:

[0075] The sixth module 606 is used to adjust the chunk generation time interval by setting the ChunkSize value, and to adjust the Chunk generation rule by setting the number of Tiles and boundary constraints.

[0076] It should be understood that the blockchain consensus device in the embodiments of this specification can also perform... Figures 1 to 5 The method executed by the blockchain consensus device (or equipment), and the implementation of the blockchain consensus device (or equipment) in... Figures 1 to 5 The functionality of the example shown will not be elaborated upon here.

[0077] Example 3

[0078] This specification also proposes a blockchain system, which includes a consensus module for executing the consensus process for generating blockchain blocks. The consensus process involves executing… Figures 1 to 5 The method of the illustrated embodiment is specifically used to perform the following method:

[0079] Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0080] After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints;

[0081] The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes;

[0082] Consensus verification is performed on the block;

[0083] After the consensus verification is passed, the block is submitted to the blockchain.

[0084] During implementation, the blockchain system includes other necessary functional modules. It should be understood that these other functional modules work in concert with the consensus module to jointly complete the functions of the blockchain system.

[0085] Example 4

[0086] Figure 8 This is a schematic diagram of the structure of an electronic device according to one embodiment of this specification. Please refer to it. Figure 8At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0087] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0088] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0089] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a shared resource access control mechanism at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0090] Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0091] After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints;

[0092] The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes;

[0093] Consensus verification is performed on the block;

[0094] After the consensus verification is passed, the block is submitted to the blockchain.

[0095] The above is as described in this instruction manual. Figures 1 to 5 The blockchain consensus method disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0096] Of course, in addition to the software implementation, the electronic devices in the embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0097] Example 5

[0098] This specification also provides an embodiment of a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figures 1 to 5 The method of the illustrated embodiment is specifically used to perform the following method:

[0099] Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation.

[0100] After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints;

[0101] The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes;

[0102] Consensus verification is performed on the block;

[0103] After the consensus verification is passed, the block is submitted to the blockchain.

[0104] In summary, the above description is merely a preferred embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0105] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an electronic data carrier device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0106] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0107] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0108] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A blockchain consensus method, characterized in that, include: Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation. After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints; The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes. The generation of the block according to the Chunk generation rules includes: Step 311: Sequentially obtaining the boundary constraints of the Slots adjacent to the current Slot, calculating the number of Tiles that satisfy the boundary constraints in the undetermined Tile state of the current Slot, and recording it as Entropy; Step 312: If the Entropy of the current Slot is not 0, randomly selecting one Tile from the Slot with the smallest Entropy, and setting the Entropy to 0; Step 313: Repeating steps 311 and 312 until all Slots have completed the selection of the Tile; Step 314: If the current Slot has no determined Tile and the Entropy is 0, then regenerating the Slot. Consensus verification of the block includes: Step 411: Verifying whether the hash of the Tile set used by the block is correct and ensuring that it is consistent with the version of the Tile set; Step 412: Verifying whether the ChunkSize is consistent; Step 413: Verifying whether the boundary constraints are consistent with the boundary constraints of the generated Chunk; Step 414: Verifying whether the Tile in all the Slots of the Chunk meets the boundary constraints. After the consensus verification is passed, the block is submitted to the blockchain. Here, a Tile is a puzzle piece with multiple pairs of boundary constraints, the same number as the block space dimension; a slot is the basic unit space in the block space, and each slot can hold a Tile; a Chunk is a set of multiple slots, used to represent the number of slots required for one consensus computation.

2. The method according to claim 1, characterized in that, Generating the block according to the Chunk generation rules also includes: Step 315: When the number of times the Slot is regenerated is k, roll back to the first k generated Slots.

3. The method according to any one of claims 1 to 2, characterized in that, The Chunk is generated in order of increasing distance from the Chunk to the origin of the block space and increasing Chunk coordinate indices.

4. The method according to claim 1, characterized in that, Also includes: The chunk generation interval can be adjusted by setting the ChunkSize value, and the Chunk generation rules can be adjusted by setting the number of Tiles and boundary constraints.

5. A blockchain consensus device, characterized in that, include: The first module is used to initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation. The second module is used to generate the genesis block by pre-setting several tiles in the genesis block that are used to attach specific features of the block space and satisfy specific boundary constraints. The slot includes the tiles that meet the boundary constraints. The third module is used to generate the block according to the Chunk generation rules and broadcast it to the blockchain nodes. Specifically, the third module generates the block according to the Chunk generation rules as follows: Step 311: Sequentially obtain the boundary constraints of the Slots adjacent to the current Slot, calculate the number of Tiles that meet the boundary constraints in the undetermined Tile state of the current Slot and record it as Entropy; Step 312: If the Entropy of the current Slot is not 0, randomly select 1 Tile from the Slot with the smallest Entropy and set the Entropy to 0; Step 313: Repeat steps 311 and 312 until all Slots have completed the selection of the Tile; Step 314: If the current Slot has not determined the Tile and the Entropy is 0, regenerate the Slot. The fourth module is used to perform consensus verification on the block, including: Step 411: verifying whether the hash of the Tile set used by the block is correct and ensuring that it is consistent with the version of the Tile set; Step 412: verifying whether the ChunkSize is consistent; Step 413: verifying whether the boundary constraints are consistent with the boundary constraints of the generated Chunk; Step 414: verifying whether the Tile in all the Slots in the Chunk meets the boundary constraints. The fifth module is used to submit the block to the blockchain after the consensus verification is passed; Here, a Tile is a puzzle piece with multiple pairs of boundary constraints, the same number as the block space dimension; a slot is the basic unit space in the block space, and each slot can hold a Tile; a Chunk is a set of multiple slots, used to represent the number of slots required for one consensus computation.

6. The apparatus according to claim 5, characterized in that, The third module generates the block according to the Chunk generation rules and is also used for: Step 315: When the number of times the Slot is regenerated is k, roll back to the first k generated Slots.

7. The apparatus according to any one of claims 5 to 6, characterized in that, The third module generates the Chunk in order of distance from the Chunk to the origin of the block space from near to far, and in order of coordinate subscript from small to large.

8. The apparatus according to claim 5, characterized in that, It also includes a sixth module, used to adjust the chunk generation time interval by setting the ChunkSize value, and to adjust the Chunk generation rules by setting the number of Tiles and boundary constraints.

9. A blockchain system, comprising a consensus module, characterized in that, The implementation process of the consensus module includes: Initialize the blockchain configuration, which includes at least the block space dimension n and the chunk size ChunkSize, wherein one chunk corresponds to one block, and the chunk includes ChunkSize. n A slot is a basic unit of block space used for consensus computation. After pre-setting several tiles in the genesis block for attaching specific features of the block space and satisfying specific boundary constraints, the genesis block is generated, wherein the slot includes the tiles that meet the boundary constraints; The block is generated according to the Chunk generation rules and broadcast to the blockchain nodes. The generation of the block according to the Chunk generation rules includes: Step 311: Sequentially obtaining the boundary constraints of the Slots adjacent to the current Slot, calculating the number of Tiles that satisfy the boundary constraints in the undetermined Tile state of the current Slot, and recording it as Entropy; Step 312: If the Entropy of the current Slot is not 0, randomly selecting one Tile from the Slot with the smallest Entropy, and setting the Entropy to 0; Step 313: Repeating steps 311 and 312 until all Slots have completed the selection of the Tile; Step 314: If the current Slot has no determined Tile and the Entropy is 0, then regenerating the Slot. Consensus verification of the block includes: Step 411: Verifying whether the hash of the Tile set used by the block is correct and ensuring that it is consistent with the version of the Tile set; Step 412: Verifying whether the ChunkSize is consistent; Step 413: Verifying whether the boundary constraints are consistent with the boundary constraints of the generated Chunk; Step 414: Verifying whether the Tile in all the Slots of the Chunk meets the boundary constraints. After the consensus verification is passed, the block is submitted to the blockchain. Here, a Tile is a puzzle piece with multiple pairs of boundary constraints, the same number as the block space dimension; a slot is the basic unit space in the block space, and each slot can hold a Tile; a Chunk is a set of multiple slots, used to represent the number of slots required for one consensus computation.

10. An electronic device, characterized in that, include: processor; And a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 4.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs that, when executed by an electronic device including multiple applications, cause the electronic device to perform the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • System and method providing advanced distributed ledger capabilities via specialized data records

    CA3141042A1

  • Blockchain consensus method and node

    CN111177263A