Internet of vehicles traffic event information sharing method based on block chain
By introducing blockchain and smart contracts into the Internet of Vehicles, combining reputation scores and Bayesian networks, the problem of false information broadcast by malicious vehicles is solved, the trustworthy sharing and accurate dissemination of traffic event information is achieved, and the information security of Internet of Vehicles and the stability of the transportation system is improved.
Patent Information
- Application Number
- CN202510736731.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-08-29
AI Technical Summary
In the existing Internet of Vehicles technology, false information broadcast by malicious vehicles makes it difficult to judge the reliability and consistency of information, especially in night or inclement weather conditions, the risk of traffic accidents increases, and it is difficult for existing models to effectively evaluate the authenticity and timeliness of information.
Blockchain technology is introduced, and through smart contracts and trust value update mechanisms, combined with reputation scores and Bayesian networks, it realizes trustworthy sharing and storage of traffic event information, and uses distributed key generation and roadside unit RSU for authentication and information verification.
It improves the accuracy and timeliness of traffic event information, reduces the spread of false information, and enhances the information security and stability of the traffic system in the Internet of Vehicles environment.
Smart Images

Figure CN120568340A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of vehicle networking technology, and more specifically, relates to a method for sharing vehicle networking traffic event information based on blockchain. Background Art
[0002] With the rapid development of connected vehicle (IoV) technology, information sharing between vehicles and transportation infrastructure has become increasingly important. A well-established trusted data sharing mechanism ensures the accuracy and timeliness of exchanged information, significantly improving traffic efficiency and enhancing driving safety. Vehicles can access real-time information such as road conditions and accident information, enabling them to make smarter decisions and reduce the incidence of traffic accidents. However, at night or in inclement weather, the reliability of the information received by vehicles on the road is often difficult to assess. Especially in low traffic conditions, limited information can cause existing vehicle data sharing models to misjudge actual road conditions, leading to accidents. Further complicating matters, the presence of malicious vehicles makes the spread of false information a real threat. These malicious vehicles may deliberately broadcast false information, such as claiming that the road ahead is safe when, in reality, an accident has occurred. Such misleading information not only poses a direct safety risk to vehicles behind them but can also trigger a chain reaction, leading to a series of traffic accidents. Therefore, how to effectively assess and verify the authenticity of received information within a vehicle's trusted data sharing model has become a critical issue that needs to be addressed in IoV technology.
[0003] Existing trusted data sharing models in the Internet of Vehicles (IoV) fall into two main categories: centralized management models and distributed trust management models. Centralized management models rely on a centralized authority to verify and distribute information. While this model offers advantages in efficiency and consistency, it also carries the risk of a single point of failure. If the central node is attacked or fails, the trustworthiness of the entire system will be severely impacted. Furthermore, centralized models can face performance bottlenecks in large-scale vehicle networks and struggle to cope with high-concurrency information processing demands. Distributed trust management models, on the other hand, rely on multiple nodes to jointly participate in information verification and distribution, avoiding the single point of failure issue. However, distributed models face challenges in information consistency and security, particularly in the presence of malicious nodes. Ensuring the authenticity and consistency of information becomes a challenge. Furthermore, at night, in inclement weather, and with the presence of malicious vehicles, low traffic volume can make it difficult to assess the reliability of information received by vehicles on the road, making it even more difficult to verify its accuracy and timeliness. Summary of the Invention
[0004] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a method for sharing traffic event information in the Internet of Vehicles based on blockchain. The blockchain is introduced into the Internet of Vehicles to achieve reliable sharing of traffic event information through smart contracts, thereby ensuring the accuracy and timeliness of the information.
[0005] To achieve the above-mentioned purpose, the present invention provides a method for sharing traffic event information in an Internet of Vehicles (IoV) based on blockchain, comprising the following steps:
[0006] S1: Build a blockchain-based Internet of Vehicles, including the vehicle layer, infrastructure layer, and blockchain layer, where:
[0007] The vehicle layer includes several vehicles, each equipped with on-board sensors, on-board computers, and on-board communication equipment. The on-board sensors are used to collect traffic data in real time, and the on-board computers are used to process the traffic data to obtain traffic event information, which is then reported to the roadside units (RSUs) in the infrastructure layer through the on-board communication equipment.
[0008] The infrastructure layer includes trusted institutions TA and roadside units RSU;
[0009] The blockchain layer is used to store traffic information, including vehicle information, road information, and traffic event information. The trusted institution (TA) is the master node of the blockchain and is used to deploy smart contracts on the roadside units (RSUs), including key smart contracts and trust value update smart contracts. The roadside units (RSUs) are nodes of the blockchain and are used to maintain the blockchain and obtain and upload information on the blockchain.
[0010] S2: When a vehicle joins the Internet of Vehicles, it applies for identity registration from the trusted institution TA. The trusted institution TA assigns an identity code to the vehicle, initializes the vehicle's trust value, and then saves the vehicle information to the blockchain. The vehicle sends the identity code to the roadside unit RSU for authentication. After the authentication is passed, the key smart contract generates a key pair for the vehicle, which is recorded as the vehicle V i The public key is PK i , the private key is SK i ;
[0011] S3: When the vehicle V i Processing to obtain a certain traffic event information m i Then, use its public key to generate the signature σ of the information i , and then send traffic event information m i and signature S i =(PK i ,σ i ) and timestamp CT i Give roadside units RSU;
[0012] S4: When the roadside unit RSU receives the vehicle V iMessage sent m i 、Signature S i and timestamp CT i After that, first verify the validity of the signature to ensure that the message is indeed from a legitimate vehicle; if the signature is valid, proceed to step S5, otherwise proceed to step S7;
[0013] S5: For traffic event information m that has passed signature verification i , the roadside unit RSU determines whether it is credible, if so, it goes to step S6, otherwise it goes to step S7;
[0014] S6: Roadside unit RSU broadcasts traffic event information m in the vehicle network i , proceed to step S8;
[0015] S7: Roadside unit RSU rejects traffic event information m i , proceed to step S8;
[0016] S8: Roadside unit RSU calls the trust value update smart contract to the vehicle V i Update the trust value of
[0017] S9: If the traffic event information m i If it is credible, the traffic event information m i and vehicle V i The updated trust value is packaged as a transaction; if the traffic event information m i If it is not credible, the vehicle V i The updated trust value is packaged into a transaction; the packaged transaction is stored after consensus is reached on the blockchain.
[0018] The present invention is based on a blockchain-based vehicle network traffic event information sharing method, which builds a blockchain-based vehicle network. When a vehicle joins the vehicle network, it applies for identity registration to a trusted organization and is authenticated by a roadside unit. After the vehicle is registered and authenticated, the traffic event information is signed and uploaded to the roadside unit. The roadside unit verifies the signature of the traffic event information and determines whether it is credible after passing the verification. If it is credible, it is broadcast in the vehicle network. Otherwise, the traffic event information is rejected, and the trust value of the vehicle is updated. The transaction is then packaged and stored on the chain.
[0019] The present invention has the following beneficial effects:
[0020] 1) This invention introduces blockchain into the Internet of Vehicles, performs key calculation and trust value update based on smart contracts, and thus realizes the sharing and storage of credible traffic event information;
[0021] 2) The present invention also proposes a credibility score to assist in determining whether traffic event information is credible, which incorporates the vehicle trust value, location data, and time data of the traffic event, thereby improving the accuracy of information evaluation;
[0022] 3) The present invention also proposes a credibility judgment method based on Bayesian networks for traffic accident information, which comprehensively considers the credibility score of traffic event information, weather conditions and historical accident probability, so as to more comprehensively judge the credibility of the information. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flowchart of a specific implementation method of the vehicle network traffic event information sharing method based on blockchain of the present invention;
[0024] Figure 2 This is a structural diagram of the blockchain-based Internet of Vehicles in the present invention;
[0025] Figure 3 This is a flow chart of vehicle identity registration and authentication in this embodiment;
[0026] Figure 4 is a flow chart of credibility judgment of traffic accident information in this embodiment;
[0027] Figure 5 This is an example diagram of the Bayesian network in this embodiment. DETAILED DESCRIPTION
[0028] The following describes the specific embodiments of the present invention in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when detailed descriptions of known functions and designs may dilute the main content of the present invention, such descriptions will be omitted here.
[0029] Example
[0030] Figure 1 This is a flowchart of a specific implementation of the method for sharing traffic event information of Internet of Vehicles based on blockchain. Figure 1 As shown, the specific steps of the vehicle network traffic event information sharing method based on blockchain of the present invention include:
[0031] S101: Building a blockchain-based Internet of Vehicles:
[0032] In order to achieve trusted sharing of event information in the Internet of Vehicles, the present invention sets up a blockchain in the Internet of Vehicles and constructs a blockchain-based Internet of Vehicles. Figure 2 This is the structural diagram of the Internet of Vehicles based on blockchain in the present invention. Figure 2 As shown, the blockchain-based Internet of Vehicles in the present invention includes a vehicle layer, an infrastructure layer, and a blockchain layer, wherein:
[0033] The vehicle layer includes several vehicles, each of which is equipped with on-board sensors, on-board computers, and on-board communication equipment. The on-board sensors are used to collect traffic data in real time, and the on-board computers are used to process the traffic data to obtain traffic event information, which is then reported to the roadside units (RSUs) in the infrastructure layer through the on-board communication equipment. With the help of various on-board devices, vehicles can automatically detect traffic-related events, such as traffic accident information, and then report them to the RSUs in the infrastructure layer. The on-board communication equipment and the RSUs can communicate using the communication standard (C-V2X, Cellular Vehicle-to-Everything). In actual applications, there may be two types of vehicles in the vehicle layer: honest vehicles and malicious vehicles. Therefore, the reported traffic event information may contain false information, and it is necessary to filter out false information through information credibility assessment in the future.
[0034] The infrastructure layer includes trusted authorities (TAs) and roadside units (RSUs). TAs are typically trusted government agencies and are considered honest. RSUs are road infrastructure and are also considered honest. They collect and process traffic event information sent by vehicles on the road over a period of time. The infrastructure layer may also include other infrastructure, such as weather stations and traffic event databases.
[0035] The blockchain layer is used to store traffic information, including vehicle information, road information, and traffic event information. The trusted authority (TA) serves as the blockchain's master node, deploying smart contracts on roadside units (RSUs), including key smart contracts and trust value update smart contracts. RSUs are nodes on the blockchain, responsible for maintaining the blockchain and acquiring and uploading information. In practical applications, consortium chains are preferred, enabling faster upload of information to the blockchain without consuming excessive resources.
[0036] S102: Vehicle identity registration and authentication:
[0037] When a vehicle joins the Internet of Vehicles, it applies for identity registration from the trusted institution TA. The trusted institution TA assigns an identity code to the vehicle, initializes the vehicle's trust value, and then saves the vehicle information to the blockchain. The vehicle sends the identity code to the roadside unit RSU for authentication. After the authentication is passed, the key smart contract generates a key pair for the vehicle, which is recorded as the vehicle V i The public key is PK i , the private key is SK i .
[0038] In this embodiment, the roadside unit RSU is used as a blockchain node to build a distributed key generation network KGN for the Internet of Vehicles, and the vehicle identity registration and authentication process is completed through smart contracts, realizing the function of the distributed key generation center KGC. Figure 3 This is a flow chart of vehicle identity registration and authentication in this embodiment. Figure 3 As shown, the specific steps of vehicle identity registration and authentication in this embodiment include:
[0039] S301: Trusted institution initialization:
[0040] The trusted institution TA sets up a supersingular elliptic curve E:y 2 =x 3 +ax+bmodq, where a and b represent the elliptic curve coefficients and q represents the base order. Then enter a security parameter And select an additive group G of order q, whose generator is P. Initialize two secure hash functions H k : k=1,2. Calculate the public key P pub =sP, where s represents the master key, which is randomly selected from the security parameter λ and kept secret.
[0041] The trusted institution TA sets up a key smart contract SET-KGN to generate the vehicle V i The encrypted portion of the private key xppk i And deploy the key smart contract SET-KGN to each roadside unit RSU, encrypt part of the private key xppk i The generation method is:
[0042]
[0043] Among them, r i Indicates vehicle V i Uploaded random number, ID i Indicates vehicle V i Identity code ID i .
[0044] Then use the following formula to calculate the partial private key ppk i Encrypt and get the encrypted private key xppk i :
[0045] xppk i =H1(ppk i ||ID i )
[0046] S302: The vehicle sends an identity registration request:
[0047] When the vehicle V iTo join the Internet of Vehicles, first initiate an identity registration request to the trusted institution TA. The trusted institution TA is the vehicle V i Assign an identity code ID i , together with the public key P pub Together with the secure hash function H1, it is fed back to the vehicle V i .
[0048] S303: The roadside unit generates the encryption partial private key:
[0049] Vehicle V i Generate a random value r i , and replace {ID i ,r i} is submitted to the corresponding roadside unit RSU as a key request. The roadside unit RSU first verifies the identity code ID i The validity of the identity code ID i If it is not registered, the key request will be rejected, otherwise the smart contract SET-KGN will be called for the vehicle V i Generate the encrypted private key xppk i And feedback to the vehicle V i .
[0050] S304: Vehicle calculates part of the private key:
[0051] Vehicle V i After receiving the encrypted private key xppk i After that, the following formula is used to calculate the partial private key ppk i :
[0052]
[0053] S305: Vehicle V i Determine the partial private key ppk i Does the following validity equation apply?
[0054] ppk i P=r i +H1(P pub ,ID i ,r i )P pub
[0055] If the equation holds true, then the partial private key ppk i is valid, go to step S306, otherwise the partial private key ppk i Invalid, return to step S303.
[0056] S306: The vehicle generates a key pair:
[0057] Vehicle V i Pick a random value As its private value, and calculate the random value X i =x i P. Vehicle V i PK i =(X i ,r i ) as the public key, and SK i =(x i ,ppk i ) as the private key.
[0058] S103: The vehicle sends traffic event information:
[0059] When the vehicle V i Processing to obtain a certain traffic event information m i ∈(0,1) * Then, use its public key to generate the signature σ of the information i , then send message m i and signature S i =(PK i ,σ i ) and timestamp CT i To the roadside unit (RSU), adding a timestamp can limit the validity period of the signature, thereby preventing replay attacks.
[0060] In this embodiment, when a key pair is generated based on the key smart contract SET-KGN, the signature σ of the information is calculated using the following formula: i :
[0061] σ i =(ppk i -β i x i )modq
[0062] Among them, β i =H2(P pub ,ID i ,PK i ,m i ,CT1).
[0063] S104: When the roadside unit RSU receives the vehicle V i Message sent m i 、Signature S i and timestamp CT i After that, the validity of the signature is first verified to ensure that the message is indeed from a legitimate vehicle. If the signature is valid, then step S105 is entered, otherwise step S107 is entered.
[0064] The signature verification method in this embodiment is: the roadside unit RSU uses the following formula to calculate the vehicle V i Hash value
[0065]
[0066] Then determine the hash value Whether the following signature verification equation is satisfied:
[0067]
[0068] If the equation holds true, the signature is considered valid; otherwise, the signature is considered invalid.
[0069] S105: For traffic event information m that has passed signature verification i , the roadside unit RSU determines whether it is credible, if so, it goes to step S106, otherwise it goes to step S107.
[0070] This embodiment proposes a method for determining whether information is credible based on reputation scores. The specific method is as follows:
[0071] The roadside unit RSU uses the following method to calculate the traffic event information m i Credit score i :
[0072]
[0073] Among them, R i Indicates vehicle V i Trust value, e represents the natural constant, d(V i ,m i ) indicates vehicle V i Report traffic incident information i When vehicle V i Distance from the place where the traffic incident occurred, t(V i ,m i ) indicates vehicle V i Report traffic incident information i The time difference between the time of the accident and the time of the traffic incident, η represents a preset rate of change parameter.
[0074] When the reputation score i When the preset conditions are met, traffic event information m i It is credible, otherwise it is not credible.
[0075] In practical applications, the most concerned traffic event information is traffic accident information. In order to more accurately determine whether traffic accident information is credible, in addition to the credit score, this embodiment also combines weather conditions and historical accident probability to make a judgment.
[0076] Weather conditions have a significant impact on the credibility of traffic accident information, so traffic accidents are more likely to occur when weather conditions are bad. For example, weather data can be classified into four states: sunny, cloudy, rainy, and stormy. These classifications are selected based on their impact on road conditions and driving behavior. For example, stormy and rainy days usually cause slippery roads, reducing driving safety and thus increasing the possibility of accidents. In contrast, sunny and cloudy weather conditions are relatively stable and have less impact on driving safety. Therefore, when traffic event information m i For traffic accident information, you can crawl the weather information of the place where the traffic accident occurred at the time of the accident from the official website of the weather station.
[0077] The historical accident probability is an important indicator that measures the frequency of traffic accidents in a specific area or time period. It is used to assess past accident trends and patterns, helps predict the likelihood of future accidents, and influences the assessment of news credibility. The historical accident probability can be calculated based on historical data from traffic management departments and public safety databases.
[0078] Figure 4 This is a flow chart of the credibility judgment of traffic accident information in this embodiment. Figure 4 As shown, the specific steps of determining the credibility of traffic accident information in this embodiment include:
[0079] S401: Statistical historical data:
[0080] Obtain historical traffic accident data within the coverage area of the Internet of Vehicles, calculate the historical accident probability of each key location within the coverage area of the Internet of Vehicles, and the accident probability under different weather conditions, and obtain the location condition probability table and weather condition probability table of traffic accidents.
[0081] S402: Constructing a Bayesian network:
[0082] In this embodiment, a Bayesian network is used to infer traffic accident information. The Bayesian network is designed to evaluate the credibility of the message based on multiple factors such as reputation score, weather conditions, and historical accident rates. Figure 5 This is an example diagram of the Bayesian network in this embodiment. Figure 5 As shown, the Bayesian network in this embodiment includes 6 nodes, among which:
[0083] Node A is the probability P(wc) of an accident occurring under different weather conditions wc, which is obtained from the weather condition probability table based on the weather conditions at the time of the traffic accident information.
[0084] Node B is the probability P(HAR) of an accident occurring at different locations. This probability is obtained from the location conditional probability table based on the location of the traffic accident information. For simplicity, in this embodiment, locations are divided into high-risk and low-risk categories, and the probability of an accident occurring is set for each category.
[0085] Node C is the probability that traffic accident information is positive information, and its parent nodes are nodes A and B, that is, the nature of traffic accident information is affected by weather conditions and historical factors.
[0086] Node D is the credibility score of traffic accident information.
[0087] Node E represents the information consistency of traffic accident information, and its parent node is node C.
[0088] Node F represents the credibility of traffic accident information, and its parent nodes are nodes D and E. That is, the credibility is determined by combining the consistency and credibility score of the information.
[0089] S403: Bayesian Inference:
[0090] Traffic incident information i When it comes to traffic accident information, the weather conditions and location of the traffic accident are obtained, and then the credibility is obtained based on Bayesian network reasoning. When the credibility is greater than the threshold, the traffic accident information is credible, otherwise it is not credible.
[0091] Bayesian parameter estimation determines the parameters of the Bayesian network by combining the prior with the observed data using Bayes' theorem. Unlike the maximum likelihood estimate MLE that provides a point estimate, the Bayesian method produces a complete posterior distribution of the parameters, provides a measure of uncertainty, and can handle complex models, noisy data, and small sample sizes. For the Bayesian network proposed in this embodiment, the Dirichlet distribution is used as the prior because it is a conjugate prior for the multinomial distribution. This makes the posterior distribution also a Dirichlet distribution, simplifying the calculation. Assume that node X has K possible values and its parent node combination has M possible cases. For each parent node combination π j ,j=1,2,…,M。
[0092] Node X, P(X|π j ) can be expressed as a multinomial distribution whose parameters are given by the Dirichlet distribution:
[0093]
[0094] Among them, θ j =(θ j,1 ,θ j,2 ,…,θ j,K ) is the conditional probability P(X|πj ) parameter, α j =(α j,1 ,α j,2 ,…,α j,K ) is the parameter of the Dirichlet distribution, often called a hyperparameter. j ) is the normalization constant of the Dirichlet distribution.
[0095] For node C, there are two states: negative and positive. For each set of parent nodes (A, B), a Dirichlet prior is selected for P(C|A, B) and the prior parameter α is set j =(1,1), which corresponds to a uniform prior.
[0096] The likelihood function describes the probability that a given parameter θ j The probability of observing data data under the condition of . For multinomial distribution, its likelihood function P(data|θ j ) is n j,k Indicates that the parent node combination π j , the value of node X is X j The observation frequency of .
[0097]
[0098] This means that for a given parent node configuration π j , the value of node X is X j The probability estimate of is the calculated posterior mean:
[0099]
[0100] The conditional probability table of each node in the Bayesian network is calculated through the above steps.
[0101] This Bayesian reasoning process is used to evaluate the message credibility (MT) in the Internet of Vehicles. It is mainly based on conditional probability calculation and decision threshold determination. The process is as follows:
[0102] Message consistency assessment: Calculate the conditional probability P(C|A,B) and classify the message as positive or negative based on the calculation result. Compare the consistency of the inferred node C with the verified message. If they match, the message is considered consistent; otherwise, it is considered inconsistent.
[0103] Calculate the message's credibility: Calculate P(F|E,D) based on the conditional probability table. Calculate the likelihood: PT = P(F = Trustworthy|E,D); PU = P(F = UTrustworthy|E,D).
[0104] Decision process: If PT>PU and PT≥τ(threshold), the message is considered credible. Otherwise, the message is considered uncredible.
[0105] The Bayesian reasoning process combines prior information (historical data) and real-time data, and dynamically evaluates the credibility of messages through conditional probability calculation, thereby improving information security in the Internet of Vehicles environment and reducing the impact of false information on the traffic system.
[0106] S106: Broadcast traffic event information:
[0107] Roadside unit RSU broadcasts traffic event information in the vehicle network i , go to step S108.
[0108] S107: Reject traffic incident information:
[0109] Roadside unit RSU rejects traffic event information m i , go to step S108.
[0110] S108: Update vehicle trust value:
[0111] The roadside unit RSU calls the trust value update smart contract to the vehicle V i The trust value is updated.
[0112] In this embodiment, the trust value update formula in the trust value update contract is as follows:
[0113]
[0114] Among them, E represents the expected value of traffic event credibility, which can be obtained by averaging the credibility values of credible traffic event information in historical data. λ represents the traffic event impact weight. ρ represents the penalty factor, which is used to represent the attenuation factor of the historical trust value. γ represents the additional reward, that is, the positive promotion of the vehicle trust value after the event is broadcast. δ represents the additional penalty, which is used to significantly reduce the trust value of malicious vehicles.
[0115] S109: Package transactions and upload to the blockchain:
[0116] If the traffic incident information m i If it is credible, the traffic event information m i and vehicle V i The updated trust value is packaged as a transaction; if the traffic event information m i If it is not credible, the vehicle V i The updated trust value is packaged into a transaction; the packaged transaction is stored after consensus is reached on the blockchain.
[0117] To expedite the recording of important information onto the blockchain, this embodiment employs the Raft consensus algorithm. Raft is a simplified distributed consensus protocol that operates on a leader-follower model, where the leader node is responsible for log replication, while the follower nodes ensure data integrity and consistency. This consensus mechanism is not only easy to understand and implement, but also offers high performance, making it well-suited for the application scenarios of this invention.
[0118] Although the above describes the illustrative specific embodiments of the present invention to facilitate understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concepts of the present invention are protected.
Claims
1. A method for sharing traffic event information in Internet of Vehicles based on blockchain, characterized in that: The following steps are involved: S1: Build a blockchain-based Internet of Vehicles, including the vehicle layer, infrastructure layer, and blockchain layer, where: The vehicle layer includes several vehicles, each equipped with on-board sensors, on-board computers, and on-board communication equipment. The on-board sensors are used to collect traffic data in real time, and the on-board computers are used to process the traffic data to obtain traffic event information, which is then reported to the roadside units (RSUs) in the infrastructure layer through the on-board communication equipment. The infrastructure layer includes trusted institutions TA and roadside units RSU; The blockchain layer is used to store traffic information, including vehicle information, road information, and traffic event information. The trusted institution (TA) is the master node of the blockchain and is used to deploy smart contracts on the roadside units (RSUs), including key smart contracts and trust value update smart contracts. The roadside units (RSUs) are nodes of the blockchain and are used to maintain the blockchain and obtain and upload information on the blockchain. S2: When a vehicle joins the Internet of Vehicles, it applies for identity registration from the trusted institution TA. The trusted institution TA assigns an identity code to the vehicle, initializes the vehicle's trust value, and then saves the vehicle information to the blockchain. The vehicle sends the identity code to the roadside unit RSU for authentication. After the authentication is passed, the key smart contract generates a key pair for the vehicle, which is recorded as the vehicle V i The public key is PK i , the private key is SK i ; S3: When the vehicle V i Processing to obtain a certain traffic event information m i Then, use its public key to generate the signature σ of the information i , and then send traffic event information m i and signature S i =(PK i ,σ i ) and timestamp CT i Give roadside units RSU; S4: When the roadside unit RSU receives the vehicle V i Message sent m i 、Signature S i and timestamp CT i After that, first verify the validity of the signature to ensure that the message is indeed from a legitimate vehicle; if the signature is valid, proceed to step S5, otherwise proceed to step S7; S5: For traffic event information m that has passed signature verification i , the roadside unit RSU determines whether it is credible, if so, it goes to step S6, otherwise it goes to step S7; S6: Roadside unit RSU broadcasts traffic event information m in the vehicle network i , proceed to step S8; S7: Roadside unit RSU rejects traffic event information m i , proceed to step S8; S8: Roadside unit RSU calls the trust value update smart contract to the vehicle V i Update the trust value of S9: If the traffic event information m i If it is credible, the traffic event information m i and vehicle V i The updated trust value is packaged as a transaction; if the traffic event information m i If it is not credible, the vehicle V i The updated trust value is packaged into a transaction; the packaged transaction is stored after consensus is reached on the blockchain.
2. The method for sharing traffic event information in an Internet of Vehicles according to claim 1, characterized in that: The specific method of vehicle registration and authentication in step S2 is as follows: S2.1: The trusted authority TA sets up a supersingular elliptic curve E:y 2 =x 3 +ax+bmodq, where a and b represent the elliptic curve coefficients and q represents the base order; then a security parameter is input. And select an additive group G of order q, whose generator is P; initialize two secure hash functions k=1,2; calculate the public key P pub =sP, where s represents the master key, which is randomly selected from the security parameter λ and kept secret; The trusted institution TA sets up a key smart contract SET-KGN to generate the vehicle V i The encrypted portion of the private key xppk i And deploy the key smart contract SET-KGN to each roadside unit RSU, encrypt part of the private key xppk i The generation method is: Among them, r i Indicates vehicle V i Uploaded random number, ID i Indicates vehicle V i Identity code ID i ; Then use the following formula to calculate the partial private key ppk i Encrypt and get the encrypted private key xppk i : xppk i =H1(ppk i ||ID i ) S2.2: When the vehicle V i To join the Internet of Vehicles, first initiate an identity registration request to the trusted institution TA. The trusted institution TA is the vehicle V i Assign an identity code ID i , together with the public key P pub Together with the secure hash function H1, it is fed back to the vehicle V i ; S2.3: Vehicle V i Generate a random value r i , and replace {ID i ,r i }Submitted as a key request to the corresponding roadside unit RSU; The roadside unit RSU first verifies the identity code ID i The validity of the identity code ID i If it is not registered, the key request will be rejected, otherwise the smart contract SET-KGN will be called for the vehicle V i Generate the encrypted private key xppk i And fed back to the vehicle V i ; S2.4: Vehicle V i After receiving the encrypted private key xppk i After that, the following formula is used to calculate the partial private key ppk i : S2.5: Vehicle V i Determine the partial private key ppk i Does the following validity equation apply? ppk i P=r i +H1(P pub ,ID i ,r i )P pub If the equation holds, then the partial private key ppk i is valid, go to step S2.6 otherwise the partial private key ppk i Invalid, return to step S2.3; S2.6: Vehicle V i Pick a random value As its private value, and calculate the random value X i =x i P; Vehicle V i PK i =(X i ,r i ) as the public key, and SK i =(x i ,ppk i ) as the private key.
3. The method for sharing traffic event information in the Internet of Vehicles according to claim 2, characterized in that: In step S3, the signature σ of the information is calculated using the following formula i : s i =(ppk i -b i x i )modq Among them, β i =H2(P pub ,ID i ,PK i ,m i ,CT1); The signature verification method in step S4 is: the roadside unit RSU uses the following formula to calculate the vehicle V i Hash value Then determine the hash value Whether the following signature verification equation is satisfied: If the equation holds true, the signature is considered valid; otherwise, the signature is considered invalid.
4. The method for sharing traffic event information in an Internet of Vehicles according to claim 1, characterized in that: Whether the traffic event information is credible in step S5 is determined by the following method: The roadside unit RSU uses the following method to calculate the traffic event information m i Credit score i : Among them, R i Indicates vehicle V i Trust value, e represents the natural constant, d(V i ,m i ) indicates vehicle V i Report traffic incident information i When vehicle V i Distance from the place where the traffic incident occurred, t(V i ,m i ) indicates vehicle V i Report traffic incident information i The time difference between the time of the accident and the time of the traffic incident, η represents the preset rate of change parameter; When the reputation score i When the preset conditions are met, traffic event information m i It is credible, otherwise it is not credible.
5. The method for sharing traffic event information in the Internet of Vehicles according to claim 4, characterized in that: The traffic event information m i When it comes to traffic accident information, the following method is used to determine whether it is credible: 1) Obtain historical traffic accident data within the coverage area of the Internet of Vehicles, calculate the historical accident probability of each key location within the coverage area of the Internet of Vehicles, and the accident probability under different weather conditions, and obtain the location condition probability table and weather condition probability table of traffic accidents; 2) Construct a Bayesian network consisting of 6 nodes, where: Node A is the probability of an accident occurring under weather conditions, which is obtained from the weather condition probability table based on the weather conditions at the time of the traffic accident information; Node B is the probability of an accident occurring at a certain location, which is obtained from the location conditional probability table based on the location of the traffic accident information; Node C is the probability that traffic accident information belongs to positive information, and its parent nodes are nodes A and B; Node D is the reputation score of traffic accident information; Node E represents the information consistency of traffic accident information, and its parent node is node C; Node F is the credibility of traffic accident information, and its parent nodes are nodes D and E; 3) Traffic incident information i When it comes to traffic accident information, the weather conditions and location of the traffic accident are obtained, and then the credibility is obtained based on Bayesian network reasoning. When the credibility is greater than the threshold, the traffic accident information is credible, otherwise it is not credible.
6. The method for sharing traffic event information in the Internet of Vehicles according to claim 1, characterized in that: The trust value update formula in the trust value update contract is as follows: Among them, E represents the expected value of traffic event credibility, λ represents the impact weight of traffic events, ρ represents the penalty factor, γ represents the additional reward, and δ represents the additional penalty.
7. The method for sharing traffic event information in an Internet of Vehicles according to claim 1, characterized in that: The blockchain consensus in step S9 adopts the Raft consensus algorithm.