CN116248725A - Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment - Google Patents
Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment Download PDFInfo
- Publication number
- CN116248725A CN116248725A CN202310518821.3A CN202310518821A CN116248725A CN 116248725 A CN116248725 A CN 116248725A CN 202310518821 A CN202310518821 A CN 202310518821A CN 116248725 A CN116248725 A CN 116248725A
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- slicing
- committee
- catalogue
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000004891 communication Methods 0.000 claims abstract description 61
- 238000013467 fragmentation Methods 0.000 claims abstract description 10
- 238000006062 fragmentation reaction Methods 0.000 claims abstract description 10
- 238000000638 solvent extraction Methods 0.000 claims abstract description 9
- 238000012790 confirmation Methods 0.000 claims abstract description 8
- 239000012634 fragment Substances 0.000 claims description 59
- 230000015572 biosynthetic process Effects 0.000 claims description 14
- 230000011218 segmentation Effects 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000006855 networking Effects 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 4
- 238000012795 verification Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 5
- 238000005457 optimization Methods 0.000 description 5
- 238000005192 partition Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 230000002068 genetic effect Effects 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 125000002015 acyclic group Chemical group 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a block chain node slicing method for node collaborative storage in an Internet of vehicles environment. The method comprises the following steps: all nodes in the block chain system solve the workload proving difficult problem to determine each member node and a leading node in the catalogue committee, each member node operates NSGA-II algorithm, and the corresponding optimal fragmentation result is obtained and sent to the leading node; the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results and broadcasts the best slicing result to other nodes in the catalogue committee; other nodes in the catalogue committee perform confirmation signature; when the leader node receives a message of 2 or morehUnder the condition of confirming the signature of 3 nodes, the catalogue committee achieves consensus and the fragmentation is completed; otherwise, reselecting the leading node for slicing until the catalogue committeeConsensus is reached to generate a shard result list and determine a cooperative group partitioning result list for each shard, thereby reducing communication delay between nodes within the shard.
Description
Technical Field
The application relates to the technical field of the Internet of things, in particular to a block chain node slicing method for node collaborative storage in an Internet of vehicles environment.
Background
With the development of the internet of things, the internet of things is becoming an important application in technology and industry. The internet of vehicles (Internet of Vehicles, ioV) is a large integrated network for wireless communication and information exchange among people, vehicles and roads. The internet of vehicles can obviously improve traffic efficiency, reduce energy consumption and reduce traffic accidents. Typically, the internet of vehicles consists of intelligent vehicles, roadSide Units (RSUs), which are typically road infrastructure fixed at the RoadSide, trusted authorities (Trusted Authority, TAs), which are typically trusted servers, and Data Centers (DCs), which are used to store all internet of vehicles related information. When the vehicle enters the communication range of the RSU, it will automatically communicate with the RSU over the wireless channel via a dedicated short-range communication protocol. Wired channels are typically used between each TA and between TA and DC. After the vehicle establishes connection with the TA through the RSU, the vehicle can upload information such as the position, the vehicle state and the like to the TA, and can also receive information such as traffic information and the like from the TA to plan the own driving route.
In the internet of vehicles, a large amount of data of different types can be continuously generated by mobile vehicles, and data sharing among vehicles plays a crucial role in improving driving safety and enhancing vehicle-mounted services, but in the data sharing, the problems of data safety, privacy information leakage and the like are easily caused. Based on the problems, the blockchain technology is combined with the Internet of vehicles, the technical characteristics of the blockchain, such as decentralization, anonymity, non-tampering and traceability, can be utilized, the privacy, safety and integrity of data sharing are ensured, the encryption algorithm in the blockchain is utilized to form effective access control, the problem of sharing data among unauthorized access vehicles can be effectively solved, and the vehicles can adaptively customize proper sharing rules according to the self resource state and the shared data characteristic by virtue of the intelligent contract technology of the blockchain, so that the autonomous data sharing of users is truly realized, and the user data management pressure in the Internet of vehicles is reduced. However, due to the problems of limited resources (such as limited storage space) of the internet of vehicles (RSU, etc.), poor expandability of the blockchain in the internet of vehicles, low throughput, etc., the application of the blockchain in the internet of vehicles is limited. In addition, due to the increasing popularity of 5G mobile communications and the explosive growth of the number of internet of vehicles devices, there is an urgent need to improve the scalability and throughput of blockchain systems.
Solutions to block chain scalability generally fall into three categories: side chains, fragmentation and directed acyclic graphs, wherein the fragmentation technique is a very promising solution. The slicing technique is divided into three types: node sharding, transaction sharding and state sharding. The node slicing is to divide the nodes in the traditional blockchain into a plurality of small slices, and each slice processes the transaction submitted to the blockchain in parallel so as to improve the expandability of the blockchain system. Each segment can be regarded as a small blockchain, and the nodes in each segment independently verify the transaction in the segment, and after all the nodes in the segment reach consensus, the transaction is packed into micro-blocks. Each tile generates micro-blocks, all micro-blocks are collected and verified by the directory committee, and finally a complete block is generated and submitted to the blockchain. Thus, in theory, the transaction throughput of a blockchain can be improved by several times.
In the related art, although the slicing technology can improve the expandability of a blockchain system, the blockchain slicing technology is used in the Internet of vehicles, a slicing scheme of node random division is adopted, malicious nodes are easily gathered to the same slicing problem, so that the slicing safety is affected.
Thus, the communication delay between nodes of the current blockchain node sharding method is high.
Disclosure of Invention
Accordingly, in view of the above-mentioned problems, it is necessary to provide a blockchain node slicing method for node collaborative storage in an internet of vehicles environment, which can reduce communication delay between nodes.
A blockchain node slicing method for node collaborative storage in an Internet of vehicles environment comprises the following steps:
all nodes in the block chain system solve the workload proving problem, and the workload proving problem is solved firsthThe individual nodes are determined as member nodes in the catalogue committee;
randomly selecting a leader node of a catalogue committee from the member nodes;
each member node runs NSGA-II algorithm to obtain the optimal slicing result of each member node;
each member node sends the respective best slicing result to the leader node;
the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results, and broadcasts the best slicing result with the smallest communication delay difference to other nodes in the catalogue committee;
other nodes in the catalogue committee perform confirmation signature according to the best slicing result with the smallest received communication delay difference;
when the leader node receives a message of 2 or morehIn case of confirming signature of 3 nodes, the catalogue committee agrees that the fragmentation is completedForming;
when the leader node receives less than 2hReturning to the step of executing the step of randomly selecting the leader node of the catalogue committee from the member nodes until the leader node receives 2 or more under the condition of the acknowledgement signature of/3 nodesh3, confirming signature of the nodes, consensus is achieved by the catalogue committee, and the segmentation is completed, so that a segmentation result list is generated;
and carrying out cooperative group division on nodes in each fragment according to the fragment result list, and determining a cooperative group division result list of each fragment.
In one embodiment, all nodes in the blockchain system solve the workload certification puzzle, first solving the front of the workload certification puzzlehBefore the step of determining that the individual node is a member node in the catalogue committee, the method further comprises:
analyzing all nodes in a block chain system, and determining malicious nodes and the total number of the malicious nodes in the block chain system;
determining whether the proportion of malicious nodes in the blockchain system is more than one third according to the total number of nodes in the blockchain system and the total number of malicious nodes in the blockchain system;
removing from the blockchain system if the proportion of malicious nodes in the blockchain system is greater than one thirdqA malicious node;
wherein ,,to the number of malicious nodes that need to be removed,mas the number of malicious nodes in the blockchain system,Nas a total number of nodes in the blockchain system,Δis the proportion of malicious nodes in the blockchain system.
In one embodiment, the objective function of the NSGA-II algorithm is:
wherein ,for the difference in the number of nodes between slices, +.>For malicious node proportion difference among fragments, +.>For communication delay difference between slices, +.>For the difference in storage space between the slices,Ωthe solution space divided for the nodes is defined,Xfor the best slicing result of the member node,Rthe proportion of malicious nodes in the fragments is the best fragments result.
In one embodiment, the difference in the number of nodes between the slicesThe calculation mode of (a) is as follows:
wherein ,is sliced intojThe number of nodes in the network is equal to the number of nodes in the network,his the number of slices in the blockchain system.
In one embodiment, the malicious node proportion difference between the fragmentsThe calculation mode of (a) is as follows:
wherein ,is sliced intojIs a proportion of the malicious nodes of (a),E j is sliced intojNumber of malicious nodes.
In one embodiment, the communication delay difference between the fragmentsThe calculation mode of (a) is as follows:
wherein ,is sliced intojAll nodes in the network to sharded leader nodeuCommunication delay difference,/->Is the leading nodeuTo the nodeiIs used for the communication delay of the (c) signal,g j is sliced intojIs>Leader node for fragmentsuReceiving nodeiTime of reply->Leader node for fragmentsuTransmitting information to a nodeiIs a time of day (c).
In one embodiment, the memory space difference between the slicesThe calculation mode of (a) is as follows: />
wherein ,is sliced intojThe storage space of the internal node is defined,c i is a nodeiIs not included in the memory space size of (a).
In one embodiment, the performing cooperative group partitioning on the nodes in each slice according to the slice result list, and determining the cooperative group partitioning result list of each slice includes:
will be slicedjThe available storage space in the memory is larger than that of the fragmentsjRequired storage spaceF j Is removed from the list of shard results;
broadcasting a start team formation notice by a leader node of the catalogue committee;
slicingjThe node in the list immediately sends the notification of the start of team formation to the sharerjBroadcasting a team request by other nodes in the network;
when slicingjNode in (a)iReceiving a nodebAfter agreeing to group message, calculate the nodeiAnd the nodebIf the node is the available storage space size of (a)iSum nodebThe sum of available storage spaces of (a) is greater thanF j The team formation is finished;
if nodeiSum nodebThe sum of the available storage spaces of (a) is less than or equal toF j Then continue waiting for other nodes' consent team formation messages until the nodeiThe sum of the available storage space with the nodes agreeing to the team is greater thanF j ;
When the total available storage space sum of all the nodes of each fragment in the fragment result list which are completely formed into groups or the nodes of the rest of each fragment which are not formed into groups is smaller thanFThe partitioning of the collaboration group of each segment is finished, and the nodes of the rest ungrouped of each segment are taken as candidate nodes of each segment.
According to the block chain node slicing method oriented to node collaborative storage in the Internet of vehicles environment, the workload proving difficult problem is solved through all nodes in the block chain system, and the front of the workload proving difficult problem is solved firsthEach node is determined as each member node in the catalogue committee, and the leader of the catalogue committee is randomly selected from each member nodeThe node further runs NSGA-II algorithm on each member node to obtain the optimal slicing result of each member node, and sends the optimal slicing result to the leader node; the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results, and broadcasts the best slicing result with the smallest communication delay difference to other nodes in the catalogue committee; other nodes in the catalogue committee perform confirmation signature according to the best slicing result with the smallest received communication delay difference; when the leader node receives a message of 2 or morehUnder the condition of confirming the signature of 3 nodes, the catalogue committee achieves consensus and the fragmentation is completed; when the leader node receives less than 2hReturning to the step of executing the step of randomly selecting the leader node of the catalogue committee from the member nodes until the leader node receives 2 or more under the condition of the acknowledgement signature of/3 nodesh3, confirming signature of the nodes, consensus is achieved by the catalogue committee, and the segmentation is completed, so that a segmentation result list is generated; and then, according to the segmentation result list, carrying out cooperative group division on the nodes in each segment, and determining a cooperative group division result list of each segment, thereby obtaining the segmentation result with the smallest communication delay difference, improving the transaction throughput of the block chain and reducing the communication delay among the nodes in the segment.
Drawings
FIG. 1 is a flow chart of a blockchain node sharding method for node collaborative storage in a vehicle networking environment in one embodiment;
fig. 2 is a schematic structural diagram of a blockchain node slicing method facing node collaborative storage in an internet of vehicles environment in an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1 and fig. 2, a blockchain node slicing method facing node collaborative storage in an internet of vehicles environment is provided, which includes the following steps:
step S220, all nodes in the block chain system solve the workload proving problem, and the front of the workload proving problem is solved firsthThe individual nodes are determined as member nodes in the directory committee.
Wherein, all nodes in the blockchain system may include roadside units, and all nodes in the blockchain system may further include roadside units and trusted authorities. Roadside units in the internet of vehicles are responsible for receiving, processing and broadcasting messages sent by vehicles.
The catalogue committee is responsible for collecting micro-blocks packaged by each partition, combining the micro-blocks into blocks, issuing the blocks into a blockchain system, and dividing the nodes into different partitions. The member nodes of the directory committee consist of leader nodes of the shards.
The leader node of the fragment is responsible for transaction distribution and collection of verification results of the current fragment, and generates micro-blocks of the transaction verification results to be submitted to a catalogue committee.
The micro-block can be a transaction set formed by verifying and consensus of transactions in the fragments.
It should be appreciated that a node wants to join a blockchain system, and that a proof of work (PoW) puzzle needs to be resolved. When the block chain system is initialized, all nodes in the block chain system solve the PoW problem, and the problem is solved firsthThe individual nodes are elected as member nodes of the directory committee.
Step S240, randomly selecting the leading node of the catalogue committee from the member nodes.
Wherein the leader node of the committee of the catalogue (denoted as L) is generated from the member nodes of the committee of the catalogue in a random manner. Each member node of the directory committee is the leader node of each slice.
And step S260, each member node runs NSGA-II algorithm to obtain the optimal slicing result of each member node.
The NSGA-II algorithm is one of the most popular multi-objective genetic algorithms, reduces the complexity of the non-inferior sorting genetic algorithm, has the advantages of high operation speed and good convergence of solution sets, and therefore NSGA-II algorithm is selected to solve the fragmentation results.
In one embodiment, the NSGA-II algorithm performs the slicing of the nodes according to how many nodes are in the slice, whether the nodes are malicious or not, the size of the communication delay between the nodes and the leader node of the slice (communication delay for short), and the size of the node storage space in the slice. The optimization objective of the NSGA-II algorithm is: 1) The difference in the number of nodes between the slices; 2) Malicious node proportion difference among the fragments; 3) Communication delay differences between slices; 4) Differences in storage space between tiles. And respectively running NSGA-II algorithm by member nodes of the catalogue committee, calculating the difference of the number of the nodes among the fragments, the difference of malicious node proportion among the fragments, the difference of communication delay among the fragments and the difference of storage space among the fragments, and performing minimization optimization to obtain the respective optimal fragments result by each member node.
In one embodiment, the objective function of the NSGA-II algorithm is:
wherein ,for the difference in the number of nodes between slices, +.>For malicious node proportion difference among fragments, +.>For communication delay difference between slices, +.>For the difference in storage space between the slices,Ωthe solution space divided for the nodes is defined,Xfor the best slicing result of the member node,Rthe proportion of malicious nodes in the fragments is the best fragments result.
It should be understood that, the optimization objective of the objective function of the NSGA-II algorithm is designed to take the difference in the number of nodes between the slices, the difference in communication delay between the slices, the difference in the proportion of malicious nodes between the slices and the difference in the storage space between the slices as the minimum optimization objective, so that malicious nodes in the blockchain system can be uniformly distributed into each slice, and the proportion difference of the malicious nodes of each slice is reduced, thereby avoiding the malicious nodes from being gathered to the same slice and causing the failure of the blockchain system. The nodes with lower communication delay among the nodes can be divided into the same fragments, the difference of the number of the nodes among the fragments and the difference of storage space among the fragments are reduced, the transaction processing delay in the same fragment is reduced, the configuration balance among the fragments is ensured, and the situation that a directory committee spends a long time waiting because a certain fragment has lower performance is avoided.
It should be appreciated that reducing the difference in the number of nodes between the segments may ensure similar transaction processing speeds between the individual segments.
It is understood that reducing the proportion difference of malicious nodes between the fragments can ensure the safety of each fragment and avoid the malicious nodes from gathering to the same fragment, thereby causing the fragment failure. In order to improve the security of the shards, the problem of low security of the shards caused by the fact that malicious nodes enter the same shards in a large amount is avoided, and the problem of difference of the proportion of the malicious nodes among the shards is needed to be considered.
It should be appreciated that the directory committee of the blockchain system, after formation, each member node in the directory committee acts as a leader node for each shard, respectively. Reducing the communication delay between each intra-segment node and the leader node of the segment can increase the speed of intra-segment transaction processing and thus increase the transaction throughput within the segment. In order to reduce the difference in communication delay between slices and improve the throughput of the system, it is necessary to ensure that the difference in communication delay between the individual slices is as small as possible.The smaller the communication delay difference between representative slices is, otherwise, the larger the communication delay difference between representative slices is, the slices with low communication delay can submit micro-blocks earlier, and the slices with high communication delay can be submitted earlierThe time for forming the micro-blocks is longer, so that the micro-blocks are submitted later, the waiting time among the micro-blocks is too long, and the throughput of the system is reduced.
It should be appreciated that, in addition to reducing the malicious node proportion difference between the slices, the difference in the number of collaboration groups between the slices may also be reduced in order to ensure security. The number of similar collaboration groups among the fragments is indirectly ensured by reducing the storage space difference among the fragments.
In one embodiment, the difference in the number of nodes between the slicesThe calculation mode of (a) is as follows:
wherein ,is sliced intojThe number of nodes in the network is equal to the number of nodes in the network,his the number of slices in the blockchain system.
wherein ,the smaller the value representing the difference in the number of nodes between slices. />
In one embodiment, malicious node proportion differences between shardsThe calculation mode of (a) is as follows:
wherein ,is sliced intojIs a proportion of the malicious nodes of (a),E j is sliced intojNumber of malicious nodes.
In one embodiment, the communication delay difference between the tilesThe calculation mode of (a) is as follows:
wherein ,is sliced intojAll nodes in the network to sharded leader nodeuCommunication delay difference,/->Is the leading nodeuTo the nodeiIs used for the communication delay of the (c) signal,g j is sliced intojThe number of collaboration groups in>Leader node for fragmentsuReceiving nodeiTime of reply->Leader node for fragmentsuTransmitting information to a nodeiIs a time of day (c).
In one embodiment, the difference in storage space between the tilesThe calculation mode of (a) is as follows:
wherein ,is sliced intojThe storage space of the internal node is defined,c i is a nodeiIs not included in the memory space size of (a).
In step S280, each member node sends the respective best slicing result to the leader node.
And step S300, the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results, and broadcasts the best slicing result with the smallest communication delay difference to other nodes in the catalogue committee.
In step S320, other nodes in the catalogue committee perform acknowledgement signature according to the best slicing result with the smallest received communication delay difference.
Step S340, when the leader node receives a message of 2 or morehIn case of confirming signatures of 3 nodes, the catalogue committee agrees and the fragmentation is completed.
Step S360, when the leader node receives less than 2hIn the case of a confirmation signature of 3 nodes, the step of randomly selecting the leader node of the directory committee from the member nodes is returned until the leader node receives 2 or morehAnd 3, confirming signatures of the nodes, consensus is achieved by the catalogue committee, and the segmentation is completed, so that a segmentation result list is generated.
The sharding can be that all nodes in the blockchain are divided into different sets according to a certain rule, and each set is called one shard.
It should be understood that after the completion of the slices, verification and confirmation of the transaction are independently performed inside each slice, all the slices process the transaction in parallel, and the leading node of the slice is responsible for distributing the transaction inside the slice and collecting verification results. The inventory committee is responsible for collecting and validating the micro-tiles submitted by each partition and performing packing and chaining.
In one embodiment, the execution of the slicing algorithm of steps S220 to S380 is implemented, and the slicing algorithm is shown in algorithm 1:
the relevant notes for algorithm 1 are as follows:
1) Line 3 represents all nodes in the blockchain system (denoted asL) Solving the PoW problem;
2) Line 4 shows the first obtained resulthThe individual nodes form a catalogue committeeM;
3) Line 5 represents randomly picking a node from the nodes of the catalogue committee as the leader node;
4) Lines 6-9 representMThe node in the tree runs NSGA-II algorithm to obtain the best slicing result, and the best slicing result is obtainedfSend to;/>
5) Lines 11-12 representFrom all offSelecting the result with the smallest communication delay as the best result +.>And willBroadcasting;
7) Lines 14-16 represent ifMHas more than 2 nodesh3 nodes send acknowledgement signatures to, thenCorresponding slicing results are recorded into a slicing result listZAnd (5) finishing slicing;
8) Line 18 indicates if sentConfirm signature to +.>The number of nodes is less than 2h3, i.e. consensus failure, then the random slave catalogue committeeMSelecting a new node as a leader node +.>。
In algorithm 1, ifPFor the optimization objective number of NSGA-II algorithm,Qfor the population of individuals, the NSGA-II algorithm has the time complexity ofO(PQ 2 ). Algorithm 1 has only one single cycle, so algorithm 1 has a time complexity ofO(hPQ 2 )。
And step S380, carrying out cooperative group division on nodes in each slice according to the slice result list, and determining a cooperative group division result list of each slice.
Wherein the nodes in the collaboration group may exchange information with each other. The nodes with insufficient storage space can form a collaboration group, so that the sum of the storage spaces of the nodes in the collaboration group can meet the storage requirement of a blockchain.
It should be appreciated that in a conventional sliced blockchain, nodes participating in consensus need to store blockchain complete data for the slice in which they are located. The reason is that the consensus node needs to compare the transaction information with the account book information in the blockchain to determine whether the transaction is legal or not when verifying the transaction, but this conventional scheme of storing complete data is not suitable for the internet of vehicles environment, because there are a large number of nodes with limited storage space in the internet of vehicles environment, and these nodes cannot store complete blockchain data. In order to reduce the storage pressure of the nodes in the Internet of vehicles, the nodes in each partition are divided into cooperation groups, and the storage pressure of the nodes in the Internet of vehicles is reduced by adopting a mode of node cooperation storage. The nodes in each slice are divided into the collaboration groups, so that the nodes with smaller communication delay can be divided into one collaboration group, and the division of the collaboration groups needs to meet the requirement that the available storage space in the collaboration group is larger than the storage space required in the slice.
In one embodiment, to ensure that there is enough space to store the shards of the block chain systemjNew blocks generated in future, slicing of blockchain systemsjRequired storage spaceF j The definition is as follows:
wherein ,slicing representing blockchain systemsjCurrently occupied memory space->Slicing representing blockchain systemsjIs provided. Reserved space for slicing of blockchain systemsjThe larger the reserved space, the longer the current collaboration group can collaboratively run. NodeiThe data structure of (2) is:i=<ID,(x,y),c,B>,, wherein ,IDrepresenting the number of the node [ ]x,y) Representing the two-dimensional coordinates of the node,crepresenting the size of the storage space of the node,Ba list of blocks stored on behalf of the node,g j is sliced intojIs a node sum of the total number of nodes.
Wherein the slicingjMiddle (f)kEach collaboration groupG k Can be expressed as:
wherein ,representing nodesiStorage space size of->Slicing representing blockchain systemsjThe required storage space is provided for the storage space,βrepresenting slices satisfying a blockchain systemjThe minimum number of nodes required for the required storage space, i.eβThe sum of the available memory spaces of the individual nodes is equal to or greater than +.>,βThe sum of the available memory spaces of 1 node is smaller than +.>. If the current blockchain system is fragmentedjThe sum of the storage spaces of all nodes in (a) is smaller than +.>The collaboration group cannot be composed.
Wherein the slicingjSet of collaboration groups in a computer systemS j The method comprises the following steps:
wherein ,representation slicesjThe number of collaboration groups in (a). The verification work of the transaction is independently carried out in each fragment, and the specific transaction verification is responsible for the cooperative group node.
In one embodiment, according to the result list of the slicing, performing cooperative group division on nodes in each slicing, and determining the result list of the cooperative group division of each slicing includes:
will be slicedjThe available storage space in the memory is larger than that of the fragmentsjIs not required for the storage spaceF j Is removed from the list of shard results; the leader node of the catalogue committee broadcasts a start team formation notification; slicingjThe node in the list immediately sends the notification of the start of team formation to the sharerjBroadcasting a team request by other nodes in the network; when slicingjNode in (a)iReceiving a nodebAfter agreeing to group message, calculate the nodeiAnd the nodebIf the node is the available storage space size of (a)iSum nodebThe sum of available storage spaces of (a) is greater thanF j The team formation is finished; if nodeiSum nodebThe sum of the available storage spaces of (a) is less than or equal toF j Then continue waiting for other nodes' consent team formation messages until the nodeiThe sum of the available storage space with the nodes agreeing to the team is greater thanF j The method comprises the steps of carrying out a first treatment on the surface of the When the nodes of each fragment in the fragment result list are all completed to be formed into groups or the sum of the available storage spaces of the nodes of the rest non-formed groups of each fragment is smaller thanF j The partitioning of the collaboration group of each segment is finished, and the nodes of the rest ungrouped of each segment are taken as candidate nodes of each segment.
According to the communication delay between nodes, dividing the nodes with smaller communication delay into the same collaboration group, and simultaneously ensuring that the total available storage space of the nodes in the collaboration group is larger than that of the nodes in the collaboration groupF j . When the available memory space of a node is greater thanF j The node may act alone as a collaboration group.
It should be appreciated that the slicingjNode in (a)iIs to determine which node to group, i.e. fragment, based on the received consent group messagejNode in (a)iWho received the consent team formation message first and then team with whom, therefore, can combine with the nodeiThe nodes with smaller communication delay are divided into the same cooperative group, namely, the nodes with smaller communication delay among the nodes are divided into the same cooperative group, and the communication delay of the block chain system is reduced.
The leader node in the cooperation group is generated in a random mode, each node in the cooperation group maintains a node-block mapping table, and a block list stored by each node and the storage space utilization rate of each node are recorded. The storage space utilization rate refers to the ratio of the used storage space of the node to the total storage space of the node, and is recorded asrThe following is shown:
wherein ,used memory space representing node, +.>Representing the total storage space of the node. When a new block is generated by the block chain system, the new block is generated byAnd selecting a node with the minimum storage space utilization to store a new block by the leader node in the group of the collaborative group according to the storage space utilization of each node in the group. When the storage space utilization rate of all nodes in the group is greater than 99%, a request for repartitioning the collaboration group is sent to the leader node of the shard by the leader node in the group. In the process of dividing the collaboration group, according to the difference of communication delay among nodes, the nodes with small communication delay are divided into one collaboration group, and meanwhile, the total storage space of the nodes in the group is larger thanF j 。
The leader node of the segment broadcasts the transaction to be verified to the member nodes in the segment, and the member nodes (source nodes) start to verify after receiving the transaction. If the locally stored information can meet the transaction verification requirement, the node performs verification transaction locally, and the transaction only needs to be attached with the signature of the source node. If the locally stored information cannot verify the transaction, a data sharing request needs to be sent to other nodes in the collaboration group, after the node (target node) with the data required by the source node receives the request, the node sends the signature of the node and the information required by the source node to the source node, the source node performs transaction verification according to the received information and the local information, and after the verification is passed, the signature of the source node and the signature of the target node are added to verification information and are sent to the leader node of the fragment.
It should be appreciated that by partitioning the nodes with smaller communication delay among the nodes in the shard into the same collaboration group, all the blockchain information of the shard stored by each node in the traditional blockchain system can be optimized to a group of nodes to store all the blockchain information of the shard, and nodes with insufficient storage space can also participate in the blockchain consensus work.
According to the block chain node slicing method oriented to node collaborative storage in the Internet of vehicles environment, the workload proving difficult problem is solved through all nodes in the block chain system, and the front of the workload proving difficult problem is solved firsthEach node is determined as each member node in the catalogue committee, and the leading node of the catalogue committee is randomly selected from the member nodes, so that each member node runs NSGA-II calculationObtaining the optimal slicing result of each member node, and sending the respective optimal slicing result to a leading node; the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results, and broadcasts the best slicing result with the smallest communication delay difference to other nodes in the catalogue committee; other nodes in the catalogue committee perform confirmation signature according to the best slicing result with the smallest received communication delay difference; when the leader node receives a message of 2 or morehUnder the condition of confirming the signature of 3 nodes, the catalogue committee achieves consensus and the fragmentation is completed; when the leader node receives less than 2hIn the case of a confirmation signature of 3 nodes, the step of randomly selecting the leader node of the directory committee from the member nodes is returned until the leader node receives 2 or moreh3, confirming signature of the nodes, consensus is achieved by the catalogue committee, and the segmentation is completed, so that a segmentation result list is generated; and then, according to the segmentation result list, the nodes in each segment are subjected to collaborative group division, and the collaborative group division result list of each segment is determined, so that the segmentation result with the smallest communication delay difference is obtained, the transaction throughput of the blockchain is improved, and the communication delay among the nodes in the segment is reduced.
In one embodiment, all nodes in the blockchain system solve the workload certification puzzle, first solving the front of the workload certification puzzlehBefore the step of determining that the individual node is a member node in the catalogue committee, the method further comprises:
analyzing all nodes in the block chain system, and determining malicious nodes and the total number of the malicious nodes in the block chain system; determining whether the proportion of malicious nodes in the blockchain system is more than one third according to the total number of nodes in the blockchain system and the total number of malicious nodes in the blockchain system; removal from a blockchain system in cases where the proportion of malicious nodes in the blockchain system is greater than one thirdqA malicious node;
wherein ,,qto the number of malicious nodes that need to be removed,mas the number of malicious nodes in the blockchain system,Nas a total number of nodes in the blockchain system,Δis the proportion of malicious nodes in the blockchain system.
It should be appreciated that, since the present application employs PBFT consensus, which does not allow the number of malicious nodes to exceed 1/3 of the total number of nodes, it is necessary to guarantee the proportion of malicious nodes in the blockchain systemΔLess than 1/3, if the condition is not met, removal from the blockchain system is requiredqIndividual malicious nodes to ensureΔLess than 1/3. Wherein the proportion of malicious nodes in the blockchain systemΔThe calculation method is as follows:
it should be appreciated that before all nodes in a blockchain system are fragmented, a determination needs to be made as to whether the proportion of malicious nodes in all nodes in the blockchain system is less than 1/3, and if not, removal is requiredqAnd the malicious nodes are used for ensuring that the proportion of the malicious nodes in all the nodes in the blockchain system is less than 1/3.
According to the block chain node slicing method oriented to node collaborative storage in the Internet of vehicles environment, the workload proving problem is solved through all nodes in the block chain system, and the front of the workload proving problem is solved firsthBefore the step of determining that each node is a member node in the catalogue committee, all nodes in the blockchain system are analyzed, and malicious nodes and the total number of the malicious nodes in the blockchain system are determined; determining whether the proportion of malicious nodes in the blockchain system is more than one third according to the total number of nodes in the blockchain system and the total number of malicious nodes in the blockchain system; removal from a blockchain system in cases where the proportion of malicious nodes in the blockchain system is greater than one thirdqThe malicious nodes can improve the security of the blockchain system.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (8)
1. A blockchain node slicing method for node collaborative storage in an Internet of vehicles environment is characterized by comprising the following steps:
all nodes in the block chain system solve the workload proving problem, and the workload proving problem is solved firsthThe individual nodes are determined as member nodes in the catalogue committee;
randomly selecting a leader node of a catalogue committee from the member nodes;
each member node runs NSGA-II algorithm to obtain the optimal slicing result of each member node;
each member node sends the respective best slicing result to the leader node;
the leader node selects the best slicing result with the smallest communication delay difference from the best slicing results according to the best slicing results, and broadcasts the best slicing result with the smallest communication delay difference to other nodes in the catalogue committee;
other nodes in the catalogue committee perform confirmation signature according to the best slicing result with the smallest received communication delay difference;
when the leader node receives a message of 2 or morehUnder the condition of confirming the signature of 3 nodes, the catalogue committee achieves consensus and the fragmentation is completed;
when the leader node receives less than 2hReturning to the step of executing the step of randomly selecting the leader node of the catalogue committee from the member nodes until the leader node receives 2 or more under the condition of the acknowledgement signature of/3 nodesh3, confirming signature of the nodes, consensus is achieved by the catalogue committee, and the segmentation is completed, so that a segmentation result list is generated;
and carrying out cooperative group division on nodes in each fragment according to the fragment result list, and determining a cooperative group division result list of each fragment.
2. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 1, wherein all nodes in the blockchain system solve a workload proof problem, and first solve the workload proof problem beforehBefore the step of determining that the individual node is a member node in the catalogue committee, the method further comprises:
analyzing all nodes in a block chain system, and determining malicious nodes and the total number of the malicious nodes in the block chain system;
determining whether the proportion of malicious nodes in the blockchain system is more than one third according to the total number of nodes in the blockchain system and the total number of malicious nodes in the blockchain system;
removing from the blockchain system if the proportion of malicious nodes in the blockchain system is greater than one thirdqA malicious node;
3. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 1, wherein the objective function of the NSGA-II algorithm is:
wherein ,for the difference in the number of nodes between slices, +.>For malicious node proportion difference among fragments, +.>For communication delay difference between slices, +.>For the difference in storage space between the slices,Ωthe solution space divided for the nodes is defined,Xfor the best slicing result of the member node,Rthe proportion of malicious nodes in the fragments is the best fragments result.
4. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 3, wherein the sharding nodes areDifference in numberThe calculation mode of (a) is as follows:
5. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 4, wherein malicious node proportion differences among shards are characterized in thatThe calculation mode of (a) is as follows:
6. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 5, wherein the communication delay difference between shards is characterized in thatThe calculation mode of (a) is as follows:
wherein ,is sliced intojAll nodes in the network to sharded leader nodeuCommunication delay difference,/->Is the leading nodeuTo the nodeiIs used for the communication delay of the (c) signal,g j is sliced intojIs>Leader node for fragmentsuReceiving nodeiAt the moment of the return,leader node for fragmentsuTransmitting information to a nodeiIs a time of day (c).
7. The blockchain node sharding method for node collaborative storage in a vehicle networking environment according to claim 6, wherein the storage space difference between shards isThe calculation mode of (a) is as follows: />
8. The blockchain node slicing method of node-oriented collaborative storage in an internet of vehicles environment according to claim 1, wherein the performing collaborative group partitioning on nodes in each slice according to the slicing result list to determine a collaborative group partitioning result list of each slice includes:
will be slicedjThe available storage space in the memory is larger than that of the fragmentsjRequired storage spaceF j Is removed from the list of shard results;
broadcasting a start team formation notice by a leader node of the catalogue committee;
slicingjThe node in the list immediately sends the notification of the start of team formation to the sharerjBroadcasting a team request by other nodes in the network;
when slicingjNode in (a)iReceiving a nodebAfter agreeing to group message, calculate the nodeiAnd the nodebIf the node is the available storage space size of (a)iSum nodebThe sum of available storage spaces of (a) is greater thanF j The team formation is finished;
if nodeiSum nodebThe sum of the available storage spaces of (a) is less than or equal toF j Then continue waiting for other nodes' consent team formation messages until the nodeiThe sum of the available storage space with the nodes agreeing to the team is greater thanF j ;
When the total available storage space sum of all the nodes of each fragment in the fragment result list which are completely formed into groups or the nodes of the rest of each fragment which are not formed into groups is smaller thanFThe partitioning of the collaboration group of each segment is finished, and the nodes of the rest ungrouped of each segment are taken as candidate nodes of each segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310518821.3A CN116248725B (en) | 2023-05-10 | 2023-05-10 | Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310518821.3A CN116248725B (en) | 2023-05-10 | 2023-05-10 | Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116248725A true CN116248725A (en) | 2023-06-09 |
CN116248725B CN116248725B (en) | 2023-07-25 |
Family
ID=86628153
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310518821.3A Active CN116248725B (en) | 2023-05-10 | 2023-05-10 | Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116248725B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118054897A (en) * | 2024-04-15 | 2024-05-17 | 南京信息工程大学 | Method for processing cross-chain transactions with different priorities based on collaborative verification group division |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112073483A (en) * | 2020-08-28 | 2020-12-11 | 武汉大学 | Authority certification consensus method and system based on credit and committee endorsement mechanism |
CN113114496A (en) * | 2021-04-06 | 2021-07-13 | 北京工业大学 | Block chain expandability problem solution based on fragmentation technology |
CN114037531A (en) * | 2021-11-08 | 2022-02-11 | 中山大学 | Fragment account adjusting method of block chain fragment system and related device thereof |
CN114567554A (en) * | 2022-02-21 | 2022-05-31 | 新疆财经大学 | Block chain construction method based on node reputation and partition consensus |
CN115118737A (en) * | 2022-08-25 | 2022-09-27 | 南京信息工程大学 | Alliance chain block storage method based on node grouping |
CN115357660A (en) * | 2022-07-20 | 2022-11-18 | 之江实验室 | Block chain consensus method with security perception and response strategy |
-
2023
- 2023-05-10 CN CN202310518821.3A patent/CN116248725B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112073483A (en) * | 2020-08-28 | 2020-12-11 | 武汉大学 | Authority certification consensus method and system based on credit and committee endorsement mechanism |
CN113114496A (en) * | 2021-04-06 | 2021-07-13 | 北京工业大学 | Block chain expandability problem solution based on fragmentation technology |
CN114037531A (en) * | 2021-11-08 | 2022-02-11 | 中山大学 | Fragment account adjusting method of block chain fragment system and related device thereof |
CN114567554A (en) * | 2022-02-21 | 2022-05-31 | 新疆财经大学 | Block chain construction method based on node reputation and partition consensus |
CN115357660A (en) * | 2022-07-20 | 2022-11-18 | 之江实验室 | Block chain consensus method with security perception and response strategy |
CN115118737A (en) * | 2022-08-25 | 2022-09-27 | 南京信息工程大学 | Alliance chain block storage method based on node grouping |
Non-Patent Citations (1)
Title |
---|
张天祥 等: "区块链激励机制在车联网领域的应用研究综述", 《计算机工程与应用》, vol. 59, no. 9 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118054897A (en) * | 2024-04-15 | 2024-05-17 | 南京信息工程大学 | Method for processing cross-chain transactions with different priorities based on collaborative verification group division |
Also Published As
Publication number | Publication date |
---|---|
CN116248725B (en) | 2023-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107528886B (en) | Block chain full-network splitting method and system | |
CN111371905B (en) | Block chain layering consensus proving system and method based on cloud computing | |
Asheralieva et al. | Reputation-based coalition formation for secure self-organized and scalable sharding in IoT blockchains with mobile-edge computing | |
CN116248725B (en) | Block chain node slicing method oriented to node collaborative storage in Internet of vehicles environment | |
Hui et al. | Reservation service: Trusted relay selection for edge computing services in vehicular networks | |
CN113553375B (en) | Partitioned storage device and method for image type block chain | |
CN113626875B (en) | Knowledge graph file storage method for block chain fragment enabling | |
CN111092896A (en) | Food traceability distributed data synchronization method based on optimized PAXOS | |
Wang et al. | Beh-Raft-Chain: a behavior-based fast blockchain protocol for complex networks | |
CN115361395B (en) | Internet of things data sharing method based on blockchain payment channel network | |
CN112637822B (en) | Cellular network safe transaction platform based on block chain | |
CN111800758A (en) | Unmanned aerial vehicle swarm layered consensus method based on block chain | |
CN112417056A (en) | Reputation value dynamic fragmentation two-layer consensus method based on block chain data sharing | |
Xue et al. | STBC: A novel blockchain-based spectrum trading solution | |
CN114048578A (en) | High-throughput block chain system and performance optimization model for 6G network | |
CN111798234B (en) | Lightweight block chain system and construction method | |
Kang et al. | Incentivizing secure block verification by contract theory in blockchain-enabled vehicular networks | |
CN114490020A (en) | Block chain fragmentation method and system and electronic equipment | |
Dai et al. | Permissioned blockchain and deep reinforcement learning for content caching in vehicular edge computing and networks | |
Li et al. | Blockchain enabled task offloading based on edge cooperation in the digital twin vehicular edge network | |
CN105611600A (en) | QoE (Quality of Experience) requirement oriented secure routing method for Internet of Things | |
Liu et al. | Consortium blockchain-based security and efficient resource trading in V2V-assisted intelligent transport systems | |
CN116258609B (en) | Electric power system transaction cooperation method, device and storage medium | |
CN115733841A (en) | Block chain dynamic fragmentation expansion method based on image flow segmentation | |
Huang et al. | Secure sharding scheme of blockchain based on reputation |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |