Internet of vehicles consensus method for ensuring load balancing and data reliability
By monitoring the key indicators of the Internet of Vehicles environment in real time and using the MMKP optimization algorithm for dynamic sharding, the problems of low data processing efficiency and insufficient sharding security in the Internet of Vehicles are solved, and load balancing and system stability are achieved.
Patent Information
- Application Number
- CN202411821119.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
When the existing blockchain architecture handles large-scale real-time data of the Internet of Vehicles, its throughput is limited, making it difficult to meet the massive data sharing needs of the intelligent Internet of Vehicles. In addition, traditional sharding solutions are difficult to maintain high efficiency and stability in high dynamic environments, resulting in poor system performance and resource utilization.
By obtaining the traffic flow, communication load and RSU number information of the Internet of Vehicles in real time, the optimization algorithm of the multi-dimensional backpack problem MMKP is used to dynamic shard division, and based on the similarity between the new and old shards, the data of the old shards is migrated to the new shard through the blockchain consensus mechanism of encryption and verification operations.
Effective shard division and load balancing under various conditions are achieved, local continuity of shards and overall stability of the system are ensured, and problems such as low data processing efficiency, unbalanced load and insufficient shard security in the Internet of Vehicles are solved.
Smart Images

Figure CN119728076A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet of Vehicles, and specifically relates to an Internet of Vehicles consensus method for ensuring load balancing and data reliability. Background Art
[0002] As the network structure of the Internet of Vehicles becomes increasingly complex, the speed and frequency of data sharing and exchange between vehicles are getting higher and higher. When using blockchain systems to process a large amount of real-time data in the Internet of Vehicles, they face the problem of limited throughput and are unable to meet the needs of massive data sharing in the future intelligent Internet of Vehicles. As the number of vehicles in the Internet of Vehicles continues to increase, the speed and frequency of data sharing and exchange between vehicles are also increasing rapidly, which puts higher demands on the scalability and processing capabilities of blockchain systems. However, due to its inherent consensus mechanism and data processing method, the traditional blockchain architecture cannot be effectively expanded to cope with the increasing amount of data. This may cause data processing delays in the system during peak periods, reducing overall efficiency and may affect the real-time and reliability of the Internet of Vehicles.
[0003] Blockchain sharding is a method to improve the scalability of blockchain and database systems. The core idea is to divide the entire network or database into multiple smaller units, called "shards". Each shard is responsible for processing a subset of data and transactions, allowing transactions and data to be processed in parallel, thereby dispersing the burden of computing and storage, reducing the number of transactions that a single node needs to process, and greatly improving the transaction throughput and efficiency of the system. Sharding technology is widely used in blockchain systems, especially when processing cross-shard transactions, by coordinating consensus protocols between shards to achieve the security and consistency of the entire network. As an efficient blockchain architecture, sharded blockchain can effectively process a large amount of real-time data in the Internet of Vehicles, such as vehicle location, speed, and other sensor information. This technology can reduce the communication load of vehicles in the network, thereby improving the efficiency and stability of the overall system.
[0004] However, existing sharding schemes mainly use geographic location for sharding, which is difficult to maintain efficiency and stability in a highly dynamic environment, resulting in poor system performance and resource utilization. In addition, traditional sharding algorithms usually lack an effective inheritance mechanism when dealing with shard reconstruction, which may lead to data discontinuity and system instability during shard reconstruction. In a dynamically changing Internet of Vehicles environment, data loss or inconsistency is prone to occur during shard reconstruction, affecting the stability and security of the system.
[0005] The above problems limit the application effect and actual operation performance of existing sharded blockchain technology in the Internet of Vehicles. Therefore, there is an urgent need for an Internet of Vehicles consensus method that can ensure load balancing and data reliability. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention provides a vehicle network consensus method that ensures load balancing and data reliability.
[0007] The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0008] A vehicle network consensus method that ensures load balancing and data reliability, including:
[0009] Acquire relevant information of the Internet of Vehicles in real time; the relevant information includes traffic flow information, communication load information and the number of roadside units (RSUs) of each road section in the Internet of Vehicles;
[0010] According to the relevant information, the blockchain network used to process Internet of Vehicles data is dynamically divided into shards using the optimization algorithm of the multiple multidimensional knapsack problem MMKP to obtain a sharding result;
[0011] According to the sharding result, based on the similarity between the old and new shards, the data of the old shards are migrated to the new shards through a blockchain consensus mechanism with encryption and verification operations.
[0012] Optionally, before obtaining relevant information of the Internet of Vehicles in real time, the method further includes:
[0013] Modeling the Internet of Vehicles as a ternary tree with road sections as nodes and connection relationships between road sections as connection relationships between nodes;
[0014] Performing a pre-order traversal on the ternary tree to obtain a set of road sections of the Internet of Vehicles, and setting node values for nodes in the set of road sections according to the node levels;
[0015] The real-time acquisition of relevant information of the Internet of Vehicles includes: real-time acquisition of traffic flow information, communication load information and the number of RSUs of each road section in the road section set.
[0016] Optionally, according to the relevant information, by introducing an optimization algorithm of a multiple multidimensional knapsack problem MMKP, the blockchain network used to process Internet of Vehicles data is dynamically sharded to obtain a sharding result, including:
[0017] According to the relevant information, the traffic flow attribute value and the communication load attribute value of each road section are calculated respectively, and the number of RSUs in each road section is determined;
[0018] According to the traffic flow attribute value, communication load attribute value and RSU number of each road section, the blockchain network used to process Internet of Vehicles data is dynamically divided into shards by introducing the optimization algorithm of the multi-dimensional knapsack problem MMKP to obtain the sharding results;
[0019] The calculation method of the traffic flow attribute value includes:
[0020] QT(t)=TT(t)×VT(t),
[0021] TF(t)=QT(t)×VT(t);
[0022] Where t represents time, TT(t) represents the average speed of vehicles on the road section, VT(t) represents the vehicle occupancy rate of the road section, QT(t) represents the vehicle density of the road section, and TF(t) represents the traffic flow attribute value of the road section;
[0023] The communication load attribute value is calculated by:
[0024]
[0025] β(t)=BW-CU(t) represents the network bandwidth of the road section, BW is the basic network bandwidth, and CU(t) represents the current network usage of the road section; represents the data transmission rate between vehicles in the road section, DD(Vi,t) represents the data demand of vehicle Vi in the road section, Nt represents the number of vehicles in the road section, t0 to t0+T is the observation time window corresponding to time t, T is the length of the observation time window, and CL(t) represents the communication load attribute value of the road section.
[0026] Optionally, according to the traffic flow attribute value, communication load attribute value and RSU number of each road section, by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP, the blockchain network used to process the Internet of Vehicles data is dynamically divided into shards to obtain the shard division results, including:
[0027] Take the road section as the item in the multi-dimensional knapsack problem MMKP, take the traffic flow attribute value, communication load attribute value and RSU number of the road section as the item attributes, take the shard as the knapsack in the multi-dimensional knapsack problem MMKP, construct the multi-dimensional knapsack problem MMKP, and define the objective function;
[0028] According to the objective function, by solving the multiple multidimensional knapsack problem MMKP, a dynamic sharding division of the blockchain network for processing Internet of Vehicles data is achieved to obtain a sharding division result;
[0029] The objective function is:
[0030]
[0031] Among them, TF(t) represents the traffic flow attribute value of the section, CL(t) represents the communication load attribute value of the section, RN(t) represents the number of RSUs in the section, xij represents whether the section Li is divided into the shard Sj; k is the total number of shards, n is the total number of sections, and e is the natural base; α, β, γ and δ are all adjustable constant parameters, ω1 and ω2 are preset weight factors; Va represents the objective function value.
[0032] Optionally, the objective function has the following constraints:
[0033] xi,j≤xPi,j,
[0034]
[0035] Among them, xPi,j indicates whether the parent node of section Li is included in the shard Sj; B(i) represents the set of brother nodes representing section Li, Lb represents the node value of the brother nodes of section Li, xb,j represents whether the brother nodes of section Li are included in the shard Sj, and maxb is the maximum brother node value of section Li; C(i) represents the set of child nodes of section Li, Lc is the node value of the child nodes of section Li, xc,j indicates whether the child nodes of section Li are included in the shard Sj, and maxc is the maximum child node value of section Li.
[0036] Optionally, the objective function also has the following constraints:
[0037]
[0038] Among them, Wi,RN represents the RSU number limit of section Li, WminRN,j represents the lower limit of the RSU number limit of slice Sj, and WmaxRN,j represents the upper limit of the RSU number limit of slice Sj; Wi,TF represents the traffic flow limit of section Li, WminTF,j represents the lower limit of the traffic flow limit of slice Sj, and WmaxTF,j represents the upper limit of the traffic flow limit of slice Sj; Wi,CL represents the communication load limit of section Li, WminCL,j represents the lower limit of the communication load limit of slice Sj, and WmaxCL,j represents the upper limit of the communication load limit of slice Sj.
[0039] Optionally, the method further comprises:
[0040] Periodically calculate the traffic flow attribute value, communication load attribute value and RSU number change range of each slice;
[0041] According to the change range, determine whether shard reconstruction is required;
[0042] If it is determined that shard reconstruction is not necessary, the data on some high-load shards will be migrated to low-load shards, and encryption and verification mechanisms will be used during the migration process to ensure data consistency and integrity;
[0043] If it is determined that shard reconstruction is required, the step of dynamically sharding the blockchain network used to process Internet of Vehicles data based on the relevant information and the subsequent steps are executed using the optimization algorithm of the multiple multidimensional knapsack problem MMKP.
[0044] Optionally, the step of migrating the data of the old shard to the new shard through a blockchain consensus mechanism with encryption and verification operations based on the similarity between the new and old shards according to the shard division result includes:
[0045] Determine a new shard set according to the shard division result;
[0046] Calculate the geographic location proximity between each pair of new and old shards in the new shard set and the old shard set;
[0047] For each new shard in the new shard set, determine the old shard with the highest geographical proximity to it, determine the blockchain node that the old shard and the new shard have in common as the consensus node for implementing the consensus mechanism, and migrate the data of the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations.
[0048] Optionally, migrating the data of the old shard to the new shard through a blockchain consensus mechanism with encryption and verification operations includes:
[0049] Select the data on the most recent blocks from the old shard, first migrate this part of the data to the new shard through the blockchain consensus mechanism with encryption and verification operations, and then gradually migrate the remaining data in the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations.
[0050] Optionally, calculating the geographic location proximity between each pair of new and old shards in the new shard set and the old shard set includes:
[0051]
[0052]
[0053] Among them, Sold represents the old shard in the old shard set, Snew represents the new shard in the new shard set, Dcenter(Sold, Snew) represents the distance between the middle coordinates of Sold and Snew, and Dmax is the preset maximum distance value; Dadj(Sold, Snew) represents the centralization distance between Sold and Snew; R(Sold) represents the geographical scope of Sold, R(Snew) represents the geographical scope of Snew, and Dadj(Sold, Snew) represents the degree of overlap between the geographical scopes of Sold and Snew; α' and β' are preset weights, and G(Sold, Snew) represents the geographical proximity between Sold and Snew.
[0054] The Internet of Vehicles consensus method for ensuring load balancing and data reliability provided by the present invention monitors indicators such as traffic flow, communication load and the number of RSUs in real time, and uses the optimization algorithm of the multiple multidimensional knapsack problem MMKP to dynamically shard the blockchain network used to process Internet of Vehicles data. It can effectively achieve sharding and load balancing under various conditions, and ensure the local continuity of shards and the overall stability of the system, solving the problems of low data processing efficiency, unbalanced load and insufficient sharding security in the Internet of Vehicles.
[0055] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flowchart of a vehicle networking consensus method for ensuring load balancing and data reliability provided by an embodiment of the present invention;
[0057] Figure 2 It is based on a real road situation captured from the Global Roads Open Access Data Set;
[0058] Figure 3 In the embodiment of the present invention, Figure 2 The road shown is modeled as a schematic diagram of a ternary tree. DETAILED DESCRIPTION
[0059] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0060] In order to solve the problem that the application effect and actual operation performance of the existing sharded blockchain technology in the Internet of Vehicles are limited, the embodiment of the present invention provides an Internet of Vehicles consensus method that ensures load balancing and data reliability. In order to more clearly explain the method of the embodiment of the present invention, firstly, the various subjects involved in the Internet of Vehicles consensus environment are explained, including:
[0061] Internet of Vehicles: The Internet of Vehicles is an intelligent transportation system that integrates communication technology. Vehicles in the Internet of Vehicles are equipped with computing, storage and wireless communication capabilities, which allows them to play the role of light nodes with the support of blockchain technology, providing a new way of interaction and communication. In this way, vehicles can not only generate, submit and forward transactions, but also forward blocks, realizing the secure and reliable exchange of data.
[0062] RSU (Roadside Unit): RSU is a bridge between intra-shard and inter-shard consensus. It is configured beside the road. They are not only mobile nodes, but also the main body of data generation and dissemination. These RSUs are equipped with advanced computing units such as powerful multi-core CPUs and application-specific integrated circuits (ASICs), which enable them to efficiently process blockchain transactions and execute smart contracts. In order to store important blockchain data and transaction records, RSU also integrates large-capacity solid-state storage devices and uses encryption technology to ensure the security of stored data. Communication between RSUs and between vehicles and RSUs adopts IEEE802.11p or DSRC (dedicated short-range communication) protocols.
[0063] TA (Trust Authority): TA plays a vital role in the Internet of Vehicles blockchain system, and is mainly responsible for vehicle identity authentication, permission management, and the division and management of shards. Identity authentication By reviewing and verifying the identity information of the vehicle, TA ensures that only legitimate and trusted vehicles can join and operate in the Internet of Vehicles. This process usually involves complex identity authentication mechanisms to ensure that each vehicle in the network is authenticated. Permission management: The setting and management of vehicle access control, operating permissions, etc. to ensure that vehicles operate in accordance with established rules and standards to prevent unauthorized behavior from affecting network security and efficiency. Shard management: Assume the division and management responsibilities of shards. By dividing the network into multiple shards and managing transactions and data processing within each shard, TA helps to improve the processing capacity and response speed of the entire network while ensuring network load balancing. TA is usually undertaken by authoritative agencies related to transportation. These agencies use their expertise and resources to ensure the security and efficient operation of the Internet of Vehicles.
[0064] CA (Certificate Authority): CA is responsible for maintaining the identity information of the vehicle, including vehicle registration, authentication, and certificate issuance. This identity information is used to verify the legitimacy of the vehicle in the network and prevent fraud and malicious behavior. CA is also responsible for updating and revoking certificates in response to vehicle changes or security issues, as well as generating public-private key pairs. The public key is used for public identification of the vehicle's identity and transaction verification, while the private key is securely stored in the vehicle's hardware security module for signing transactions and secure communications. The use of this key pair ensures the security of transactions in the blockchain network and the non-repudiation of the vehicle's identity.
[0065] In the embodiment of the present invention, the blockchain system of the Internet of Vehicles uses a partially synchronous network. This means that there is a certain delay limit for message transmission in the network. Although the delay limit cannot be used as a parameter of the protocol, it can ensure that the message sent by an honest user at time t reaches all other honest users within the delay limit. The partially synchronous network model is widely used in blockchain protocol analysis, especially in the Internet of Vehicles environment.
[0066] like Figure 1 As shown, the vehicle networking consensus method for ensuring load balancing and data reliability provided by an embodiment of the present invention includes the following steps:
[0067] S10. Obtain relevant information of the Internet of Vehicles in real time; the relevant information includes traffic flow information, communication load information and the number of roadside units (RSUs) of each road section in the Internet of Vehicles.
[0068] Specifically, sensors and communication equipment are used to form a real-time monitoring system, which continuously collects information such as traffic flow information, communication load information, and the number of roadside units (RSUs) on each road section in the Internet of Vehicles. In this way, by analyzing the collected information in real time, the fluctuation pattern and change trend of vehicle flow and communication load can be identified, thereby predicting the load peaks and valleys that may occur in the short term in the future.
[0069] Traffic flow information usually refers to the number of vehicles passing through a specific road section or traffic node within a certain period of time. In traffic engineering and urban planning, traffic flow is a key indicator used to measure road usage, traffic congestion, and the overall efficiency of the transportation system. Exemplarily, the traffic flow information of a road section may include: the average vehicle speed TT(t) of the road section, the vehicle occupancy rate VT(t) of the road section, and the number of vehicles Nt in the road section, etc., where t represents time. Here, the vehicle occupancy rate VT(t) of the road section refers to the proportion of space actually occupied by vehicles on the road section.
[0070] Communication load refers to the amount of data transmitted in the communication network and its impact on the network transmission speed and bandwidth. For example, the communication load information of a road segment may include: basic network bandwidth BW, current network usage CU(t) of the road segment, and data demand DD(Vi,t) of vehicles in the road segment, etc., where Vi represents the i-th vehicle.
[0071] In one implementation, before obtaining relevant information of the Internet of Vehicles in real time, the method of the embodiment of the present invention further includes:
[0072] (a1) The Internet of Vehicles is modeled as a ternary tree with road segments as nodes and the connection relationships between road segments as the connection relationships between nodes.
[0073] Specifically, a road in an area selects a head as the root of a multi-branch tree, and then extends downward to form a ternary tree.
[0074] The road network in modern cities usually has a highly complex and diverse structure. These roads can be roughly divided into the following types:
[0075] Straight Road: This is the most common type of road and usually connects two distant points. Straight roads can be single lane or multi-lane and are often used for major traffic arteries. Curved Road: These roads are usually designed based on topography or planning needs and may go around natural obstacles such as mountains, rivers or buildings. Circular Road: Circular roads or roundabouts are used to improve traffic flow and reduce traffic congestion at intersections. This type of road is often found in city centers or major intersections. Crossroads: At a crossroads, two roads intersect to form a "cross". These intersections can be signalized or unsignalized. Multi-fork intersection: At this intersection, more than two roads intersect. These intersections can be very complex, with multiple entrances and exits and traffic flowing in different directions. Intersections: In these areas, several roads are intertwined within a short distance to form a complex traffic network. This is usually more common in older or dense areas of cities.
[0076] In view of the inherent interconnectivity between different roads, an embodiment of the present invention adopts a method of establishing connections between them. By selecting a starting point and dividing the road into sections per kilometer, a framework for converting these paths into a multi-branch tree structure is constructed. Representing such a complex road network with a multi-branch tree can greatly simplify its understanding and analysis. In the multi-branch tree model: each node represents a section of road. The connection between nodes represents the connection between road sections, for example, the end of one road is the starting point of another road. Each node can have multiple child nodes, reflecting the multiple forked intersections or staggered intersections in the actual road network.
[0077] Roads in real life are very complex. For example, according to a section of real road conditions captured in the Global Roads Open Access DataSet, Figure 2 As shown. The road is generally composed of three roads: black, gray, and blue, which are connected to form an intersection. The RSU can be used as a shard blockchain node to generate blocks, etc. In practice, there are many ways to construct a tree. For example, the intersection of the black road and the gray road can be considered as the starting point of the tree, and then the road can be divided into a ternary tree according to the road section.
[0078] (a2) Perform a pre-order traversal on the ternary tree to obtain the road segment set of the Internet of Vehicles, and set node values for the nodes in the road segment set according to the node level.
[0079] In a multi-branch tree, pre-order traversal is a traversal method, which is very clearly defined for a binary tree: first visit the root node, then traverse the root node, and finally traverse the right subtree. For a multi-branch tree, the concept of in-order traversal can be extended to first traverse some child nodes, visit the root node, and then traverse the remaining child nodes. Therefore, when the multi-branch tree is a ternary tree, it is assumed that the three subtree points are the left subtree, the middle subtree, and the right subtree. Therefore, the pre-order traversal of the ternary tree is to first visit the root node, then traverse the left subtree, the middle subtree, and finally traverse the right subtree. Pre-order traversal is as follows Figure 3 As shown, the traversed road segment set is represented as {1,2,5,3,6,8,11,9,12,4,7,10}. By using this method of pre-order traversal of the ternary tree, the road segment can be approximately simulated into a set of pre-order traversal of the multi-branch tree.
[0080] Thus, the Internet of Vehicles is modeled as a ternary tree, and the road segment set of the Internet of Vehicles is obtained by performing a pre-order traversal of the ternary tree. Accordingly, in step S10, the relevant information of the Internet of Vehicles is obtained in real time, specifically including: obtaining the traffic flow information, communication load information and the number of RSUs of each road segment in the road segment set constructed based on the ternary tree in real time. That is, the traffic flow information, communication load information and the number of RSUs of each road segment are obtained by directly operating the road segment set.
[0081] S20. Based on the above relevant information, the optimization algorithm of the multiple multidimensional knapsack problem (MMKP) is used to dynamically shard the blockchain network used to process Internet of Vehicles data to obtain a sharding result.
[0082] Specifically, according to the traffic flow information and communication load information of the road section, the traffic flow attribute value and communication load attribute value of each road section are calculated respectively; then according to the traffic flow attribute value, communication load attribute value and the number of RSUs of each road section, the blockchain network used to process the Internet of Vehicles data is dynamically divided into shards by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP to obtain the sharding result.
[0083] The traffic flow attribute value is calculated as follows:
[0084] QT(t)=TT(t)×VT(t),
[0085] TF(t)=QT(t)×VT(t);
[0086] Here, QT(t) represents the vehicle density of the road section, and TF(t) represents the traffic flow attribute value of the road section.
[0087] The communication load attribute value is calculated by:
[0088]
[0089] This calculation method takes into account the unevenness and dynamic changes of data transmission, and calculates the communication load attribute value by integration. Among them, β(t) = BW-CU(t) represents the network bandwidth of the road section, BW is the basic network bandwidth, and CU(t) represents the current network usage of the road section; represents the data transmission rate between vehicles in the road section, t0 to t0+T is the observation time window corresponding to time t, T is the length of the observation time window, and CL(t) represents the communication load attribute value of the road section.
[0090] It should be noted that the calculation method of the traffic flow attribute value and the communication load attribute value shown above is only an example and does not constitute a limitation on the embodiments of the present invention. In practice, other calculation formulas that can characterize the traffic flow attributes and communication load attributes of a road section may also be defined. This is all possible.
[0091] Then, according to the traffic flow attribute values, communication load attribute values and RSU number of each road section obtained in real time, the blockchain network used to process the Internet of Vehicles data is dynamically sharded by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP. This process is mainly to determine the best road combination for each shard. First, the number of road sections in the shard must be maximized (without exceeding the limit of a specific shard size), and secondly, the cost must be considered. The ultimate goal is to achieve load balancing of the shards through reasonable sharding, ensure the geographical proximity of different shards to promote real-time communication between different road sections, and each shard can handle a similar number of network transactions. In addition, the increase in the number of RSUs will lead to slower consensus efficiency, so the number of RSUs should also be taken into account.
[0092] The multi-dimensional knapsack problem is a combinatorial optimization problem and an extension of the classic knapsack problem. In this problem, there are multiple knapsacks, each with multiple constraints (such as weight, volume, and other dimensions). The goal is to select several items and put them into the knapsacks, maximizing their value while not exceeding the capacity constraints of each knapsack. Since this problem is an NP (Non-deterministic Polynomial) hard problem, it is difficult to solve and usually requires the use of heuristic algorithms, dynamic programming, and other methods to find an approximate optimal solution. MMKP has a wide range of applications in resource allocation, task scheduling, and system optimization.
[0093] Specifically, in step S20, according to the traffic flow attribute value, communication load attribute value and RSU number of each road section, by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP, the blockchain network used to process the Internet of Vehicles data is dynamically divided into shards to obtain the shard division results, including:
[0094] (b1) Take the road section as the item in the multi-dimensional knapsack problem (MMKP), take the traffic flow attribute value, communication load attribute value and RSU number of the road section as the item attributes, take the shard as the knapsack in the multi-dimensional knapsack problem (MMKP), construct the multi-dimensional knapsack problem (MMKP), and define the objective function:
[0095]
[0096] Among them, xij indicates whether the road section Li is included in the segment Sj; k is the total number of segments, n is the total number of sections, and e is the natural base; α, β, γ and δ are all adjustable constant parameters, ω1 and ω2 are preset weight factors, corresponding to the transportation cost and communication cost respectively; Va represents the objective function value.
[0097] In the above objective function, eα·CL(t) indicates that as the transaction processing capacity increases, the processing efficiency of each vehicle will decay at a certain rate. represents the nonlinear effect of the increase in the number of RSUs on processing power. ln(1+RN(t)) represents the natural logarithmic growth of the complexity of the consensus mechanism as the number of RSUs increases. Traffic flow determines the scale of network demand, and communication load provides a snapshot of the current network state, reflecting real-time performance. The number of RSUs represents both resources and challenges. On the one hand, more RSUs can enhance the security of sharded blockchains; on the other hand, they may also lead to increased latency in the consensus process. Therefore, the number of RSUs needs to be accurately balanced to maintain an appropriate relationship between efficiency and system complexity.
[0098] In the embodiment of the present invention, by introducing the optimization algorithm of the multiple multidimensional knapsack problem (MMKP), the real-time data (traffic flow attribute value, communication load attribute value and number of RSUs) obtained by analysis is used to complete the complex sharding in seconds. The algorithm can comprehensively consider multiple factors, including vehicle flow, number of RSU nodes and communication load, to ensure load balancing and efficient resource utilization of each shard.
[0099] In addition, under the premise of using the multi-tree logical structure to organize the road sections and importing the optimization algorithm in this form to optimize the segmentation strategy, it is necessary to formulate the constraints of continuity between the tree structures to ensure the integrity of the data structure and the effectiveness of the operation. At this time, the objective function can have the following constraints:
[0100] xi,j≤xPi,j,
[0101]
[0102] Among them, xPi,j indicates whether the parent node of section Li is included in the shard Sj; B(i) represents the set of brother nodes representing section Li, Lb represents the node value of the brother nodes of section Li, xb,j represents whether the brother nodes of section Li are included in the shard Sj, and maxb is the maximum brother node value of section Li; C(i) represents the set of child nodes of section Li, Lc is the node value of the child nodes of section Li, xc,j indicates whether the child nodes of section Li are included in the shard Sj, and maxc is the maximum child node value of section Li.
[0103] In addition, some other constraints can be formulated to ensure that the road sections are correctly assigned to different shards. For example, the uniqueness constraint xij∈{0,1} limits xij to only 0 or 1, which can ensure that each road section can only be placed in one shard. In addition, it is also necessary to ensure that the number of RSUs, vehicle flow, and communication load of each shard do not exceed the attribute capacity limit. Therefore, the objective function can also have the following constraints:
[0104]
[0105]
[0106] Among them, Wi,RN represents the RSU number limit of section Li, WminRN,j represents the lower limit of the RSU number limit of slice Sj, and WmaxRN,j represents the upper limit of the RSU number limit of slice Sj; Wi,TF represents the traffic flow limit of section Li, WminTF,j represents the lower limit of the traffic flow limit of slice Sj, and WmaxTF,j represents the upper limit of the traffic flow limit of slice Sj; Wi,CL represents the communication load limit of section Li, WminCL,j represents the lower limit of the communication load limit of slice Sj, and WmaxCL,j represents the upper limit of the communication load limit of slice Sj.
[0107] (b2) According to the objective function, by solving multiple multi-dimensional knapsack problems, the blockchain network used to process Internet of Vehicles data is dynamically partitioned to obtain the partitioning result.
[0108] Here, the specific process of solving the multi-dimensional knapsack problem can be referred to the relevant prior art, and the embodiment of the present invention will not be described in detail.
[0109] S30. According to the sharding result, based on the similarity between the old and new shards, the data of the old shards is migrated to the new shards through a blockchain consensus mechanism with encryption and verification operations.
[0110] What step S30 actually does is to perform the process of shard reconstruction and inheritance according to the shard division result. Through shard reconstruction and inheritance, the new shard can inherit the status and data of the previous shard, so that the system can dynamically adapt to changes in network conditions without losing the information in the previous shard, effectively improving the flexibility and scalability of the shard system and ensuring the continuity and security of the system.
[0111] In the embodiment of the present invention, the sharding scheme is dynamically adjusted according to the sharding result, and nodes and resources can be quickly reallocated according to real-time changes to ensure load balancing between shards and avoid overloading of certain shards or waste of resources.
[0112] Specifically, according to the sharding results, based on the similarity between the old and new shards, the data of the old shards is migrated to the new shards through a blockchain consensus mechanism with encryption and verification operations, including:
[0113] (c1) Determine a new shard set based on the shard division result;
[0114] Here, the shard division result includes multiple new shards, that is, a new shard set.
[0115] (c2) calculating the geographic proximity between each pair of new and old shards in the new shard set and the old shard set;
[0116] It can be understood that the old shard set is the set consisting of the shards before they are re-divided.
[0117] Calculate the geographic proximity between each pair of new and old shards in the new shard collection and the old shard collection, including:
[0118] G(Sold,Snew)=α'Dadj(Sold,Snew)+β'Ooverlap(Sold,Snew);
[0119]
[0120] Among them, Sold represents the old shard in the old shard set, Snew represents the new shard in the new shard set, Dcenter(Sold, Snew) represents the distance between the middle coordinates of Sold and Snew, and Dmax is the preset maximum distance value; Dadj(Sold, Snew) represents the centralization distance between Sold and Snew; R(Sold) represents the geographical scope of Sold, R(Snew) represents the geographical scope of Snew, and Dadj(Sold, Snew) represents the degree of overlap between the geographical scopes of Sold and Snew; α' and β' are preset weights, and G(Sold, Snew) represents the geographical proximity between Sold and Snew.
[0121] (c3) For each new shard in the new shard set, determine the old shard with the closest geographical location to the new shard, determine the blockchain node that the old shard and the new shard have in common as the consensus node for implementing the consensus mechanism, and migrate the data of the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations.
[0122] Here, the embodiment of the present invention uses geographic location data to calculate the geographic location proximity between the new and old shards. Shards with geographic location proximity are closer in terms of geographic location and traffic characteristics, which helps to achieve seamless data migration. In addition, during the migration process, a consensus mechanism with encryption and verification processes is used to ensure data consistency and integrity.
[0123] In one implementation, in the process of migrating the data of the old shard to the new shard through a blockchain consensus mechanism with encryption and verification operations, in order to further ensure data continuity, the embodiment of the present invention introduces a two-stage synchronization mechanism. The first is the fast synchronization stage, which prioritizes the synchronization of the most recent key data to ensure that the system is not disturbed during the reconstruction process. Then there is the full synchronization stage, which completely migrates all historical data to ensure that the new shard has complete data.
[0124] Specifically, under the dual-stage synchronization machine, the data of the old shard is migrated to the new shard through the blockchain consensus mechanism with encryption and verification operations, including: selecting data on several recent blocks from the old shard, first migrating this part of the data to the new shard through the blockchain consensus mechanism with encryption and verification operations, and then gradually migrating the remaining data in the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations. Therefore, the embodiment of the present invention reduces the impact of shard reconstruction on system performance by gradually migrating and verifying data.
[0125] The Internet of Vehicles consensus method for ensuring load balancing and data reliability provided by the embodiment of the present invention monitors indicators such as traffic flow, communication load and the number of RSUs in real time, and uses the optimization algorithm of the multiple multidimensional knapsack problem MMKP to dynamically shard the blockchain network used to process Internet of Vehicles data. It can effectively achieve sharding and load balancing under various conditions, and solves the problems of low data processing efficiency, unbalanced load and insufficient sharding security in the Internet of Vehicles by ensuring the local continuity of the shards and the overall stability of the system.
[0126] It is worth mentioning that although the sharding scheme based solely on geographic location in the prior art can solve the local problem of data processing to a certain extent, it cannot simultaneously achieve close distances between nodes within a slice and load balancing between slices. This method ignores the impact of dynamically changing factors such as vehicle flow and the number of roadside unit (RSU) nodes in the Internet of Vehicles, and it is difficult to maintain high efficiency and stability in a highly dynamic environment, resulting in poor system performance and resource utilization. For example, in some high-traffic areas, shards may be overcrowded, while in low-traffic areas, resources may be wasted, and the optimal performance of the overall system cannot be achieved. In addition, traditional sharding algorithms usually lack an effective inheritance mechanism when dealing with shard reconstruction, which may lead to data discontinuity and system instability during shard reconstruction. In a dynamically changing Internet of Vehicles environment, data loss or inconsistency is prone to occur during shard reconstruction, affecting the stability and security of the system.
[0127] In the Internet of Vehicles environment, the reconstruction of shards is caused by the change in the load of different shards due to time. However, in real life, there may be many situations in which the load of different shards changes, such as a large change in traffic volume, the construction and addition of real roads, etc. It is also possible that only some RSUs are damaged or some RSUs are newly added. This is a minor change and does not affect the global road section. Therefore, considering the actual situation, a trusted trusted certification authority (TA) can decide whether the sharding scheme needs to be reconstructed, and the TA will notify the decision results to each node of the blockchain network. Therefore, in one implementation method, the method of an embodiment of the present invention may also include the following steps:
[0128] (d1) Periodically calculate the traffic flow attribute value, communication load attribute value and RSU number change range of each slice:
[0129]
[0130] Among them, TFj(t) represents the traffic flow attribute value of the j-th slice, ΔTFj is the change amplitude of the traffic flow attribute value of the j-th slice, RNj(t) represents the number of RSUs of the j-th slice, ΔRNj is the change amplitude of the number of RSUs of the j-th slice, CLj(t) represents the communication load attribute value of the j-th slice, ΔCLj is the change amplitude of the communication load attribute value of the j-th slice.
[0131] Then, calculate the total change:
[0132]
[0133] (d2) judging whether shard reconstruction is required based on the calculated change amplitude;
[0134] Specifically, a small change threshold ∈ and a large change threshold θ are set. The number Nlarge of change amplitudes Δj ≥ 0 in all shards and the number Nsmall of change amplitudes ∈ ≤ Δj < 0 in all shards are counted.
[0135] If Nlarge is greater than or equal to the shard number threshold (for example, 2) set according to actual conditions, it is considered a significant change and shard reconstruction is required.
[0136] If Δj<∈ for all shards, it is considered that there is no significant change and no shard reconstruction is required.
[0137] If Nsmall indicates that the sharding has changed, and Nlarge is smaller than the threshold, it is considered a small change and no sharding reconstruction is required.
[0138] (d3) If it is determined that shard reconstruction is not necessary, the data on some high-load shards will be migrated to low-load shards, and encryption and verification mechanisms will be used during the migration process to ensure data consistency and integrity.
[0139] Here, specifically, when Nsmall indicates that there is a change in the shard, and Nlarge is less than the threshold, that is, when there is a small change, TA can notify the relevant shard members to move the shards to ensure that the shards with similar geographical locations are adjusted.
[0140] Specifically, calculate the total load Lj(t) of each shard:
[0141]
[0142] Set the high load threshold Lhigh and the low load threshold Llow, and determine the high load shard set Shigh and the low load shard set Slow:
[0143] Shigh={Si|Lj(t)>Lhigh},
[0144] Slow={Si|Lj(t) <Llow};
[0145] From each high-load shard Select the data set you want to move. To reduce its load, for each high-load shard The data to be moved Distribute to multiple low-load shards To ensure balanced load, the allocation strategy is expressed as:
[0146]
[0147] Where L(k) represents the low load shard of the original load.
[0148] On the move Specifically, The relevant old shard members first synchronize the τ block data in the latest new shard, generate the fast synchronization data Drecent and perform digital signature verification. The digital signature is expressed as:
[0149] σ=Sign(SKsender,Drecent);
[0150] Among them, SKsender is the private key of the old shard member, and Sign(·) represents the signature algorithm.
[0151] Then, the old shard members broadcast σ to the shard network, and the consensus nodes in both the old and new shards verify the signature using the public key PKsender:
[0152] Verify(PKsender,Drecent);
[0153] Wherein, Verify(·) represents the signature verification algorithm.
[0154] If the verification result is true, the data Drecent is valid and has not been tampered with, which can prove that the data is indeed created by Emitted by the relevant old shard members.
[0155] If the verification result is false, the data Drecent is invalid or tampered with, indicating that the old shard member that issued σ may have sent incorrect data or the data may have been tampered with during transmission.
[0156] During the consensus verification process, other new shard members that are not consensus nodes wait for the consensus verification result. If they still do not receive any information about whether the data has been tampered with after waiting for a period of time, these members will believe that Drecent is authentic and valid, and can inherit the data normally, and then start a new round of consensus to continue to perform complete historical data synchronization until the data is tampered with. All inherited.
[0157] It is understandable that due to the complexity of the Internet of Vehicles, some nodes can resist the normal operation of the system by implementing attacks. These attack nodes have stable computing power and may conduct malicious activities such as intercepting communications, spreading false data, or destroying network functions. However, the influence of these attackers is limited by their initial capabilities and will not increase over time. Therefore, the encryption verification mechanism used in the embodiments of the present invention can effectively deal with the security threats it brings.
[0158] In an embodiment of the present invention, when the new geographic location distribution does not change much from the previous distribution, part of the load is moved from the high-load shard to the low-load shard, and the affected shard members perform data movement and synchronization according to the notification of the TA. This method is suitable for situations where there are fewer sections, and only the shards that have changed are adjusted. During the movement process, geographic location proximity is still used to calculate the new and old sections to ensure that the adjusted shards still maintain efficient operation. This strategy gives shard members the ability to perform autonomous calculations based on geographic location proximity, aiming to determine which old shard has an inheritance relationship with the new shard. Subsequently, within the new shard, members that inherit from a specific old shard will be responsible for broadcasting the old shard data to the new shard to ensure seamless inheritance between the new and old shards.
[0159] If it is determined that shard reconstruction is required, the above steps S20 to S30 are still executed, that is, a new shard division scheme is generated to reconstruct the shard as a whole. At this time, all new shard members inherit and quickly synchronize data according to the notification of TA, and notify all old shard members at the same time to clarify which old shard data needs to be inherited to which new shards, and then continue the complete data synchronization. The specific synchronization process also uses the encryption, verification and consensus process described above, which will not be repeated here.
[0160] In summary, the embodiments of the present invention, combined with real-time monitoring and dynamic adjustment mechanisms, can respond quickly and make adjustments when the system load changes, complete load balancing under multiple factors, complete sharding of thousands of nodes considering multiple factors within seconds, and reduce communication loss during sharding reconstruction through sharding reconstruction inheritance mechanism, thereby increasing security. It can effectively realize sharding and load balancing under various conditions, and ensure the local continuity of sharding and the overall stability of the system, solving the problems of low data processing efficiency, unbalanced load and insufficient sharding security in the Internet of Vehicles.
[0161] It should be noted that the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention.
[0162] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0163] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other changes to the disclosed embodiments by viewing the drawings and the disclosed content. In the description of the present invention, the term "comprising" does not exclude other components or steps, "one" or "an" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically limited. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0164] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, devices (equipment), or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware, which are collectively referred to as "modules" or "systems" herein. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as part of the hardware, or may take other distribution forms, such as through the Internet or other wired or wireless telecommunications systems.
[0165] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses (devices) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0168] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A vehicle networking consensus method that ensures load balancing and data reliability, characterized in that: include: Get relevant information about the Internet of Vehicles in real time; The relevant information includes traffic flow information, communication load information and the number of roadside units (RSUs) for each road section in the vehicle network; According to the relevant information, the blockchain network used to process Internet of Vehicles data is dynamically divided into shards using the optimization algorithm of the multiple multidimensional knapsack problem MMKP to obtain a sharding result; According to the sharding result, based on the similarity between the old and new shards, the data of the old shards are migrated to the new shards through a blockchain consensus mechanism with encryption and verification operations.
2. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 1 is characterized in that: Before obtaining relevant information of the Internet of Vehicles in real time, the method further includes: Modeling the Internet of Vehicles as a ternary tree with road sections as nodes and connection relationships between road sections as connection relationships between nodes; Performing a pre-order traversal on the ternary tree to obtain a set of road sections of the Internet of Vehicles, and setting node values for nodes in the set of road sections according to the node levels; The real-time acquisition of relevant information of the Internet of Vehicles includes: real-time acquisition of traffic flow information, communication load information and the number of RSUs of each road section in the road section set.
3. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 2 is characterized in that: According to the relevant information, by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP, the blockchain network used to process the Internet of Vehicles data is dynamically divided into shards to obtain the shard division results, including: According to the relevant information, the traffic flow attribute value and the communication load attribute value of each road section are calculated respectively, and the number of RSUs in each road section is determined; According to the traffic flow attribute value, communication load attribute value and RSU number of each road section, the blockchain network used to process Internet of Vehicles data is dynamically divided into shards by introducing the optimization algorithm of the multi-dimensional knapsack problem MMKP to obtain the sharding results; The calculation method of the traffic flow attribute value includes: QT(t)=TT(t)×VT(t), TF(t)=QT(t)×VT(t); Where t represents time, TT(t) represents the average speed of vehicles on the road section, VT(t) represents the vehicle occupancy rate of the road section, QT(t) represents the vehicle density of the road section, and TF(t) represents the traffic flow attribute value of the road section; The communication load attribute value is calculated by: β(t)=BW-CU(t) represents the network bandwidth of the road section, BW is the basic network bandwidth, and CU(t) represents the current network usage of the road section; represents the data transmission rate between vehicles in the road section, DD(Vi,t) represents the data demand of vehicle Vi in the road section, Nt represents the number of vehicles in the road section, t0 to t0+T is the observation time window corresponding to time t, T is the length of the observation time window, and CL(t) represents the communication load attribute value of the road section.
4. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 3 is characterized in that: According to the traffic flow attribute value, communication load attribute value and RSU number of each road section, the blockchain network used to process Internet of Vehicles data is dynamically divided into shards by introducing the optimization algorithm of the multiple multidimensional knapsack problem MMKP, and the shard division results are obtained, including: Take the road section as the item in the multi-dimensional knapsack problem MMKP, take the traffic flow attribute value, communication load attribute value and RSU number of the road section as the item attributes, take the shard as the knapsack in the multi-dimensional knapsack problem MMKP, construct the multi-dimensional knapsack problem MMKP, and define the objective function; According to the objective function, by solving the multiple multidimensional knapsack problem MMKP, a dynamic sharding division of the blockchain network for processing Internet of Vehicles data is achieved to obtain a sharding division result; The objective function is: Among them, TF(t) represents the traffic flow attribute value of the section, CL(t) represents the communication load attribute value of the section, RN(t) represents the number of RSUs in the section, xij represents whether the section Li is divided into the shard Sj; k is the total number of shards, n is the total number of sections, and e is the natural base; α, β, γ and δ are all adjustable constant parameters, ω1 and ω2 are preset weight factors; Va represents the objective function value.
5. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 4 is characterized in that: The objective function has the following constraints: xi,j≤xPi,j, Among them, xPi,j indicates whether the parent node of section Li is included in the shard Sj; B(i) represents the set of brother nodes representing section Li, Lb represents the node value of the brother nodes of section Li, xb,j represents whether the brother nodes of section Li are included in the shard Sj, and maxb is the maximum brother node value of section Li; C(i) represents the set of child nodes of section Li, Lc is the node value of the child nodes of section Li, xc,j indicates whether the child nodes of section Li are included in the shard Sj, and maxc is the maximum child node value of section Li.
6. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 5 is characterized in that: The objective function also has the following constraints: Among them, Wi,RN represents the RSU number limit of section Li, WminRN,j represents the lower limit of the RSU number limit of slice Sj, and WmaxRN,j represents the upper limit of the RSU number limit of slice Sj; Wi,TF represents the traffic flow limit of section Li, WminTF,j represents the lower limit of the traffic flow limit of slice Sj, and WmaxTF,j represents the upper limit of the traffic flow limit of slice Sj; Wi,CL represents the communication load limit of section Li, WminCL,j represents the lower limit of the communication load limit of slice Sj, and WmaxCL,j represents the upper limit of the communication load limit of slice Sj.
7. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 3 is characterized in that: The method further comprises: Periodically calculate the traffic flow attribute value, communication load attribute value and RSU number change range of each slice; According to the change range, determine whether shard reconstruction is required; If it is determined that shard reconstruction is not necessary, the data on some high-load shards will be migrated to low-load shards, and encryption and verification mechanisms will be used during the migration process to ensure data consistency and integrity; If it is determined that shard reconstruction is required, the step of dynamically sharding the blockchain network used to process Internet of Vehicles data based on the relevant information and the subsequent steps are executed using the optimization algorithm of the multiple multidimensional knapsack problem MMKP.
8. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 1 is characterized in that: According to the sharding result, based on the similarity between the new and old shards, the data of the old shards are migrated to the new shards through a blockchain consensus mechanism with encryption and verification operations, including: Determine a new shard set according to the shard division result; Calculate the geographic location proximity between each pair of new and old shards in the new shard set and the old shard set; For each new shard in the new shard set, determine the old shard with the highest geographical proximity to it, determine the blockchain node that the old shard and the new shard have in common as the consensus node for implementing the consensus mechanism, and migrate the data of the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations.
9. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 8 is characterized in that: The migration of the data of the old shard to the new shard through a blockchain consensus mechanism with encryption and verification operations includes: Select the data on the most recent blocks from the old shard, first migrate this part of the data to the new shard through the blockchain consensus mechanism with encryption and verification operations, and then gradually migrate the remaining data in the old shard to the new shard through the blockchain consensus mechanism with encryption and verification operations.
10. The vehicle networking consensus method for ensuring load balancing and data reliability according to claim 8, characterized in that: The calculating the geographic location proximity between each pair of new and old shards in the new shard set and the old shard set includes: G(Sold,Snew)=α'Dadj(Sold,Snew)+β'Ooverlap(Sold,Snew); Among them, Sold represents the old shard in the old shard set, Snew represents the new shard in the new shard set, Dcenter(Sold, Snew) represents the distance between the middle coordinates of Sold and Snew, and Dmax is the preset maximum distance value; Dadj(Sold, Snew) represents the centralization distance between Sold and Snew; R(Sold) represents the geographical scope of Sold, R(Snew) represents the geographical scope of Snew, and Dadj(Sold, Snew) represents the degree of overlap between the geographical scopes of Sold and Snew; α' and β' are preset weights, and G(Sold, Snew) represents the geographical proximity between Sold and Snew.
Citation Information
Cited By
Block chain-based distributed traffic signal control method and device, and medium
CN119992854A