Internet of vehicles data communication method, apparatus and device, and storage medium
Through the reputation detection and message consistency verification of non-authoritative nodes in the vehicle network, the problem of misleading malicious node detection and message transmission timeliness is solved, and the security and timeliness of data transmission are improved.
Patent Information
- Application Number
- CN202410729213.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-10
AI Technical Summary
Existing malicious node detection solutions in in-vehicle networks are easily misled by false reputation values when evaluating node reputation, resulting in inaccurate evaluations. Moreover, node transmission-based methods increase network overhead and time delay when messages are long, reducing the timeliness of messages.
The receiving node determines the type of sending node and the message type. If it is not an authoritative node and the message is not urgent, reputation detection and random value hash function message consistency verification are performed to ensure the reliability and security of the message.
It improves the timeliness and security of data transmission in the vehicle network, reduces network overhead and time delay, and effectively prevents interference from malicious nodes.
Smart Images

Figure CN118632256A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a vehicle network data communication method, device, equipment and storage medium. Background Art
[0002] In order to ensure the timeliness and security of data transmission in vehicle networks, the existing malicious node detection schemes are divided into three categories: malicious node detection schemes centered on node behavior, malicious node detection schemes centered on node transmission data, and hybrid malicious node detection schemes that combine the two. Among the many malicious node detection schemes centered on node behavior, the node's historical behavior and neighbor recommendations are considered to solve the node's reputation value.
[0003] However, these schemes ignore the existence of malicious neighbor nodes that may provide false reputation values in the network. These malicious nodes may provide an overly high reputation value to the requesting node in the network to help other malicious nodes gain the trust of the requesting node, which makes the node inaccurate when evaluating the reputation value of other nodes. In addition, in the data-centric scheme based on node transmission, most schemes use methods such as Hamming distance and edit distance to check whether the message is authentic. Although these methods can check the authenticity of the message by comparing the message content bit by bit, when the message content transmitted by the node is very long, such a bit-by-bit comparison method increases unnecessary network overhead and time delay. Although it can ensure that the message received by the node is safe, it reduces the timeliness of the message. In addition, although the hybrid malicious node detection scheme combines the node behavior evaluation method and the data-centric evaluation method, they do not reduce the network overhead and time delay.
[0004] Therefore, there is an urgent need for a vehicle network data communication method that can effectively improve the timeliness and security of data transmission in the vehicle network. Summary of the invention
[0005] The main purpose of the present invention is to provide a vehicle network data communication method, device, equipment and storage medium, aiming to solve the technical problems of poor timeliness and security of data transmission in vehicle networks in the prior art.
[0006] To achieve the above object, the present invention provides a vehicle network data communication method, the method comprising the following steps:
[0007] When the sending node sends the target message to the receiving node, determining the node type of the sending node and the message type of the target message through the receiving node;
[0008] If the node type is not an authoritative node and the target message is not an emergency message, performing a node reputation check on the sending node through the receiving node to obtain a reputation check result;
[0009] If the reputation detection result indicates that the sending node is not a malicious node, performing message consistency verification on the target message based on a random value hash function to obtain a verification result;
[0010] If the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message.
[0011] Optionally, if the node type is not an authoritative node and the target message is not an emergency message, the step of performing node reputation detection on the sending node by the receiving node to obtain a reputation detection result includes:
[0012] If the node type is not an authoritative node and the target message is not an emergency message, determining whether there is an interaction record between the receiving node and the sending node;
[0013] If there is an interaction record, checking the reputation value of the receiving node to the sending node;
[0014] If the reputation value is greater than 0 and less than a reputation value threshold, determining a direct trust value of the receiving node to the sending node;
[0015] If the direct trust value is greater than or equal to the direct trust confidence, it means that the reputation detection result is that the sending node is not a malicious node.
[0016] Optionally, after the step of determining the direct trust value of the receiving node to the sending node if the reputation value is greater than 0 and less than a reputation value threshold, the step further includes:
[0017] If the direct trust value is less than the direct trust confidence, then calculating the indirect trust value of the receiving node to the sending node using an indirect trust value calculation formula;
[0018] Determine a comprehensive trust value of the receiving node to the sending node through the direct trust value and the indirect trust value;
[0019] If the comprehensive trust value is greater than or equal to the first comprehensive trust confidence level, it indicates that the reputation detection result is that the sending node is not a malicious node;
[0020] Correspondingly, if the node type is not an authoritative node and the target message is not an emergency message, after the step of determining whether there is an interaction record between the receiving node and the sending node, the method further includes:
[0021] If there is no interaction record, the step of calculating the indirect trust value of the receiving node to the sending node by using an indirect trust value calculation formula is performed.
[0022] Optionally, after the step of checking the reputation value of the receiving node to the sending node if an interaction record exists, the step further includes:
[0023] If the reputation value is less than or equal to 0, the receiving node refuses to receive the target message;
[0024] Correspondingly, after the step of checking the reputation value of the receiving node to the sending node if there is an interaction record, the step further includes:
[0025] If the reputation value is greater than or equal to the reputation value threshold, the step of performing message consistency verification on the target message based on the random value hash function to obtain a verification result is executed.
[0026] Optionally, if the reputation detection result indicates that the sending node is not a malicious node, performing message consistency verification on the target message based on a random value hash function to obtain a verification result includes:
[0027] If the reputation detection result indicates that the sending node is not a malicious node, requesting a data message having the same ID as the target message from a neighboring node through the receiving node;
[0028] If the neighboring node has the data message, the target message is verified for message consistency based on a random value hash function and the data message to obtain a verification result.
[0029] Optionally, after the step of indicating that if the comprehensive trust value is greater than or equal to the first comprehensive trust confidence level, the reputation detection result indicates that the sending node is not a malicious node, the step further includes:
[0030] Requesting, through the receiving node, a neighboring node for a data message having the same ID as the target message;
[0031] If the neighboring node does not have the data message, determining whether the comprehensive trust value is greater than a second comprehensive trust confidence level;
[0032] If the comprehensive trust value is greater than or equal to the second comprehensive trust confidence level, the receiving node receives the target message and reduces the reputation value of the sending node;
[0033] If the comprehensive trust value is less than the second comprehensive trust confidence level, the target message is rejected and the reputation value of the sending node is reduced.
[0034] Optionally, after the step of determining, by the receiving node, the node type of the sending node and the message type of the target message, the method further includes:
[0035] If the node type of the sending node is an authoritative node or the message type of the target message is an emergency message, the receiving node receives the target message, and the receiving node does not forward the target message.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a vehicle networking data communication device, the device comprising:
[0037] A type determination module, used for determining the node type of the sending node and the message type of the target message through the receiving node when the sending node sends the target message to the receiving node;
[0038] A reputation detection module, configured to, if the node type is not an authoritative node and the target message is not an emergency message, perform a node reputation detection on the sending node through the receiving node to obtain a reputation detection result;
[0039] A message verification module, configured to perform message consistency verification on the target message based on a random value hash function to obtain a verification result if the reputation detection result indicates that the sending node is not a malicious node;
[0040] The result determination module is configured to, if the verification result indicates that the target message is a reliable and normal message, cause the receiving node to receive and forward the target message.
[0041] In addition, to achieve the above-mentioned purpose, the present invention also proposes a vehicle network data communication device, which includes: a memory, a processor, and a vehicle network data communication program stored in the memory and executable on the processor, and the vehicle network data communication program is configured to implement the steps of the vehicle network data communication method described above.
[0042] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a vehicle network data communication program is stored. When the vehicle network data communication program is executed by a processor, the steps of the vehicle network data communication method described above are implemented.
[0043] When the sending node sends the target message to the receiving node, the present invention determines the node type of the sending node and the message type of the target message through the receiving node; if the node type is not an authoritative node and the target message is not an emergency message, the receiving node performs a node reputation check on the sending node to obtain a reputation check result; if the reputation check result indicates that the sending node is not a malicious node, the target message is verified for message consistency based on a random value hash function to obtain a verification result; if the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message. Since the present invention performs a node reputation check on the sending node when the node type of the sending node is not an authoritative node and the target message is not an emergency message, and then performs a message consistency verification based on a random value hash function, compared to the prior art, the present invention effectively improves the timeliness and security of data transmission in the vehicle network. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a structural diagram of a vehicle networking data communication device in a hardware operating environment involved in an embodiment of the present invention;
[0045] Figure 2 This is a flow chart of a first embodiment of a vehicle networking data communication method according to the present invention;
[0046] Figure 3 This is a flow chart of a second embodiment of a vehicle networking data communication method according to the present invention;
[0047] Figure 4 A schematic diagram of a flow chart of a third embodiment of a vehicle networking data communication method according to the present invention;
[0048] Figure 5 This is a structural block diagram of the first embodiment of the vehicle networking data communication device of the present invention.
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0051] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a vehicle networking data communication device in the hardware operating environment involved in an embodiment of the present invention.
[0052] like Figure 1As shown, the vehicle networking data communication device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the Internet of Vehicles data communication device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0054] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a vehicle networking data communication program.
[0055] exist Figure 1 In the Internet of Vehicles data communication device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the Internet of Vehicles data communication device of the present invention can be set in the Internet of Vehicles data communication device, and the Internet of Vehicles data communication device calls the Internet of Vehicles data communication program stored in the memory 1005 through the processor 1001, and executes the Internet of Vehicles data communication method provided in an embodiment of the present invention.
[0056] The embodiment of the present invention provides a vehicle network data communication method, referring to Figure 2 , Figure 2 1 is a flow chart of the first embodiment of the vehicle networking data communication method of the present invention.
[0057] In this embodiment, the Internet of Vehicles data communication method includes the following steps:
[0058] Step S10: When the sending node sends the target message to the receiving node, the receiving node determines the node type of the sending node and the message type of the target message.
[0059] It should be noted that this embodiment is applied to the data communication scenario of the vehicle network, and the execution subject of this embodiment can be a computer server device with data processing, network communication and program running functions, such as a server, a tablet computer, a personal computer, etc., or an electronic device capable of realizing the above functions, a vehicle network data communication device, etc. The following takes the vehicle network data communication system as an example to illustrate this embodiment and the following embodiments.
[0060] It is understandable that the above-mentioned sending node and receiving node each correspond to a unique vehicle, the sending node can also be a receiving node, and the receiving node can also be a sending node. Each node has a unique and unchangeable ID to identify the corresponding vehicle.
[0061] It should be understood that before receiving the target message, the receiving node can detect whether it has received this message through the ID of the target message. If the receiving node has received the target message before, the receiving node refuses to receive the target message, and the reputation value of the sending node remains unchanged; if the receiving node has not received the target message, execute step S10.
[0062] It should be explained that, in this embodiment, nodes are divided into four types: authoritative vehicle nodes, non-authoritative nodes, non-authoritative normal nodes and non-authoritative malicious nodes.
[0063] Authoritative nodes include: police cars, ambulances, and fire trucks. It is assumed that authoritative nodes will not tamper with the content of messages. When the receiving node finds that the sending node is an authoritative node, the receiving node will immediately receive the message sent by the authoritative node. However, since the receiving node does not judge the authenticity of the message, in order to avoid transmitting the wrong message, the receiving node will not pass the message to other nodes in the vehicle network after receiving the message from the authoritative node.
[0064] Non-authoritative nodes include taxis, private cars and other types of vehicles. These types of vehicles are very likely to tamper with the message content and interfere with the network.
[0065] Non-authoritative normal nodes: Non-authoritative normal nodes will normally forward all messages they receive in the network, will not arbitrarily tamper with the content of the message to deceive other nodes, and will not provide false recommendation values to other nodes.
[0066] Non-authoritative malicious nodes: In the vehicle network, non-authoritative malicious nodes will deceive other nodes to create convenience for themselves, or deliberately tamper with the message content or create false content to interfere with the network. The malicious behavior of non-authoritative malicious nodes is defined as maliciously tampering with the message content, or providing false trust values to the requesting node to interfere with the node's judgment.
[0067] It should be explained that, in this embodiment, messages are divided into four types: emergency messages, non-emergency normal messages, non-emergency abnormal messages and uncertain messages, and each message has a unique and unchangeable message ID to identify the message.
[0068] Emergency message: Emergency messages include emergency accident messages and temporary lane changes of vehicles ahead. For emergency messages, this embodiment consistently adopts a mechanism of receiving but not forwarding, because when an emergency accident or a temporary lane change occurs, the receiving node does not have enough time to determine whether the message is true, and can only take immediate measures to avoid the accident. However, after receiving the emergency message, the receiving node cannot determine whether the message is true or false, so the receiving node will not forward the emergency message to avoid transmitting false emergency messages that affect the network.
[0069] Non-emergency normal message: Non-emergency normal message is sent or forwarded by normal nodes. It contains information such as road conditions and traffic lights. For example, a non-emergency message may inform other nodes that a road is flooded and poses a safety hazard, and other vehicles are advised to take a detour. Whether the non-emergency message is authentic and reliable needs to be verified. If the verification result indicates that the message is credible, the receiving node will define the message as a non-emergency normal message. At the same time, the receiving node will receive the message and forward it to other nodes.
[0070] Non-emergency abnormal message: Non-emergency abnormal message is most likely sent by malicious nodes. It contains information such as road conditions and traffic lights. Similarly, for example, a non-emergency normal message says that a certain road is in good condition and can be passed quickly. However, if a malicious node tampers with this message to disrupt the network and interfere with the routes of other vehicles, it will change it to: a certain road is seriously congested and cannot be passed for a short period of time, and it is recommended to detour. Then, after receiving this message, the receiving node will verify whether the message is reliable. If it is unreliable, the receiving node will define this message as a non-emergency abnormal message and refuse to accept this message.
[0071] Uncertain message: An uncertain message is a message that the receiving node cannot provide for comparison when performing message consistency verification because its neighboring node has not received the message and cannot determine whether the message is reliable.
[0072] In a specific implementation, if the node type of the sending node is an authoritative node or the message type of the target message is an emergency message, the receiving node receives the target message, and the receiving node does not forward the target message.
[0073] It is understandable that since the receiving node will immediately check the node type of the sending node and the message type of the target message after receiving the target message sent by the sending node, if the sending node is an authoritative node or the target message is an emergency message, the receiving node will immediately receive the target message. However, since the receiving node does not perform message consistency judgment on the target message, it is unable to accurately judge the authenticity of the target message. Therefore, in order to avoid lowering its trust value due to forwarding false or tampered messages under uncertain circumstances, the receiving node will not forward the target message after receiving the target message. Therefore, compared with the prior art, this embodiment not only reduces time delay and network overhead, but also effectively ensures the security of data transmission in the vehicle network.
[0074] Step S20: If the node type is not an authoritative node and the target message is not an emergency message, the receiving node performs a node reputation check on the sending node to obtain a reputation check result.
[0075] It should be noted that, in order to ensure node reputation detection, this embodiment performs node reputation detection on the sending node through the reputation value of the sending node, the direct trust value of the sending node, the indirect trust value and the comprehensive trust value.
[0076] It should be explained that the direct trust value of the receiving node B to the sending node A is determined by the time satisfaction value TS of the sending node A. BA and message forwarding success rate MFR BA And the reputation value R of the sending node A A The comprehensive evaluation of the three aspects shows that the calculation formula of the direct trust value of the receiving node B to the sending node A is as follows:
[0077]
[0078] In the formula, α, β, and μ are the weights of message forwarding success rate, time satisfaction, and reputation value, respectively. BA Indicates the direct trust value of receiving node B to sending node A.
[0079] It should be understood that the values of α, β, and μ can be reasonably allocated according to different situations, and the values of α, β, and μ satisfy the quantitative relationship of α+β+μ=1. In the vehicle network, the timeliness of the message has a more important position, so a larger value can be assigned to β when calculating the direct reputation value.
[0080] It should be noted that time satisfaction TSBA The calculation formula is:
[0081]
[0082] Among them, simTime is the time when the sending node A successfully sends the message, T A recive is the time when the sending node A receives this message, Num Csend The number of messages successfully sent by sending node A.
[0083] It should be understood that TS BA The smaller the value, the shorter the time it takes for the sending node A to successfully forward the message. The more timely the message is, and the more likely the node is a normal node. BA The larger it is, the smaller the direct trust value of node A is, and the greater the possibility that the sending node A is a malicious node.
[0084] It should be noted that the success rate of the message forwarding from the receiving node B to the sending node A is recorded as MFR BA , message forwarding success rate MFR BA The calculation formula is as follows:
[0085]
[0086] Among them, the denominator Num Asend is the total number of messages forwarded by the sending node A, and the numerator Num Csend is the number of messages successfully forwarded by sending node A.
[0087] It should be understood that MFR BA The larger the value, the more messages the sending node A has successfully forwarded, and the greater the probability that the sending node A is a normal node.
[0088] Furthermore, in order to more accurately detect malicious nodes in the vehicle network, the recommended trust from neighboring nodes, i.e., the indirect trust value, is also very important. The indirect trust value refers to the direct trust value of the third-party neighbor node K to the sending node A, which is used by the receiving node B to calculate the comprehensive trust value of the receiving node A.
[0089] In this embodiment, it is not necessary to calculate the indirect trust value for all nodes, because the calculation of the indirect trust value requires a certain time delay and network overhead. In order to reduce the time delay and ensure the timeliness of the message, the direct trust confidence is adopted in this embodiment. When the direct trust value of the sending node is greater than the direct trust confidence, the indirect trust value of the sending node is not calculated. Instead, the message consistency verification is directly performed on the target message. By judging whether the target message has been tampered with, it is decided whether to receive the message, which further improves the timeliness of message transmission in the vehicle network.
[0090] When calculating the indirect trust value of the sending node, the concept of the subjective belief of the receiving node is used to prevent malicious nodes in the network from trying to falsely report the indirect trust value to interfere with the node's judgment. That is, the receiving node will calculate the recommended value of this neighbor node based on its direct trust in the neighbor node. The greater the trust value of the neighbor node, the greater the indirect trust value provided by the neighbor, thereby isolating those neighbor nodes that provide false trust values.
[0091] The indirect trust value IR of the receiving node B to the sending node A BA It can be calculated by the following formula:
[0092]
[0093] In the formula, m is the number of neighbor nodes, For receiving node B to neighbor node K i The direct trust value of is the neighbor node K i Direct trust value of the sending node A. N h is the set of neighbor nodes of node B.
[0094] It should be understood that there are three cases for calculating the indirect trust value of the sending node A: h The direct trust value of any node to the sending node A is greater than 0. At this time, the indirect trust value of the sending node A is the combined result of the direct trust value of all recommended nodes that meet the requirements to the sending node A and the direct trust value of the receiving node B to the recommended node. The second case: when N h There is a node whose direct trust value for the sending node A is 0, so the sending node A is a malicious node and its indirect trust value should be 0; the third case: when N h When the number of intermediate nodes m is 0, it means that there is no recommended node about the trust value of sending node A among the neighbor nodes of receiving node B. At this time, the indirect trust value is the direct trust value of receiving node B to sending node A.
[0095] It should be noted that the comprehensive trust value of the receiving node B to the sending node A is obtained by a linear combination of the direct trust value and the indirect trust value of the receiving node B to the sending node A. The formula for solving the comprehensive trust value of the receiving node B to the sending node A is as follows:
[0096]
[0097] Among them, ω1 and ω2 are the weights of the direct trust value and indirect trust value of the receiving node B to the sending node A, respectively.
[0098] It is understandable that the values of ω1 and ω2 can be reasonably allocated according to different situations, and the quantitative relationship between ω1 and ω2 satisfies ω1+ω2=1. Since we pay more attention to the direct trust of the node when calculating the comprehensive trust of the node, a larger value can be assigned to ω1.
[0099] It can be seen from the above formula that when the direct trust value and indirect trust value of the receiving node B to the sending node A are both greater than 0, the comprehensive trust value of the node is a linear combination of the direct trust value and the indirect trust value; when one of the direct reputation value or indirect trust value of the receiving node B to the sending node A is 0, node A is a malicious node and the comprehensive reputation value is 0.
[0100] In this embodiment, a comprehensive trust confidence level is set. When the comprehensive trust value is greater than the comprehensive trust confidence level, step S30 is executed to determine whether the message is a reliable normal message. When the comprehensive trust value is less than the comprehensive trust confidence level, that is, the comprehensive trust value of the node is very small, it indicates that the node is untrustworthy, that is, the second stage of message consistency judgment is not entered, and the receiving node directly rejects the message.
[0101] In this embodiment, in the node reputation detection, the node calculates its comprehensive trust value CT based on the direct trust value DT and the indirect trust value IT, and decides whether to perform message consistency verification on the message M sent by the node by comparing the comprehensive trust value CT with the preset comprehensive trust confidence. The judgment at this stage can be divided into the following four situations, as follows:
[0102] 1. When there is an interaction record between the sending node A and the receiving node B, if the receiving node B finds the reputation value R of the sending node A A <=0, it means that the node is a malicious node. There are two possibilities for this type of node:
[0103] (1) The sending node A sent a large number of unconfirmed messages to the network during past transactions.
[0104] (2) The sending node A has had clear malicious behavior in the past. Therefore, the node is marked as a malicious node. In order to save time and network overhead, the message consistency verification of the message sent by the sending node is not performed. And the receiving node B will share this information with neighboring nodes to notify other nodes to refuse to receive messages from this node.
[0105] 2. When there is an interaction record between the sending node A and the receiving node B, if the receiving node B finds the reputation value R of the sending node A A If it is greater than or equal to the reputation value threshold RThreshold, it means that the sending node has good behavior in the past, so the sending node is defined as a high reputation value node.
[0106] 3. In the case where there is an interaction record between node A and node B, if the receiving node B finds the reputation value R of the sending node A A Satisfy: 0<R A <RThreshold, the direct trust value DT of the node will be calculated. If DT satisfies DT>=Threshold (direct trust confidence), the node is defined as a high direct trust value node.
[0107] 4. In the case where there is an interaction record between the sending node A and the receiving node B, if the direct trust value DT of the receiving node B to the sending node A satisfies DT<Threshold (direct trust confidence), it is necessary to calculate the indirect trust value IT of the sending node, and calculate the comprehensive trust value CT of the receiving node B to the sending node A through DT and IT. If CT is greater than or equal to Threshold (comprehensive trust confidence), the node is determined to be a high comprehensive trust value node.
[0108] Then, in order to further ensure the reliability of the target message, message consistency verification is performed on nodes with high reputation value, high direct trust value and high comprehensive trust value.
[0109] Step S30: If the reputation detection result indicates that the sending node is not a malicious node, the target message is verified for consistency based on a random value hash function to obtain a verification result.
[0110] It should be noted that step S30 includes:
[0111] Step S301: If the reputation detection result indicates that the sending node is not a malicious node, then requesting a data message having the same ID as the target message from a neighboring node through the receiving node.
[0112] Step S302: If the neighboring node has the data message, the target message is verified for consistency based on a random value hash function and the data message to obtain a verification result.
[0113] It should be noted that the core idea of the random value hash function is to randomly but non-repeatedly extract a part of the message content of the message to be verified within the message length range for comparison, and then dynamically set the Information Discrepancy Tolerance (IDTThreshold) according to the length of the extracted message content.
[0114] When the information difference ID between the target message M and the data message provided by the neighboring node of the receiving node is greater than or equal to the information difference tolerance threshold IDTThreshold, the receiving node determines that the target message is a false message or a tampered message, records and broadcasts the message sending node as a malicious node that sends a false message, and sets the reputation value R of the sending node to 0. When the information difference ID between the target message M and the data message provided by the neighboring node of the receiving node is less than the information difference tolerance threshold IDTThreshold, the receiving node determines that the message is a normal message, and the reputation value R of the node remains unchanged.
[0115] Since in this embodiment, the reputation value R only decreases and does not increase, it effectively prevents malicious nodes from compensating their reputation values by cooperating in forwarding messages after carrying out malicious behavior, and then carrying out attack behaviors again after the reputation value reaches a normal value.
[0116] It should be noted that there are three situations in which the target message is verified for consistency:
[0117] Case 1: By judging the reputation value R of the sending node, it is known that the node is a high reputation node, which means that the sending node has no clear malicious behavior in past interactions. In this case, the message receiving node is more inclined to trust the node. In order to save time delay and network overhead, the receiving node does not calculate the trust value of the sending node. However, although the high reputation value node indicates that the sending node has no record of malicious behavior in the past, it cannot be determined that the sending node will not become a malicious node and send false messages at this time, so the receiving node will still verify the message consistency of the target message M sent by the sending node at this time.
[0118] Case 2: After calculating the direct trust value, it is known that the sending node is a high direct trust value node. Similarly, a high direct trust value node is more likely to be believed to be a normal node, but it is not certain whether the sending node is still a normal node at this moment, so it will directly enter the message consistency verification.
[0119] Case 3: After calculating the direct trust value and the indirect trust value, it is known that the sending node is a node with a high comprehensive trust value. In order to ensure the security of the target message, message consistency verification is performed.
[0120] The random value hash function follows the following steps when judging the consistency of a message:
[0121] 1. Randomly extract a portion of the message content but not repeat it according to the length of the message being tested for comparison;
[0122] 2. Dynamically determine the information difference tolerance threshold (IDT-Threshold) based on the length of the extracted part;
[0123] 3. Obtain the value of the information difference ID of the message by comparison;
[0124] 4. Determine whether the information difference ID of the message is greater than the information difference tolerance threshold (IDTThreshold);
[0125] 5. If the information difference ID of the message is greater than or equal to the information difference tolerance threshold, the message is judged to be a false message or a tampered message, and the message sender node is recorded and broadcast as a malicious node that sends a false message, and the reputation value R of the node is set to 0; if the information difference ID of the message is less than the information difference tolerance threshold, the message is judged to be a normal message, and the reputation value R of the node remains unchanged.
[0126] In the specific implementation, assuming that the content length of the detected message is L, a part of the message content is randomly extracted for comparison, and the length of the extracted part is S, where S is a random value that satisfies 0<S<L. Then, according to the length S of the extracted part, a function f(LR) value is used to dynamically determine the information difference tolerance threshold IDTThreshold; then determine whether the information difference ID is greater than the preset threshold IDTThreshold, that is, if the information difference ID is greater than or equal to IDTThreshold, it means that the message is reliable, otherwise it is unreliable.
[0127]
[0128] f(LR) = (S × LR);
[0129] Where f is a function whose input is the length S and LR of the extracted part, and whose output is the information difference tolerance threshold IDTThreshold.
[0130] The random value hash function proposed in this embodiment does not compare the message contents one by one, but adopts a method of randomly but non-repetitively extracting part of the content for comparison. This can save the time of message consistency detection to a great extent when the message content is very long, thereby reducing the high-end end-to-end time delay of the message and the network overhead.
[0131] Step S40: If the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message.
[0132] In this embodiment, when the sending node sends the target message to the receiving node, the node type of the sending node and the message type of the target message are determined by the receiving node; if the node type is not an authoritative node and the target message is not an emergency message, the receiving node performs a node reputation check on the sending node to obtain a reputation check result; if the reputation check result indicates that the sending node is not a malicious node, the target message is verified for message consistency based on a random value hash function to obtain a verification result; if the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message. Since this embodiment performs a node reputation check on the sending node when the node type of the sending node is not an authoritative node and the target message is not an emergency message, and then performs a message consistency verification based on a random value hash function, compared to the prior art, this embodiment effectively improves the timeliness and security of data transmission in the vehicle network.
[0133] refer to Figure 3 , Figure 3 Schematic diagram of the flow chart of the second embodiment of the vehicle networking data communication method of the present invention.
[0134] Based on the above first embodiment, in this embodiment, step S20 includes:
[0135] Step S201: If the node type is not an authoritative node and the target message is not an emergency message, it is determined whether there is an interaction record between the receiving node and the sending node.
[0136] It should be noted that if there is no interaction record between the receiving node and the sending node, the indirect trust value of the receiving node to the sending node is calculated by the calculation formula of the indirect trust value; then the comprehensive trust value of the receiving node to the sending node is obtained by a linear combination of the indirect trust value and the direct trust value; if the comprehensive trust value is greater than or equal to the first comprehensive trust confidence, the receiving node requests the neighbor node for a data message with the same ID as the target message. If the neighbor node has this data message, the receiving node uses a random value hash function to verify the data message provided by the neighbor node. If the verification result indicates that the target message is a reliable normal message, the receiving node receives the target message. If the verification result indicates that the target message is an abnormal message, it means that the sending node has tampered with the message. The receiving node refuses to receive the target message and sets the reputation value R of the sending node to 0. At the same time, the receiving node marks and broadcasts the sending node as a malicious node.
[0137] Step S202: If there is an interaction record, check the reputation value of the receiving node to the sending node.
[0138] Step S203: If the reputation value is greater than 0 and less than the reputation value threshold, determine the direct trust value of the receiving node to the sending node.
[0139] It should be noted that if the reputation value is less than or equal to 0, it means that the sending node has deceived the receiving node before, and the receiving node will not receive the target message sent by the sending node at this moment.
[0140] Correspondingly, if the reputation value is greater than or equal to the reputation value threshold, the step of performing message consistency verification on the target message based on the random value hash function to obtain a verification result is executed.
[0141] If the reputation value is greater than or equal to the reputation value threshold, the target message is verified for message consistency based on a random value hash function. In a specific implementation, the receiving node requests a data message with the same ID as the target message from a neighboring node. If the neighboring node has this data message, the receiving node uses a random value hash function to verify the data message provided by the neighboring node. If the verification result indicates that the target message is a reliable normal message, the receiving node receives the target message. If the verification result indicates that the target message is an abnormal message, it indicates that the sending node has tampered with the message. The receiving node refuses to receive the target message and sets the reputation value R of the sending node to 0. At the same time, the receiving node marks and broadcasts the sending node as a malicious node. If the neighboring node of the receiving node has not received this data message, the receiving node receives the target message and sets the reputation value R of the sending node to R-1. It should be noted that the receiving node receives the target message because the reputation value is greater than or equal to the reputation value threshold. The reputation value R-1 of A is because the receiving node cannot verify the target message sent by the sending node, which is an uncertain message.
[0142] Step S204: If the direct trust value is greater than or equal to the direct trust confidence, it means that the reputation detection result is that the sending node is not a malicious node.
[0143] It is understandable that if the direct trust value is greater than or equal to the direct trust confidence, in order to save overhead and time, no indirect trust calculation is performed, which means that the reputation detection result is that the sending node is not a malicious node, and the message consistency verification is directly entered.
[0144] In this embodiment, when a sending node sends a target message to a receiving node, the node type of the sending node and the message type of the target message are determined by the receiving node; if the node type is not an authoritative node and the target message is not an emergency message, it is determined whether there is an interaction record between the receiving node and the sending node; if there is an interaction record, the reputation value of the receiving node for the sending node is checked; if the reputation value is greater than 0 and less than the reputation value threshold, the direct trust value of the receiving node for the sending node is determined; if the direct trust value is greater than or equal to the direct trust confidence, it indicates that the reputation detection result is that the sending node is not a malicious node; if the reputation detection result indicates that the sending node is not a malicious node, the target message is verified for message consistency based on a random value hash function to obtain a verification result; if the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message. In this embodiment, if the node type is not an authoritative node and the target message is not an emergency message, and there is an interaction record between the receiving node and the sending node, the reputation value of the receiving node to the sending node is checked; if the reputation value is greater than 0 and less than the reputation value threshold, the direct trust value of the receiving node to the sending node is determined; if the direct trust value is greater than or equal to the direct trust confidence, it indicates that the sending node is not a malicious node, and then the target message is verified for message consistency based on a random value hash function, which further ensures the timeliness and security of data transmission in the vehicle network.
[0145] refer to Figure 4 , Figure 4 Schematic diagram of the flow chart of the third embodiment of the vehicle networking data communication method of the present invention.
[0146] Based on the above embodiments, in this embodiment, after step S203, the following is further included:
[0147] Step S2031: If the direct trust value is less than the direct trust confidence, the indirect trust value of the receiving node to the sending node is calculated using an indirect trust value calculation formula.
[0148] Step S2032: Determine the comprehensive trust value of the receiving node to the sending node through the direct trust value and the indirect trust value.
[0149] Step S2033: If the comprehensive trust value is greater than or equal to the first comprehensive trust confidence level, it indicates that the reputation detection result is that the sending node is not a malicious node.
[0150] It should be noted that if the reputation detection result shows that the sending node is not a malicious node, the receiving node will request the neighbor node for a data message with the same ID as the target message. If the neighbor node has the data message, the receiving node will use a random value hash function to verify the data message provided by the neighbor node. If the verification result indicates that the target message is a reliable normal message, the receiving node will receive the target message. If the verification result indicates that the target message is an abnormal message, it means that the sending node has tampered with the message. The receiving node will refuse to receive the target message and set the reputation value R of the sending node to 0. At the same time, the receiving node will mark and broadcast the sending node as a malicious node.
[0151] Furthermore, if the neighboring node does not have the data message, it is determined whether the comprehensive trust value is greater than a second comprehensive trust confidence level; if the comprehensive trust value is greater than or equal to the second comprehensive trust confidence level, the receiving node receives the target message and reduces the reputation value of the sending node; if the comprehensive trust value is less than the second comprehensive trust confidence level, the target message is refused to be received and the reputation value of the sending node is reduced.
[0152] This embodiment discloses that if the direct trust value is less than the direct trust confidence, the indirect trust value of the receiving node to the sending node is calculated by the indirect trust value calculation formula; the comprehensive trust value of the receiving node to the sending node is determined by the direct trust value and the indirect trust value; if the comprehensive trust value is greater than or equal to the first comprehensive trust confidence, it means that the reputation detection result is that the sending node is not a malicious node. Since this embodiment determines the comprehensive trust value of the receiving node to the sending node by the direct trust value and the indirect trust value; and determines whether the sending node is a malicious node based on the comprehensive trust value, compared with the prior art, the reliability of node reputation detection is guaranteed.
[0153] In addition, an embodiment of the present invention further proposes a storage medium, on which a vehicle networking data communication program is stored. When the vehicle networking data communication program is executed by a processor, the steps of the vehicle networking data communication method described above are implemented.
[0154] Reference Figure 5 , Figure 5 This is a structural block diagram of the first embodiment of the vehicle networking data communication device of the present invention.
[0155] like Figure 5 As shown, the Internet of Vehicles data communication device proposed in the embodiment of the present invention includes: a type determination module 501, a reputation detection module 502, a message verification module 503 and a result determination module 504.
[0156] The type determination module 501 is used to determine the node type of the sending node and the message type of the target message through the receiving node when the sending node sends the target message to the receiving node.
[0157] The reputation detection module 502 is used to perform node reputation detection on the sending node through the receiving node to obtain a reputation detection result if the node type is not an authoritative node and the target message is not an emergency message.
[0158] The message verification module 503 is configured to perform message consistency verification on the target message based on a random value hash function to obtain a verification result if the reputation detection result indicates that the sending node is not a malicious node.
[0159] The result determination module 504 is configured to, if the verification result indicates that the target message is a reliable and normal message, cause the receiving node to receive and forward the target message.
[0160] The message verification module 503 is also used to request a data message with the same ID as the target message from a neighboring node through the receiving node if the reputation detection result indicates that the sending node is not a malicious node; if the neighboring node has the data message, the target message is verified for message consistency based on a random value hash function and the data message to obtain a verification result.
[0161] The type determination module 501 is further configured to: if the node type of the sending node is an authoritative node or the message type of the target message is an emergency message, the receiving node receives the target message, and the receiving node does not forward the target message.
[0162] When the sending node of the device of this embodiment sends the target message to the receiving node, the node type of the sending node and the message type of the target message are determined through the receiving node; if the node type is not an authoritative node and the target message is not an emergency message, the receiving node performs a node reputation check on the sending node to obtain a reputation check result; if the reputation check result indicates that the sending node is not a malicious node, the target message is verified for message consistency based on a random value hash function to obtain a verification result; if the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message. Since the device of this embodiment performs a node reputation check on the sending node when the node type of the sending node is not an authoritative node and the target message is not an emergency message, and then performs a message consistency verification based on a random value hash function, compared with the prior art, the device of this embodiment effectively improves the timeliness and security of data transmission in the vehicle network.
[0163] Based on the above-mentioned first embodiment of the vehicle networking data communication device of the present invention, a second embodiment of the vehicle networking data communication device of the present invention is proposed.
[0164] In this embodiment, the reputation detection module 502 is also used to determine whether there is an interaction record between the receiving node and the sending node if the node type is not an authoritative node and the target message is not an emergency message; if there is an interaction record, check the reputation value of the receiving node for the sending node; if the reputation value is greater than 0 and less than the reputation value threshold, determine the direct trust value of the receiving node for the sending node; if the direct trust value is greater than or equal to the direct trust confidence, it means that the reputation detection result is that the sending node is not a malicious node;
[0165] The reputation detection module 502 is further configured to cause the receiving node to refuse to receive the target message if the reputation value is less than or equal to 0.
[0166] The reputation detection module 502 is further configured to execute the step of performing message consistency verification on the target message based on a random value hash function to obtain a verification result if the reputation value is greater than or equal to a reputation value threshold.
[0167] Other embodiments or specific implementations of the vehicle networking data communication device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.
[0168] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0169] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0171] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A vehicle network data communication method, characterized in that: The method includes: When the sending node sends the target message to the receiving node, determining the node type of the sending node and the message type of the target message through the receiving node; If the node type is not an authoritative node and the target message is not an emergency message, performing a node reputation check on the sending node through the receiving node to obtain a reputation check result; If the reputation detection result indicates that the sending node is not a malicious node, performing message consistency verification on the target message based on a random value hash function to obtain a verification result; If the verification result indicates that the target message is a reliable normal message, the receiving node receives and forwards the target message.
2. The vehicle networking data communication method according to claim 1, characterized in that: If the node type is not an authoritative node and the target message is not an emergency message, the step of performing node reputation detection on the sending node by the receiving node to obtain a reputation detection result includes: If the node type is not an authoritative node and the target message is not an emergency message, determining whether there is an interaction record between the receiving node and the sending node; If there is an interaction record, checking the reputation value of the receiving node to the sending node; If the reputation value is greater than 0 and less than a reputation value threshold, determining a direct trust value of the receiving node to the sending node; If the direct trust value is greater than or equal to the direct trust confidence, it means that the reputation detection result is that the sending node is not a malicious node.
3. The vehicle networking data communication method according to claim 2, characterized in that: After the step of determining the direct trust value of the receiving node to the sending node if the reputation value is greater than 0 and less than the reputation value threshold, the method further includes: If the direct trust value is less than the direct trust confidence, then calculating the indirect trust value of the receiving node to the sending node using an indirect trust value calculation formula; Determine a comprehensive trust value of the receiving node to the sending node through the direct trust value and the indirect trust value; If the comprehensive trust value is greater than or equal to the first comprehensive trust confidence level, it indicates that the reputation detection result is that the sending node is not a malicious node; Correspondingly, if the node type is not an authoritative node and the target message is not an emergency message, after the step of determining whether there is an interaction record between the receiving node and the sending node, the method further includes: If there is no interaction record, the step of calculating the indirect trust value of the receiving node to the sending node by using the indirect trust value calculation formula is performed.
4. The vehicle networking data communication method according to claim 2, characterized in that: After the step of checking the reputation value of the receiving node to the sending node if there is an interaction record, the method further includes: If the reputation value is less than or equal to 0, the receiving node refuses to receive the target message; Correspondingly, after the step of checking the reputation value of the receiving node to the sending node if there is an interaction record, the step further includes: If the reputation value is greater than or equal to the reputation value threshold, the step of performing message consistency verification on the target message based on the random value hash function to obtain a verification result is executed.
5. The vehicle networking data communication method according to claim 1, characterized in that: If the reputation detection result indicates that the sending node is not a malicious node, the step of performing message consistency verification on the target message based on a random value hash function to obtain a verification result includes: If the reputation detection result indicates that the sending node is not a malicious node, requesting a data message having the same ID as the target message from a neighboring node through the receiving node; If the neighboring node has the data message, the target message is verified for message consistency based on a random value hash function and the data message to obtain a verification result.
6. The vehicle networking data communication method according to claim 3, characterized in that: After the step of: if the comprehensive trust value is greater than or equal to the first comprehensive trust confidence, indicating that the reputation detection result is that the sending node is not a malicious node, the step further includes: Requesting, through the receiving node, a neighboring node for a data message having the same ID as the target message; If the neighboring node does not have the data message, determining whether the comprehensive trust value is greater than a second comprehensive trust confidence level; If the comprehensive trust value is greater than or equal to the second comprehensive trust confidence level, the receiving node receives the target message and reduces the reputation value of the sending node; If the comprehensive trust value is less than the second comprehensive trust confidence level, the target message is rejected and the reputation value of the sending node is reduced.
7. The vehicle networking data communication method according to any one of claims 1 to 6, characterized in that: After the step of determining the node type of the sending node and the message type of the target message by the receiving node, the method further includes: If the node type of the sending node is an authoritative node or the message type of the target message is an emergency message, the receiving node receives the target message, and the receiving node does not forward the target message.
8. A vehicle network data communication device, characterized in that: The device comprises: A type determination module, used for determining the node type of the sending node and the message type of the target message through the receiving node when the sending node sends the target message to the receiving node; A reputation detection module, configured to, if the node type is not an authoritative node and the target message is not an emergency message, perform a node reputation detection on the sending node through the receiving node to obtain a reputation detection result; A message verification module, configured to perform message consistency verification on the target message based on a random value hash function to obtain a verification result if the reputation detection result indicates that the sending node is not a malicious node; The result determination module is configured to, if the verification result indicates that the target message is a reliable and normal message, cause the receiving node to receive and forward the target message.
9. A vehicle networking data communication device, characterized in that: The device includes: a memory, a processor, and a vehicle networking data communication program stored in the memory and executable on the processor, wherein the vehicle networking data communication program is configured to implement the steps of the vehicle networking data communication method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a vehicle networking data communication program, and when the vehicle networking data communication program is executed by the processor, the steps of the vehicle networking data communication method according to any one of claims 1 to 7 are implemented.
