Consensus method for data sharing based on edge computing of internet of vehicles
By designing a data consensus method in the vehicle-to-everything (V2X) system and utilizing edge computing and blockchain technology, the resource constraints and security issues of data sharing in V2X were resolved, achieving efficient and reliable data sharing.
Patent Information
- Application Number
- CN202310350244.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-04-04
AI Technical Summary
Due to resource limitations, connected vehicle systems cannot support massive data storage and large-scale data sharing, and there are security and privacy issues that make data sharing difficult.
A data sharing consensus method based on edge computing in the Internet of Vehicles is designed. By using a central node to monitor data block construction, a trust value evaluation algorithm, edge node election rules, and a practical Byzantine fault-tolerant consensus algorithm, malicious nodes are eliminated, thereby improving the speed and reliability of data consensus.
Effectively eliminate malicious nodes, improve the credibility of data sharing, reduce consensus latency, and achieve secure and reliable data sharing.
Smart Images

Figure CN116367163B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a consensus method for data sharing based on edge computing of Internet of Vehicles, and belongs to the technical field of edge computing and block chain algorithm. BACKGROUND
[0002] With the expansion of demand for vehicle application services, the vehicle Internet adopting advanced communication technology, data collection technology and wireless networking technology has become the cornerstone of the future intelligent transportation system, and the vehicle cooperative collection and sharing of common interest data can well achieve the goals of ensuring driving safety and improving driving service quality. In the Internet of Vehicles system, due to the limitation of resources, the vehicle cannot support mass data storage and large-scale data sharing. The data generated by the vehicle becomes more and more fine-grained and complex, increasing the burden of data transmission. At the same time, for the vehicle, the more locally related data has a spatial range and a clear service life, which requires low delay and location awareness to realize vehicle data sharing.
[0003] The emergence of edge collaborative computing service has become the key to reducing the terminal deployment cost and improving the system processing capacity and efficiency of the Internet of Vehicles system, but the security and privacy problem is still a key challenge of the Internet of Vehicles. The block chain technology has attracted more and more attention and research in the vehicle network environment due to its characteristics of decentralization, anonymity and trustworthiness, and can promote the establishment of a safe, reliable and decentralized intelligent transportation ecosystem to solve the data sharing problem.
[0004] Therefore, it is necessary to provide a consensus method for data sharing based on edge computing of Internet of Vehicles to solve the above problems. SUMMARY
[0005] The application aims to provide a consensus method for data sharing based on edge computing of Internet of Vehicles, improve the data credibility, and improve the data consensus speed.
[0006] To achieve the above purpose, the application provides a consensus method for data sharing based on edge computing of Internet of Vehicles, mainly including the following steps:
[0007] Step 1, collecting information and constructing a data block, monitoring the Internet of Vehicles through a center node, storing the data shared between vehicles in a local record pool in time sequence, when the information stored in the record pool is enough to fill the data block, the system packs the data into a block, when the block is constructed, the center node broadcasts the block to the Internet of Vehicles, and waits for the realization of the consensus process;
[0008] Step 2, defining the trust value influencing factors of shared data vehicles, the trust value including a reward mechanism and a punishment mechanism;
[0009] Step 3, give definition, apply evaluation algorithm to evaluate the trust value of the vehicle;
[0010] Step 4, design the proxy node election rule of the edge node, get the master node and consensus node in the consensus process according to the trust value of the vehicle, and eliminate malicious nodes;
[0011] Step 5, determine the consensus process scheme of data sharing, adopt the practical Byzantine fault tolerance consensus algorithm to obtain the consensus scheme of shared data in the consensus process;
[0012] Step 6, according to the obtained consensus scheme, the nodes of Internet of Vehicles reach an agreement, and generate a block to complete the data sharing in Internet of Vehicles.
[0013] As a further improvement of the application, in step 1, the data shared between vehicles includes road traffic information and vehicle-related information.
[0014] As a further improvement of the application, in step 2, the reward mechanism includes three reward behaviors, which are respectively: vehicle V i broadcasts the change message honestly and actively, vehicle V i can obtain rewards by reporting vehicles that spread false information, and vehicle V i actively and actively contributes idle computing power.
[0015] As a further improvement of the application, in step 2, the punishment mechanism includes two punishment behaviors, which are respectively: vehicle V i spreads false information, and vehicle V i abuses the report information to defame other vehicles.
[0016] As a further improvement of the application, in step 3, the definition includes:
[0017] V i : vehicle i;
[0018] broadcast information of vehicle i;
[0019] report information of vehicle j to vehicle i broadcast information;
[0020] K: the distance between the vehicle transmitting the message and the vehicle receiving the information;
[0021] D v : the density of vehicles near the receiver;
[0022] N: whether the vehicle V i provides idle computing capacity this time;
[0023] The trust value of the vehicle is updated by the previous trust value;
[0024] T: level of real message, wherein, when T=1, it represents basic information of on-site traffic accident, when T=2, it represents congestion degree of the road where the vehicle is located, when T=3, it represents self-driving information, and when T=4, it represents weather condition of the region where the vehicle is located and on-site road condition;
[0025] F: level of false information, wherein, when F=1, it represents that the false information spread causes serious traffic accident and casualties, when F=2, it represents that the false information spread causes slight traffic accident, when F=3, it represents that the false information spread causes vehicle congestion, and when F=4, it represents that the false information spread does not cause adverse effect;
[0026] The reward coefficient α and the punishment coefficient β.
[0027] As a further improvement of the application, the reward mechanism is
[0028]
[0029]
[0030]
[0031] Wherein, R1(T,K,D v ) is the trust value reward obtained by the vehicle V i for publishing real traffic information. R2(F,K,D v ) is the trust value reward obtained by the vehicle V i for questioning and verifying false information published by other vehicles in the Internet of Vehicles. R3(K,D v ,N) is the trust value reward obtained by the vehicle V i for actively providing idle computing power.
[0032] As a further improvement of the application, the punishment mechanism is:
[0033]
[0034] Wherein, P(F,K,D v ) is the trust value punishment obtained by the vehicle V i for publishing false traffic information or maliciously slandering other vehicles for providing traffic information.
[0035] As a further improvement of the application, step 3 further comprises the following steps:
[0036] When V i broadcasts traffic information to the Internet of Vehicles, V iThe reward for providing idle computing power actively during the period from the last broadcast of traffic information to the current broadcast can be obtained first, that is, the current trust value plus R3(K, D v , N), if the vehicle only provides idle computing power without broadcasting traffic information, then after a specified time period, the score is automatically obtained;
[0037] If no vehicle reports V i , the trust value of V i may be added by R1(T, K, D v );
[0038] When someone questions and reports the traffic information sent by V i , the center node has the right to arbitrate the questioning, if the questioning is true, the questioner can add R2(F, K, D v ) to the existing trust value, and the one sending false information will be punished P(F, K, D v ), if the questioner is maliciously slandering V i , the questioner will be punished P(F, K, D v ).
[0039] As a further improvement of the application, in step 3, the evaluation algorithm is:
[0040] If the report information of vehicle j on the broadcast information of vehicle i does not exist, then
[0041]
[0042]
[0043] If the report information of vehicle j on the broadcast information of vehicle i exists and is true, then
[0044]
[0045]
[0046] If the report information of vehicle j on the broadcast information of vehicle i exists and is false, then
[0047]
[0048]
[0049] As a further improvement of the application, the specific steps of the practical Byzantine fault tolerance consensus algorithm in step 5 are as follows:
[0050] Step 51, according to the latest vehicle trust value, the highest trust value vehicle in the area is taken as the master node in the consensus process, and the malicious node is removed, wherein the total number of nodes is 3f+1;
[0051] Step 52, the center sends a shared data request to the master node, the master node assigns a proposal number to the request received from the client, and then sends a pre-preparation message to each consensus node;
[0052] Step 53, after receiving the pre-preparation message, the consensus node checks the message legality, and if the check is passed, the preparation message is sent to other nodes with its own id information, and the preparation information from other nodes is received, the node receiving the preparation message also checks the message legality, and if the verification is passed, the preparation message is written into the message log, and at least 2f+1 verified messages are collected to enter the preparation state;
[0053] Step 54, each consensus node broadcasts a confirmation message to tell other nodes that a proposal is in the preparation state in the view;
[0054] Step 55, when the node set collects at least 2f+1 verified confirmation messages, it means that the proposal is passed, the area reaches consensus, and a new block and its transaction are generated to the local blockchain and state database.
[0055] The beneficial effects of the present application are that the present application can improve the credibility of shared data and effectively remove malicious nodes. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 It is a data sharing system model schematic diagram in the consensus method for data sharing based on edge computing of Internet of Vehicles of the present application.
[0057] Figure 2 It is a flowchart of the data sharing consensus method in the consensus method for data sharing based on edge computing of Internet of Vehicles of the present application.
[0058] Figure 3 It is a flowchart of the practical Byzantine fault tolerance consensus algorithm based on trust value in the consensus method for data sharing based on edge computing of Internet of Vehicles of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in detail below with reference to the drawings and specific embodiments.
[0060] Here, it should be noted that, in order to avoid obscuring the present application due to unnecessary details, only structures and / or processing steps closely related to the scheme of the present application are shown in the drawings, and other details not closely related to the present application are omitted.
[0061] In addition, it should be noted that the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article, or apparatus that comprises a list of elements not only includes those elements, but also other elements not explicitly listed or inherent to such process, method, article, or apparatus.
[0062] As shown in Figures 1 to 3 The application discloses a consensus method based on data sharing of edge computing of Internet of Vehicles, comprising the following steps:
[0063] Step 1, collecting information and constructing data blocks: the center node (TC) monitors the Internet of Vehicles, and stores the data shared among vehicles in the local record pool in time sequence, and when the information stored in the record pool is enough to fill the data block, the system packs the data into blocks. When the block is constructed, the center node broadcasts it to the Internet of Vehicles, and waits for the realization of the consensus process. Among them, the data shared among vehicles includes road traffic information and related information of the vehicle itself;
[0064] Step 2, defining the influencing factors of the trust value of the shared data vehicle: the trust value of the vehicle is a quantitative symbol of the trusted degree of the vehicle in the Internet of Vehicles. The evaluation of the trust value of the vehicle is mainly composed of two parts of reward mechanism and punishment mechanism. Among them, the behaviors affecting the trust value of the vehicle are composed of the following behaviors:
[0065] Three reward behaviors:
[0066] 1. Vehicle V i broadcasts the change message honestly and actively;
[0067] 2. Vehicle V i can get rewards by reporting vehicles that spread false information;
[0068] 3. Vehicle V i actively contributes idle computing power.
[0069] Two punishment behaviors:
[0070] 1. Vehicle V i spreads false information;
[0071] 2. Vehicle V i abuses the report information to defame other vehicles.
[0072] Step 3, the following definitions are given, and the trust value evaluation algorithm of the vehicle is designed:
[0073] (1) V i : vehicle i, let the vehicle set V = {1, 2, 3, 4, 5, 6, 7, 8}
[0074] (2) Broadcast information of vehicle i, assuming vehicle 1 broadcasts true information;
[0075] (3) Reporting information of vehicle j to the broadcast information of vehicle i, assuming vehicle 2 and vehicle 3 maliciously report to vehicle 1;
[0076] (4) K: distance between vehicle transmitting information and vehicle receiving information, assuming the distance between each vehicle and vehicle 1 is {0, 2, 2, 1, 2, 2, 3, 3} (km);
[0077] (5) D v : Vehicle density near the receiver, assuming the density of each vehicle is {1, 1, 1, 2, 2, 2, 2, 2} (hundred vehicles / km 2 );
[0078] (6) N: Whether the vehicle V i provides idle computing power this time, value is 0 or 1, assuming each vehicle provides computing power this time is {1, 0, 0, 0, 1, 0, 0, 1};
[0079] (7) The trust value of the vehicle is updated from the previous trust value, assuming each vehicle is initially joined in data sharing, and the trust value before updating is {0, 0, 0, 0, 0, 0, 0, 0};
[0080] (8) T: level of true information. T=1, basic information of on-site traffic accident. T=2, congestion degree of the road where it is located. T=3, own driving information, such as vehicle driving speed, current specific location. T=4, weather conditions in the area, on-site road conditions, including road congestion, damage, maintenance, this time, assuming vehicle 1 shares true information level this time is 2;
[0081] (9) F: level of false information. F=1, the spread of false information causes serious traffic accidents and causes casualties. F=2, the spread of false information causes minor traffic accidents, such as vehicle scratching and collision, but does not cause casualties. F=3, the spread of false information causes vehicle congestion. F=4, the spread of false information but does not cause adverse effects;
[0082] (10) Reward coefficient α=0.5 and penalty coefficient β=0.5;
[0083] According to the evaluation of the factors affecting the trust value of the vehicle, we get the reward mechanism and the punishment mechanism related to the trust value.
[0084] Reward mechanism:
[0085]
[0086]
[0087]
[0088] Punishment mechanism:
[0089]
[0090] where R1(T, K, D v ) is the trust value reward of vehicle V i publishing real traffic information, R2(F, K, D v ) is the trust value reward of vehicle V i questioning the traffic information published by other vehicles in the Internet of Vehicles and verifying false information, R3(K, D v , N) is the trust value reward of vehicle V i proactively providing idle computing power, P(F, K, D v ) is the trust value punishment of vehicle V i publishing false traffic information or maliciously slandering other vehicles providing traffic information.
[0091] When V i broadcasts traffic information to the Internet of Vehicles, V i may first obtain the reward for providing idle computing power from the last broadcast of traffic information to the current broadcast, that is, the current trust value plus R3(K, D v , N). If the vehicle only provides idle computing power without broadcasting traffic information, it will automatically obtain the bonus after a specified period of time.
[0092] In addition, if no vehicle reports V i , the trust value of V i may be added by R1(T, K, D v ) again.
[0093] On the contrary, when someone questions and reports the traffic information sent by V i , the center node has the right to arbitrate the questioning. If the questioning is true, the questioner can add R2(F, K, D v ) to the existing trust value, and the sender of false information will be punished P(F, K, D v ). If the questioner is maliciously slandering V i , the questioner will be punished P(F, K, D v ).
[0094] According to the relevant reward mechanism and punishment mechanism, we can obtain the trust value evaluation algorithm of the vehicle:
[0095] If vehicle j reports the broadcast information of vehicle i Not present, then
[0096]
[0097]
[0098] If the report information of vehicle j to the broadcast information of vehicle i is present Present and true, then
[0099]
[0100]
[0101] If the report information of vehicle j to the broadcast information of vehicle i is present Present and false, then
[0102]
[0103]
[0104] The final latest trust value of each vehicle can be obtained as shown in Table 1:
[0105] Table 1: Trust value of each vehicle node
[0106] Vehicle 1 2 3 4 5 6 7 8 Trust value 0.625 -0.017 -0.017 0 0.034 0 0 0.013
[0107] Step 4, design the proxy node election rule of the edge node: according to the trust value of the vehicle, the proxy node and the consensus node in the consensus process are obtained, then vehicle 1 acts as the master node, and the rest of the vehicles act as the consensus nodes;
[0108] Step 5, determine the consensus process scheme of data sharing: the practical Byzantine fault tolerance consensus algorithm based on the trust value of the vehicle is used to obtain the consensus scheme of the shared data in the consensus process;
[0109] The specific steps of the practical Byzantine fault tolerance consensus algorithm based on the trust value of the vehicle are as follows:
[0110] Step 51, according to the latest trust value of the vehicle, the vehicle with the highest trust value in the region is taken as the master node in the consensus process, and the malicious node is removed, wherein the total number of nodes is 3f+1, wherein the trust values of vehicle 2 and vehicle 3 are lower than 0, which are regarded as malicious nodes and are removed from the consensus process, at this time the total number of nodes is 6;
[0111] Step 52, the center sends a shared data request Request to the master node, the master node assigns a proposal number to the request received from the client, and then sends a pre-preparation message pre-prepare to each consensus node;
[0112] Step 53, after the consensus node receives the pre-preparation message, checks the legality of the message, checks through the preparation message prepare to send to other nodes, with own id information, at the same time receiving the preparation information from other nodes, the node receiving the preparation message also carries out the message legality check on the message, and after verification, the preparation message is written into the message log, and at least 2f+1 verified messages are collected to enter the preparation state;
[0113] Step 54, each consensus node broadcasts the confirmation message commit to tell other nodes that a proposal is in the preparation state in the view;
[0114] Step 55, when the node set collects at least 2f+1 verified confirmation messages, it means that the proposal is passed, the region reaches consensus, generates a new block and its transaction to the local blockchain and state database, and finally the delay required by the consensus process can be obtained as shown in Table 2:
[0115] Table 2: Consensus delay
[0116] Number of nodes 6 8 Latency / s 4 6
[0117] After eliminating the malicious node, the consensus delay can be effectively reduced.
[0118] Step 6, according to the obtained consensus scheme, the Internet of Vehicles nodes reach an agreement, generate a block, and complete data sharing in the Internet of Vehicles.
[0119] In summary, the present application formalizes the consensus problem of data sharing in edge computing of the Internet of Vehicles, eliminates untrusted data sources in the data sharing process, and improves the data credibility. Firstly, in order to solve the challenge brought by the reliability of data source, a vehicle trust value evaluation algorithm is designed. Secondly, in order to solve the challenge brought by data consensus, an election rule of proxy node of edge node is designed, the master node and consensus node in the consensus process are obtained according to the vehicle trust value, and a practical Byzantine fault tolerance consensus algorithm is adopted, so as to eliminate untrusted data sources in the data sharing process and improve the data credibility.
[0120] The above embodiments are only used to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A consensus method for data sharing based on edge computing in the Internet of Vehicles (IoV), characterized in that, Includes the following steps: Step 1: Collect information and build data blocks. The central node monitors the vehicle network and stores the data shared between vehicles in the local record pool in chronological order. When the information stored in the record pool is enough to fill the data block, the system packages the data into a block. When the block is built, the central node will broadcast it to the vehicle network and wait for the consensus process to be realized. Step 2: Define the factors influencing the trust value of shared data vehicles, including reward and penalty mechanisms; Step 3: Define the vehicle's trust value and apply the evaluation algorithm. Step 4: Design the proxy node election rules for edge nodes, and obtain the master node and consensus node in the consensus process based on the trust value of the vehicle, while eliminating malicious nodes. Step 5: Determine the consensus process scheme for data sharing, and use the Practical Byzantine Fault-Tolerant Consensus Algorithm to obtain the consensus scheme for shared data in the consensus process; the specific steps of the Practical Byzantine Fault-Tolerant Consensus Algorithm are as follows: Step 51: Based on the latest trust value of the vehicles, select the vehicle with the highest trust value in the region as the master node in the consensus process, and remove malicious nodes. The total number of nodes is 3f+1. Step 52: The center sends the shared data request to the master node. The master node assigns a proposal number to the request received from the client and then sends a pre-preparation message to each consensus node. Step 53: After receiving the pre-preparation message, the consensus node checks the message's validity. If the check passes, it sends a preparation message to other nodes, including its own ID information. At the same time, it receives preparation information from other nodes. The nodes that receive the preparation message also check the message's validity. If the verification passes, the node writes the preparation message to the message log. Only after collecting at least 2f+1 verified messages can the node enter the preparation state. Step 54: Each consensus node broadcasts a confirmation message to inform other nodes that a certain proposal is ready in the view; Step 55: When a node collects at least 2f+1 verified confirmation messages, the proposal is passed, consensus is reached in the area, and a new block and its transactions are generated in the local blockchain and state database. Step 6: Based on the consensus scheme obtained, after the vehicle network nodes reach an agreement, a block is generated to complete data sharing in the vehicle network.
2. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 1, characterized in that: In step 1, the data shared between vehicles includes traffic information of the road where the vehicle is located and information related to the vehicle itself.
3. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 1, characterized in that: In step 2, the reward mechanism includes three reward behaviors: vehicle V i Honestly and proactively broadcast change messages, vehicle V i You can earn rewards and vehicle V by reporting vehicles that spread false information. i Actively and proactively contribute idle computing power.
4. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 1, characterized in that: In step 2, the punishment mechanism includes two punishment behaviors: vehicle V i Spreading false information and vehicle V i Abuse of whistleblower information to defame other vehicles.
5. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 2, characterized in that, In step 3, the definition includes: V i Vehicle i; Broadcast information for vehicle i; Report information from vehicle j regarding broadcast information from vehicle i; K: The distance between the vehicle transmitting the message and the vehicle receiving the message; D v Vehicle density near the receiver; N: Vehicle V i Will idle computing power be provided this time? The vehicle's trust value is updated to the previous trust value; T: The level of real information. When T=1, it represents the basic information of the traffic accident at the scene. When T=2, it represents the degree of traffic congestion on the road. When T=3, it represents the driver's own driving information. When T=4, it represents the weather conditions of the area and the road conditions at the scene. F: Level of false information. When F=1, it means that the spread of false information caused a serious traffic accident and resulted in casualties. When F=2, it means that the spread of false information caused a minor traffic accident. When F=3, it means that the spread of false information caused traffic congestion. When F=4, it means that the spread of false information did not cause any adverse effects. Reward coefficient α and penalty coefficient β.
6. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 5, characterized in that: The reward mechanism is as follows: Where R1(T, K, D) v ) for vehicle V i Trust value reward for publishing accurate traffic information, R2(F, K, D) v ) for vehicle V i The trust value reward obtained by questioning and verifying false traffic information published by other connected vehicles, R3(K, D) v N) represents vehicle V i Trust value rewards are given for proactively providing idle computing power.
7. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 6, characterized in that: The punishment mechanism is as follows: Wherein, P(F, K, D) v ) for vehicle V i Penalties will be imposed for providing false traffic information or maliciously defaming other vehicles and losing trust points obtained from providing traffic information.
8. The consensus method for data sharing based on edge computing in the Internet of Vehicles as described in claim 7, characterized in that: Step 3 also includes the following steps: When V i When broadcasting traffic information to the vehicle network, V i You can first receive a reward for voluntarily providing idle computing power between the last broadcast of traffic information and the current broadcast, which is the current trust value plus R3(K, D). v If a vehicle only provides idle computing power without broadcasting traffic information, it will automatically receive bonus points after a specified period of time. No vehicle reported V i Then V i The trust value can be increased by adding R1(T, K, D) v ); When someone questions and reports V i When sending traffic information, the central node has the right to arbitrate any objections. If the objection is valid, the objector can add R2(F, K, D) to the existing trust value. v Sending false information will result in a penalty P(F, K, D). v If the person raising the question is maliciously defaming V i Those who raise objections will be punished (P(F, K, D)). v ).
9. The consensus method for data sharing based on vehicle-to-everything (V2X) edge computing according to claim 8, characterized in that, In step 3, the evaluation algorithm is as follows: If vehicle j reports information broadcast by vehicle i If it does not exist, then If vehicle j reports information broadcast by vehicle i If it exists and is true, then If vehicle j reports information broadcast by vehicle i If it exists and is false, then