CN117376137A - Block chain node slicing method, equipment and storage medium - Google Patents

Block chain node slicing method, equipment and storage medium Download PDF

Info

Publication number
CN117376137A
CN117376137A CN202311374976.0A CN202311374976A CN117376137A CN 117376137 A CN117376137 A CN 117376137A CN 202311374976 A CN202311374976 A CN 202311374976A CN 117376137 A CN117376137 A CN 117376137A
Authority
CN
China
Prior art keywords
node
fragment
mapping
static
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311374976.0A
Other languages
Chinese (zh)
Inventor
王宏智
史先澳
龙浩
唐乙午
陈荣深
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Complex Beauty Technology Co ltd
Original Assignee
Chongqing Complex Beauty Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Complex Beauty Technology Co ltd filed Critical Chongqing Complex Beauty Technology Co ltd
Priority to CN202311374976.0A priority Critical patent/CN117376137A/en
Publication of CN117376137A publication Critical patent/CN117376137A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block chain node slicing method, equipment and a storage medium, which are characterized in that static nodes are in one-to-one correspondence with slicing networks, mapping and virtual mapping are performed on a hash ring, the relative average probability of dynamic nodes entering each slicing network is ensured through virtual mapping, then the slicing network into which the dynamic nodes are allocated is ensured through the mapping of the dynamic nodes on the hash ring, the distribution of the dynamic nodes in each slicing network is ensured, and meanwhile, when the dynamic nodes are allocated to enter the slicing network, the time sequence marker number is used as a parameter to be added into the calculation of the hash ring mapping, the mapping calculation at different block heights is ensured to be different, and the randomness when slicing is repeated.

Description

Block chain node slicing method, equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain node slicing method, a device, and a storage medium.
Background
With the development of the blockchain technology, the number of nodes of the blockchain network is rapidly increased, so that the transaction throughput in the blockchain network is linearly increased, meanwhile, the blockchain technology relies on the technologies such as cryptography and consensus mechanism to accommodate the consensus of the nodes in the untrusted network, but due to the influence of the consensus mechanism and the cryptography, the transaction of the blockchain usually needs to adopt a serial mechanism, and the transaction throughput has a huge efficiency gap from the traditional internet application. Therefore, the block chain node slicing technology is developed, the node slicing test paper divides the block chain system into a plurality of similar slices, and a plurality of slices process transactions in parallel and store corresponding data, so that the transaction processing efficiency is improved, the original serial working mechanism of the block chain is changed into parallel, and the transaction throughput of the block chain is greatly improved.
The current mainstream node slicing method firstly sets a certain value, requires the nodes of the whole network to adopt a workload proof algorithm to obtain hash values meeting the requirements, takes the first N nodes to form a central committee, takes charge of the allocation of other nodes in the network by the central committee, adopts the allocation mode such as taking the hash values of node IP, public key and other information combinations, and allocates the obtained hash values to corresponding slices by taking the modes of the latter bits of the obtained hash values; still other allocation methods are those in which the central committee requires the nodes to generate random numbers and broadcast them in some way, and the central committee determines the node allocation results by ordering the random numbers returned by the nodes. Because each node can broadcast to the whole network after generating the random number, the malicious node can use the random number received at the stage to obtain the distribution condition of the nodes in the system, thereby launching the attack. In the two methods, nodes are distributed by a central committee, the success rate and the time consumption of the segmentation are high in dependence on the central committee, if malicious nodes exist in the central committee, the node distribution failure can be caused, the central membership number is generated through a workload proof algorithm, and the malicious nodes have high probability of acquiring the node positions of the central committee through a calculation stacking mode.
Disclosure of Invention
In order to solve the technical problems, the invention provides a block chain node slicing method, equipment and a storage medium, which can form a node slicing scheme for uniformly distributing nodes on the premise of not depending on a central committee.
The invention is realized by the following scheme, and in a first aspect, the invention provides a blockchain node slicing method, which comprises the following steps:
s1, initializing the number of fragments, and configuring the same number of static nodes for each fragment; wherein the static node is randomly selected according to the intelligent contract or specified by the blockchain manager;
s2, each static node calculates the mapping of the fragment on which the static node is positioned on the first hash ring through a consistent hash algorithm according to the fragment information of the fragment, and simultaneously calculates a plurality of virtual mappings of the fragment on which the static node is positioned on the first hash ring through a virtual mapping mechanism, wherein the virtual mapping mechanism realizes the mapping of each fragment on the first hash ring and the virtual mapping to form uniform distribution by configuring the virtual mapping for each fragment;
s3, randomly selecting a static node in the block chain network to calculate a time sequence marker number, and broadcasting the mapping result of each fragment on the first hash ring and the book sequence marker number to the whole network through consensus; the time sequence mark number is calculated according to the current block height and the current fragment number in the block chain system;
s4, the dynamic node joins the blockchain network, corresponding verifiable random values and verification certificates are calculated through VRF functions based on time sequence marker numbers, node private keys of the dynamic node and node attribute parameters, the dynamic node calculates the mapping of the dynamic node on the first hash ring according to the corresponding verifiable random values and the consistency hash algorithm, the dynamic node determines the affiliated fragments of the dynamic node according to the positions of the mapping of the dynamic node on the first hash ring, and the dynamic node sends fragment verification messages to all static nodes of the affiliated fragments, wherein the fragment verification messages comprise the verifiable random values and the verification certificates corresponding to the dynamic node;
s5, the static node receives and verifies the fragment verification message from the dynamic node, verifies the verifiable random value of the dynamic node through the time sequence mark number and verification proof, and incorporates the dynamic node into the fragment if verification is passed, otherwise, sends failure information;
and S6, after a preset re-segmentation period, each static node synchronizes the block data in the segmentation, uploads the block data to a storage node for storage, and after the uploading is finished, the system executes the re-segmentation and repeats the steps S1 to S5.
In a second aspect, the invention provides a computer device characterized by one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described in the first aspect above.
In a third aspect, the present invention provides a storage medium storing a computer program which, when executed by a processor, implements a method as described in the first aspect above.
The application has the following beneficial effects:
in the method, the static nodes are in one-to-one correspondence with the fragments, the probability that the dynamic nodes are allocated into the fragments is guaranteed not to have too large difference through the mapping and virtual mapping of the static nodes on the hash ring, the fragments into which the dynamic nodes are allocated are determined through the mapping of the dynamic nodes on the hash ring, the dynamic nodes are distributed in the fragments, a central committee is avoided being generated before allocation, and the dependence of the node fragments on the central committee is eliminated; meanwhile, through periodical re-slicing, the nodes which are in the same slicing for a long time are prevented from being influenced by malicious nodes.
Drawings
FIG. 1 is a flow chart of a blockchain node sharding method provided by an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to specific examples and figures of the specification. Those of ordinary skill in the art will be able to implement the invention based on these descriptions. In addition, the embodiments of the present invention referred to in the following description are typically only some, but not all, embodiments of the present invention. Therefore, all other embodiments, which can be made by one of ordinary skill in the art without undue burden, are intended to be within the scope of the present invention, based on the embodiments of the present invention. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The methods outlined in the examples of the present invention are all those known to those skilled in the art unless specifically stated otherwise.
Examples:
in this embodiment, a blockchain node slicing method is provided, as shown in fig. 1, and the method includes the following steps:
s1, initializing the number of fragments, and configuring the same number of static nodes for each fragment; wherein the static node is randomly selected according to the intelligent contract or specified by the blockchain manager;
s2, each static node calculates the mapping of the fragment on which the static node is positioned on the first hash ring through a consistent hash algorithm according to the fragment information of the fragment, and simultaneously calculates a plurality of virtual mappings of the fragment on which the static node is positioned on the first hash ring through a virtual mapping mechanism, wherein the virtual mapping mechanism realizes the mapping of each fragment on the first hash ring and the virtual mapping to form uniform distribution by configuring the virtual mapping for each fragment;
s3, randomly selecting a static node in the block chain network to calculate a time sequence marker number, and broadcasting the mapping result of each fragment on the first hash ring and the book sequence marker number to the whole network through consensus; the time sequence mark number is calculated according to the current block height and the current fragment number in the block chain system;
s4, the dynamic node joins the blockchain network, corresponding verifiable random values and verification certificates are calculated through VRF functions based on time sequence marker numbers, node private keys of the dynamic node and node attribute parameters, the dynamic node calculates the mapping of the dynamic node on the first hash ring according to the corresponding verifiable random values and the consistency hash algorithm, the dynamic node determines the affiliated fragments of the dynamic node according to the positions of the mapping of the dynamic node on the first hash ring, and the dynamic node sends fragment verification messages to all static nodes of the affiliated fragments, wherein the fragment verification messages comprise the verifiable random values and the verification certificates corresponding to the dynamic node;
s5, the static node receives and verifies the fragment verification message from the dynamic node, verifies the verifiable random value of the dynamic node through the time sequence mark number and verification proof, and incorporates the dynamic node into the fragment if verification is passed, otherwise, sends failure information;
and S6, after a preset re-segmentation period, each static node synchronizes the block data in the segmentation, uploads the block data to a storage node for storage, and after the uploading is finished, the system executes the re-segmentation and repeats the steps S1 to S5.
In the above embodiment, firstly, the static nodes and the sliced network are in one-to-one correspondence, mapping and virtual mapping are performed on the hash ring, the probability of the dynamic nodes entering each sliced network is ensured to be relatively even through the virtual mapping, then the sliced network into which the dynamic nodes are distributed is ensured to be distributed through the mapping of the dynamic nodes on the hash ring, the dynamic nodes are distributed in each sliced network, meanwhile, when the dynamic nodes are distributed into the sliced network, the dynamic nodes are added into the calculation of the hash ring mapping by taking the time sequence mark number as a parameter, the different mapping calculation at different block heights is ensured, and the randomness at the time of slicing is ensured.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 2, as still another embodiment of the present invention, there is provided a computer apparatus 100 including one or more Central Processing Units (CPUs) 101 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 102 or a program loaded from a storage portion 108 into a Random Access Memory (RAM) 103. In the RAM103, various programs and data required for the operation of the device 100 are also stored. The CPU101, ROM102, and RAM103 are connected to each other through a bus 104. An input/output (I/O) interface 105 is also connected to bus 104.
The following components are connected to the I/O interface 105: an input section 106 including a keyboard, a mouse, and the like; an output section 107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 108 including a hard disk or the like; and a communication section 109 including a network interface card such as a LAN card, a modem, and the like. The communication section 109 is also connected to the I/O interface 105 as necessary via a network execution communication processing driver 110 such as the internet. A removable medium 111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 110 as needed, so that a computer program read out therefrom is installed into the storage section 108 as needed.
In particular, according to embodiments of the present disclosure, the method described in embodiment 1 above may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 109, and/or installed from the removable medium 111.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or can be implemented by special purpose hardware in combination with computer instructions, for self-expressed parallel chain cross-chain transaction state synchronization information based on compressed account number addresses, which are compressed for the purpose of saving the number of transaction bytes, and which express asset type information. The design saves the number of transaction bytes, and can complete the synchronization of the states without the need of a main chain to pull the historical height blocks.
The units or modules described in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or their equivalents without departing from the spirit of the application. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (3)

1. A blockchain node slicing method, the method comprising the steps of:
s1, initializing the number of fragments, and configuring the same number of static nodes for each fragment; wherein the static node is randomly selected according to the intelligent contract or specified by the blockchain manager;
s2, each static node calculates the mapping of the fragment on which the static node is positioned on the first hash ring through a consistent hash algorithm according to the fragment information of the fragment, and simultaneously calculates a plurality of virtual mappings of the fragment on which the static node is positioned on the first hash ring through a virtual mapping mechanism, wherein the virtual mapping mechanism realizes the mapping of each fragment on the first hash ring and the virtual mapping to form uniform distribution by configuring the virtual mapping for each fragment;
s3, randomly selecting a static node in the block chain network to calculate a time sequence marker number, and broadcasting the mapping result of each fragment on the first hash ring and the book sequence marker number to the whole network through consensus; the time sequence mark number is calculated according to the current block height and the current fragment number in the block chain system;
s4, the dynamic node joins the blockchain network, corresponding verifiable random values and verification certificates are calculated through VRF functions based on time sequence marker numbers, node private keys of the dynamic node and node attribute parameters, the dynamic node calculates the mapping of the dynamic node on the first hash ring according to the corresponding verifiable random values and the consistency hash algorithm, the dynamic node determines the affiliated fragments of the dynamic node according to the positions of the mapping of the dynamic node on the first hash ring, and the dynamic node sends fragment verification messages to all static nodes of the affiliated fragments, wherein the fragment verification messages comprise the verifiable random values and the verification certificates corresponding to the dynamic node;
s5, the static node receives and verifies the fragment verification message from the dynamic node, verifies the verifiable random value of the dynamic node through the time sequence mark number and verification proof, and incorporates the dynamic node into the fragment if verification is passed, otherwise, sends failure information;
and S6, after a preset re-segmentation period, each static node synchronizes the block data in the segmentation, uploads the block data to a storage node for storage, and after the uploading is finished, the system executes the re-segmentation and repeats the steps S1 to S5.
2. A computer device, characterized by one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of claim 1.
3. A storage medium storing a computer program, which when executed by a processor implements the method of claim 1.
CN202311374976.0A 2023-10-23 2023-10-23 Block chain node slicing method, equipment and storage medium Pending CN117376137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311374976.0A CN117376137A (en) 2023-10-23 2023-10-23 Block chain node slicing method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311374976.0A CN117376137A (en) 2023-10-23 2023-10-23 Block chain node slicing method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117376137A true CN117376137A (en) 2024-01-09

Family

ID=89396104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311374976.0A Pending CN117376137A (en) 2023-10-23 2023-10-23 Block chain node slicing method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117376137A (en)

Similar Documents

Publication Publication Date Title
CN108964879B (en) Lottery drawing method, consensus method, device and storage medium
CN109246176B (en) Multi-controller synchronization method and device based on block chain in software defined network
CN109688199B (en) Multi-domain layered Internet of things alliance chain platform, fragmentation method thereof and computer
CN113900598B (en) Data storage method, device, equipment and storage medium based on block chain
CN106156159A (en) A kind of table connection processing method, device and cloud computing system
CN111478795B (en) Alliance block chain network consensus method based on mixed Byzantine fault tolerance
CN113824728A (en) Network communication method and system based on data encryption
CN111478775B (en) Interactive aggregated signature method, equipment and storage medium
CN112367168A (en) Method and device for generating key of block chain user
CN110990790B (en) Data processing method and equipment
CN109981284B (en) Method and device for realizing elliptic curve digital signature
CN113505392B (en) Secret sharing method and device
CN110570309B (en) Method and system for replacing a leader of a blockchain network
CN114036581A (en) Privacy calculation method based on neural network model
CN117376137A (en) Block chain node slicing method, equipment and storage medium
CN104965840B (en) Data node random allocation method and system
CN111464542B (en) Accounting method and device for block chain network
CN112182598A (en) Public sample ID identification method, device, server and readable storage medium
CN117834656B (en) Edge computing cross-domain synchronization method and system
CN116055049B (en) Multiparty secure computing method, device, system, electronic equipment and storage medium
CN114726851B (en) Block operation method, device, electronic equipment and storage medium
CN113518016B (en) Message sending method, VNFM and computer readable storage medium
CN113452540B (en) SDN configuration method and device and computer readable storage medium
CN108964878B (en) Lottery drawing method, consensus method, device and storage medium
CN117318952A (en) Block chain-based monitoring equipment authentication method, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination