A secure routing method for Internet of Vehicles integrating identity trust and geographic location information
Selecting the next hop node through trust evaluation and sparrow search algorithms solves the problem of single malicious nodes and factors in the GPSR routing protocol, and improves the security and success rate of Internet of Vehicles packet transmission.
Patent Information
- Application Number
- CN202411181996.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The GPSR routing protocol has the problem of malicious nodes broadcasting false beacon messages in the Internet of Vehicles, which leads to unstable packet transmission. The traditional protocol has a single factor when selecting the next hop node, which affects security.
The Internet of Vehicles Security Routing Method that integrates identity trust and geographical location information is adopted to filter malicious nodes through trust evaluation, and the next hop node with high trust, strong signal, sufficient energy and closest distance is selected using the sparrow search algorithm.
It improves the security and success rate of data packet transmission, reduces end-to-end delay, and provides a better transmission security environment.
Smart Images

Figure CN118695322B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of wireless communications, and in particular relates to a secure routing method for an Internet of Vehicles that integrates identity trust and geographic location information, and can be used in the Internet of Vehicles. Background Art
[0002] GPSR routing (Greedy Perimeter Stateless Routing) is a representative geographic routing protocol for wireless communication networks. In GPSR routing, nodes periodically broadcast their beacon messages to their neighbors. Each node maintains and updates its neighbor information table based on the received beacon messages. There are two modes for GPSR to forward data packets. The first mode is the greedy mode. If the target node is a neighbor of the sending node, the data packet will be forwarded directly to the target node; otherwise, the next hop node of the route will select a neighbor node that is closer to the target node than itself. The second mode is the peripheral forwarding mode, which forwards data packets using the right-hand rule. The peripheral forwarding mode is a solution to the greedy mode when there is no neighbor to choose from and it falls into the routing black hole dilemma. The advantage of GPSR is that it does not need to maintain the routing table, only the next hop node needs to be considered, and the routing cost is relatively low. Compared with traditional routing protocols such as AODV and DSDV, GPSR has better scalability. However, GPSR routing also has some network security issues. First, there are many malicious nodes in the Internet of Vehicles, which may send false beacon messages to neighbors, such as false geographic locations and false speed information. This may cause GPSR to make wrong decisions when selecting the next hop node, thus affecting the transmission of data packets. Secondly, due to the influence of factors such as node mobility, signal strength, trust, and remaining energy, traditional GPSR only considers the geographical location factor when selecting the next hop node, which is too single and easily leads to data packet transmission failure, thus posing a security threat.
[0003] Most existing technologies select the next-hop node based on the predicted node geographic location and the node entity trust value. However, there is no trust evaluation of the beacon messages broadcast by malicious nodes, and the factors considered for the next-hop node lack diversity. It is a key issue that needs to be solved urgently to conduct trust evaluation on beacon messages, identify false beacon messages issued by malicious nodes, and comprehensively consider multiple factors to select a safe and reliable next-hop node. Summary of the invention
[0004] The present invention provides a secure routing method for an Internet of Vehicles that integrates identity trust and geographic location information. It is an improved GPSR routing method based on trust in the Internet of Vehicles. Before selecting the next hop node, the node that sends a false beacon message can be filtered by performing a trust evaluation on the beacon message of the neighboring node. Then, the next hop node with high trust, high received signal strength, high residual energy, and closest to the target node is found through the sparrow search algorithm (SSA), thereby improving the security of the transmission path and achieving the effect of improving the data packet delivery rate.
[0005] In order to achieve the above object, the technical solution of the present invention is as follows.
[0006] A secure routing method for an Internet of Vehicles that integrates identity trust and geographic location information includes the following steps:
[0007] Step S1, in the Internet of Vehicles, all vehicle nodes periodically broadcast Hello packets containing beacon messages, and the beacon messages contain the anonymous identity information of the vehicle node that sends the beacon message and the geographic location information of the sending vehicle node; the trust agency TA assigns the identity trust of the vehicle node based on the communication history data within the past cycle time T uploaded by the vehicle node, the neighboring nodes of the vehicle node and the roadside unit RSU, and sends the identity trust information of the vehicle node to the roadside unit RSU in a timely manner, and the identity trust information contains the anonymous identity information of the vehicle node and the corresponding identity trust; the roadside unit RSU stores the identity trust of the vehicle node and broadcasts the identity trust information of the vehicle node in real time; the receiving vehicle node that receives the Hello packet reads the beacon message of the sending vehicle node, and searches for the identity trust of the corresponding sending vehicle node from the real-time broadcast according to the anonymous identity information in the beacon message. ;
[0008] Step S2: The receiving vehicle node performs a trust evaluation on the beacon message sent by the sending vehicle node, and first calculates the motion state score between the receiving vehicle node and the sending vehicle node. ; and calculate the risk value of the beacon message by time sensitivity ; Then based on the exercise status score , Value at Risk and the identity trust of the sending vehicle node Construct a decision function to determine whether the beacon message sent by the sending vehicle node is credible;
[0009] Step S3, the receiving vehicle node updates its own neighbor node information table according to the beacon message trust evaluation result obtained by the decision function, and then delivers the data packet; if the updated neighbor node information table contains the information of the target node, the data packet is directly delivered to the target node, otherwise, the next step S4 is executed;
[0010] Step S4, based on the updated neighbor node information table and the information in the data packet, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and calculate the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , and the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node ; Determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the requirements at the same time < and conditions, is the remaining energy of the neighboring nodes of the vehicle node where the data packet is located, and a next-hop candidate set is constructed according to the judgment result; if the next-hop candidate set is not empty, the next step S5 is executed, otherwise the peripheral forwarding mode is entered to select the next-hop node;
[0011] Step S5, construct a fitness function, and use the sparrow search algorithm to find the vehicle node with the highest fitness function value from the next hop candidate set as the next hop node.
[0012] Furthermore, the specific steps of step S1 include:
[0013] Step S11, define the set of all current vehicle nodes in the Internet of Vehicles as , n is the total number of vehicle nodes, each vehicle node has its own set of neighbor nodes, and the neighbor node set of a vehicle node is represented by express, is represented as an arbitrary vehicle node, and , m is the total number of neighbor nodes of vehicle node j;
[0014] All vehicle nodes periodically broadcast Hello packets containing beacon messages. The format of the beacon messages received by the receiving vehicle nodes is defined as ,in, is the anonymous identity information of the vehicle node. The anonymous identity information of each vehicle node All are unique. In order to protect the privacy of the vehicle, only the trust institution TA can obtain its real identity information; To send a timestamp, To receive the timestamp, is the horizontal coordinate of the position of the sending vehicle node when sending the timestamp, is the vertical coordinate of the position of the sending vehicle node when sending the timestamp, is the horizontal coordinate component of the velocity of the sending vehicle node when sending the timestamp, is the vertical coordinate component of the velocity of the sending vehicle node at the time of sending the timestamp;
[0015] Step S12: The trust agency TA calculates the identity trust of vehicle node j through the communication history data uploaded by vehicle node j, its neighbor nodes and roadside unit RSU within the past cycle time T. , the identity trust of vehicle node j The calculation formula is as follows:
[0016] ,
[0017] In the formula, is the comprehensive communication feedback trust value of vehicle node j, is the perception capability of vehicle node j, is the weight factor of the comprehensive communication feedback trust value, is the weight factor of perception ability, and ;
[0018] Step S13: The trust agency TA sends the identity trust information of the vehicle node j to the roadside unit RSU in a timely manner. The identity trust information includes the anonymous identity information of the vehicle node j. and the identity trust of vehicle node j ; Roadside unit RSU stores the identity trust of vehicle node j And broadcast the identity trust information of vehicle node j in real time; the receiving vehicle node that receives the Hello packet reads the beacon message of the sending vehicle node, and sends the anonymous identity information of the vehicle node according to the beacon message Find the identity trust of the corresponding sending vehicle node from the identity trust information of all vehicle nodes broadcasted in real time by the roadside unit RSU .
[0019] Furthermore, in step S12, the perception capability of vehicle node j It is calculated by the trust agency TA based on the traffic data collected by the on-board sensors of vehicle node j and other vehicle nodes. The perception capability of vehicle node j The calculation formula is as follows:
[0020] ,
[0021] In the formula, The probability density function of collecting data for vehicle node j, , is the mean, is the traffic data collected by vehicle node j, is the variance, is the average data value collected by vehicle node j in the past cycle time T, is the average data value collected by vehicle node j and all its neighboring nodes in the past cycle time T;
[0022] Comprehensive communication feedback trust value of vehicle node j is the evaluation of all neighboring nodes on the behavior of vehicle node j in the past cycle time T, is the average of the communication feedback trust of all neighboring nodes of vehicle node j in the past cycle time T, and is the comprehensive communication feedback trust value of vehicle node j. The calculation formula is as follows:
[0023] ,
[0024] In the formula, is the total number of neighbor nodes of vehicle node j in the past cycle time T, is the communication feedback trust of vehicle node i to vehicle node j, where vehicle node i is the neighbor node of vehicle node j, that is, , , where is the weight factor of the packet quantity trust, is the weight factor of the communication success rate trust, and , Trust for the number of packets, Trust in the success rate of communication;
[0025] Among them, the number of packets is trusted represents the trust evaluation of vehicle node i on the number of packets sent by vehicle node j, and the number of packets trust The calculation formula is as follows:
[0026] ,
[0027] In the formula, is the number of data packets sent from vehicle node j to vehicle node i in the past cycle time T, is the number of packets with the largest amount sent among all neighboring nodes of vehicle node i; is the average number of data packets received by vehicle node i in the past cycle time T, is an important factor used to adjust the threshold. is an important factor used to adjust the descent rate. is the natural exponential function;
[0028] Communication success rate trust Represents the trust feedback evaluation of the communication success rate of vehicle node i to vehicle node j, and is defined as Represents three possible evaluation results of the transmission result from vehicle node i to vehicle node j, where , , Represent the probability of successful information transmission, the probability of unsuccessful information transmission, and the probability of uncertainty, respectively, and satisfy ;set up Represents the number of successful information transmissions between vehicle node i and vehicle node j, represents the number of unsuccessful information transmissions between vehicle node i and vehicle node j, and the probability of successful information transmission between vehicle node i and vehicle node j , the probability of unsuccessful information transmission , uncertain probability Will be expressed as follows:
[0029] ,
[0030] Then, the communication success rate trust The calculation formula is: .
[0031] Furthermore, in step S2, the calculation formula of the constructed decision function is as follows:
[0032] ,
[0033] In the formula, is the beacon message trust evaluation result, A value of 1 indicates that the beacon message is trustworthy. A value of 0 means that the beacon message is not trustworthy.
[0034] Further, in step S2, the motion state score between the receiving vehicle node and the sending vehicle node is calculated. The specific steps include:
[0035] Step S211, first calculate the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the calculation formula is as follows:
[0036] ,
[0037] ,
[0038] ,
[0039] ,
[0040] In the formula, Is the receiving timestamp and send timestamp The time difference, is the predicted position coordinate of the sending vehicle node at the time of receiving the timestamp, is the predicted position ordinate of the sending vehicle node at the time of receiving the timestamp, The horizontal coordinate of the position of the receiving vehicle node at the time of receiving the timestamp, is the ordinate of the position of the receiving vehicle node at the time of receiving the timestamp;
[0041] Then, according to the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node Calculating distance trust of beacon messages , distance trust The calculation formula is as follows:
[0042] ,
[0043] In the formula, is the communication distance range of the node;
[0044] Step S212, calculating the speed difference between the speed of the sending vehicle node at the time of sending the timestamp and the predicted speed at the time of receiving the timestamp , the calculation formula is as follows:
[0045] ,
[0046] In the formula, is the speed of the sending vehicle node at the time of sending the timestamp, , is the predicted speed of the beacon message sending vehicle node at the time of receiving the timestamp, and is the predicted speed of the sending vehicle node at the time of receiving the timestamp. Prediction through vehicle-mounted sensors or roadside unit sensors;
[0047] Then, the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp is calculated. Calculating speed trust of beacon messages , speed trust The calculation formula is as follows:
[0048] ,
[0049] In the formula, is the velocity normalization constant, is the threshold of the vehicle node moving speed allowed by the road;
[0050] Step S213, calculating the relative movement direction of the sending vehicle node and the receiving vehicle node , the calculation formula is as follows:
[0051] ,
[0052] In the formula, represents the speed of the receiving vehicle node at the time of receiving the timestamp, Represents the horizontal coordinate component of the velocity of the receiving vehicle node at the receiving timestamp, Represents the vertical coordinate component of the speed of the receiving vehicle node at the receiving timestamp;
[0053] Then, according to the relative movement direction of the sending vehicle node and the receiving vehicle node Computing directional trust of beacon messages , Direction Trust The calculation formula is as follows:
[0054] ,
[0055] In the formula, is the angle influencing factor; when the receiving vehicle node speed or the sending vehicle node speed is 0, it means that the vehicle corresponding to the receiving vehicle node or the sending vehicle node has stopped moving and the relative motion direction angle cannot be calculated. At this time, the direction is trusted Set to the middle value of 0.5;
[0056] Step S214, based on the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp , the relative movement direction of the sending vehicle node and the receiving vehicle node Calculate the exercise status score , the calculation formula is as follows:
[0057] ,
[0058] In the formula, is the weight of distance trust, is the weight of speed trust, is the weight of the directional trust, and .
[0059] Furthermore, in step S2, the risk value The calculation formula is as follows:
[0060] ,
[0061] ,
[0062] ,
[0063] In the formula, The time interval between the current beacon message received by the receiving vehicle node and the last beacon message received by the same sending vehicle node; The timestamp of receiving the current beacon message, is the timestamp of the last beacon message received from the same sending vehicle node, is the sending cycle time of the beacon message, is the time deviation, is the time risk threshold.
[0064] Furthermore, in step S3, the specific method for the receiving vehicle node to update its own neighbor node information table according to the beacon message trust evaluation result obtained by the decision function is:
[0065] Will The relevant information of the sending vehicle node corresponding to the beacon message with a value of 1 is updated to the neighbor node information table of the receiving vehicle node. The relevant information of the sending vehicle node corresponding to the beacon message with a value of 0 is removed from the neighbor node information table of the receiving vehicle node; the relevant information includes the anonymous identity information of the vehicle node , IP address, location coordinates, identity trust, received signal strength, and remaining energy; the information contained in the data packet includes: source node PID, target node PID, source node coordinates, target node coordinates, target node IP address, and data packet content.
[0066] Furthermore, the specific steps of step S4 are as follows:
[0067] Step S41, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , the calculation formula is as follows:
[0068] ,
[0069] ,
[0070] In the formula, and are the horizontal and vertical coordinates of the vehicle node where the data packet is located, and are the horizontal and vertical coordinates of the target node, respectively. and are the horizontal and vertical coordinates of the neighboring nodes of the vehicle node where the data packet is located;
[0071] Step S42: Calculate the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node , the calculation formula is as follows:
[0072] ,
[0073] ,
[0074] ,
[0075] In the formula, is the number of bits in the packet, To transmit a data packet of size k bits to a distance of The energy required by the neighbor nodes, The energy required to receive a k-bit packet is The energy required to transmit or receive each bit, is the power amplification factor of the space loss model, is the power amplification factor under the multipath fading channel model, is the transmission distance from the vehicle node where the data packet is located to the neighboring node, is the threshold for dividing the spatial loss model and the multipath fading channel model, and ;
[0076] Step S43, traverse the neighbor node information table of the vehicle node where the data packet is located, and determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the requirements at the same time. < and If there is no neighbor node that meets the above conditions in the neighbor node information table of the vehicle node where the data packet is located, the vehicle node where the data packet is located enters the peripheral forwarding mode and delivers the data packet to the next hop node; if there is a neighbor node that meets the above conditions in the neighbor node information table of the vehicle node where the data packet is located, the neighbor node that meets the conditions is selected into the next hop candidate set. , and proceed to the next step S5.
[0077] Furthermore, the step S5 specifically includes the following steps:
[0078] Step S51, construct a fitness function, which is composed of four factors: the identity trust of the vehicle node, the received signal strength, the remaining energy, and the distance from the target node. The higher the fitness function value, the more suitable the corresponding vehicle node is as the next hop node. The calculation formula is as follows:
[0079] ,
[0080] In the formula, is the identity trust factor function, is the received signal strength factor function, is the energy factor function, is the distance factor function, is the weight factor of the identity trust factor function, is the weight factor of the received signal strength factor function, is the weight factor of the energy factor function, is the weight factor of the distance factor function, ,and ;
[0081] Step S52, initialize the population, randomly select N vehicle nodes from the next hop candidate set of the vehicle node where the data packet is located as the initial population, and the sequence of the initial population is expressed as , The initial population The pth sparrow, and , each sparrow has a corresponding vehicle node in the next hop candidate set when initialized; The initial five-dimensional coordinate position of , which is composed of vehicle nodes endowed, ;in, For vehicle nodes The x-axis coordinate of For vehicle nodes The y-axis coordinate of For vehicle nodes The degree of identity trust, For vehicle nodes The received signal strength, For vehicle nodes The remaining energy of , the proportion of discoverers in the population is PD, the proportion of early warning in the population is SD, and the early warning value is ;
[0082] Step S53, calculate the individual fitness of each sparrow in the current initial population and find the current global maximum fitness And the global minimum fitness ; The various factor functions required to calculate the individual fitness of sparrows are calculated through the five-dimensional coordinate position parameters of sparrows;
[0083] Step S54, the sparrow updates its position, including the position of the discoverer, the follower, and the warning person in the population; the position of the sparrow is a five-dimensional vector, which represents the value of the sparrow individual in each dimension, and each dimension represents the limiting factor for the selection of the next hop node, namely, the horizontal coordinate, the vertical coordinate, the identity trust, the received signal strength, and the remaining energy; the specific steps for the sparrow to update its position are as follows:
[0084] Step S541, the formula for updating the finder's location is as follows:
[0085] ,
[0086] In the formula, is the number of traversals by the discoverer, corresponding to the A discoverer, Indicates The d-dimensional position information of the discoverer at the t+1th iteration, Indicates The d-dimensional position information of the discoverer at the tth iteration, where the value range of d is [ 1 , 5 ] , t ∈ [ 1 , iter max ] , for [ 0 , 1 ] A random number, Q is a random number that follows a normal distribution, is a matrix with 1 row and 5 columns, all of which have element values 1. is the maximum number of iterations, is the warning value, the warning value The value range is [ 0 , 1 ] , is a safe value, a safe value The value range is [ 0 . 5 , 1 ] ;
[0087] Step S542, the formula for updating the follower position is as follows:
[0088] ,
[0089] In the formula, is the follower traversal number, corresponding to the Followers, Indicates The d-dimensional position information of the follower at the t+1th iteration, Indicates The d-dimensional position information of the follower at the tth iteration, represents the worst position in the tth iteration, is the total number of followers, represents the optimal position of the finder in the t+1th iteration, is a matrix, , is a matrix with 1 row and 5 columns. The elements in it are randomly assigned 1 or -1. For the matrix The transpose of
[0090] Step S543, the formula for updating the position of the alerter is as follows:
[0091] ,
[0092] In the formula, is the number of traversal of the early warning person, corresponding to the A warning person, Indicates The d-dimensional position information of the early warning signal in the t+1th iteration, Indicates The d-dimensional position information of the early warning signal at the tth iteration, is the global optimal individual position in the tth iteration, and The difference is that the former is the global optimal individual position at the tth iteration, and the latter is the optimal position among the discoverers at the tth iteration; is the step size control parameter, which is used to adjust the size of the warning position movement. It is a random number that follows a normal distribution with a mean of 0 and a variance of 1. It is also the step size control parameter, and its value range is [ − 1 , 1 ] , This is to avoid setting a very small constant when the denominator is 0. It represents the individual fitness of the current warning person;
[0093] Step S55, traverse and calculate the fitness of all sparrow individuals according to the updated d-dimensional position information of each sparrow, and update the global optimal individual position , global maximum fitness , the global minimum fitness ;
[0094] Step S56: determine whether the current number of iterations has reached the maximum number of iterations If the maximum number of iterations is not reached , start looping through steps S54 to S55; if the maximum number of iterations is reached , output the global optimal individual position , and execute the next step S57;
[0095] Step S57, node mapping strategy, set the output global optimal individual position The corresponding ideal node is , find out whether there is a corresponding vehicle node in the next-hop candidate set. If so, output the corresponding vehicle node as the next-hop node; if there is no actual corresponding vehicle node in the next-hop candidate set, adopt the principle of proximity and output the next-hop candidate set with the global optimal position The closest vehicle node is mapped to the actual next hop node .
[0096] Furthermore, in step S51,
[0097] Identity Trust Factor Function Represents the maximum-minimum metric value of the identity trust of the vehicle node in the next hop candidate set, the identity trust factor function The larger the value, the higher the trust of the vehicle node in the next hop candidate set. The identity trust factor function The calculation formula is as follows:
[0098] ,
[0099] In the formula, is the identity trust of vehicle node s in the next hop candidate set, , is the maximum identity trust in the next hop candidate set, The minimum identity trust in the next hop candidate set;
[0100] Received signal strength factor function Represents the maximum-minimum metric value of the received signal strength of the vehicle node in the next hop candidate set, and the received signal strength factor function The larger the value, the higher the received signal strength of the vehicle node in the next hop candidate set. The received signal strength factor function The calculation formula is as follows:
[0101] ,
[0102] In the formula, is the received signal strength of vehicle node s in the next hop candidate set, is the maximum received signal strength in the next hop candidate set, is the minimum received signal strength among the next hop candidate set;
[0103] Energy Factor Function Represents the metric value after maximizing and minimizing the remaining energy of the vehicle node in the next hop candidate set, the energy factor function The larger the value, the more residual energy of the vehicle node is in the next hop candidate set. The energy factor function The calculation formula is as follows:
[0104] ,
[0105] In the formula, The remaining energy of vehicle node s in the next hop candidate set, represents the minimum remaining energy in the next-hop candidate set, Indicates the maximum remaining energy among the next-hop candidate set;
[0106] Distance Factor Function Represents the normalized distance between the vehicle node and the target node in the next hop candidate set, and the distance factor function The larger the value, the closer the vehicle node in the next hop candidate set is to the target node. The distance factor function The calculation formula is as follows:
[0107] ,
[0108] In the formula, is the distance between the vehicle node s and the target node in the next hop candidate set, is the closest distance to the target node in the next hop candidate set, It is the farthest distance from the target node in the next hop candidate set.
[0109] Furthermore, in step S57, the next hop candidate set and the global optimal position are The closest vehicle node is mapped to the actual next hop node The calculation formula is as follows:
[0110] ,
[0111] f ( Node y ) = { Node next | min[dis( Node y , Node m )], Node m ∈ S } ,
[0112] In the formula, is the global optimal individual position The corresponding ideal node is is the vehicle node in the next hop candidate set, is the Euclidean distance between the ideal node and the vehicle node in the next hop candidate set, Ideal nodes The corresponding values of the x-axis coordinate, y-axis coordinate, identity trust, received signal strength, and remaining energy, They are the vehicle nodes in the next hop candidate set. The corresponding values of the x-axis coordinate, y-axis coordinate, identity trust, received signal strength, and remaining energy, is the node mapping function.
[0113] Compared with the prior art, the present invention has the following advantages:
[0114] The method of the present invention can filter malicious nodes that send false beacon messages, eliminating the impact of malicious nodes spreading erroneous geographic location information. In the stage of selecting the next hop node for data packet transmission, the present invention solves the problem of single consideration of factors when selecting the next hop node by the traditional GPSR routing protocol. The method of the present invention integrates geographic location information, identity trust and other factors, and uses the sparrow search algorithm to more comprehensively consider the selection of the next hop node. Compared with the traditional GPSR routing protocol, the routing method of the present invention has a higher data packet delivery rate, a shorter end-to-end delay, and a better transmission security environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0115] Figure 1 It is an overall flow chart of a secure routing method for an Internet of Vehicles that integrates identity trust and geographic location information in an embodiment of the present invention;
[0116] Figure 2 A flowchart for constructing a decision function and updating a neighbor node information table in an embodiment of the present invention;
[0117] Figure 3 This is a flowchart of the implementation of using the sparrow search algorithm to find the next hop node in an embodiment of the present invention;
[0118] Figure 4 The figure is a comparison chart of the data packet delivery rate test results of the method of the present invention and the traditional GPSR routing method;
[0119] Figure 5 This is a comparison chart of the delay results between the method of the present invention and the traditional GPSR routing method. DETAILED DESCRIPTION
[0120] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0121] like Figure 1~Figure 3 As shown, the implementation steps of the vehicle network security routing method for integrating identity trust and geographic location information of the present invention are as follows:
[0122] Step S1, define the set of all current vehicle nodes in the Internet of Vehicles as , n is the total number of vehicle nodes. Each vehicle node can be used as a sending vehicle node to send data packets, or as a receiving vehicle node to receive data packets. Each vehicle node has its own set of neighbor nodes. The neighbor node set of a vehicle node is represented by express, is represented as an arbitrary vehicle node, and , m is the vehicle node The total number of neighboring nodes. All vehicle nodes periodically broadcast Hello packets containing beacon messages, which contain the anonymous identity information of the vehicle node sending the beacon message and the geographical location information of the sending vehicle node; the trust agency TA assigns the identity trust of vehicle node j based on the communication history data uploaded by vehicle node j, its neighbor nodes and roadside unit RSU within the past cycle time T. Then the trust agency TA sends the identity trust information of vehicle node j to the roadside unit RSU in time, and the roadside unit RSU stores the identity trust of vehicle node j The identity trust information of vehicle node j is broadcast in real time. In order to protect the privacy of vehicle nodes, the identity trust information broadcast in real time includes the anonymous identity information of the vehicle node and the identity trust of the vehicle node corresponding to the anonymous identity information. The receiving vehicle node that receives the Hello packet reads the beacon message of the sending vehicle node, and searches for the identity trust of the corresponding sending vehicle node from the real-time broadcast according to the anonymous identity information in the beacon message. , the specific steps are as follows:
[0123] Step S11, all vehicle nodes periodically broadcast Hello packets containing beacon messages. The beacon messages contain the anonymous identity information of the vehicle node sending the beacon message and the geographical location information of the vehicle node sending the beacon message. The format of the received beacon message is defined as .in is the anonymous identity information of the vehicle node. The anonymous identity information of each vehicle node All are unique. In order to protect the privacy of the vehicle, only the trust institution TA can obtain its real identity information; To send a timestamp, To receive the timestamp, is the horizontal coordinate of the position of the sending vehicle node when sending the timestamp, is the vertical coordinate of the position of the sending vehicle node when sending the timestamp, is the horizontal coordinate component of the velocity of the sending vehicle node when sending the timestamp, It is the vertical coordinate component of the velocity of the sending vehicle node when sending the timestamp.
[0124] Step S12: The trust agency TA calculates the identity trust of vehicle node j through the communication history data uploaded by vehicle node j, its neighbor nodes and roadside unit RSU within the past cycle time T. , the identity trust of vehicle node j is the perception capability of vehicle node j and the comprehensive communication feedback trust value of vehicle node j The calculated identity trust of vehicle node j is The calculation formula is as follows:
[0125] ,
[0126] in, is the weight factor of the comprehensive communication feedback trust value, is the weight factor of perception ability, and .
[0127] Among them, the perception capability of vehicle node j It is calculated by the trust agency TA based on the traffic data (such as traffic conditions, environment, etc.) collected by the on-board sensors of vehicle node j and other vehicle nodes. The traffic data information collected by different vehicle nodes is similar. Assume that the collected traffic data follows a normal distribution. If the data collected by vehicle node j deviates greatly from the mean of the data collected by all vehicle nodes, the perception ability of vehicle node j is low. The perception ability of vehicle node j The calculation formula is as follows:
[0128] ,
[0129] in, The probability density function of collecting data for vehicle node j, , is the mean, is the traffic data collected by vehicle node j, is the variance, is the average data value collected by vehicle node j in the past cycle time T, is the average data value collected by vehicle node j and all its neighboring nodes in the past cycle time T.
[0130] Among them, the comprehensive communication feedback trust value of vehicle node j is is the evaluation of all neighboring nodes on the behavior of vehicle node j in the past cycle time T, and the comprehensive communication feedback trust value of vehicle node j Including packet number trust and communication success rate trust .
[0131] Packet Quantity Trust represents the trust evaluation of vehicle node i on the number of data packets sent by vehicle node j, where vehicle node i is the neighbor node of vehicle node j, that is, , if a vehicle node has been in the past cycle time If the number of packets sent within a period exceeds the threshold, the vehicle node may be under malicious attack, and its trust value will be reduced accordingly. The calculation formula is as follows:
[0132] ,
[0133] In the formula, is the number of data packets sent from vehicle node j to vehicle node i in the past cycle time T, It is the number of packets with the largest amount sent among all neighboring nodes of vehicle node i. is the average number of data packets received by vehicle node i in the past cycle time T, is an important factor used to adjust the threshold. is an important factor used to adjust the descent rate. is a natural exponential function.
[0134] Communication success rate trust Represents the trust feedback evaluation of the communication success rate of vehicle node i to vehicle node j, and is defined as Represents three possible evaluation results of the transmission result from vehicle node i to vehicle node j, where , , Represent the probability of successful information transmission, the probability of unsuccessful information transmission, and the probability of uncertainty, respectively, and satisfy .set up Represents the number of successful information transmissions between vehicle node i and vehicle node j, represents the number of unsuccessful information transmissions between vehicle node i and vehicle node j, and the probability of successful information transmission between vehicle node i and vehicle node j , the probability of unsuccessful information transmission , uncertain probability Will be expressed as follows:
[0135] ,
[0136] Then, the communication success rate trust The calculation formula is: .
[0137] Trust by Packet Count and communication success rate trust The communication feedback trust of vehicle node i to vehicle node j can be obtained , the calculation formula is: ,in, is the weight factor of the packet quantity trust, is the weight factor of the communication success rate trust, and The comprehensive communication feedback trust value of vehicle node j is the average value of the communication feedback trust of vehicle node j from all neighboring nodes, and the comprehensive communication feedback trust value of vehicle node j The calculation formula is as follows:
[0138] .
[0139] in, is the total number of neighbor nodes of vehicle node j in the past cycle time T.
[0140] Step S13, the trust agency TA sends the identity trust information of the vehicle node to the roadside unit RSU in a timely manner. The roadside unit RSU stores the identity trust of the vehicle node and broadcasts the identity trust information of the vehicle node in real time. In order to protect the privacy of the vehicle node, the identity trust information of the vehicle node j broadcast in real time contains the anonymous identity information of the vehicle node j. and the identity trust of the corresponding vehicle node j The receiving vehicle node that receives the Hello packet reads the beacon message of the sending vehicle node and sends the anonymous identity information of the sending vehicle node according to the beacon message. Find the identity trust of the corresponding sending vehicle node from the identity trust information of all vehicle nodes broadcasted in real time by the roadside unit RSU .
[0141] Step S2: The receiving vehicle node obtains the identity trust of the sending vehicle node After that, the trust evaluation of the beacon message sent by the sending vehicle node begins. The receiving vehicle node first calculates the predicted Euclidean distance between the beacon message sending vehicle node and the receiving vehicle node. , the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp , the relative movement direction of the sending vehicle node and the receiving vehicle node , and then calculate the exercise status score based on these three factors ; Calculate the risk value of beacon messages by time sensitivity ;Finally, score based on exercise status , Value at Risk and the identity trust of the sending vehicle node Construct a decision function to determine whether the beacon message is credible. The specific steps are as follows:
[0142] Step S21, calculate the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp , the relative movement direction of the sending vehicle node and the receiving vehicle node , and then calculate the exercise status score based on these three factors The specific steps are as follows:
[0143] Step S211, first calculate the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the calculation formula is as follows:
[0144] ,
[0145] ,
[0146] ,
[0147] ,
[0148] in, Is the receiving timestamp and send timestamp The time difference, is the predicted position coordinate of the sending vehicle node at the time of receiving the timestamp, is the predicted position ordinate of the sending vehicle node at the time of receiving the timestamp, The horizontal coordinate of the position of the receiving vehicle node at the time of receiving the timestamp, It is the ordinate of the position of the receiving vehicle node at the time of receiving the timestamp.
[0149] Then, according to the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node Calculating distance trust of beacon messages , distance trust The calculation formula is as follows:
[0150] ,
[0151] in, is the communication distance range of the node. When the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node is within the communication distance range of the node, the distance trust When the value is 1, the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node is not within the communication distance range of the node, the distance trust The value of is 0.
[0152] Step S212, calculating the speed difference between the speed of the sending vehicle node at the time of sending the timestamp and the predicted speed at the time of receiving the timestamp , the calculation formula is as follows:
[0153] ,
[0154] in, is the speed of the sending vehicle node at the time of sending the timestamp, , is the predicted speed of the beacon message sending vehicle node at the time of receiving the timestamp, and is the predicted speed of the sending vehicle node at the time of receiving the timestamp. It can be predicted by on-board sensors or roadside unit sensors.
[0155] Then, the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp is calculated. Calculating speed trust of beacon messages , speed trust The calculation formula is as follows:
[0156] ,
[0157] in, is the velocity normalization constant, It is the threshold of the vehicle node moving speed allowed on the road.
[0158] Step S213, calculating the relative movement direction of the sending vehicle node and the receiving vehicle node , the calculation formula is as follows:
[0159] ,
[0160] in, represents the speed of the receiving vehicle node at the time of receiving the timestamp, Represents the horizontal coordinate component of the velocity of the receiving vehicle node at the receiving timestamp, Represents the vertical coordinate component of the speed of the receiving vehicle node at the receiving timestamp;
[0161] Then, according to the relative movement direction of the sending vehicle node and the receiving vehicle node Computing directional trust of beacon messages , Direction Trust The calculation formula is as follows:
[0162] ,
[0163] in, is the angle influencing factor. When the receiving vehicle node speed or the sending vehicle node speed is 0, it means that the vehicle corresponding to the receiving vehicle node or the sending vehicle node has stopped moving and the relative motion direction angle cannot be calculated. At this time, the direction is trusted. Set it to a midpoint value of 0.5.
[0164] Step S214, based on the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp , the relative movement direction of the sending vehicle node and the receiving vehicle node Calculate the exercise status score , the calculation formula is as follows:
[0165] ,
[0166] in, is the weight of distance trust, is the weight of speed trust, is the weight of the directional trust, and .
[0167] Step S22, calculating the risk value of the beacon message according to the time sensitivity , Value at Risk The calculation formula is as follows:
[0168] ,
[0169] ,
[0170] ,
[0171] in, It is the time interval between the current beacon message received by the receiving vehicle node and the last beacon message received by the same sending vehicle node. The timestamp of receiving the current beacon message, is the timestamp of the last beacon message received from the same sending vehicle node, is the sending cycle time of the beacon message, is the time deviation, is the time risk threshold.
[0172] Step S23, the receiving vehicle node constructs a decision function to determine whether the received beacon message is credible, and obtains a beacon message trust evaluation result; a trustworthy beacon message must meet the conditions of low risk value, high motion state score, and high identity trust. The calculation formula of the decision function constructed in this embodiment is as follows:
[0173] ,
[0174] In the formula, is the beacon message trust evaluation result, A value of 1 indicates that the beacon message is trustworthy. A value of 0 means that the beacon message is not trustworthy.
[0175] Step S3: The receiving vehicle node updates its own neighbor node information table according to the beacon message trust evaluation result obtained by the decision function, and then delivers the data packet. The specific steps are as follows:
[0176] Step S31: The relevant information of the sending vehicle node corresponding to the beacon message with a value of 1 is updated to the neighbor node information table of the receiving vehicle node. The relevant information of the sending vehicle node corresponding to the beacon message with a value of 0 is removed from the neighbor node information table of the receiving vehicle node. The relevant information includes: the anonymous identity information of the vehicle node , IP address, location coordinates, identity trust, received signal strength, remaining energy, the definition format of the neighbor node information table of the vehicle node is shown in Table 1.
[0177] Table 1 Format of the neighbor node information table of a vehicle node:
[0178]
[0179] In step S32, each vehicle node needs to maintain and update its own neighbor node information table. The neighbor node information table plays an indispensable role in the transmission of data packets. The definition format of the data packet is shown in Table 2 below. When the vehicle node where the data packet is located needs to transmit the data packet, check whether its neighbor node information table contains the information of the target node of the data packet. If the neighbor node information table contains the information of the target node, the data packet is directly transmitted to the target node. If the neighbor node information table does not contain the information of the target node, the data packet is not transmitted, and the next step S4 is executed.
[0180] Table 2 Data packet format:
[0181]
[0182] Step S4, based on the updated neighbor node information table and the information in the data packet, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and calculate the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , and the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node . Determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the following conditions at the same time: < and conditions, is the remaining energy of the neighboring nodes of the vehicle node where the data packet is located, and the next hop candidate set is constructed based on the judgment result. The specific steps are as follows:
[0183] Step S41, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , the calculation formula is as follows:
[0184] ,
[0185] ,
[0186] in, and are the horizontal and vertical coordinates of the vehicle node where the data packet is located, and are the horizontal and vertical coordinates of the target node, respectively. and are the horizontal and vertical coordinates of the neighboring nodes of the vehicle node where the data packet is located.
[0187] Step S42: Calculate the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node , the calculation formula is as follows:
[0188] ,
[0189] ,
[0190] ,
[0191] in, is the number of bits in the packet, To transmit a data packet of size k bits to a distance of The energy required by the neighbor nodes, The energy required to receive a k-bit packet is The energy required to transmit or receive each bit, is the power amplification factor of the space loss model, is the power amplification factor under the multipath fading channel model, is the transmission distance from the vehicle node where the data packet is located to the neighboring node, is the threshold for dividing the spatial loss model and the multipath fading channel model, and .
[0192] Step S43, traverse the neighbor node information table of the vehicle node where the data packet is located, and determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the requirements at the same time. < and If the neighbor node information table of the vehicle node where the data packet is located does not contain a neighbor node that meets the above conditions, the vehicle node where the data packet is located enters the peripheral forwarding mode and delivers the data packet to the next hop node; the peripheral forwarding mode is a commonly used vehicle network data forwarding mechanism in the prior art, and the right-hand rule can solve the routing black hole problem (the problem that the data packet cannot continue to be delivered). If the neighbor node information table of the vehicle node where the data packet is located contains a neighbor node that meets the above conditions, the neighbor node that meets the conditions will be selected into the next hop candidate set. , and proceed to the next step S5.
[0193] Step S5: Use the sparrow search algorithm to find the next hop candidate set of the vehicle node where the data packet is located The most suitable vehicle node is selected as the next hop node. The next hop candidate set is defined as , is the total number of vehicle nodes in the next hop candidate set. The next hop node selected from the next hop candidate set should meet the conditions of high identity trust, high received signal strength, high residual energy, and closer to the target node than the vehicle node where the data packet is located. The specific steps are as follows:
[0194] Step S51, construct a fitness function, which is composed of four factors: the identity trust of the vehicle node, the received signal strength, the remaining energy, and the distance from the target node. The higher the fitness function value, the more suitable the vehicle node is as the next hop node. The calculation formula is as follows:
[0195] ,
[0196] in, is the identity trust factor function, is the received signal strength factor function, is the energy factor function, is the distance factor function, is the weight factor of the identity trust factor function, is the weight factor of the received signal strength factor function, is the weight factor of the energy factor function, is the weight factor of the distance factor function, ,and .
[0197] Identity Trust Factor Function Represents the maximum-minimum metric value of the identity trust of the vehicle node in the next hop candidate set, the identity trust factor function The larger the value, the higher the trust of the vehicle node in the next hop candidate set. The identity trust factor function The calculation formula is as follows:
[0198] ,
[0199] in, is the identity trust of vehicle node s in the next hop candidate set, , is the maximum identity trust in the next hop candidate set, is the minimum identity trust in the next hop candidate set.
[0200] Received signal strength factor function Represents the maximum-minimum metric value of the received signal strength of the vehicle node in the next hop candidate set, and the received signal strength factor function The larger the value, the higher the received signal strength of the vehicle node in the next hop candidate set. Received signal strength factor function The calculation formula is as follows:
[0201] ,
[0202] in, is the received signal strength of vehicle node s in the next hop candidate set, is the maximum received signal strength in the next hop candidate set, It is the minimum received signal strength among the next hop candidate set.
[0203] Energy Factor Function Represents the metric value after the maximum-minimum residual energy of the vehicle node in the next hop candidate set. Energy factor function The larger the value, the more residual energy the vehicle node has in the next-hop candidate set. Energy factor function The calculation formula is as follows:
[0204] ,
[0205] in, The remaining energy of vehicle node s in the next hop candidate set, represents the minimum remaining energy in the next-hop candidate set, Indicates the maximum remaining energy among the next-hop candidate sets.
[0206] Distance Factor Function Represents the normalized distance between the vehicle node and the target node in the next hop candidate set, and the distance factor function The larger the value, the closer the vehicle node in the next hop candidate set is to the target node. The distance factor function The calculation formula is as follows:
[0207] ,
[0208] in, is the distance between the vehicle node s and the target node in the next hop candidate set, is the closest distance to the target node in the next hop candidate set, It is the farthest distance from the target node in the next hop candidate set.
[0209] Step S52, initialize the population, randomly select N vehicle nodes from the next hop candidate set of the vehicle node where the data packet is located as the initial population, and the sequence of the initial population is expressed as , The initial population The pth sparrow, and , each sparrow has a corresponding vehicle node in the next hop candidate set when initialized. The initial five-dimensional coordinate position of , which is composed of vehicle nodes endowed, ;in, For vehicle nodes The x-axis coordinate of For vehicle nodes The y-axis coordinate of For vehicle nodes The degree of identity trust, For vehicle nodes The received signal strength, For vehicle nodes The remaining energy of . Set the maximum number of iterations to , the proportion of discoverers in the population is PD, the proportion of early warning in the population is SD, and the early warning value is .
[0210] Step S53, calculate the individual fitness of each sparrow in the current initial population and find the current global maximum fitness And the global minimum fitness . Counting Sparrows The individual fitness All the required factor functions can be obtained by Five parameters are calculated.
[0211] Step S54, the sparrow updates its position, including the discoverer position, the follower position, and the warner position. The position of the sparrow is a five-dimensional vector, which represents the value of the individual sparrow in each dimension. Each dimension represents the limiting factor for the selection of the next-hop node, namely the horizontal coordinate, the vertical coordinate, the identity trust, the received signal strength, and the remaining energy. The discoverer conducts a global search in the five-dimensional space and evaluates the quality of the new position through the fitness function. The follower mainly conducts local searches in the area near the high-quality position explored by the discoverer to find a better location. The warner is responsible for monitoring the entire search process. When the fitness value of the population decreases or falls into a local optimum (that is, the search progresses slowly), an alarm is issued to prompt the population to transfer and search again. The specific steps are as follows:
[0212] Step S541, the formula for updating the finder's location is as follows:
[0213] ,
[0214] in, is the number of traversals by the discoverer, corresponding to the A discoverer, Indicates The d-dimensional position information of the discoverer at the t+1th iteration, Indicates The d-dimensional position information of the discoverer at the tth iteration, where the value range of d is [ 1 , 5 ] , t ∈ [ 1 , iter max ] , for [ 0 , 1 ] A random number, Q is a random number that follows a normal distribution, is a matrix with 1 row and 5 columns, all of which have element values 1. is the maximum number of iterations, is the warning value, the warning value The value range is [ 0 , 1 ] , is a safe value, a safe value The value range is [ 0 . 5 , 1 ] .
[0215] Step S542, the formula for updating the follower position is as follows:
[0216] ,
[0217] in, is the follower traversal number, corresponding to the Followers, Indicates The d-dimensional position information of the follower at the t+1th iteration, Indicates The d-dimensional position information of the follower at the tth iteration, represents the worst position in the tth iteration, is the total number of followers, represents the optimal position of the finder in the t+1th iteration, is a matrix With the matrix Multiply the inverse matrix of , is a matrix with 1 row and 5 columns. The elements in it are randomly assigned 1 or -1. For the matrix The transpose of .
[0218] Step S543, the formula for updating the position of the alerter is as follows:
[0219] ,
[0220] in, is the number of traversal of the early warning person, corresponding to the A warning person, Indicates The d-dimensional position information of the early warning signal in the t+1th iteration, Indicates The d-dimensional position information of the early warning signal at the tth iteration, is the global optimal individual position in the tth iteration, and The difference is that the former is the global optimal individual position at the t-th iteration, and the latter is the optimal position among the discoverers at the t-th iteration. is the step size control parameter, which is used to adjust the size of the warning position movement. It is a random number that follows a normal distribution with a mean of 0 and a variance of 1. It is also the step size control parameter, and its value range is [ − 1 , 1 ] , This is to avoid setting a very small constant when the denominator is 0. Represents the individual fitness of the current warning person.
[0221] Step S55, traverse and calculate the fitness of all sparrow individuals according to the d-dimensional position information of each sparrow updated in step S54, and update the global optimal individual position , global maximum fitness , the global minimum fitness .
[0222] Step S56: determine whether the current number of iterations has reached the maximum number of iterations If the maximum number of iterations is not reached , start looping through steps S54 to S55; if the maximum number of iterations is reached , output the global optimal individual position , and execute the next step S57.
[0223] Step S57, node mapping strategy, set the output global optimal individual position The corresponding ideal node is , find out whether there is a corresponding vehicle node in the next-hop candidate set. If so, output the corresponding vehicle node as the next-hop node; if there is no actual corresponding vehicle node in the next-hop candidate set, adopt the principle of proximity and output the next-hop candidate set with the global optimal position The closest vehicle node is mapped to the actual next hop node Node Mapping Function The calculation formula is as follows:
[0224] ,
[0225] f ( Node y ) = { Node next | min[dis( Node y , Node m )], Node m ∈ S } ,
[0226] in, is the global optimal individual position The corresponding ideal node is is the vehicle node in the next hop candidate set, is the actual next hop node, is the Euclidean distance between the ideal node and the vehicle node in the next hop candidate set, Ideal nodes The corresponding values of the x-axis coordinate, y-axis coordinate, identity trust, received signal strength, and remaining energy, They are the vehicle nodes in the next hop candidate set. The corresponding values of the x-axis coordinate, y-axis coordinate, identity trust, received signal strength, and remaining energy.
[0227] The effect of the present invention is further illustrated by simulation below:
[0228] (1) Simulation conditions
[0229] In the simulation scenario, the present invention considers a scene at a crossroads where 100 vehicle nodes are randomly distributed The communication transmission radius of the vehicle is 300m, the moving speed of the vehicle node is 30~60km / h, the Hello packet sending time interval is 1 second, the data packet size is 64bytes, the malicious node ratio is 0, 5%, 10%, 15%, 20%, 25%, and the identity trust range of the malicious node is ( 0 , 0 . 5 ] , the identity trust of the normal node is [ 0 . 5 , 1 ] , the simulation time is 60 seconds. The population size is set to 30 in the sparrow search algorithm, and the maximum number of iterations is 50, the finder's safety value Set to 0.75, warning value The simulation conditions are set to 0.5, the proportion of discoverers PD is 30%, the proportion of early warnings SD is 20%, and the number of trials is 30.
[0230] (2) Simulation results and content
[0231] (2.1) Packet Delivery Rate (PDR)
[0232] Figure 4 This is a comparison chart of the experimental results of the improved GPSR vehicle network security routing method that integrates identity trust and geographic location information and the traditional GPSR routing method. The packet delivery rate PDR is the percentage of the total number of data packets successfully received by the target node to the total number of data packets sent by the source node. The calculation formula is as follows:
[0233] .
[0234] (2.2) End-to-end delay (E2D)
[0235] Figure 5 This is a comparison chart of the end-to-end delay E2D of the GPSR vehicle network security routing method improved by integrating identity trust and geographic location in the present invention and the traditional GPSR routing method. The end-to-end delay E2D is the average end-to-end propagation delay for the target node to successfully receive the message, and the calculation formula is as follows:
[0236] ,
[0237] in, is the delay of each data packet successfully received, and Num is the number of data packets successfully received by the target node.
[0238] according to Figure 4 and Figure 5The experimental results show that the present invention evaluates beacon messages containing geographic location information and prevents nodes that send malicious beacon messages from joining the neighbor information table. At the same time, the sparrow search algorithm is used to find vehicle nodes with high identity trust, high received signal strength, high residual energy, and closer to the target node as the next hop node, which makes up for the disadvantage that traditional GPSR only considers distance factors, reduces latency, greatly improves data packet delivery rate, and improves routing security.
[0239] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A secure routing method for Internet of Vehicles that integrates identity trust and geographic location information, characterized in that: The following steps are involved: Step S1: In the Internet of Vehicles, all vehicle nodes periodically broadcast a beacon message. Hello package; trust institution TA According to the vehicle node, the neighboring nodes of the vehicle node and the roadside unit RSU Past cycle time of upload T The communication history data in the vehicle node is used to give the vehicle node identity trust, and the identity trust information of the vehicle node is sent to the roadside unit in a timely manner. RSU ; Roadside Unit RSU Store the identity trust of vehicle nodes and broadcast the identity trust information of vehicle nodes in real time; Received Hello The receiving vehicle node of the packet reads the beacon message of the sending vehicle node and finds the identity trust of the corresponding sending vehicle node from the real-time broadcast ; Step S2: The receiving vehicle node performs a trust evaluation on the beacon message sent by the sending vehicle node, and first calculates the motion state score between the receiving vehicle node and the sending vehicle node. ; And calculate the risk value of the beacon message by time sensitivity ; Then based on the exercise status score , Value at Risk and the identity trust of the sending vehicle node Construct a decision function to determine whether the beacon message sent by the sending vehicle node is credible; Step S3, the receiving vehicle node updates its own neighbor node information table according to the beacon message trust evaluation result obtained by the decision function, and then delivers the data packet; if the updated neighbor node information table contains the information of the target node, the data packet is directly delivered to the target node, otherwise, the next step S4 is executed; Step S4, based on the updated neighbor node information table and the information in the data packet, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and calculate the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , and the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node ; Determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the requirements at the same time and conditions, The residual energy of the neighboring nodes of the vehicle node where the data packet is located, and a next-hop candidate set is constructed according to the judgment result; if the next-hop candidate set is not empty, execute the next step S5, otherwise enter the peripheral forwarding mode to select the next-hop node; step S5, construct a fitness function according to the identity trust, received signal strength, residual energy, and distance from the target node of the vehicle node, and then use the sparrow search algorithm to find the vehicle node with the highest fitness function value from the next-hop candidate set as the next-hop node.
2. The vehicle network security routing method integrating identity trust and geographic location information according to claim 1 is characterized in that: The specific steps of step S1 include: Step S11, define the set of all current vehicle nodes in the Internet of Vehicles as , is the total number of vehicle nodes. Each vehicle node has its own set of neighbor nodes. The neighbor node set of a vehicle node is represented by express, is represented as an arbitrary vehicle node, and , For vehicle nodes The total number of neighbor nodes; All vehicle nodes periodically broadcast a beacon message Hello Package, defines the format of the beacon message received by the receiving vehicle node as ,in, is the anonymous identity information of the vehicle node. The anonymous identity information of each vehicle node To protect the privacy of the vehicle, only the trust TA To obtain their real identity information; To send a timestamp, To receive the timestamp, is the horizontal coordinate of the position of the sending vehicle node when sending the timestamp, is the vertical coordinate of the position of the sending vehicle node when sending the timestamp, is the horizontal coordinate component of the velocity of the sending vehicle node when sending the timestamp, is the vertical coordinate component of the velocity of the sending vehicle node at the time of sending the timestamp; Step S12: Trust institution TA Through the vehicle node j , vehicle node j Neighbor nodes and roadside units RSU Past cycle time of upload T The communication history data within the vehicle node is used to calculate j Identity trust , vehicle node j Identity trust The calculation formula is as follows: , In the formula, For vehicle nodes j The comprehensive communication feedback trust value, For vehicle nodes j The perception ability, is the weight factor of the comprehensive communication feedback trust value, is the weight factor of perception ability, and ; Step S13: Trust institution TA The vehicle node j The identity trust information is sent to the roadside unit in a timely manner RSU , the identity trust information includes the vehicle node j Anonymous identity information and vehicle nodes j Identity trust ; Roadside Unit RSU Storage vehicle node j Identity trust And broadcast vehicle nodes in real time j identity trust information received; Hello The receiving vehicle node of the packet reads the beacon message of the sending vehicle node and sends the anonymous identity information of the sending vehicle node according to the beacon message. From roadside unit RSU Find the identity trust of the corresponding sending vehicle node in the identity trust information of all vehicle nodes broadcast in real time .
3. The vehicle network security routing method integrating identity trust and geographic location information according to claim 2 is characterized in that: In step S12, the vehicle node j Perception It is a trust institution TA According to the vehicle node j The vehicle node is evaluated and calculated based on the traffic data collected by the onboard sensors of other vehicle nodes. j Perception The calculation formula is as follows: , In the formula, For vehicle nodes j The probability density function of the collected data, , is the mean, For vehicle nodes j The traffic data collected, is the variance, is the past cycle time T Internal vehicle node j The average data value collected, It is a vehicle node j and all its neighbor nodes in the past cycle time T The average value of data collected within Vehicle Node j The comprehensive communication feedback trust value are all neighbor nodes to the vehicle node j In the past cycle time T Evaluation of internal behavior, for the past cycle time T Internal vehicle node j The mean of the communication feedback trust of all neighbor nodes, vehicle node j The comprehensive communication feedback trust value The calculation formula is as follows: , In the formula, For the past cycle time T Internal vehicle node j The total number of neighbor nodes, For vehicle nodes i For vehicle nodes j The communication feedback trust of the vehicle node i It is a vehicle node j The neighbor nodes of , , where is the weight factor of the packet quantity trust, is the weight factor of the communication success rate trust, and , Trust for the number of packets, Trust in the success rate of communication; Among them, the number of packets is trusted Represents vehicle node i For vehicle nodes j Trust rating of the number of packets sent, trust of the number of packets The calculation formula is as follows: , In the formula, For the past cycle time T Internal vehicle node j Send to vehicle node The number of packets, It is a vehicle node The number of packets with the largest amount sent among all neighbor nodes; For the past cycle time T Internal vehicle node The average number of packets received, is an important factor used to adjust the threshold. is an important factor for adjusting the descent rate. is the natural exponential function; Communication success rate trust Represents vehicle node i For vehicle nodes j The communication success rate trust feedback evaluation is defined as Represents vehicle node i To vehicle node j There are three possible evaluation results of the transmission result, among which , , Represent the probability of successful information transmission, the probability of unsuccessful information transmission, and the probability of uncertainty, respectively, and satisfy ;set up Represents vehicle node i With vehicle node j The number of successful information transmissions between Represents vehicle node i With vehicle node j The number of unsuccessful information transmissions between the vehicle nodes i With vehicle node j The probability of successful information transmission between , the probability of unsuccessful information transmission , uncertain probability Will be expressed as follows: , then, the communication success rate trust The calculation formula is: .
4. The vehicle network security routing method integrating identity trust and geographic location information according to claim 3 is characterized in that: In step S2, the calculation formula of the constructed decision function is as follows: , In the formula, is the beacon message trust evaluation result, A value of 1 indicates that the beacon message is trustworthy. A value of 0 means that the beacon message is not trustworthy.
5. The vehicle network security routing method integrating identity trust and geographic location information according to claim 4 is characterized in that: In step S2, the motion state score between the receiving vehicle node and the sending vehicle node is calculated The specific steps include: Step S211, first calculate the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the calculation formula is as follows: , In the formula, Is the receiving timestamp and send timestamp The time difference, is the predicted position coordinate of the sending vehicle node at the time of receiving the timestamp, is the predicted position coordinate of the sending vehicle node at the time of receiving the timestamp, The horizontal coordinate of the position of the receiving vehicle node at the time of receiving the timestamp, is the ordinate of the position of the receiving vehicle node at the time of receiving the timestamp; Then, according to the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node Calculating distance trust of beacon messages , distance trust The calculation formula is as follows: , In the formula, is the communication distance range of the node; Step S212, calculating the speed difference between the speed of the sending vehicle node at the time of sending the timestamp and the predicted speed at the time of receiving the timestamp , the calculation formula is as follows: , In the formula, is the speed of the sending vehicle node at the time of sending the timestamp, , is the predicted speed of the beacon message sending vehicle node at the time of receiving the timestamp, and is the predicted speed of the sending vehicle node at the time of receiving the timestamp. Prediction through vehicle-mounted sensors or roadside unit sensors; Then, the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp is calculated. Calculating speed trust of beacon messages , speed trust The calculation formula is as follows: , In the formula, is the velocity normalization constant, is the threshold of the vehicle node moving speed allowed by the road; Step S213, calculating the relative movement direction of the sending vehicle node and the receiving vehicle node , the calculation formula is as follows: , In the formula, represents the speed of the receiving vehicle node at the time of receiving the timestamp, Represents the horizontal coordinate component of the velocity of the receiving vehicle node at the receiving timestamp, Represents the vertical coordinate component of the speed of the receiving vehicle node at the receiving timestamp; Then, according to the relative movement direction of the sending vehicle node and the receiving vehicle node Computing directional trust of beacon messages , Direction Trust The calculation formula is as follows: , In the formula, is the angle influencing factor; when the receiving vehicle node speed or the sending vehicle node speed is 0, it means that the vehicle corresponding to the receiving vehicle node or the sending vehicle node has stopped moving and the relative motion direction angle cannot be calculated. At this time, the direction is trusted Set to the middle value of 0.5; Step S214, based on the predicted Euclidean distance between the sending vehicle node and the receiving vehicle node , the speed difference between the sending vehicle node’s speed at the sending timestamp and the predicted speed at the receiving timestamp , the relative movement direction of the sending vehicle node and the receiving vehicle node Calculate the exercise status score , the calculation formula is as follows: , In the formula, is the weight of distance trust, is the weight of speed trust, is the weight of the directional trust, and .
6. The vehicle network security routing method integrating identity trust and geographic location information according to claim 5 is characterized in that: In step S2, the risk value The calculation formula is as follows: In the formula, The time interval between the current beacon message received by the receiving vehicle node and the last beacon message received by the same sending vehicle node; The timestamp of receiving the current beacon message, is the timestamp of the last beacon message received from the same sending vehicle node, is the sending cycle time of the beacon message, is the time deviation, is the time risk threshold.
7. The vehicle network security routing method integrating identity trust and geographic location information according to claim 6 is characterized in that: The specific steps of step S4 are as follows: Step S41, calculate the Euclidean distance between the vehicle node where the data packet is located and the target node , and the Euclidean distance between each neighbor node of the vehicle node where the data packet is located and the target node , the calculation formula is as follows: In the formula, and are the horizontal and vertical coordinates of the vehicle node where the data packet is located, and are the horizontal and vertical coordinates of the target node, respectively. and are the horizontal and vertical coordinates of the neighboring nodes of the vehicle node where the data packet is located; Step S42: Calculate the energy required by the vehicle node where the data packet is located to transmit the data packet to each neighboring node , the calculation formula is as follows: In the formula, is the number of bits in the packet, The transfer size is k The distance from the data packet of bits to The energy required by the neighbor nodes, For receiving k The energy required for a data packet of bits, The energy required to transmit or receive each bit, is the power amplification factor of the space loss model, is the power amplification factor under the multipath fading channel model, is the transmission distance from the vehicle node where the data packet is located to the neighboring node, is the threshold for dividing the spatial loss model and the multipath fading channel model, and ; Step S43, traverse the neighbor node information table of the vehicle node where the data packet is located, and determine whether the neighbor nodes in the neighbor node information table of the vehicle node where the data packet is located meet the requirements at the same time. and If there is no neighbor node that meets the above conditions in the neighbor node information table of the vehicle node where the data packet is located, the vehicle node where the data packet is located enters the peripheral forwarding mode and delivers the data packet to the next hop node; If there is a neighbor node that meets the above conditions in the neighbor node information table of the vehicle node where the data packet is located, the neighbor node that meets the conditions is selected into the next hop candidate set. , and proceed to the next step S5.
8. The vehicle network security routing method integrating identity trust and geographic location information according to claim 7 is characterized in that: The step S5 specifically comprises the following steps: Step S51, construct a fitness function, which is composed of four factors: the identity trust of the vehicle node, the received signal strength, the remaining energy, and the distance from the target node. The higher the fitness function value, the more suitable the corresponding vehicle node is as the next hop node. The calculation formula is as follows: , In the formula, is the identity trust factor function, is the received signal strength factor function, is the energy factor function, is the distance factor function, is the weight factor of the identity trust factor function, is the weight factor of the received signal strength factor function, is the weight factor of the energy factor function, is the weight factor of the distance factor function, ,and ; Step S52, initialize the population and randomly select the next hop candidate set of the vehicle node where the data packet is located N vehicle nodes as the initial population, and the sequence of the initial population is expressed as , The initial population Middle p A sparrow, and , each sparrow has a corresponding vehicle node in the next hop candidate set when initialized; The initial five-dimensional coordinate position of , which is composed of vehicle nodes endowed, ;in, For vehicle nodes The x-axis coordinate of For vehicle nodes The y-axis coordinate of For vehicle nodes The degree of identity trust, For vehicle nodes The received signal strength, For vehicle nodes The remaining energy of , the proportion of discoverers in the population is PD , the proportion of early warning persons in the population is SD , the warning value is ; Step S53, calculate the individual fitness of each sparrow in the current initial population and find the current global maximum fitness And the global minimum fitness ; The various factor functions required to calculate the individual fitness of sparrows are calculated through the five-dimensional coordinate position parameters of sparrows; Step S54, the sparrow updates its position, including the position of the discoverer, the follower, and the warning person in the population; the position of the sparrow is a five-dimensional vector, which represents the value of the sparrow individual in each dimension, and each dimension represents the limiting factor for the selection of the next hop node, namely, the horizontal coordinate, the vertical coordinate, the identity trust, the received signal strength, and the remaining energy; the specific steps for the sparrow to update its position are as follows: Step S541, the formula for updating the finder's location is as follows: , In the formula, is the number of traversals by the discoverer, corresponding to the A discoverer, Indicates The discoverer in t+ 1 iteration d Dimension location information, Indicates The discoverer in t Iteration d Dimensional location information, where d The value range is , , for A random number, Q is a random number that follows a normal distribution, is a matrix with 1 row and 5 columns, all of which have element values 1. is the maximum number of iterations, is the warning value, the warning value The value range is , is a safe value, a safe value The value range is ; Step S542, the formula for updating the follower position is as follows: , In the formula, is the follower traversal number, corresponding to the Followers, Indicates Followers in t+ 1 iteration d Dimension location information, Indicates Followers in t Iteration d Dimension location information, Indicates t The worst position in iteration , is the total number of followers, Indicates that the discoverer t+ The optimal position in 1 iteration, is a matrix, , is a matrix with 1 row and 5 columns. The elements in it are randomly assigned 1 or -1. For the matrix The transpose of Step S543, the formula for updating the position of the alerter is as follows: , In the formula, is the number of traversal of the early warning person, corresponding to the A warning person, Indicates The early warning t+ 1 iteration d Dimension location information, Indicates The early warning t Iteration d Dimension location information, For the t The global optimal individual position in the iteration is and The difference is that the former is t The global optimal individual position at the iteration is t The best position among the finders is found at the iteration; is the step size control parameter, which is used to adjust the size of the warning position movement. It is a random number that follows a normal distribution with a mean of 0 and a variance of 1. It is also the step size control parameter, and its value range is , This is to avoid setting a very small constant when the denominator is 0. It represents the individual fitness of the current warning person; Step S55, according to the updated d The position information is traversed to calculate the fitness of all sparrow individuals and update the global optimal individual position , global maximum fitness , the global minimum fitness ; Step S56: determine whether the current number of iterations has reached the maximum number of iterations , if the maximum number of iterations is not reached , start looping through steps S54 to S55; if the maximum number of iterations is reached , output the global optimal individual position , and execute the next step S57; Step S57, node mapping strategy, set the output global optimal individual position The corresponding ideal node is , find out whether there is a corresponding vehicle node in the next-hop candidate set. If so, output the corresponding vehicle node as the next-hop node; if there is no actual corresponding vehicle node in the next-hop candidate set, adopt the principle of proximity and output the next-hop candidate set with the global optimal position The closest vehicle node is mapped to the actual next hop node .
9. The vehicle network security routing method integrating identity trust and geographic location information according to claim 8 is characterized in that: In step S51, the identity trust factor function Represents the maximum-minimum metric value of the identity trust of the vehicle node in the next hop candidate set, and the identity trust factor function The larger the value, the higher the trust of the vehicle node in the next hop candidate set. The identity trust factor function The calculation formula is as follows: , In the formula, The vehicle node in the next hop candidate set s The degree of identity trust, , is the maximum identity trust in the next hop candidate set, The minimum identity trust in the next hop candidate set; Received signal strength factor function Represents the maximum-minimum metric value of the received signal strength of the vehicle node in the next hop candidate set, and the received signal strength factor function The larger the value, the higher the received signal strength of the vehicle node in the next hop candidate set. The received signal strength factor function The calculation formula is as follows: , In the formula, The vehicle node in the next hop candidate set s The received signal strength, is the maximum received signal strength in the next hop candidate set, is the minimum received signal strength among the next hop candidate set; Energy Factor Function Represents the metric value after the maximum-minimum residual energy of the vehicle node in the next hop candidate set, the energy factor function The larger the value, the more residual energy of the vehicle node is in the next hop candidate set. The energy factor function The calculation formula is as follows: , In the formula, Vehicle nodes in the next hop candidate set s The remaining energy, represents the minimum remaining energy in the next-hop candidate set, Indicates the maximum remaining energy among the next-hop candidate set; Distance Factor Function Represents the normalized distance between the vehicle node and the target node in the next hop candidate set, and the distance factor function The larger the value, the closer the vehicle node in the next hop candidate set is to the target node. The distance factor function The calculation formula is as follows: , In the formula, The vehicle node in the next hop candidate set s The distance from the target node, is the closest distance to the target node in the next hop candidate set, It is the farthest distance from the target node in the next hop candidate set.
10. The vehicle network security routing method integrating identity trust and geographic location information according to claim 9 is characterized in that: In step S57, the next hop candidate set and the global optimal position The closest vehicle node is mapped to the actual next hop node The calculation formula is as follows: , , In the formula, is the global optimal individual position The corresponding ideal node is is the vehicle node in the next hop candidate set, is the Euclidean distance between the ideal node and the vehicle node in the next hop candidate set, Ideal nodes of x Axis coordinates, y The corresponding values of axis coordinates, identity trust, received signal strength, and remaining energy, They are the vehicle nodes in the next hop candidate set. of x Axis coordinates, y The corresponding values of axis coordinates, identity trust, received signal strength, and remaining energy, is the node mapping function.
Citation Information
Patent Citations
WSN (Wireless Sensor Network) safety routing method based on credit evaluating mechanism
CN101801011A
Instant route selection based on multi-path communication time and credibility in VANET (Vehicular Ad-Hoc Network)
CN102916889A
