Secure communication method for V2V in vehicle ad hoc network

By employing secure communication methods based on UWB technology, the problems of resource scheduling and security protection in vehicle ad hoc networks are solved, achieving efficient node authentication and data encryption, improving spectrum utilization and positioning accuracy, and meeting the real-time and security requirements of vehicle ad hoc networks.

CN121126344APending Publication Date: 2025-12-12CHENGDU UNIV OF INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511319568.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing UWB technology has weak resource scheduling capabilities in vehicle ad hoc networks and lacks effective security protection mechanisms, making it difficult to meet the needs of highly dynamic networking and secure communication.

Method used

By adopting a UWB-based secure communication method, a dynamic vehicle network system is constructed through the association mapping of physical features and digital identities, token mechanism authentication, multi-level clock synchronization and channel resource allocation, elliptic curve cryptography and device ID authentication to achieve node authentication and data encryption.

Benefits of technology

It improves spectrum utilization, reduces average latency, meets the real-time, stability and security requirements of high-dynamic V2V scenarios, and achieves centimeter-level positioning accuracy and secure communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121126344A_ABST
    Figure CN121126344A_ABST
Patent Text Reader

Abstract

The invention discloses a secure communication method for a V2V in a vehicle ad hoc network, and relates to the technical field of communication security, and the method comprises the steps: S1, building an association mapping relation between a physical feature and a digital identity; s2, authenticating the association mapping relation between the physical characteristics and the digital identities; s3, acquiring neighbor nodes of the node passing the authentication through a UWB broadcast mechanism, and establishing a routing table; s4, the receiver node scores the candidate declaration frames of all the nodes, selects a V2V network master control node, and constructs an autonomous cluster network based on the master control node; s5, generating a time reference of the internal nodes of the ad hoc network system during the networking period based on the master control node, and dividing time slots and channel resources in the ad hoc network; and S6, performing data encryption and secure communication based on elliptic curve cryptography and equipment ID authentication. According to the application, three core requirements of real-time performance, stability and safety can be met at the same time in a high-dynamic V2V scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication security technology, and in particular to a secure V2V communication method in a vehicle ad hoc network. Background Technology

[0002] Ultra-Wideband (UWB) is a wireless communication technology based on ultra-wideband spectrum transmission. Its main characteristic is the use of nanosecond-level extremely narrow pulses to achieve data transmission at the physical layer, offering advantages such as strong anti-interference capabilities, high positioning accuracy, and superior time-domain resolution. Compared to traditional wireless communication methods (such as Wi-Fi and Bluetooth), UWB requires no carrier modulation, has a moderate signal coverage distance, and can achieve centimeter-level accurate ranging and positioning capabilities, making it particularly suitable for short-range communication in highly dynamic scenarios.

[0003] In recent years, UWB has been gradually applied to consumer-grade terminal products, such as anti-loss functions in smartphones and keyless entry systems (UWB smart keys) in high-end cars. However, with its further expansion into complex and dynamic environments, such as vehicle-to-everything (V2X) networks, robot swarms, and indoor navigation systems, its original design architecture has revealed significant shortcomings, specifically: First, resource scheduling capabilities are weak. In practical applications, multiple UWB devices need to access the shared channel simultaneously, resulting in significant channel contention. Traditional static channel allocation strategies cannot dynamically adapt to the changing states of mobile nodes such as vehicles, easily leading to low-speed nodes occupying too many resources, while high-speed nodes, due to rapid location changes, cannot obtain sufficient communication opportunities. Ultimately, this results in problems such as decreased overall system spectrum utilization, increased data transmission latency, and reduced positioning frequency.

[0004] Second, there is a lack of effective security protection mechanisms. Traditional UWB systems were not adequately designed with physical layer security in mind, particularly lacking the ability to defend against relay attacks and replay attacks. Attackers only need to intercept encrypted data frames from legitimate nodes to bypass upper-layer authentication using replay mechanisms, thereby illegally accessing the network or impersonating individuals to carry out security threats such as data eavesdropping and interference. These problems are particularly prominent in the highly open and frequently changing vehicle-to-everything (V2X) scenarios.

[0005] To address the aforementioned issues, while traditional solutions employ resource allocation mechanisms based on time slot partitioning, they lack specific design considerations for factors such as node mobility, network dynamism, and communication security, making it difficult to effectively meet the network security communication needs of vehicular networks.

[0006] In summary, there is an urgent need to design a secure V2V communication method for vehicle ad hoc networks, which can simultaneously balance highly dynamic networking and secure communication mechanisms, enabling efficient resource scheduling and reliable communication link assurance, thereby meeting the complex needs of future vehicle ad hoc networks in mobile communication, positioning synchronization, security authentication, and other aspects. Summary of the Invention

[0007] The purpose of this application is to provide a secure V2V communication method in vehicle ad hoc networks. Addressing the requirements of orderliness, controllability, and high reliability in vehicle ad hoc network communication, it constructs a UWB-based dynamic vehicle network system that integrates data transmission and high-precision positioning, providing a secure and efficient communication solution for multi-vehicle collaboration in intelligent driving scenarios. To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a secure V2V communication method in a vehicle ad hoc network, the method comprising: S1. Generate a complete digital identity based on user information and establish a mapping relationship between physical characteristics and digital identity; S2. The remote authentication process based on the token mechanism authenticates the association mapping relationship between physical characteristics and digital identity, and obtains the authenticated node; S3. Obtain the neighbor nodes of the authenticated nodes through the UWB broadcast mechanism and establish a routing table; S4. The receiving node scores the candidate frames of all nodes to generate the master node, and builds a cluster network based on the master node; S5. Based on the master control node, generate the time base for the nodes inside the self-organizing network system during the networking period, and divide the time slots and channel resources within the self-organizing network; S6. Data encryption and secure communication based on elliptic curve cryptography and device ID authentication.

[0008] Optionally, establishing the association mapping relationship between physical characteristics and digital identity in S1 specifically includes: S11. Obtain user registration information and UWB module hardware information; S12. Verify the validity of the user registration information and the UWB module hardware information; S13. Generate corresponding public and private keys based on the validity of user registration information and UWB module hardware information, and encapsulate the relevant configuration information to obtain encapsulated configuration information; S14. The registration platform sends the packaged configuration information to the user through a secure channel; S15. After receiving the packaged configuration information, the user writes it into the security chip HSM (Hardware Security Module). S16. The registration platform records and binds the physical fingerprint information of the device, establishing a mapping between physical characteristics and digital identity; S17. The device obtains a complete digital identity, providing proof of identity for subsequent access to the V2V network system.

[0009] Optionally, the remote authentication process based on the token mechanism in S2, which authenticates the association between physical features and digital identities and obtains authenticated nodes, further includes: S21. When a node starts up for the first time, it actively connects to the cloud registration platform and submits an identity information data packet; S22. The cloud performs a consistency check between the identity information data packet and the data in the database. If the consistency check passes, an authentication token for the current node is generated. The authentication token is encrypted and signed using the node's Device_ID. S23. Save the authentication token returned from the cloud through the local security module; S24. Mark the node's local state as "authentication passed" and use the token for broadcasting during the neighbor discovery authentication process.

[0010] Optionally, step S3, which involves obtaining the neighbor nodes of the authenticated node through the UWB broadcast mechanism and establishing a routing table, further includes: S31. For nodes that have passed authentication, a neighbor discovery frame is broadcast via UWB; S32. The current node forms an initial neighbor table by recording neighbor information; S33. A node obtains multiple neighboring nodes through broadcasting, updates its routing table based on neighbor discovery frames from these neighboring nodes, and obtains the master node based on the information in the routing table. S34. After the master node completes the node legitimacy verification, it updates the local routing table and broadcasts a network formation success frame.

[0011] Optionally, in step S4, the receiving node scores the candidate frames of all nodes to generate a master control node, and a cluster network is constructed based on the master control node, which further includes: S41. After each node starts up, it enters the "candidate master control state" and broadcasts the master control candidate declaration frame in the control time slot; S42. The receiver node performs the following scoring function on all candidate frames: Score =α× Neighbors +β×RSSI_avg -Y×CPU_Load; Where Neighbors is the number of neighboring nodes; RSSI_avg is the average channel quality between the receiver node and other nodes; CPU_Load is the current node load; α is the weighting coefficient for the number of neighboring nodes, β is the weighting coefficient for the average channel quality, and γ is the weighting coefficient for the current node load. S43. Each node obtains its own judgment result by comparing the current node's score with that of all candidate frames. If the current node has the highest score, it is set to master node mode (MN); otherwise, it is set to normal node mode (ON) and waits for allocation. S44. The master node broadcasts a master control confirmation frame in the synchronization time slot. After receiving the frame, other nodes lock onto it as the master node and establish a cluster network.

[0012] Optionally, S5 also includes generating a time base for nodes within the ad hoc network system based on the master control node during network formation, and allocating time slots and channel resources within the ad hoc network. Clock synchronization mechanism: Multi-level clock synchronization is adopted. The master node broadcasts a synchronization frame with a timestamp, and ordinary nodes receive it and correct their local clocks by combining it with TOF ranging information. Time slot allocation: Based on the superframe period, four types of time slots are obtained: synchronization time slot, control time slot, data time slot, and flexible time slot; Time slot allocation strategy: The master node allocates time slots based on a dynamic allocation strategy using Device_ID; Elasticity mechanism: Based on the comparison between the number of nodes and the maximum allocable capacity, the master node generates an elastic time slot allocation strategy.

[0013] Optionally, S6 also includes elliptic curve cryptography and device ID authentication for data encryption and secure communication, further comprising: S61. After a node joins the vehicle ad hoc network and completes identity authentication, the master node allocates communication data time slots to the current node; S62. A shared session key is generated using the ECC elliptic curve cryptography algorithm; S63. Use the AES-128-GCM algorithm to encrypt business data; S64. Construct a data frame by encapsulating the encrypted data according to a fixed format; S65. The receiving node receives the data frame and decrypts and verifies it.

[0014] According to the secure V2V communication method in a vehicle ad hoc network provided in this application, this application has the following technical effects: This application provides a secure V2V communication method in vehicle ad hoc networks. The invention comprehensively utilizes physical layer two-factor authentication based on UWB time-of-flight and spectral fingerprinting, combined with ECC lightweight key negotiation and AES-GCM encryption, to achieve highly reliable verification of node identities and protection of the confidentiality and integrity of communication data in high-speed V2V networks. It employs a TDMA dynamic time slot allocation mechanism with multi-level clock synchronization and centralized scheduling of the master node, improving spectrum utilization by approximately 30%–45% and reducing average latency by approximately 25% compared to existing static allocation methods or contention backoff mechanisms. The designed rapid master node election and flexible time slot emergency mechanism can quickly complete network reconstruction and high-priority information transmission in situations involving high-speed node movement, frequent topology changes, and unexpected events. This method simultaneously addresses centimeter-level positioning accuracy and secure communication requirements, meeting the three core requirements of real-time performance, stability, and security in highly dynamic V2V scenarios. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of a secure V2V communication method in a vehicle ad hoc network according to an embodiment of this application; Figure 2 This is a diagram of a V2V vehicle clustering network system structure, illustrating a secure V2V communication method in a vehicle ad hoc network according to an embodiment of this application. Figure 3 This is a schematic diagram of the four-level time slot structure and allocation of a secure V2V communication method in a vehicle ad hoc network according to an embodiment of this application. Figure 4 This is a timing diagram of node time slot allocation for a secure V2V communication method in a vehicle ad hoc network according to an embodiment of this application; Figure 5 This is a schematic diagram of the frame structure in a secure V2V communication method in a vehicle ad hoc network according to an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] like Figure 1 As shown in the embodiment of this application, a secure V2V communication method in a vehicle ad hoc network is provided, the method comprising: S1. Generate a complete digital identity based on user information and establish a mapping relationship between physical characteristics and digital identity; S2. The remote authentication process based on the token mechanism authenticates the association mapping relationship between physical characteristics and digital identity, and obtains the nodes that have passed authentication; S3. Obtain the neighbor nodes of the authenticated nodes through the UWB broadcast mechanism and establish a routing table; S4. The receiving node scores the candidate frames of all nodes to generate the master node, and builds a cluster network based on the master node; S5. Employs a multi-level clock synchronization and node dynamic correction mechanism to generate a time base for nodes within the self-organizing network system during the networking process; S6. Data encryption and secure communication based on elliptic curve cryptography and device ID authentication.

[0020] Optionally, establishing the association mapping relationship between physical characteristics and digital identity in S1 specifically includes: S11. Obtain user registration information and UWB module hardware information; Specifically, the user initiates a registration application: The user fills in the basic information of the device on the registration platform provided by the manufacturer, submits the hardware-related information of the UWB module, and prepares to receive the factory configuration; S12. Verify the validity of the user registration information and the UWB module hardware information; Specifically, the registration platform processes applications by verifying the validity of the user's identity and device information, and generating a globally unique identifier (ID) for the UWB module. The device ID is a hexadecimal random number. "device_id":"0x1a2b"; S13. Generate corresponding public and private keys based on the validity of user registration information and UWB module hardware information, and encapsulate the relevant configuration information to obtain encapsulated configuration information; Specifically, the process involves generating corresponding public and private key pairs: Securely encapsulating relevant configuration information and preparing for the distribution of public and private keys. Private key PrivKey: A randomly generated 256-bit integer; Public key PubKey: generated from the private key using elliptic curve dot multiplication; fromcryptography.hazmat.primitives.asymmetricimportec fromcryptography.hazmat.primitivesimportserialization # Generate ECC key pair private_key=ec.generate_private_key(ec.SECP256R1()) #print(private_key) public_key=private_key.public_key() # Serialize to DER format pub_key_der=public_key.public_bytes( encoding=serialization.Encoding.DER, format=serialization.PublicFormat.SubjectPublicKeyInfo ) print(pub_key_der.hex()) # Output the DER encoding of the public key; S14. The registration platform sends the packaged configuration information to the user through a secure channel; Specifically, security credentials are issued as follows: The registration platform sends the following information to the user through a secure channel: the unique identifier (ID) of the UWB module, public and private keys and physical fingerprint, and relevant configuration parameters; S15. After receiving the information, the user writes the encapsulated configuration information into the security chip HSM (hardware security module). Specifically, the security chip stores: after receiving the information, the user writes all identity files into the security chip HSM (hardware security module). The HSM provides hardware-level security to prevent key leakage. S16. The registration platform records and binds the physical fingerprint information of the device, establishing a mapping between physical characteristics and digital identity; Specifically, physical fingerprint generation: #data=device_id.encode()+tof.to_bytes(4,'big')+psf.tobytes()[:32] defgenerate_fingerprint(): tof=measure_uwb_tof(reference=Factory_Base_Station) # The tof of the factory base station measurement for each UWB varies slightly; psf=capture_psd_spectrum() # Capture frequency domain features; returnhmac_sha256(ID+tof.to_bytes(4,'big')+psf[:32]); S17. The device obtains a complete digital identity, providing proof of identity for subsequent access to the V2V network system, such as... Figure 2 As shown.

[0021] Specifically, upon completion of registration, the device acquires a complete digital identity and can securely access subsequent V2V network systems, which have the ability to track disputes based on physical characteristics.

[0022] Optionally, the remote authentication process based on the token mechanism in S2, which authenticates the association mapping relationship between physical features and digital identities and obtains authenticated nodes, further includes: Specifically, to ensure that vehicle nodes have a legitimate identity before joining the UWB self-organizing network and to prevent the addition of disguised or forged devices, this invention proposes a remote authentication process based on a token mechanism. The authentication process is completed in the cloud, and the authentication result is stored locally on the node in the form of a token.

[0023] S21. When a node starts up for the first time, it actively connects to the cloud registration platform and submits an identity information data packet; specifically, when a node starts up for the first time, it actively connects to the cloud registration platform and submits identity information, including the Device_ID and the 256-bit string data generated in step 6 by encrypting the node's public key; S22. The cloud performs a consistency check between the identity information data packet and the data in the database. If the consistency check passes, an authentication token for the current node is generated. The authentication token is encrypted and signed using the node's Device_ID. Specifically, the cloud uses the Device_ID of the data packet to query the node's private key, decrypts the physical fingerprint of the data packet, and compares it with the data stored in the database. If they match, an authentication token for the node is generated. This token is encrypted and signed using the node's Device_ID; the format is shown in Table 1. Table 1: Example Table of Tokens

[0024] S23. Save the authentication token returned from the cloud through the local security module; Specifically, the cloud returns a token and sends it to the node, which stores it in its local security module for subsequent authentication or for rapid authentication in offline situations. S24. Mark the node's local state as "authentication passed" and use the token for broadcasting during the neighbor discovery authentication process.

[0025] Specifically, the node's local state is marked as "authentication passed", and the token is used for broadcasting during the neighbor discovery authentication process.

[0026] Optionally, step S3, which involves obtaining the neighbor nodes of the authenticated node through the UWB broadcast mechanism and establishing a routing table, further includes: S31. For nodes that have passed authentication, a neighbor discovery frame is broadcast via UWB; Specifically, after authentication is complete, the node broadcasts a neighbor discovery frame via UWB, the content of which includes: The device_ID and its own public key (PubKey) are encapsulated in a format consisting of a PHY header, a MAC header, a payload, and a checksum (FCS). This invention designs the authentication data packet to use the payload segment as the carrier, encapsulating the Device_ID and its own public key (PubKey). S32. The current node forms an initial neighbor table by recording neighbor information; Specifically, nodes record neighbor information to form an initial neighbor table, as shown in Table 2: Table 2 Neighbor Routing Table Design Table

[0027] This neighbor table includes fields such as neighbor ID, public key, signal strength, authentication token, and authentication status. S33. A node obtains multiple neighboring nodes through broadcasting, updates its routing table based on neighbor discovery frames from these neighboring nodes, and obtains the master node based on the information in the routing table. Specifically, after a node continuously broadcasts, its routing table is updated (as the number of neighboring nodes increases), and then... In the election of the master node, ON selects the neighbor with the best signal quality as the master node (MN) candidate. ON uses the public key of the node with the best signal quality to encrypt its own token into a frame and sends it to the candidate master node. The candidate master node and ON complete mutual identity authentication (the candidate node completes the comparison and verification on the cloud identity authentication platform) and can then be elected as the master node. S34. After the master node completes the node legitimacy verification, it updates the local routing table and broadcasts a network formation success frame.

[0028] Optionally, in step S4, the receiving node scores the candidate frames of all nodes to generate a master control node, and a cluster network is constructed based on the master control node, which further includes: S41. After each node starts up, it enters the "candidate master state" and broadcasts a master candidate declaration frame (MN_Candidate_Announce) in the control time slot, carrying the following fields: Device_ID (unique identifier of the node), number of neighbors (obtained by local scanning), and average signal strength RSSI (average of the last 5 broadcast receptions).

[0029] S42. The receiver node performs the following scoring function on all candidate frames: Score=α×Neighbors+β×RSSI_avg-Y×CPU_Load; Where Neighbors is the number of neighboring nodes; RSSI_avg is the average channel quality between the receiver node and other nodes; CPU_Load is the current node load; α is the weighting coefficient for the number of neighboring nodes, β is the weighting coefficient for the average channel quality, and γ is the weighting coefficient for the current node load. S43. Each node obtains its own judgment result by comparing the current node's score with that of all candidate frames. If the current node has the highest score, it is set to master node mode (MN); otherwise, it is set to normal node mode (ON) and waits for allocation. To determine whether a node has won, each node compares itself with the received candidate scores: if its score is the highest, it enters the master node mode (MN); otherwise, it enters the normal node mode (ON) and waits for allocation. S44. The master node broadcasts a master control confirmation frame (MN_Confirm) in the synchronization time slot. After receiving the frame, other nodes lock it as the master node and establish a cluster network.

[0030] Optionally, in S5, the master control node generates the time base for nodes within the ad hoc network system during network formation and allocates time slots and channel resources within the ad hoc network; it also includes: Specifically, to ensure the communication stability and resource utilization efficiency of nodes in a UWB vehicle ad hoc network in a mobile environment, this invention proposes a clock synchronization and time slot allocation mechanism centrally managed by a master control node (MN). This mechanism includes clock synchronization control, clustered node management, four-level time slot structure partitioning, time slot allocation and reclamation strategies, and elastic control mechanisms, and is suitable for dynamic TDMA scheduling environments.

[0031] In dynamic vehicle-to-everything (V2X) networks, UWB positioning systems have extremely high requirements for time measurement. A time error of 1 ns can lead to a positioning error of approximately 30 cm. Therefore, the system clock synchronization mechanism must be accurate and reliable. Common wired synchronization methods (where all UWB modules use the same table (synchronization controller), and the synchronization controllers are connected together via wires to ensure that each UWB module is in the same time system, achieving clock synchronization) are not suitable for temporary V2X network setups. Therefore, this invention adopts a multi-level clock synchronization and node dynamic correction mechanism to ensure that nodes within the self-organizing network system operate on the same time reference during network setup.

[0032] The core structure of the multi-level clock synchronization and node dynamic correction mechanism proposed in this invention is as follows: Primary clock source: from global time bases such as BeiDou satellites and GPS; Secondary master control node: It has satellite receiving capability or is assisted by roadside unit (RSU) for time synchronization, and serves as the time reference source within the cluster; Level 3 anchor point / ordinary node: Time-of-Flight ranging and local clock correction are performed through timestamp frames broadcast periodically by the master node.

[0033] The master control node adopts a timestamp-based wireless synchronization mechanism, which broadcasts a synchronization frame with a timestamp. After receiving the synchronization signal, each node combines the local reception time and TOF ranging information to correct the local clock offset, thus ensuring the timing consistency of TDMA scheduling.

[0034] The master node is also responsible for the unified scheduling and time slot management of members within the vehicle cluster, including dynamic time slot allocation, conflict control, and emergency resource scheduling.

[0035] Clock synchronization mechanism: Multi-level clock synchronization is adopted. The master node broadcasts a synchronization frame with a timestamp, and ordinary nodes receive it and correct their local clocks by combining it with TOF ranging information. Time slot allocation: Based on the superframe period, four types of time slots are obtained: synchronization time slots, control time slots, data time slots, and flexible time slots, such as... Figure 3 As shown; 1. Synchronization Time Slot: The master node broadcasts a self-organizing network time synchronization signal, which is fixed in position and only available to the MN; 2. Control time slots: used for node application for network access, exit announcements, and authentication status reports; MN scheduling takes priority. 3. Data time slots: used for data communication between nodes, dynamically allocated; 4. Flexible time slots: Reserved for emergencies, abnormal communications, and broadcast security alarms. They are only temporarily activated in special scenarios and are given priority to RSUs or high-risk nodes.

[0036] This invention adopts the 127-byte frame structure in the IEEE 802.15.4 UWB standard. The transmission time of a 127-byte data frame at a rate of 6.8 Mbps is approximately 0.015 seconds. The relevant calculation basis is as follows: Maximum frame length: 128B = 128Byte × 8 = 1024 bits; Transmission rate: 6.8Mbps; Sending time: ; That is, it takes about 0.15 milliseconds to send 128 bytes of frame data; plus the TDOA positioning calculation time, assuming the positioning calculation time is 2ms; (This can be replaced with actual values), then the total time occupied by each node is: Tslot = 0.15ms + 2ms ≈ 2.15ms; Taking into account factors such as signal flight time and data frame error detection time, the present invention sets a 20ms time slot as the channel time width and a 1-second duration as the superframe period, resulting in a total of 50 communication time slots. These time slots are divided according to the four types mentioned above, with 5 synchronization time slots, 5 control time slots, 35 data time slots, and 5 flexible time slots. This ensures that reliable communication between multiple nodes is completed as much as possible within one superframe period, as shown in Table 3.

[0037] Table 3 Dynamic Time Slot Allocation Table

[0038] The superframe period is 1000ms, with 50 time slots and a single time slot of 20ms; slots 0-4 are synchronization time slots, slots 5-9 are control time slots, slots 10-44 are data time slots, and slots 45-49 are flexible time slots; the start time of each time slot is listed (Table 4 below shows a partial list), and the table also provides the time slot type and example allocation (leave blank if there is no specific node, so that MN can fill it in later).

[0039] Table 4 Time Slot Allocation and Scheduling (Unit: ms)

[0040] During the synchronization time slot, the master node (MN) broadcasts a synchronization frame, the structure of which is shown in Table 5 below: Table 5. Examples of Synchronization Frames

[0041] MN starts broadcasting the frame at the beginning of the "synchronization time slot", and all ONs in the cluster receive the frame and immediately record the reception time T_receive_local; The ON calculates the round-trip time difference (TOF). Each ON records the following two time points: the local time when receiving the MN synchronization frame (T_receive_local) and the MN timestamp carried in the frame (T_send_from_MN). Then, the initial time difference Δt is calculated. △t_raw=T_receive_local-T_send_from_MN; (First, correct) Local clock correction calculation (executed by ON). ON calculates the correction amount based on Δt_raw and distance compensation Δtof: △tof = Distance / c, where c is the speed of light, in m / s → ns; △clock = △t_raw - △tof; Perform local clock correction: Local_Clock=Local_Clock-△clock; The ON node stores the correction value in the "clock drift buffer" for calibration of subsequent frame transmissions. By default, TOF synchronization is performed once every 1 second. If the node's consecutive Δclock error is too large (e.g., >500ns) within a short period of time, the MN can broadcast a forced clock recalibration frame. ON replies to MN with a ranging response frame, the frame structure of which is as follows (TOF_Sync_Reply); Table 6. Examples of Synchronization Response Frames

[0042] After receiving the frame, the MN can calculate the RTT estimated distance between itself and the node, which can further eliminate the influence of propagation time.

[0043] Time slot allocation strategy: The master node allocates time slots based on a dynamic allocation strategy using Device_ID; To enable the master node to allocate time slots and manage conflicts among cluster members, the system designs a dynamic allocation strategy based on Device_ID, the specific process of which is as follows: After a node joins the network, the MN records its Device_ID and adds it to the local cluster member table, as shown in Table 7 below: Table 7 Example of Member Table Records

[0044] The channel allocation is based on the above time slot allocation design table (each communication time slot is 20ms; each superframe period is 1000ms; 5 synchronization time slots (first 0-100ms); 5 control time slots (100-200ms); 35 data time slots (200-900ms); 5 elastic time slots (900-1000ms)) to achieve dynamic resource allocation for new access nodes.

[0045] This invention designs a resource scheduling mechanism based on fixed data time slot length and sequential allocation. The master node (MN) allocates time slots according to the current network load, following these steps: Each node occupies one data time slot with a fixed length of 20ms; Data time slots are numbered sequentially starting from the 11th time slot (200ms) of the superframe period; The maximum number of nodes that can be supported is 35, that is, from the 11th time slot (200ms) to the 45th time slot (900ms); Allocation algorithm logic (example code representation): defallocate_slot(new_device_id): #Basic Time Configuration data_slot_start_base=200 # Data slot start time (ms) slot_length=20 # Duration of each data slot (ms) max_slots=35 # Maximum number of data slots ifn_allocated_nodes <max_slots: next_slot_index=n_allocated_nodes start_time=data_slot_start_base+next_slot_index*slot_length slot_assignment={ 'Device_ID':new_device_id, 'Start_Time':start_time, 'Length':slot_length, 'Priority':0 # Default is normal priority } n_allocated_nodes += 1 returnslot_assignment else: returnNone# All time slots have been allocated Time slot allocation example: Node addition order Device_ID Slot range (ms) Status 1OxA1B2200-220ms has been allocated; 20x3F4C220-240ms has been allocated; ... 350x8D7E880-900ms has been allocated; Elasticity mechanism: Based on the comparison between the number of nodes and the maximum allocable capacity, the master node generates an elastic time slot allocation strategy.

[0046] When data time slots are fully allocated or the current node density is too high to exceed the communication capacity, frequency-based networking is triggered when any of the following conditions are met (according to the "Interim Provisions on Radio Management of Ultra-Wideband (UWB) Equipment" issued by the Ministry of Industry and Information Technology, the operating frequency range of UWB equipment is 7163-8812MHz, which allows adjacent areas of the vehicle terminal to form a structure similar to a wireless cellular network, with adjacent areas using different frequencies for networking, provided that the UWB terminal supports multiple frequency bands): 1. All data time slots have been allocated (e.g., all 35 data time slots have been used up); 2. The number of active nodes within the cluster exceeds a threshold (e.g., >35), and new nodes are unable to communicate temporarily in elastic time slots; 3. Channel congestion or collision rate exceeds the threshold; After being triggered, the current master node (MN) decides whether to temporarily use the elastic time slot buffer or initiate frequency-division networking within the current clustered network, splitting the current cluster into several sub-clusters, with each sub-cluster using a different frequency sub-channel or frequency band.

[0047] Within the control time slot, the MN informs all nodes of the time slot allocation results by broadcasting a "Slot AssignFrame". The frame fields are shown in Table 8. Table 8 Example of Broadcast Time Slot Allocation Results

[0048] Example configuration frame: Frame_Type = 0xA1 Slot_Cycle_ID = 0x0045 Node_Count = 2 Allocation[0]={Device_ID:0xA1B2,Start_Time:55,Length:10,Priority:0}; Allocation[1]={Device_ID:0x3F4C,Start_Time:65,Length:10,Priority:1}; If a node leaves the network or goes offline, the MN will reclaim its time slot in the next cycle, either by temporarily reserving it or by reallocating it to a newly joined node. Figure 4 As shown.

[0049] To adapt to dynamic network changes and unforeseen events, the system incorporates a resilience mechanism. If the number of nodes exceeds the maximum allocable capacity (e.g., >35), the MN can broadcast a network access suspension command; if channel conflicts are detected, the system prioritizes reserving higher-priority nodes. Resilient time slots will be temporarily allocated, primarily for the following scenarios: a. Broadcasting high-priority messages such as vehicle emergency avoidance and collision warnings; b. Request to rebuild communication after interruption; c. The master control node is switched over, and the system is temporarily reorganized.

[0050] The elastic slot is configured and notified using a separate frame structure, "Emergency_Slot_Frame," with the following fields as shown in Table 9: Table 9 Example diagram of flexible time slot frames

[0051] Through the above mechanism, the master control node achieves precise scheduling and unified clock management of all nodes in the vehicle-mounted UWB network, ensuring that the system has good synchronization, real-time performance and security in high-speed mobile environments.

[0052] Optionally, S6 also includes data encryption and secure communication based on elliptic curve cryptography and device ID authentication, as well as: This invention proposes a lightweight secure communication scheme based on elliptic curve cryptography (ECC) and device ID authentication, specifically designed for the high dynamism, low latency, and security requirements of vehicle ad hoc networks.

[0053] S61. After a node joins the vehicle ad hoc network and completes identity authentication, the master node allocates communication data time slots to the current node; After a node joins the vehicle ad hoc network and completes authentication, the master node (MN) allocates a communication data time slot for it. This time slot is unique to the node and is used for secure communication, including key negotiation, data transmission, and reception. S62. A shared session key is generated using the ECC elliptic curve cryptography algorithm; Lightweight key negotiation based on ECC requires each node to complete a lightweight key negotiation process with the target node before the initial communication. This system uses the ECC elliptic curve cryptography algorithm to generate the shared session key, and the specific process is as follows: 1) Node A and Node B each generate their own ECC private key and public key; 2) Node A sends its public key, along with its Device_ID, to Node B within its data time slot; 3) After receiving the data, Node B verifies the validity of the Device_ID (by comparing it with the neighbor table or Token cache); 4) Node B replies with its ECC public key and its own Device_ID; 5). Both parties use the ECDH (Elliptic Curve Diffie-Hellman) algorithm to generate a shared session key SK_AB (SK_AB = ECDH(Priv_A, Pub_B) = ECDH(Priv_B, Pub_A)). Furthermore, the session key is bound to the device IDs of both parties to prevent man-in-the-middle forgery: Final_Key=HMAC(SK_AB,Device_ID_A||Device_ID_B); S63. Use the AES-128-GCM algorithm to encrypt business data; At this point, node A and node B have completed session key negotiation through ECC+Device_ID and obtained a shared key Final_Key. Both parties save each other's Device_ID for verifying the source identity and generating Final_Key. The process of Node A sending data to Node B uses the AES-128-GCM algorithm. Node A prepares plaintext data + encrypted plaintext "xxxxx", generates a random number Nonce (12 bytes), and performs encryption using Final_Key. Encrypted_Payload, Auth_Tag = AES-GCM(Final_Key, Plaintext, Nonce); AES-GCM encryption structure description (AES-GCM(Final_Key, Plaintext_Data, Nonce, AAD) → (Ciphertext, Auth_Tag)) After AES-GCM encryption, the length of the ciphertext is equal to the length of the plaintext. The authentication tag (Auth_Tag) is fixed at 16 bytes. The Nonce (random number) is usually 12 bytes, as shown in Table 10.

[0054] Table 10 Example of ECC Elliptic Curve Cryptography Algorithm Parameters

[0055] S64. Construct a data frame by encapsulating the encrypted data in a fixed format, as shown in Table 11; Table 11 Example of a Data Frame

[0056] The entire frame is transmitted within the time slot of node A, and the transmission time is strictly controlled by MN allocation; S65. The receiving node receives the data frame and decrypts and verifies it. Node B receives the data and decrypts and verifies it. Node B listens for broadcasts and detects frames. If Receiver_ID == 0x3C4F (B's ID) in the frame, it indicates that it is the target receiving object.

[0057] Node B uses the saved Final_Key to decrypt the data; Plaintext = AES-GCM-Decrypt(Final_Key, Encrypted_Payload, Nonce, Auth_Tag). If Auth_Tag verification fails, it means the data has been tampered with or forged; discard the frame.

[0058] Specific process: Node A starts time slot → encrypts data → broadcasts and sends → completes transmission. Node B receives frame → checks Receiver_ID → decrypts → verifies → extracts plaintext data.

[0059] I. Clock Synchronization Byte Planning 1. Synchronization Request Frame (used by the master node MN to broadcast the time base in the synchronization time slot), this frame is 21 bytes long, as shown in Table 12.

[0060] Table 12 Example Table of General Synchronization Request Frames

[0061] 2. Synchronization response frame (used by the child node to respond with the local reception time and ID after receiving synchronization), totaling 19 bytes, as shown in Table 13.

[0062] Table 13 Example of a general request-response frame:

[0063] Considering the high precision requirements of UWB (lns≈30cm), a 21-byte request frame and a 19-byte response frame are used. The response frame exhibits good performance within the maximum frame length of 127 bytes in UWB and can meet the core requirements of vehicle-to-everything (V2X) environments such as high-speed synchronization, positioning correction, and collision detection.

[0064] II. General frame structure design, as shown in Table 14: In the UWB module, the IEEE 802.15.4a standard is introduced as a supplement to the original IEEE 802.15.4 standard for WPAN networks (typically used for short-range connections between personal devices), bringing the new UWBPHY into the existing WPAN standard. Due to the special definition of the UWB frame structure, the UWB PHY supports a maximum payload of 127 bytes (according to the IEEE 802.15.4a specification). For security and communication efficiency, the total frame length dynamically varies depending on the application. In control frames (authentication, clock synchronization, and time slot allocation), the total frame length does not exceed 64 bytes, while in encrypted data communication frames, the number of bytes supported is 127 bytes.

[0065] Table 14 General Frame Design Table

[0066] Considering the UWB communication data link layer protocol structure and authentication, synchronization, and encryption mechanisms, such as Figure 5 As shown, the present invention uniformly adopts the following frame format (applicable to neighbor discovery, clock synchronization, authentication requests, data communication, etc.).

[0067] In this general frame structure design, the definition of the payload portion differs for different types of frame structures, as shown in Table 15. Table 15 General Frame Payload Definition Table

[0068] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0069] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0070] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0072] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A secure V2V communication method in a vehicle ad hoc network, characterized in that, The method includes: S1. Generate a complete digital identity based on user information and establish a mapping relationship between physical characteristics and digital identity; S2. The remote authentication process based on the token mechanism authenticates the association mapping relationship between physical characteristics and digital identity, and obtains the authenticated node; S3. Obtain the neighbor nodes of the authenticated nodes through the UWB broadcast mechanism and establish a routing table; S4. The receiving node scores the candidate declaration frames of all nodes, elects the V2V network master node, and builds an autonomous cluster network based on the master node; S5. Based on the master control node, generate the time base for the nodes inside the self-organizing network system during the networking period, and divide the time slots and channel resources within the self-organizing network; S6. Data encryption and secure communication based on elliptic curve cryptography and device ID authentication.

2. The secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, The establishment of the association mapping relationship between physical characteristics and digital identity in S1 specifically includes: S11. Obtain user registration information and UWB module hardware information; S12. Verify the validity of the user registration information and the UWB module hardware information; S13. Generate corresponding public and private keys based on the validity of user registration information and UWB module hardware information, and encapsulate the relevant configuration information to obtain encapsulated configuration information; S14. The registration platform sends the packaged configuration information to the user through a secure channel; S15. After receiving the packaged configuration information, the user writes it into the security chip HSM. S16. The registration platform records and binds the physical fingerprint information of the device, establishing a mapping between physical characteristics and digital identity; S17. The device obtains a complete digital identity, providing proof of identity for subsequent access to the V2V network system.

3. The secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, The remote authentication process based on the token mechanism in S2 authenticates the association between physical features and digital identities, and obtains authenticated nodes. It also includes: S21. When a node starts up for the first time, it actively connects to the cloud registration platform and submits an identity information data packet; S22. The cloud performs a consistency check between the identity information data packet and the data in the database. If the consistency check passes, an authentication token for the current node is generated. The authentication token is encrypted and signed using the node's Device_ID. S23. Save the authentication token returned from the cloud through the local security module; S24. Mark the node's local state as "authentication passed" and use the token for broadcasting during the neighbor discovery authentication process.

4. A secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, The S3 process, which obtains the neighbor nodes of the authenticated node through the UWB broadcast mechanism and establishes a routing table, also includes: S31. For nodes that have passed authentication, a neighbor discovery frame is broadcast via UWB; S32. The current node forms an initial neighbor table by recording neighbor information; S33. A node obtains multiple neighboring nodes through broadcasting, updates its routing table based on neighbor discovery frames from these neighboring nodes, and obtains the master node based on the information in the routing table. S34. After the master node completes the node legitimacy verification, it updates the local routing table and broadcasts a network formation success frame.

5. A secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, In step S4, the receiving node scores the candidate frames of all nodes to generate a master node, and a cluster network is constructed based on the master node. This also includes: S41. After each node starts up, it enters the "candidate master state" and broadcasts the master candidate declaration frame in the control time slot; S42. The receiver node performs the following scoring function on all candidate frames: Score =α× Neighbors +β×RSSI_avg -Y×CPU_Load; Where Neighbors is the number of neighboring nodes; RSSI_avg is the average channel quality between the receiver node and other nodes; CPU_Load is the current node load; α is the weighting coefficient for the number of neighboring nodes, β is the weighting coefficient for the average channel quality, and γ is the weighting coefficient for the current node load. S43. Each node obtains its own judgment result by comparing the current node's score with that of all candidate frames. If the current node's score is the highest, the current node is set to master node mode; otherwise, the current node is set to ordinary node mode and waits for allocation. S44. The master node broadcasts a master control confirmation frame in the synchronization time slot. After receiving the frame, other nodes lock onto it as the master node and establish a cluster network.

6. A secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, S5 generates a time base for nodes within the ad hoc network system based on the master control node during network formation, and allocates time slots and channel resources within the ad hoc network. It also includes: Clock synchronization mechanism: Multi-level clock synchronization is adopted. The master node broadcasts a synchronization frame with a timestamp, and ordinary nodes receive it and correct their local clocks by combining it with TOF ranging information. Time slot allocation: Based on the superframe period, four types of time slots are obtained: synchronization time slot, control time slot, data time slot, and flexible time slot; Time slot allocation strategy: The master node allocates time slots based on a dynamic allocation strategy using Device_ID; Elasticity mechanism: Based on the comparison between the number of nodes and the maximum allocable capacity, the master node generates an elastic time slot allocation strategy.

7. A secure V2V communication method in a vehicle ad hoc network according to claim 1, characterized in that, S6 also includes data encryption and secure communication based on elliptic curve cryptography and device ID authentication, and further includes: S61. After a node joins the vehicle ad hoc network and completes identity authentication, the master node allocates communication data time slots to the current node; S62. A shared session key is generated using the ECC elliptic curve cryptography algorithm; S63. Use the AES-128-GCM algorithm to encrypt business data; S64. Construct a data frame by encapsulating the encrypted data according to a fixed format; S65. The receiving node receives the data frame and decrypts and verifies it.