Internet of vehicles trust management method based on improved LSTM neural network

Through the improved LSTM neural network combined with the KAN neural network, it identifies false information in the Internet of Vehicles environment, solves the security risks caused by internal attacks, and improves the security and reliability of the Internet of Vehicles environment.

CN119545361APending Publication Date: 2025-02-28SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411668738.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the Internet of Vehicles environment, internal attackers may bypass user authentication and send false information, resulting in security risks. Traditional encryption algorithms are difficult to identify internal false information.

Method used

Using an improved LSTM neural network, combined with KAN neural network, time series features are constructed through bidirectional LSTM and linear layers, using a weighted cross entropy loss function, identify false messages and evaluate vehicle trust.

Benefits of technology

It improves the accuracy of false message recognition, enhances the security and reliability of the Internet of Vehicles environment, dynamically adjusts the vehicle trust value, and reduces misjudgment of normal vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545361A_ABST
    Figure CN119545361A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Vehicles trust management method based on an improved LSTM neural network, and the method comprises the steps: carrying out urban traffic simulation through employing a traffic simulator SUMO and a discrete event simulation platform OMNet + +, collecting message data transmitted between vehicles in a simulation process to construct a data set, and dividing the data set into a training set and a test set; training and testing the improved LSTM neural network by using the training set and the test set, and deploying the neural network with the optimal performance to a vehicle server; and using the improved LSTM neural network to carry out authenticity judgment on the received message, and updating the trust value of the vehicle so as to realize trust management in the Internet of Vehicles environment. Based on a deep learning technology, the method can be effectively applied to credibility evaluation of vehicles in an Internet of Vehicles environment and establishment of long-term trust management, so that detection of malicious or untrusted vehicles in a global range is realized, and the method has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Vehicles trust mechanism, and in particular to an Internet of Vehicles trust management method based on an improved LSTM neural network. Background Art

[0002] In the IoV scenario, vehicles often need to share information to gain a broader perspective of the outside world and make reasonable decisions. Sometimes, multiple vehicles need to work together to complete some IoV services. Therefore, the authenticity of information shared between vehicles and trust management between vehicles are very important. However, in the open information exchange environment of the IoV, although traditional cryptography-related technologies can make vehicles as immune to external attackers as possible, when attackers come from within the IoV, it is still easy to cause security risks. Attackers may bypass user authentication of the IoV and control damaged but legal vehicles to convey false information in the IoV, thereby interfering with the normal decision-making of other vehicles. Traditional encryption algorithms can only ensure that the vehicle is authenticated and the transmitted message has not been tampered with, but when internal attackers directly send false messages, the vehicle may not be able to recognize it. In recent years, deep learning technology has been introduced into IoV trust management. Deep learning has powerful data processing and pattern recognition capabilities, can extract effective features from a large amount of data, and accurately evaluate the authenticity of messages sent between vehicles, thereby providing a basis for evaluating the trustworthiness of vehicles and making up for the shortcomings of traditional cryptography methods. Deep learning models can effectively capture false information, suppress the spread of false information, identify potential malicious vehicles, and then dynamically adjust the credibility of vehicles, making Internet of Vehicles services safer and more reliable. Summary of the invention

[0003] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and proposes a trust management method for the Internet of Vehicles based on an improved LSTM neural network. The method utilizes the KAN and LSTM structures, wherein the LSTM is a bidirectional LSTM. Through the combination of the two structures, the relationship between each feature time within the message and the timing relationship between adjacent messages from the same vehicle can be better captured, and the authenticity of each message can be accurately distinguished, thereby more accurately evaluating the trustworthiness of the vehicle and improving the security and reliability of the Internet of Vehicles.

[0004] To achieve the above purpose, the technical solution provided by the present invention is: a vehicle network trust management method based on an improved LSTM neural network, comprising the following steps:

[0005] 1) Use the traffic simulator SUMO and the discrete event simulation platform OMNet++ to simulate urban traffic. The map used by the traffic simulator SUMO is a real-world map, and the map data comes from the OpenStreetMap open source map. During the simulation process, the message data sent between vehicles is collected, and the data is organized and classified according to the input required for neural network training and reasoning. Then the data is z-score normalized, and the mean and variance of the data are saved to facilitate the same processing of the data in subsequent reasoning. Finally, after converting the data into a time series, a time series data set is constructed, and then the data set is divided into a training set and a test set.

[0006] 2) The training set is used as the input of the improved LSTM neural network for training, and the parameters of the neural network are continuously adjusted and updated using the AdamW optimizer, and then the test set is used for verification to obtain the neural network with the best performance; the improvements of the LSTM neural network include: first, the KAN neural network is used as the front layer of the LSTM neural network, and multiple message data are mapped to a higher dimension through the KAN neural network one by one, and the potential relationship between different features within the vehicle message is initially extracted, and then the high-dimensional features of each message are merged into a high-dimensional time series as the input of the subsequent neural network; second, the KAN neural network and the LSTM neural network are organically combined. The network is bidirectional, and the LSTM is able to better learn the time series relationship of adjacent messages from the same vehicle, thereby improving the accuracy of judgment. Third, a linear layer is introduced after the LSTM neural network to integrate the features learned previously, and the high-dimensional features corresponding to each message in the time series are mapped into two numerical values, which respectively represent the possibility of the message being true or false. Fourth, a weighted cross entropy loss function is used as the optimization target of the neural network. In a real Internet of Vehicles environment, false messages are in the minority, and there are also few false messages in the data set. Therefore, it is necessary to give a greater weight to the loss of false messages, thereby enhancing the ability to identify false messages.

[0007] 3) After the neural network with the best performance is deployed on the vehicle server, each vehicle is assigned an initial trust value; when the message sending vehicle A sends a message to the message receiving vehicle B, vehicle B will process the received message and convert the message and several messages previously sent by vehicle A into the input required by the improved LSTM neural network for the neural network to make a judgment; vehicle B determines the change in the trust value based on the judgment result of the improved LSTM neural network and the number of false messages and true messages received by vehicle B from vehicle A; then, vehicle B adjusts the local trust value of vehicle A based on the change in the trust value and reports it to the nearby roadside unit RSU so that the RSU updates the global trust value of vehicle A, where the trust value of vehicle A stored on vehicle B is only known to vehicle B, called the local trust value, and the trust value of vehicle A on the RSU comes from the common modification of all vehicles, called the global trust value; when the local trust value of vehicle A is lower than the preset threshold, vehicle B will not forward any message of vehicle A; when the global trust value of vehicle A is lower than the preset threshold, the RSU marks vehicle A as a malicious vehicle and broadcasts it so that all other vehicles do not forward messages of vehicle A.

[0008] Furthermore, in step 1), the content of the message Msg transmitted between vehicles is: Msg = {id s ,t s ,pos s ,spe s ,ori s ,acc_pos s ,disToAcc s}, the message indicates that the number is id s The message is sent to the vehicle at t s Time, pos s The message sent by the location to the surrounding vehicles within the communication range is the main content of the dataset, where spe s 、ori s Respectively represent the number id s The message is sent to the vehicle at t s The moving speed and direction at the moment, acc_pos s 、disToAcc s Indicates the location of the accident and the distance between the message sending vehicle and the accident. If there is no accident, the horizontal and vertical coordinates of the accident location are set to the default 0, and the accident distance is set to the default -1. To determine the authenticity of a message, it is also necessary to combine the status information of the receiving vehicle and the receiving time, that is, the time t when the receiving vehicle receives the message r , receiving vehicle speed spe s 、Direction r and position pos r; Therefore, the message data Msg_data collected at last is: Msg_data = {id s ,t r ,pos s ,pos r ,spe s ,spe r ,ori s ,ori r ,acc_pos s ,disToAcc s}, each message data Msg_data corresponds to a label y i , if the message is true, then y i is 0, otherwise it is 1; the message data Msg_data and labels will be used to train and improve the LSTM neural network.

[0009] Furthermore, in step 1), n ​​Msg_data can generate a data set D n , for the dataset D n Before dividing, the data needs to be normalized by z-score to obtain data with the same scale in order to reduce the deviation introduced by data measurement. The calculation formula for z-score normalization is: Among them, X' represents the normalized data, X represents each original data in the data set, μ represents the average value of all the original data in each field in the data set, and σ represents the standard deviation of all the original data in each field in the data set. For subsequent new data, it is necessary to use the saved μ and σ to perform the same processing and then use the neural network to make judgments.

[0010] Furthermore, in step 1), it is also necessary to process a single message data into time series data. Each message data is equivalent to a time step in the time series data. If vehicle A sends several messages to vehicle B, each time the improved LSTM neural network is used for judgment, vehicle B needs to input several messages received from vehicle A as a time series into the improved LSTM neural network. The input of the improved LSTM neural network is a sequence composed of the above message data Msg_data: Msg_seq = {Msg_data1, Msg_data2, ..., Msg_data m}, Msg_data m Represents the mth message data, where m is the number of consecutive messages. After converting the message data into a time series, a time series data set is constructed. The data set is divided into a training set and a test set according to a preset ratio using the time series as a unit. When dividing, the order of the message data must be maintained according to the receiving time.

[0011] Further, in step 2), the entire neural network is divided into 3 parts, each of which is as follows:

[0012] a. KAN layer: In order to better extract the features in the message data, the KAN neural network is used to map the low-dimensional features of each message to a 256-dimensional feature space, which is convenient for subsequent learning of the temporal relationship between messages. At the same time, it also preliminarily learns the potential relationship between the various features within the message. The KAN neural network represents a multivariate function to be learned as a series of single-variable functions. Its forward propagation formula is:

[0013]

[0014] Where f(x) represents the multivariable function to be learned by the KAN neural network, x represents the message data, x1, x2, ..., x n′ represents each feature of the message data, n′ represents the number of dimensions of the message data, p is used to index each variable of the input layer, and q is used to index the univariate function and the aggregate function Φ q , Φ q The univariate function used to aggregate each hidden node The output, is the pth feature x of the input p The corresponding univariate function, each Φ q and are all learnable parameterized functions, w b and w s is the parameter to be learned, b(x) is the silu activation function, spline(x) is the B-spline function, that is, the basis function B j (x), j represents the basis function index, b(x) and spline(x) are expressed as follows:

[0015]

[0016] In the formula, c j is the parameter to be learned, and x is each feature in the message data;

[0017] b. LSTM neural network: It is composed of three stacked LSTM layers. Each LSTM layer includes input gate, cell state, forget gate and output gate. The cell state is used to save important information at a certain moment. The three gates control the storage information of the cell state to ensure the effective transmission of messages. In order to better learn the time series features, bidirectional LSTM is needed as the LSTM layer. Bidirectional LSTM contains two independent LSTMs, one for processing the forward time series and the other for processing the reverse time series. These two time series generate their own hidden states respectively. Finally, the hidden states of each time step are merged to better learn the time series relationship between messages.

[0018] Input gate: processes the input of the current sequence position, determines the information that needs to be updated, and updates the cell state. The specific formula is as follows:

[0019]

[0020] In the formula, x t is the vector representation of the t-th time step of the input sequence, is the input x at the tth time step t The new information generated, h t-1 is the hidden state of LSTM at the t-1th time step, is the cell state of LSTM at the tth time step, W C , b C is the parameter to be learned of the neural network, σ is the sigmoid function;

[0021] Cell state: After the outputs of the forget gate and the input gate are determined, the cell state C at time t-1 can be t-1 Update the cell state at the next moment C t , the specific formula is as follows:

[0022]

[0023] Forget gate: controls the cell state C of the previous layer at time t-1 t-1 The information that needs to be forgotten is as follows:

[0024] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0025] In the formula, f t It is used to generate variables that need to be forgotten to control the state of the previous layer of cells. The sigmoid activation function is used to make the value between (0,1) to determine Ct-1 The output of the previous layer and the input content at this moment that need to be completely forgotten and remembered, W f、 b f are the parameters to be learned of the neural network;

[0026] Output gate: The output value needs to be determined based on the cell state. First, the sigmoid activation function is used to determine which part of the cell state needs to be output, and then the cell state C t Through the tanh function processing, the two are multiplied to get the final output. The specific formula is as follows:

[0027] o t =σ(W o [h t-1 ,x t ]+b o )

[0028] h t =o t *tanh(C t )

[0029] In the formula, o t Indicates cell state C t How much content needs to be output? t is the hidden state of LSTM at the tth time step; the final output of the LSTM neural network consists of the hidden state of each time step, and the hidden state of one time step corresponds to one message;

[0030] c. Linear layer: According to the output of the LSTM neural network, the features of each message are mapped into a two-dimensional representation and passed through the softmax activation function. The output result is two numerical values, which respectively represent the possibility of whether each message in the time series is true or false. The category with the greatest possibility is selected as the result of the neural network judgment.

[0031] Furthermore, during the training process of the neural network, after the message passes through the improved LSTM neural network, a judgment result is obtained as to whether the message is true or not. Although each input is a time series consisting of multiple messages, each message in the sequence has a judgment result. In order to evaluate the output of the neural network after forward propagation and label y i The difference between , using the weighted cross entropy function L WCE As the loss function, the formula is as follows:

[0032]

[0033] Where N is the amount of interactive information, y i is the label of the i-th vehicle message, is the output of the forward propagation of the i-th message input into the neural network; w is the weight, which can be flexibly adjusted according to the ratio of false messages to real messages in the data set; when training the network, the parameters of the neural network are optimized by minimizing the cross entropy loss so that the prediction results of the neural network are as close to the actual values ​​as possible.

[0034] Furthermore, in step 3), the neural network with the best performance is deployed to the server of the vehicle. The steps of the entire trust management are as follows:

[0035] 3.1) Trust value initialization and recording: Each vehicle is assigned an initial trust value. Whenever vehicle A sends a message to vehicle B, vehicle B combines the relevant features of the message and several previous messages from vehicle A into a time series, and uses the improved LSTM neural network to determine the authenticity of each message. Then, based on the judgment result of the neural network, vehicle B records the number of real messages and false messages received from vehicle A, calculates the change in the trust value this time, and feeds back the change in the trust value to the roadside unit RSU. After the RSU receives the report, the RSUs send each other the change in the trust value of the vehicle, thereby recording, updating, and synchronizing the trust value of each vehicle in the Internet of Vehicles.

[0036] 3.2) Trust value update algorithm and dynamic adjustment: After vehicle B obtains the authenticity of the message sent by vehicle A through the neural network, it needs to calculate the change in the trust value of vehicle A based on the number of real messages and false messages received from vehicle A. The calculation formula for the change in the trust value is as follows:

[0037]

[0038] In the formula, deltaTrust represents the change in trust value, α represents the number of real messages received by vehicle B from vehicle A, and β represents the number of false messages received recently. If vehicle B receives a false message from vehicle A and then receives several real messages from vehicle A, then each time a real message from vehicle A is received, β may be reset to 0. rate1 and rate2 are the initial changes, and η and ξ represent the growth rates of the change in trust value.

[0039] After obtaining the change in trust value, vehicle B will modify the local trust value of vehicle A, which is stored on vehicle A. Then, RSU dynamically adjusts the global trust value of vehicle A according to the change in trust value of vehicle A received. When the change in trust value of vehicle A is positive, RSU increases its trust value, otherwise, it decreases the trust value.

[0040] 3.3) Malicious vehicle marking and broadcasting: If the local trust value of a message-sending vehicle in a receiving vehicle is lower than the preset threshold, the receiving vehicle will mark it as a malicious vehicle. If the global trust value of the message-sending vehicle on the RSU is lower than the preset threshold, the RSU will mark the vehicle as a malicious vehicle and add it to the blacklist. The RSU will broadcast the identification information of the blacklisted vehicles at regular intervals.

[0041] 3.4) Malicious vehicle message processing: The message receiving vehicle will still check the messages from the malicious vehicle. If the malicious vehicle behaves normally, its trust value will still be increased, but its messages will not be forwarded to prevent it from affecting the Internet of Vehicles. If the global trust value of the malicious vehicle recovers to above the preset threshold, the RSU will remove it from the blacklist, but if its trust value still does not recover within the set time, its certificate will be revoked.

[0042] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0043] 1. The present invention adopts an improved LSTM neural network instead of a simple fully connected neural network or LSTM neural network to better identify the features in the interactive information, distinguish the true and false of the interactive information, and effectively improve the accuracy of identifying false information.

[0044] 2. Compared with traditional statistical methods, the present invention is more flexible and can better learn the complex patterns of false information, thus expanding the application scenarios of the trust management mechanism.

[0045] 3. The present invention proposes a trust value update algorithm that takes into account the number of real messages and the number of false messages sent by the sending vehicle, thereby reducing the misjudgment of normal vehicles and allowing the trust value of malicious vehicles to drop faster.

[0046] 4. The present invention has broad application prospects and can be well applied to judging the authenticity of messages sent by vehicles in a vehicle networking environment and evaluating the credibility of vehicles interacting with them. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Schematic diagram of the method of the present invention.

[0048] Figure 2 Structural diagram for improving LSTM neural network. DETAILED DESCRIPTION

[0049] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0050] like Figure 1As shown, this embodiment discloses a vehicle network trust management method based on an improved LSTM neural network, and the specific situation is as follows:

[0051] 1) Use the traffic simulation simulator SUMO and the discrete event simulation platform OMNet++ to simulate urban traffic. The map used by the traffic simulation simulator SUMO is a real-world map, and the map data comes from the OpenStreetMap open source map. During the simulation process, the message data sent between vehicles is collected, and the data is organized and classified according to the input required for neural network training and reasoning. Then, the data is z-score normalized, and the mean and variance of the data are saved to facilitate the same processing of the data during subsequent reasoning; finally, after converting the data into a time series, a time series data set is constructed, and then the data set is divided into a training set and a test set. The specific situation is as follows:

[0052] First, collect the messages and message features sent by vehicles during the simulation process. The message Msg transmitted between vehicles carries the following content: Msg = {id s ,t s ,pos s ,spe s ,ori s ,acc_pos s ,disToAcc s}, the message indicates that the number is id s The message is sent to the vehicle at t s Time, pos s The message sent by the location to the surrounding vehicles within the communication range is the main content of the dataset, where spe s 、ori s Respectively represent the number id s The message is sent to the vehicle at t s The moving speed and direction at the moment, acc_pos s 、disToAcc s Indicates the location of the accident and the distance between the message sending vehicle and the accident. If there is no accident, the horizontal and vertical coordinates of the accident location are set to the default 0, and the accident distance is set to the default -1. To determine the authenticity of a message, it is also necessary to combine the status information of the receiving vehicle and the receiving time, that is, the time t when the receiving vehicle receives the message r , receiving vehicle speed spe s 、Direction r and position pos r ; Therefore, the message data Msg_data collected at last is: Msg_data = {id s ,t r ,poss ,pos r ,spe s ,spe r ,ori s ,ori r ,acc_pos s ,disToAcc s}, each message data Msg_data corresponds to a label y i , if the message is true, then y i is 0, otherwise it is 1; the message data Msg_data and labels will be used to train and improve the LSTM neural network.

[0053] n Msg_data can generate a data set D n Before dividing the data set, it is necessary to normalize the data z-score to obtain data with the same scale in order to reduce the deviation introduced by data measurement. Specifically, the calculation formula for z-score normalization is: Where X' represents the normalized data, X represents each raw data in the data set, μ represents the average value of all raw data in each field in the data set, and σ represents the standard deviation of all raw data in each field in the data set. For subsequent new data, the saved μ and σ need to be processed in the same way before using the neural network for judgment;

[0054] In addition, it is also necessary to process a single piece of data into time series data, and each message data is equivalent to a time step in the time series data. Specifically, if vehicle A sends several messages to vehicle B, each time the improved LSTM neural network is used for judgment, vehicle B needs to input the several consecutive messages received from vehicle A into the improved LSTM neural network as a time series. Specifically, the input of the improved LSTM neural network is a sequence composed of the above message data Msg_data: Msg_seq = {Msg_data1, Msg_data2,..., Msg_data m}, Msg_data m Represents the mth message data, where m is the number of consecutive messages. After converting the message data into a time series, a time series data set is constructed. The time series is used as a unit and divided into a training set and a test set according to a preset ratio. When dividing, the order of the message data should be maintained according to the receiving time. The ratio of the training set to the test set can be 7:3.

[0055] 2) The training set is used as the input of the improved LSTM neural network for training, and the parameters of the neural network are continuously adjusted and updated using the AdamW optimizer, and then the test set is used for verification to obtain the neural network with the best performance; the improvements of the LSTM neural network include: first, the KAN neural network is used as the front layer of the LSTM neural network, and multiple message data are mapped to a higher dimension through the KAN neural network one by one, and the potential relationship between different features within the vehicle message is initially extracted, and then the high-dimensional features of each message are merged into a high-dimensional time series as the input of the subsequent neural network; second, the KAN neural network and the LSTM neural network are organically combined. The LSTM is a bidirectional LSTM, which can better learn the time series relationship of several adjacent messages from the same car, thereby improving the accuracy of judgment; third, a linear layer is introduced after the LSTM neural network to integrate the previously learned features, and the high-dimensional features corresponding to each message in the time series are mapped into two numerical values, which respectively represent the possibility of the message being true or false; fourth, a weighted cross entropy loss function is used as the optimization target of the neural network. In a real Internet of Vehicles environment, false messages are in the minority, and there are also fewer false messages in the data set. Therefore, it is necessary to give a greater weight to the loss of false messages, thereby enhancing the ability to identify false messages.

[0056] The entire neural network is divided into 3 parts, such as Figure 2 As shown, each part is as follows:

[0057] a. KAN layer: In order to better extract the features in the message data, the KAN neural network is used to map the low-dimensional features of each message to a 256-dimensional feature space, which is convenient for subsequent learning of the temporal relationship between messages, and also preliminarily learns the potential relationship between the various features within the message. The KAN neural network represents a multivariate function to be learned as a series of single-variable functions. The univariate function uses the B-spline function. Specifically, its forward propagation formula is:

[0058]

[0059]

[0060] Where f(x) represents the multivariable function to be learned by the KAN neural network, x represents the message data, x1, x2, ..., x n′ represents each feature of the message data, n′ represents the number of dimensions of the message data, p is used to index each variable of the input layer, and q is used to index the univariate function and the aggregate function Φ q , Φ q The univariate function used to aggregate each hidden node The output, is the pth feature x of the input p The corresponding univariate function, each Φ q and are all learnable parameterized functions, w b and w s is the parameter to be learned, b(x) is the silu activation function, spline(x) is the B-spline function, that is, the basis function B j (x), j represents the basis function index, b(x) and spline(x) are expressed as follows:

[0061]

[0062] In the formula, c j is the parameter to be learned, and x is each feature in the message data.

[0063] b. LSTM neural network: It is composed of three stacked LSTM layers. Each LSTM layer includes an input gate, a cell state, a forget gate, and an output gate. The cell state is used to save important information at a certain moment, and the three gates control the storage information of the cell state to ensure the effective transmission of messages. In order to better learn the timing features, a bidirectional LSTM is required as the LSTM layer. The bidirectional LSTM contains two independent LSTMs, one for processing the forward time series and the other for processing the reverse time series. These two time series generate their own hidden states respectively, and finally merge the hidden states of each time step to better learn the timing relationship between messages;

[0064] Input gate: processes the input of the current sequence position and determines the information that needs to be updated to update the cell state. The specific formula is as follows:

[0065]

[0066] In the formula, x t is the vector representation of the t-th time step of the input sequence, is the input x at the tth time step t The new information generated, h t-1 is the hidden state of LSTM at the t-1th time step, is the cell state of LSTM at the tth time step, W C、 b C is the parameter to be learned of the neural network, and σ is the sigmoid function.

[0067] Cell state: After the outputs of the forget gate and the input gate are determined, the cell state C at time t-1 can be t-1Update the cell state at the next moment C t The specific formula is as follows:

[0068]

[0069] Forget gate: controls the cell state C of the previous layer at time t-1 t-1 The information that needs to be forgotten in the calculation is as follows:

[0070] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0071] In the formula, f t It is used to generate variables that need to be forgotten to control the state of the previous layer of cells. The sigmoid activation function is used to make the value between (0,1) to determine C t-1 The output of the previous layer and the input content at this moment that need to be completely forgotten and remembered, W f, b f are the parameters of the neural network to be learned.

[0072] Output gate: The output value needs to be determined based on the cell state. First, the sigmoid activation function is used to determine which part of the cell state needs to be output, and then the cell state C t Through the tanh function processing, the two are multiplied to get the final output. The specific formula is as follows:

[0073] o t =σ(W o [h t-1 ,x t ]+b o )

[0074] h t =o t *tanh(C t )

[0075] In the formula, o t Indicates cell state C t How much content needs to be output? t is the hidden state of LSTM at the tth time step. The final output of the LSTM neural network consists of the hidden state of each time step, and the hidden state of one time step corresponds to one message.

[0076] c. Linear layer: According to the output of the LSTM neural network, the features of each message are mapped into a two-dimensional representation and passed through the softmax activation function. The output result is two numerical values, which respectively represent the possibility of whether each message in the time series is true or false. The category with the greatest possibility is selected as the result of the neural network judgment.

[0077] During the training of the neural network, the message passes through the improved LSTM neural network and gets the result of whether the message is true or not. Although each input is a time series consisting of multiple messages, each message in the sequence has a judgment result. In order to evaluate the output of the neural network after forward propagation and label y i The difference between , using the weighted cross entropy function L WCE As the loss function, the formula is as follows:

[0078]

[0079] Where N is the amount of interactive information, y i is the label of the i-th vehicle message, is the output of the forward propagation of the i-th message input into the neural network. The weight w in the above formula can be flexibly adjusted according to the ratio of false messages to real messages in the data set. When training the network, the parameters of the neural network are optimized by minimizing the cross entropy loss so that the prediction results of the neural network are as close to the actual value as possible.

[0080] 3) After the neural network with the best performance is deployed on the vehicle server, the steps of the entire trust management method are as follows:

[0081] 3.1) Trust value initialization and recording: Each vehicle is assigned an initial trust value, which can be 1.0. Whenever vehicle A sends a message to vehicle B, vehicle B combines the relevant features of the message and several previous messages from vehicle A into a time series, and uses the improved LSTM neural network to determine the authenticity of each message. Then, based on the judgment results of the neural network, vehicle B records the number of real messages and false messages received from vehicle A, calculates the change in the trust value this time, and feeds back the change in the trust value to the roadside unit RSU. The RSU receives the report, and the RSUs send each other the change in the trust value of the vehicle, thereby recording, updating and synchronizing the trust value of each vehicle in the Internet of Vehicles;

[0082] 3.2) Trust value update algorithm and dynamic adjustment: After vehicle B obtains the authenticity of the message sent by vehicle A through the neural network, it needs to calculate the change in the trust value of vehicle A based on the number of real messages and false messages received from vehicle A. The calculation formula for the change in the trust value is as follows:

[0083]

[0084] Among them, deltaTrust represents the change in trust value, α represents the number of real messages received by vehicle B from vehicle A, and β represents the number of false messages received recently. If vehicle B receives a false message from vehicle A and then receives several real messages from vehicle A, for example, three real messages, then each time a real message from vehicle A is received, β can be reset to 0 with a probability of 50%, thereby readjusting the size of the change in trust value. rate1 and rate2 are the initial changes, and η and ξ represent the growth rates of the change in trust value. rate1 and rate2 can be 0.01 and -0.02, and η and ζ can be 0.1 and 0.005.

[0085] After obtaining the change in trust value, vehicle B will modify the local trust value of vehicle A, which is stored on vehicle A. Then, the RSU dynamically adjusts the global trust value of vehicle A according to the change in trust value of vehicle A received. When the change in trust value of vehicle A is positive, the RSU increases its trust value, otherwise, it decreases the trust value.

[0086] 3.3) Malicious vehicle marking and broadcasting: If the local trust value of a message-sending vehicle in a receiving vehicle is lower than the preset threshold, the receiving vehicle will mark it as a malicious vehicle. If the global trust value of the message-sending vehicle on the RSU is lower than the preset threshold, the RSU will mark the vehicle as a malicious vehicle and add it to the blacklist. The RSU will broadcast the identification information of the blacklisted vehicles at regular intervals; the thresholds of the local trust value and the global trust value can be 0.5, or they can be adjusted or different values ​​can be taken according to the actual situation.

[0087] 3.4) Malicious vehicle message processing: The message receiving vehicle will still check the message from the malicious vehicle. If the malicious vehicle behaves normally, its trust value will still be raised, but its message will not be forwarded to prevent it from affecting the Internet of Vehicles. If the global trust value of the malicious vehicle is restored to above the preset threshold, the RSU will remove it from the blacklist, but if its trust value still does not recover within the set time, its certificate will be revoked.

[0088] In summary, the present invention mainly realizes the following functions: using the traffic simulation simulator SUMO and the discrete event simulation platform OMNet++ to simulate urban traffic, collecting the message data sent between vehicles during the simulation process to construct a data set; using the training set to train the improved LSTM neural network, and deploying the trained neural network to the vehicle server; using the improved LSTM neural network to judge the authenticity of the received message, and updating the trust value of the vehicle to achieve trust management in the Internet of Vehicles environment. Based on deep learning technology, the present invention can be effectively applied to the credibility assessment of vehicles in the Internet of Vehicles environment and establish long-term trust management, thereby achieving the detection of malicious or untrustworthy vehicles on a global scale, and has broad application prospects.

[0089] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. The vehicle network trust management method based on the improved LSTM neural network is characterized by: The following steps are involved: 1) Use the traffic simulator SUMO and the discrete event simulation platform OMNet++ to simulate urban traffic. The map used by the traffic simulator SUMO is a real-world map, and the map data comes from the OpenStreetMap open source map. During the simulation process, the message data sent between vehicles is collected, and the data is organized and classified according to the input required for neural network training and reasoning. Then the data is z-score normalized, and the mean and variance of the data are saved to facilitate the same processing of the data in subsequent reasoning. Finally, after converting the data into a time series, a time series data set is constructed, and then the data set is divided into a training set and a test set. 2) The training set is used as the input of the improved LSTM neural network for training, and the parameters of the neural network are continuously adjusted and updated using the AdamW optimizer, and then the test set is used for verification to obtain the neural network with the best performance; the improvements of the LSTM neural network include: first, the KAN neural network is used as the front layer of the LSTM neural network, and multiple message data are mapped to a higher dimension through the KAN neural network one by one, and the potential relationship between different features within the vehicle message is initially extracted, and then the high-dimensional features of each message are merged into a high-dimensional time series as the input of the subsequent neural network; second, the KAN neural network and the LSTM neural network are organically combined. The network is bidirectional, and the LSTM is able to better learn the time series relationship of adjacent messages from the same vehicle, thereby improving the accuracy of judgment. Third, a linear layer is introduced after the LSTM neural network to integrate the features learned previously, and the high-dimensional features corresponding to each message in the time series are mapped into two numerical values, which respectively represent the possibility of the message being true or false. Fourth, a weighted cross entropy loss function is used as the optimization target of the neural network. In a real Internet of Vehicles environment, false messages are in the minority, and there are also few false messages in the data set. Therefore, it is necessary to give a greater weight to the loss of false messages, thereby enhancing the ability to identify false messages. 3) After the neural network with the best performance is deployed on the vehicle server, each vehicle is assigned an initial trust value; when the message sending vehicle A sends a message to the message receiving vehicle B, vehicle B will process the received message and convert the message and several messages previously sent by vehicle A into the input required by the improved LSTM neural network for the neural network to make a judgment; vehicle B determines the change in the trust value based on the judgment result of the improved LSTM neural network and the number of false messages and true messages received by vehicle B from vehicle A; then, vehicle B adjusts the local trust value of vehicle A based on the change in the trust value and reports it to the nearby roadside unit RSU so that the RSU updates the global trust value of vehicle A, where the trust value of vehicle A stored on vehicle B is only known to vehicle B, called the local trust value, and the trust value of vehicle A on the RSU comes from the common modification of all vehicles, called the global trust value; when the local trust value of vehicle A is lower than the preset threshold, vehicle B will not forward any message of vehicle A; when the global trust value of vehicle A is lower than the preset threshold, the RSU marks vehicle A as a malicious vehicle and broadcasts it so that all other vehicles do not forward messages of vehicle A.

2. The vehicle network trust management method based on the improved LSTM neural network according to claim 1 is characterized in that: In step 1), the message Msg transmitted between vehicles carries the following content: Msg = {id s ,t s ,pos s ,spe s ,ori s ,acc_pos s ,disToAcc s }, the message indicates that the number is id s The message is sent to the vehicle at t s Time, pos s The message sent by the location to the surrounding vehicles within the communication range is the main content of the dataset, where spe s 、ori s Respectively represent the number id s The message is sent to the vehicle at t s The moving speed and direction at the moment, acc_pos s 、disToAcc s Indicates the location of the accident and the distance between the message sending vehicle and the accident. If there is no accident, the horizontal and vertical coordinates of the accident location are set to the default 0, and the accident distance is set to the default -1. To determine the authenticity of a message, it is also necessary to combine the status information of the receiving vehicle and the receiving time, that is, the time t when the receiving vehicle receives the message r , receiving vehicle speed spe s 、Direction r and position pos r ; Therefore, the message data Msg_data collected at last is: Msg_data = {id s ,t r ,pos s ,pos r ,spe s ,spe r ,ori s ,ori r ,acc_pos s ,disToAcc s }, each message data Msg_data corresponds to a label y i , if the message is true, then y i is 0, otherwise it is 1; the message data Msg_data and labels will be used to train and improve the LSTM neural network.

3. The vehicle network trust management method based on the improved LSTM neural network according to claim 2 is characterized in that: In step 1), n ​​Msg_data can generate a data set D n , for the dataset D n Before dividing, the data needs to be normalized by z-score to obtain data with the same scale in order to reduce the deviation introduced by data measurement. The calculation formula for z-score normalization is: Among them, X' represents the normalized data, X represents each original data in the data set, μ represents the average value of all the original data in each field in the data set, and σ represents the standard deviation of all the original data in each field in the data set. For subsequent new data, it is necessary to use the saved μ and σ to perform the same processing and then use the neural network to make judgments.

4. The vehicle network trust management method based on the improved LSTM neural network according to claim 3 is characterized in that: In step 1), it is also necessary to process a single message data into time series data. Each message data is equivalent to a time step in the time series data. If vehicle A sends several messages to vehicle B, each time the improved LSTM neural network is used for judgment, vehicle B needs to input several consecutive messages received from vehicle A into the improved LSTM neural network as a time series. The input of the improved LSTM neural network is a sequence composed of the above message data Msg_data: Msg_seq = {Msg_data1, Msg_data2, ..., Msg_data m }, Msg_data m Represents the mth message data, where m is the number of consecutive messages. After converting the message data into a time series, a time series data set is constructed. The data set is divided into a training set and a test set according to a preset ratio using the time series as a unit. When dividing, the order of the message data must be maintained according to the receiving time.

5. The vehicle network trust management method based on the improved LSTM neural network according to claim 4 is characterized in that: In step 2), the entire neural network is divided into 3 parts, each of which is as follows: a. KAN layer: In order to better extract the features in the message data, the KAN neural network is used to map the low-dimensional features of each message to a 256-dimensional feature space, which is convenient for subsequent learning of the temporal relationship between messages. At the same time, it also preliminarily learns the potential relationship between the various features within the message. The KAN neural network represents a multivariate function to be learned as a series of single-variable functions. Its forward propagation formula is: Where f(x) represents the multivariable function to be learned by the KAN neural network, x represents the message data, x1, x2, ..., x n′ represents each feature of the message data, n′ represents the number of dimensions of the message data, p is used to index each variable of the input layer, and q is used to index the univariate function and the aggregate function Φ q , Φ q The univariate function used to aggregate each hidden node The output, is the pth feature x of the input p The corresponding univariate function, each Φ q and are all learnable parameterized functions, w b and w s is the parameter to be learned, b(x) is the silu activation function, spline(x) is the B-spline function, that is, the basis function B j (x), j represents the basis function index, b(x) and spline(x) are expressed as follows: In the formula, c j is the parameter to be learned, and x is each feature in the message data; b. LSTM neural network: It is composed of three stacked LSTM layers. Each LSTM layer includes input gate, cell state, forget gate and output gate. The cell state is used to save important information at a certain moment. The three gates control the storage information of the cell state to ensure the effective transmission of messages. In order to better learn the time series features, bidirectional LSTM is needed as the LSTM layer. Bidirectional LSTM contains two independent LSTMs, one for processing the forward time series and the other for processing the reverse time series. These two time series generate their own hidden states respectively. Finally, the hidden states of each time step are merged to better learn the time series relationship between messages. Input gate: processes the input of the current sequence position, determines the information that needs to be updated, and updates the cell state. The specific formula is as follows: In the formula, x t is the vector representation of the t-th time step of the input sequence, is the input x at the tth time step t The new information generated, h t-1 is the hidden state of LSTM at the t-1th time step, is the cell state of LSTM at the tth time step, W C , b C is the parameter to be learned of the neural network, σ is the sigmoid function; Cell state: After the outputs of the forget gate and the input gate are determined, the cell state C at time t-1 can be t-1 Update the cell state at the next moment C t , the specific formula is as follows: Forget gate: controls the cell state C of the previous layer at time t-1 t-1 The information that needs to be forgotten is as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ) In the formula, f t It is used to generate variables that need to be forgotten to control the state of the previous layer of cells. The sigmoid activation function is used to make the value between (0,1) to determine C t-1 The output of the previous layer and the input content at this moment that need to be completely forgotten and remembered, W f、 b f are the parameters to be learned of the neural network; Output gate: The output value needs to be determined based on the cell state. First, the sigmoid activation function is used to determine which part of the cell state needs to be output, and then the cell state C t Through the tanh function processing, the two are multiplied to get the final output. The specific formula is as follows: the t =σ(W o [h t-1 ,x t ]+b o ) h t =o t *tanh(C t ) In the formula, o t Indicates cell state C t How much content needs to be output? t is the hidden state of LSTM at the tth time step; the final output of the LSTM neural network consists of the hidden state of each time step, and the hidden state of one time step corresponds to one message; c. Linear layer: According to the output of the LSTM neural network, the features of each message are mapped into a two-dimensional representation and passed through the softmax activation function. The output result is two numerical values, which respectively represent the possibility of whether each message in the time series is true or false. The category with the greatest possibility is selected as the result of the neural network judgment.

6. The vehicle network trust management method based on the improved LSTM neural network according to claim 5 is characterized in that: During the training process of the neural network, after the message passes through the improved LSTM neural network, a judgment result is obtained as to whether the message is true or not. Although each input is a time series consisting of multiple messages, each message in the sequence has a judgment result. In order to evaluate the output of the neural network after forward propagation and label y i The difference between , using the weighted cross entropy function L WCE As the loss function, the formula is as follows: Where N is the amount of interactive information, y i is the label of the i-th vehicle message, is the output of the forward propagation of the i-th message input into the neural network; w is the weight, which can be flexibly adjusted according to the ratio of false messages to real messages in the data set; when training the network, the parameters of the neural network are optimized by minimizing the cross entropy loss so that the prediction results of the neural network are as close to the actual values ​​as possible.

7. The vehicle network trust management method based on the improved LSTM neural network according to claim 6 is characterized in that: In step 3), the neural network with the best performance is deployed to the vehicle's server. The entire trust management steps are as follows: 3.1) Trust value initialization and recording: Each vehicle is assigned an initial trust value. Whenever vehicle A sends a message to vehicle B, vehicle B combines the relevant features of the message and several previous messages from vehicle A into a time series and uses the improved LSTM neural network to determine the authenticity of each message. Then, based on the judgment result of the neural network, vehicle B records the number of real messages and false messages received from vehicle A, calculates the change in the trust value this time, and feeds the change in the trust value back to the roadside unit RSU. After receiving the report, the RSUs send each other the change in the trust value of the vehicle, thereby recording, updating and synchronizing the trust value of each vehicle in the Internet of Vehicles. 3.2) Trust value update algorithm and dynamic adjustment: After vehicle B obtains the authenticity of the message sent by vehicle A through the neural network, it needs to calculate the change in the trust value of vehicle A based on the number of real messages and false messages received from vehicle A. The calculation formula for the change in the trust value is as follows: In the formula, deltaTrust represents the change in trust value, α represents the number of real messages received by vehicle B from vehicle A, and β represents the number of false messages received recently. If vehicle B receives a false message from vehicle A and then receives several real messages from vehicle A, then each time a real message from vehicle A is received, β may be reset to 0. rate1 and rate2 are the initial changes, and η and ξ represent the growth rates of the change in trust value. After obtaining the change in trust value, vehicle B will modify the local trust value of vehicle A, which is stored on vehicle A. Then, RSU dynamically adjusts the global trust value of vehicle A according to the change in trust value of vehicle A received. When the change in trust value of vehicle A is positive, RSU increases its trust value, otherwise, it decreases the trust value. 3.3) Malicious vehicle marking and broadcasting: If the local trust value of a message-sending vehicle in a receiving vehicle is lower than the preset threshold, the receiving vehicle will mark it as a malicious vehicle. If the global trust value of the message-sending vehicle on the RSU is lower than the preset threshold, the RSU will mark the vehicle as a malicious vehicle and add it to the blacklist. The RSU will broadcast the identification information of the blacklisted vehicles at regular intervals. 3.4) Malicious vehicle message processing: The message receiving vehicle will still check the messages from the malicious vehicle. If the malicious vehicle behaves normally, its trust value will still be increased, but its messages will not be forwarded to prevent it from affecting the Internet of Vehicles. If the global trust value of the malicious vehicle recovers to above the preset threshold, the RSU will remove it from the blacklist, but if its trust value still does not recover within the set time, its certificate will be revoked.

Citation Information

Cited By

  • Multilevel information safety protection system, method and equipment for electric vehicle and medium

    CN120639397A