A method and system for secure wireless data transmission in heavy-duty trucks
By generating transition state identifiers and offloading messages, the problem of secure session reconstruction during base station handover in wireless data transmission for heavy-duty trucks was solved, enabling reliable message transmission and accurate execution of control commands, thus improving the security and reliability of data transmission.
Patent Information
- Application Number
- CN202611278435.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-11-17
AI Technical Summary
In traditional wireless data transmission methods for heavy-duty trucks, when the vehicle terminal switches between base stations, there is a time overlap between the reconstruction of the secure session and the forwarding of service packets. The source of the packets is not clearly determined, resulting in unclear boundaries for the execution of control commands, which can easily lead to erroneous packet execution and record disconnection.
When the source-side session is suspended and the new security session is not acknowledged, a transitional state identifier is generated. The message is received through a temporary unprotected channel for format verification and service type identification. Basic state maintenance messages and control messages are processed separately. The restricted buffer, the pending confirmation queue and the historical delivery records under the new security session are used for review to restore the execution permission of control messages.
This reduces message erroneous execution and record disconnection during handover, ensures that vehicle status data correction and control message execution are associated with session and digital signature verification constraints, and improves the security and reliability of data transmission.
Smart Images

Figure CN123123884A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle networking wireless communication technology, and in particular to a method and system for secure wireless data transmission in heavy-duty trucks. Background Technology
[0002] The field of wireless communication technology in the Internet of Vehicles (IoV) mainly revolves around activities such as vehicle status collection, message encapsulation, identity authentication, session key negotiation, data transmission, command issuance, and log storage in the wireless link between vehicle terminals, on-board gateways, base stations, roadside units, and cloud platforms. In-vehicle sensors, controllers, and communication terminals typically obtain operating parameters via the on-board bus or Ethernet, and then interact with network-side devices through cellular networks or dedicated short-range communication links. Traditional wireless data security transmission methods for heavy-duty trucks refer to the methods for transmitting and processing status data, service messages, and control commands during the driving, dispatching, and remote management of heavy-duty trucks. Typically, the on-board communication terminal reads parameters such as vehicle speed, location, fault codes, and battery or engine status, encapsulates messages according to vehicle identification, service type, timestamp, and session information, and connects to the network-side platform via the base station. During cell handover or link reconstruction, messages are typically queued, forwarded, discarded, or retransmitted based on access authentication results, session status, message header fields, command source records, and local cache records.
[0003] Traditional vehicle-to-everything (V2X) wireless communication relies on access authentication results and session status to process messages when vehicle terminals switch across base stations. Vehicle status data and control commands arrive at the network-side platform via the same wireless link. During the handover, there is a time overlap between secure session reconstruction and service message forwarding. Message source determination mainly relies on message header fields and command source records. The queuing and execution boundaries of control commands before and after link reconstruction are unclear. The correspondence between pending messages, received messages, cached records, and historical transmission records is prone to breakage. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for secure wireless data transmission in heavy-duty trucks.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for secure wireless data transmission in heavy-duty trucks, comprising the following steps: S1: When the source-side session suspension flag and the temporary unprotected channel enable signal are read, but no new security session confirmation message is read, it is determined that the handover transition state is entered. The timestamp corresponding to the source-side session suspension flag is determined as the protection window start timestamp. A transition state flag is generated based on the protection window start timestamp, the source base station identifier, the target base station identifier, and the vehicle identifier. The flag is stored on the vehicle side and the network side and written into the header of the transition message. S2: Receive transition messages through a temporary unprotected channel and perform message format verification. Transition messages that pass the format verification are marked as basic status maintenance messages if the service type field corresponds to the vehicle status parameter and does not contain control command feature codes, and are marked as control messages if they contain control command feature codes. Transition messages that fail the format verification and the remaining transition messages are marked as abnormal messages, and a set of transition messages with classification labels is generated. S3: Based on the set of transition messages with classification tags, compare the transition status identifier carried in the message header with the locally stored transition status identifier, write the basic state maintenance type messages that are consistent to the restricted buffer to form restricted buffer data, write the control type messages that are consistent to the pending confirmation queue and freeze the execution permissions to form pending confirmation queue data, and block the transition messages and abnormal messages that are inconsistent to the comparison and form suspicious records. S4: Upon receiving the new security session confirmation message sent by the target base station network, the handover transition state ends. Based on the transition state identifier, the restricted buffer data, the pending confirmation queue data, and the suspicious record are associated with the new security session. The pending confirmation queue data is reviewed according to the historical delivery records, original instruction hash value, and digital signature sent by the network side through the new security session. The execution permission of the control messages that pass the review is restored, and the control messages that fail the review are discarded. The restricted buffer data is corrected according to the vehicle status data obtained through the new security session.
[0006] As a further aspect of the present invention, the process of S1 is as follows: S101: Read the base station handover request and the timestamp of the base station handover request from the radio resource control layer of the vehicle communication terminal; using the base station handover request as a trigger condition, read the source-side session suspension flag, target base station access request, new secure session confirmation message, temporary unprotected channel enable signal and corresponding timestamp from the core network mobility management entity to obtain handover status information; S102: Based on the handover status information, call the network time protocol or PTP protocol to synchronize the vehicle-side clock and the network-side clock, read the clock offset and link propagation delay, read the signaling reception timestamp and signaling processing completion timestamp from the signaling processing record of the vehicle communication terminal, calculate the time difference between the two timestamps to obtain the device processing delay, correct each timestamp according to the clock offset, link propagation delay and device processing delay, and establish a time alignment window with the corrected timestamp of the base station handover request as the starting point and a preset window length; S103: Based on the time alignment window, determine whether the source-side session suspension mark has been generated, the target base station access request has been sent, the new security session confirmation message has not yet been generated, and the temporary unprotected channel enable signal has been generated simultaneously. If they are simultaneously generated, determine that the handover transition state has been entered, and determine the timestamp corresponding to the corrected source-side session suspension mark as the start timestamp of the protection window period. S104: Based on the protection window start timestamp, read the source base station identifier and the target base station identifier from the base station handover request, read the vehicle identifier from the vehicle communication terminal storage area, read the temporary random number from the vehicle communication terminal security chip, input the source base station identifier, the target base station identifier, the protection window start timestamp, the vehicle identifier, and the temporary random number into a one-way hash function to generate an identifier hash value, determine the identifier hash value as the transition state identifier, save the transition state identifier on the vehicle side and the network side, and write it into the preset field of the message header of the transition message.
[0007] As a further aspect of the present invention, the process of inputting the source base station identifier, the target base station identifier, the protection window start timestamp, the vehicle identifier, and the temporary random number into a one-way hash function to generate an identifier hash value is specifically as follows: According to the preset field order, the source base station identifier, the target base station identifier, the protection window start timestamp, the vehicle identifier, and the temporary random number are converted into binary sequences of preset field lengths, and then concatenated to form data to be hashed. The data to be hashed is divided into multiple data blocks according to the preset group length. The preset initial hash value and the first data block to be hashed are input into the one-way hash function to obtain the hash state value. The previous hash state value and the next data block to be hashed are input into the one-way hash function to update the hash state value. The hash state value corresponding to the last data block to be hashed is determined as the identifier hash value.
[0008] As a further aspect of the present invention, the process of S2 is as follows: S201: Receive each transition message through the temporary unprotected channel, parse the preset fields in the message header and the message payload field, extract the transition status identifier, service type field, received message length, received field position and check field, and detect whether the message payload field carries a control instruction feature code. The service type field is the field in the preset fields in the message header that identifies the service carried by the transition message, and the control instruction feature code is the preset code in the message payload field that identifies the type of vehicle control instruction. Establish message field data. S202: Based on the message field data, read the protocol message length, protocol field position, check field coverage and check parameters from the locally pre-stored message format configuration record of the temporary unprotected channel. Calculate the check value corresponding to the message data according to the check field coverage and check parameters. Compare the received message length with the protocol message length, the received field position with the protocol field position, and the check value with the check field to generate a format check result. S203: Based on the message field data and the format verification result, among the transition messages that pass the format verification, those whose service type field corresponds to any one of vehicle position, vehicle speed, engine coolant temperature and oil pressure and do not carry the control command feature code are marked as basic state maintenance messages, and those that carry the control command feature code are marked as control messages, where the control command feature code corresponds to any one of emergency braking, engine torque limiting and steering system intervention. Transition messages that fail the format verification, as well as transition messages that pass the format verification but are neither marked as basic state maintenance messages nor as control messages, are marked as abnormal messages, generating a set of transition messages with classification labels.
[0009] As a further aspect of the present invention, the process of S3 is as follows: S301: Based on the set of transition messages with classification tags, extract the transition status identifier, source address, source base station identifier, source base station identifier field type, sequence number counter value, arrival timestamp, and declared execution permission carried by each transition message. The source base station identifier field type is a field in the message header preset field indicating that the source base station identifier is a source base station identifier or a target base station identifier. The declared execution permission is a field in the message header preset field recording the permission requested by the transition message. Read the previous valid sequence number from the locally stored received message record before the source-side security session was suspended. The previous valid sequence number is the sequence number counter value of the last message that passed the integrity check and was received before the source-side security session was suspended. Read the preset sequence number offset lower limit, sequence number offset upper limit, and signaling delay threshold. Calculate the sequence number offset between the sequence number counter value and the previous valid sequence number to obtain the sequence number offset amount. Calculate the time difference between the arrival timestamp and the protection window start timestamp to obtain the arrival time interval. S302: Compare the transition state identifier carried in each transition message with the locally stored transition state identifier, and generate an identifier matching result based on whether the two are consistent. When the source base station identifier field type is the source base station identifier type, compare the source base station identifier with the source base station identifier. When the source base station identifier field type is the target base station identifier type, compare the source base station identifier with the target base station identifier. Generate a source base station matching result based on whether the two are consistent. For each transition message, detect whether the declaration execution permission of the basic state maintenance type message carries vehicle control permission, and detect whether the declaration execution permission of the control type message carries vehicle control permission. Generate an permission matching flag when the basic state maintenance type message does not carry vehicle control permission or the control type message carries vehicle control permission. Generate a permission mismatch flag when the basic state maintenance type message carries vehicle control permission or the control type message does not carry vehicle control permission. Generate a message permission matching result based on the permission matching flag and the permission mismatch flag. S303: Based on the identifier matching result, the source base station matching result, the message permission matching result, the sequence number offset, and the arrival time interval, the transitional messages are classified and marked: Non-abnormal messages that are identified as having a matching result, a matching result from the source base station, a matching result for message permissions, a sequence number offset between the lower limit and the upper limit of the sequence number offset, and an arrival time interval not greater than the signaling delay threshold are marked as normal transition messages. Non-abnormal messages that are identified as having a matching result, whose source base station identifier is consistent with the source base station identifier, whose message permission matching result is a matching result, whose sequence number offset is between the lower limit and the upper limit of the sequence number offset, and whose arrival time interval is greater than the signaling delay threshold are marked as delayed residual messages. Abnormal messages, as well as non-abnormal messages that meet any of the following conditions: identifier matching result is not matched, source base station matching result is not matched, message permission matching result is not matched, sequence number offset is lower than the lower limit of the sequence number offset, sequence number offset is higher than the upper limit of the sequence number offset, source base station identifier is the same as the target base station identifier and the arrival time interval is greater than the signaling delay threshold, are marked as suspicious forged messages. S304: Write the basic state maintenance type message in the normal transition message into the restricted buffer, and after deleting the control field carried by the basic state maintenance type message in the delayed residual message, write its vehicle status field into the restricted buffer. The control field is the field in the message payload field that carries the vehicle control command. Generate restricted buffer data, write the control type message in the normal transition message and the delayed residual message into the pending confirmation queue and freeze the execution permission, record the entry time, original content and the source base station identifier, generate pending confirmation queue data, block and discard the suspicious forged message, record the source address, the sequence number counter value, the arrival timestamp and verification failure items, and generate a suspicious record.
[0010] As a further aspect of the present invention, the process for determining the verification failure item is specifically as follows: When the identifier matching result is not a match, the transition status identifier carried in the corresponding message is recorded. When the source base station matching result is not a match, the source base station identifier is recorded. When the message permission matching result is not a match, the declaration execution permission is recorded. When the sequence number offset is lower than the lower limit of the sequence number offset or higher than the upper limit of the sequence number offset, the sequence number counter value is recorded. When the arrival time interval is greater than the signaling delay threshold and the source base station identifier is consistent with the target base station identifier, the arrival timestamp is recorded. The recorded data and the message category marked by the corresponding transition message are associated with the transition message to determine the verification failure item.
[0011] As a further aspect of the present invention, the process of S4 is as follows: S401: Receive the new secure session confirmation message sent after authentication and key negotiation are completed from the session signaling interface of the target base station network, end the handover transition state and stop receiving transition messages through the temporary unprotected channel, associate the restricted buffer data, the pending confirmation queue data and the suspicious record based on the transition state identifier, write the associated data into the new secure session acceptance record, and generate transition context data; S402: Based on the transition state identifier and pending confirmation queue data in the transition context data, the vehicle-mounted communication terminal sends a verification request carrying the transition state identifier and the sequence number counter value of the control class message in the pending confirmation queue data to the network side through the new security session. The vehicle-mounted communication terminal reads the verification response returned by the network side in response to the verification request from the receiving queue under the new security session. The historical delivery record, the original instruction hash value and the digital signature are extracted from the verification response. The source base station identifier, the entry time and the original content in the pending confirmation queue data are read. The time difference between the delivery time in the historical delivery record and the entry time in the queue is calculated to obtain the delivery and reception time interval. The source base station identifier is compared with the base station identifier in the historical delivery record. The delivery and reception time interval is compared with the preset delivery delay threshold to generate a historical delivery matching result. S403: Based on the historical matching results, read the network-side public key from the new secure session authentication record generated by the identity authentication and key negotiation process, call the network-side public key to verify the digital signature, call the one-way hash function to process the original content to generate a local instruction hash value, compare the local instruction hash value with the original instruction hash value bit by bit, associate the results of historical matching, digital signature verification and hash value comparison, and generate a control message review result; S404: Based on the control message review results, unfreeze the control messages whose historical matching results are matched, whose digital signature verification is passed, and whose local instruction hash value is consistent with the original instruction hash value, and restore their execution permissions; discard the control messages whose historical matching results are not matched, whose digital signature verification is not passed, or whose local instruction hash value is inconsistent with the original instruction hash value; and write the reasons for the review failure of historical non-matching, digital signature verification failure, or local instruction hash value inconsistent with the original instruction hash value into the suspicious record. S405: The network side reads the vehicle status data collected by the vehicle communication terminal and uploaded through the new security session from the receiving queue of the network side under the new security session. It extracts the sampling timestamp, vehicle position coordinates, and vehicle speed value from the restricted buffer data and the vehicle status data. It establishes a correspondence between the sampling data based on the sampling timestamp, converts the vehicle position coordinates to a preset geographic coordinate system, calculates the geographic distance between corresponding vehicle position coordinates and the speed deviation between vehicle speed values, performs interpolation and filtering on data points where the geographic distance is greater than a preset position continuity threshold or the speed deviation is greater than a preset speed continuity threshold, and uses the processing result to overwrite the corresponding data points in the restricted buffer data to obtain the corrected restricted buffer data.
[0012] As a further aspect of the present invention, the process of calling the network-side public key to verify the digital signature specifically includes: The historical issuance record and the original instruction hash value are concatenated according to the field order in the verification response to form the data to be verified. The network-side public key, the digital signature, and the data to be verified are input into a preset signature verification operation to obtain the digital signature verification result.
[0013] As a further aspect of the present invention, the process of establishing the correspondence between the sampling data is specifically as follows: The sampling timestamps in the restricted buffer data and the vehicle status data are read respectively. For each sampling timestamp in the restricted buffer data, the sampling time difference between the corresponding sampling timestamp and each sampling timestamp in the vehicle status data is calculated. The sampling timestamp in the vehicle status data with the smallest sampling time difference is retrieved. When the sampling time difference is not greater than a preset sampling time matching threshold, a corresponding relationship of sampling data is established. When the sampling timestamp in the same vehicle status data corresponds to the sampling timestamps in multiple restricted buffer data, the corresponding relationship with the smallest sampling time difference is retained.
[0014] A secure wireless data transmission system for heavy-duty trucks, the system being used to execute the aforementioned secure wireless data transmission method for heavy-duty trucks, the system comprising: The handover transition awareness module determines that it has entered the handover transition state when it reads the source side session suspension flag and the temporary unprotected channel enable signal, but does not read the new security session confirmation message. It determines the timestamp corresponding to the source side session suspension flag as the protection window start timestamp, and generates a transition state flag based on the protection window start timestamp, the source base station identifier, the target base station identifier, and the vehicle identifier. The flag is stored on the vehicle side and the network side and written into the header of the transition message. Message classification and processing module: Receives transition messages through a temporary unprotected channel and performs message format verification. Transition messages that pass the format verification are marked as basic state maintenance messages if the service type field corresponds to the vehicle status parameter and does not contain control command feature codes, and are marked as control messages if they contain control command feature codes. Transition messages that fail the format verification and other transition messages are marked as abnormal messages, and a set of transition messages with classification tags is generated. The traffic diversion and control execution module: Based on the set of transition messages with classification tags, it compares the transition status identifier carried in the message header with the locally stored transition status identifier, writes the basic status maintenance type messages that are more consistent into the restricted buffer area to form restricted buffer area data, writes the control type messages that are more consistent into the pending confirmation queue and freezes the execution permissions to form pending confirmation queue data, and blocks the transition messages and abnormal messages that are inconsistent and forms suspicious records. Session reconstruction verification module: Upon receiving the new security session confirmation message sent by the target base station network, the handover transition state is terminated. Based on the transition state identifier, the restricted buffer data, the pending confirmation queue data, and the suspicious record are associated with the new security session. The pending confirmation queue data is verified according to the historical delivery records, original instruction hash value, and digital signature sent by the network side through the new security session. The execution permission of the verified control messages is restored and the verified control messages are discarded. The restricted buffer data is corrected according to the vehicle status data obtained through the new security session.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a transitional state identifier is generated when the source-side session is suspended and the new security session is not confirmed. This identifier is then synchronously stored on both the vehicle and network sides, providing a comparable basis for the packets in the transitional state. By performing format verification, service type identification, and control command feature code identification on the transitional packets, basic state maintenance packets, control packets, and abnormal packets are processed separately. Through a restricted buffer, a pending confirmation queue, execution permission freezing, and historical delivery records under the new security session, vehicle state data correction and control packet execution recovery are constrained by session association and digital signature verification, respectively, reducing packet erroneous execution and record disconnection during the handover period. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the wireless data security transmission method for heavy-duty trucks according to the present invention; Figure 2 This is a schematic diagram of the workflow of the wireless data security transmission method for heavy-duty trucks according to the present invention; Figure 3 This is a schematic diagram illustrating the principle of the transition state identification of the present invention; Figure 4 This is a schematic diagram illustrating the session reconstruction verification principle of the present invention; Figure 5 This is a schematic diagram of the structure of the wireless data security transmission system for heavy-duty trucks according to the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] This embodiment provides a method for secure wireless data transmission in heavy-duty trucks. This method is used in a transmission scenario where, during the handover from a source base station to a target base station, the source-side secure session has been suspended, a new secure session has not yet been confirmed, and a temporary unprotected channel is enabled. Transitional messages refer to vehicle-related messages transmitted via the temporary unprotected channel during this handover transition state. The protection window period refers to the time segment during which the source-side secure session ceases to provide full protection while a new secure session has not yet been accepted. The transition state identifier is session transition identification information formed by the handover-related time, base station, and vehicle identity information, and jointly stored by the vehicle and network sides. This identifier is used to associate data generated during the same handover period with the same context during subsequent message reception, distribution, verification, and data correction processes.
[0019] Please see Figure 1 , Figure 2 and Figure 3 S1: Upon reading the source-side session suspension flag and the temporary unprotected channel enable signal, but not reading the new security session confirmation message, the system determines that it has entered a handover transition state. The timestamp corresponding to the source-side session suspension flag is determined as the start timestamp of the protection window period. A transition state identifier is generated based on the protection window start timestamp, the source base station identifier, the target base station identifier, and the vehicle identifier. This identifier is stored on both the vehicle and network sides and written into the header of the transition message. The technical purpose of this step is to establish a traceable transition identity for messages during the unprotected channel period, so that subsequently received messages can be bound to this vehicle handover process, preventing messages from other handover processes or forged sources from being mixed into the same processing link. The source-side session suspension flag indicates that the original security session on the source base station side has suspended providing protection. The temporary unprotected channel enable signal indicates that temporary transmission of necessary messages is allowed between the vehicle and the network side. The new security session confirmation message indicates that the target base station side network has completed the acceptance confirmation after identity authentication and key negotiation. Only when the first two types of signals are present and the new safety session confirmation message is absent can it be said that the vehicle is in a section where the safety protection handover is not completed, and therefore there is a clear signaling basis for entering the handover transition state.
[0020] S101: Read the base station handover request and its timestamp from the radio resource control layer of the vehicular communication terminal. Using the base station handover request as a trigger, read the source-side session suspension flag, target base station access request, new secure session confirmation message, temporary unprotected channel enable signal, and corresponding timestamp from the core network mobility management entity to obtain handover status information. The handover status information is a set of signaling states during this base station handover process, including handover trigger signaling, session suspension state, target access state, secure session confirmation state, and unprotected channel enable state. This step first uses the base station handover request recorded by the radio resource control layer of the vehicular communication terminal as the time and event starting point, then reads the network-side state corresponding to the request from the core network mobility management entity, ensuring that the vehicle-side triggering information and network-side processing information are in the same event chain. The handover status information formed after reading is passed to the subsequent time correction process as input for judging the handover transition state.
[0021] S102: Based on the handover status information, the vehicle-side clock and network-side clock are synchronized using the Network Time Protocol (NTP) or PTP protocol. The clock offset and link propagation delay are read. The signaling reception timestamp and signaling processing completion timestamp are read from the vehicle-mounted communication terminal's signaling processing record. The device processing delay between the two timestamps is determined. Each timestamp is corrected based on the clock offset, link propagation delay, and device processing delay. A time alignment window is established starting from the corrected base station handover request timestamp and according to a preset window establishment rule. The clock offset represents the deviation between the vehicle-side clock and the network-side clock on the same event record. The link propagation delay represents the time offset formed by the transmission of signaling between the vehicle and network sides. The device processing delay represents the internal processing time of the vehicle-mounted communication terminal from receiving signaling to completing signaling processing. After correcting each timestamp using the above three types of time correction quantities, the signaling time from the vehicle side and the network side is aligned to a unified time reference. The time alignment window is an event judgment interval established around the corrected base station handover request. Its content is whether each signaling status appears within the corresponding time relationship in the same handover. This window is passed to the subsequent status judgment process.
[0022] S103: Based on the time alignment window, determine whether the following conditions are simultaneously met: the source-side session suspension flag has been generated, the target base station access request has been sent, the new security session confirmation message has not yet been generated, and the temporary unprotected channel enable signal has been generated. If all four conditions are met, the system enters the handover transition state, and the timestamp corresponding to the corrected source-side session suspension flag is determined as the start timestamp of the protection window period. This determination is performed according to the handover sequence. The generation of the source-side session suspension flag indicates that the original security protection has remained in a suspended state; the sending of the target base station access request indicates that the vehicle is establishing access to the target base station; the lack of a new security session confirmation message indicates that the new security protection has not yet taken over; and the generation of the temporary unprotected channel enable signal indicates that the transition message has a transmission path. When all four conditions are met simultaneously, the start time of the protection window period is determined as the corrected timestamp of the source-side session suspension, because this timestamp corresponds to the actual starting point of the original security session losing its continuous protection capability. The obtained protection window period start timestamp is used to generate the transition state identifier and is used to subsequently determine whether the arrival time of the transition message conforms to the handover process.
[0023] S104: Based on the protection window start timestamp, read the source base station identifier and target base station identifier from the base station handover request, read the vehicle identifier from the vehicle communication terminal storage area, and read the temporary random number from the vehicle communication terminal security chip. Input the source base station identifier, target base station identifier, protection window start timestamp, vehicle identifier, and temporary random number into a one-way hash function to generate an identifier hash value. Determine the identifier hash value as the transition state identifier, save the transition state identifier on the vehicle side and the network side, and write it into the preset fields of the transition message header. The source base station identifier and target base station identifier are used to limit the two ends of the radio access object in this handover, the vehicle identifier is used to limit the heavy truck vehicle participating in the handover, and the temporary random number is used to ensure that different hash inputs are generated even when the same vehicle and base station are involved in different handover processes. The one-way hash function converts the above fields into a unified field format according to the preset field order, and then concatenates them to form the data to be hashed. The data to be hashed is grouped into hash blocks according to a preset grouping rule. The preset initial hash value and the first hash block are fed into a one-way hash function to form a hash state value. Subsequent hash blocks are fed into the one-way hash function sequentially with the previous hash state value, ensuring that changes in the preceding fields continuously affect the hash states of subsequent blocks. The hash state value corresponding to the last hash block is determined as an identifier hash value. This identifier hash value is synchronously stored on both the vehicle and network sides as a transition state identifier and is written into a preset field in the header of the transition message, so that each subsequent transition message carries a matching transition identity.
[0024] If a base station handover request is missing, a source-side session suspension flag is missing, a temporary unprotected channel enable signal is missing, or a new secure session confirmation message already exists, the handover transition state will not be entered. The received related signaling will continue to be processed as ordinary handover signaling according to the secure session state. If the vehicle-side clock fails to synchronize with the network-side clock, or if the clock offset, link propagation delay, or equipment processing delay cannot be read, the relevant packets will not be written to the subsequent transition processing link, and the reason for the time correction failure will be recorded to prevent subsequent processing from using misaligned timestamps for state determination. If the source base station identifier, target base station identifier, vehicle identifier, or temporary random number is missing, a transition state identifier will not be generated, and packets received by the temporary unprotected channel will be guided to the abnormal processing path because they cannot establish a verifiable association with this handover process.
[0025] Please see Figure 1 and Figure 2 S2: Transitional messages are received through a temporary unprotected channel and their format is verified. Transitional messages that pass format verification, whose service type field corresponds to the vehicle status parameters and do not contain control command signatures, are marked as basic status maintenance messages; those containing control command signatures are marked as control messages. Transitional messages that fail format verification and the remaining transitional messages are marked as abnormal messages, generating a set of transitional messages with classification labels. The technical purpose of this step is to isolate data entering the vehicle or network side according to format and service attributes before security protection is restored, so that messages used only to maintain vehicle status display or status continuity are processed separately from messages that can trigger vehicle control actions. The service type field is a preset field in the message header that identifies the service carried by the transitional message, and the control command signature is a preset code in the message payload field that identifies the type of vehicle control command. Both together determine the processing path of the message in subsequent traffic control.
[0026] S201: Receive each transition message through a temporary unprotected channel, parse the preset fields in the message header and the message payload fields, extract the transition status identifier, service type field, received message length, received field position, and check field, and check whether the message payload field carries a control command signature, thus establishing message field data. Message field data is a set of fields formed after structural parsing of a single transition message. Its object types include message identity fields, service attribute fields, format verification fields, and control feature fields. During parsing, the preset fields in the message header are read first to obtain the transition status identifier and service type field, then the message payload fields are read to check for the presence of preset control command signatures, while simultaneously recording the received message length, received field position, and check field. This information, organized into message field data, is then passed to the format verification process.
[0027] S202: Based on the message field data, read the protocol message length, protocol field position, check field coverage, and check parameters from the locally pre-stored message format configuration record for the temporary unprotected channel. Obtain the check value corresponding to the message data based on the check field coverage and check parameters. Compare the received message length with the protocol message length, the received field position with the protocol field position, and the check value with the check field to generate a format verification result. The message format configuration record is a protocol description information pre-stored locally on the vehicle or network side, carrying the message structure requirements allowed to be received by the temporary unprotected channel. During format verification, the received message length is used to determine whether the overall message structure conforms to the protocol length requirement; the received field position is used to determine whether the header and payload fields are in the agreed-upon positions; and the comparison between the check value and the check field is used to determine whether there are any missing, misaligned, or altered fields during transmission. If all three comparisons conform to the configuration record, the format verification result is passed; if any comparison fails, the format verification result is failed. The format verification result and the message field data are jointly passed to the classification and marking process.
[0028] S203: Based on the message field data and format verification results, among the transition messages that pass format verification, those whose business type field corresponds to any one of vehicle position, vehicle speed, engine coolant temperature, or engine oil pressure and do not carry a control command feature code are marked as basic state maintenance messages; those carrying a control command feature code are marked as control messages; and the control command feature code corresponds to any one of emergency braking, engine torque limiting, or steering system intervention. Transition messages that fail format verification, as well as transition messages that pass format verification but are neither marked as basic state maintenance messages nor as control messages, are marked as abnormal messages, generating a set of transition messages with classification labels. Basic state maintenance messages are transition messages that only carry vehicle state parameters without requesting vehicle control authority; their function is to maintain the continuity of vehicle state data during handover. Control messages are transition messages whose payload carries a control command feature code and may affect vehicle actuators; they must not be executed directly before the safe session resumes. Abnormal messages include messages that fail format verification and messages whose business type field and control command feature code cannot be classified into either of the above two categories. The transition message set with category tags stores the original content, parsed fields, and category tags of each transition message and is passed to the subsequent traffic control process.
[0029] When transition message parsing fails, preset fields in the message header are missing, message payload fields are missing, verification fields cannot be read, or message format configuration records cannot be accessed, the corresponding transition message is marked as an abnormal message and will not participate in the processing of basic status maintenance or control messages. If the service type field points to vehicle status parameters but the payload also carries a control command feature code, the presence of the control command feature code is used as a higher risk signal, and the message is directed to the control message processing path or abnormal handling path, and its declared execution permissions will be further checked in subsequent permission verification. If the temporary unprotected channel transmission is interrupted, the set of transition messages that have been classified continues to be passed to subsequent traffic control, and messages that have not been parsed are recorded as receiving abnormalities.
[0030] Please see Figure 1 and Figure 2 S3: Based on the set of transitional messages with classification tags, the transitional state identifier carried in the message header is compared with the locally stored transitional state identifier. Messages that match the basic state maintenance type are written to a restricted buffer to form restricted buffer data. Messages that match the control type are written to a pending confirmation queue and their execution permissions are frozen to form pending confirmation queue data. Inconsistent transitional messages and abnormal messages are blocked, and suspicious records are created. The technical purpose of this step is to limit the data received during the unprotected channel to a controllable range. Basic state maintenance type messages can only enter the restricted buffer and wait for state correction under the new secure session. Control type messages can only enter the pending confirmation queue and remain frozen. Abnormal or identity-mismatched messages are blocked and recorded. The restricted buffer is an isolated storage area used to temporarily store basic vehicle state data; its content must not directly overwrite the confirmed state under the new secure session. The pending confirmation queue is a waiting queue for verification, storing the original content and source information of control type messages. Its content must not trigger vehicle control actions before verification is passed. Suspicious records are a collection of records of the blocking reason, source information, and verification failure items, used for subsequent security audits and session takeover.
[0031] S301: Based on the set of transitional messages with classification tags, extract the transitional status identifier, source address, source base station identifier, source base station identifier field type, sequence number counter value, arrival timestamp, and declared execution permission carried by each transitional message. The source base station identifier field type is a field in the message header preset field indicating that the source base station identifier is a source base station identifier or a target base station identifier. The declared execution permission is a field in the message header preset field recording the permission requested by the transitional message. Read the previous valid sequence number from the received message record before the source-side security session was suspended locally. The previous valid sequence number is the sequence number counter value of the last message that passed the integrity check and was received before the source-side security session was suspended. Read the preset sequence number offset judgment condition and signaling delay judgment condition, determine the sequence number offset between the sequence number counter value and the previous valid sequence number, and determine the arrival time interval between the arrival timestamp and the protection window start timestamp. The source address is used to record the network origin of the transition message. The source base station identifier is used to determine whether the message claims to originate from the source base station or the target base station. The source base station identifier field type determines whether the source base station identifier should be compared with the source base station identifier or the target base station identifier. The sequence number offset is used to determine whether the transition message is consecutive to the message sequence before the source-side security session was suspended. The arrival time interval is used to determine whether the message arrival conforms to the timing during the handover transition. The above fields and derived results together constitute the input for subsequent multi-condition verification.
[0032] S302: Compare the transition state identifier carried in each transition message with the locally stored transition state identifier. Generate an identifier matching result based on whether the two match. When the source base station identifier field type is the same as the source base station identifier type, compare the source base station identifier with the source base station identifier. When the source base station identifier field type is the same as the target base station identifier type, compare the source base station identifier with the target base station identifier. Generate a source base station matching result based on whether the two match. For each transition message, check whether the declaration execution permission of the basic state maintenance type message carries vehicle control permission, and check whether the declaration execution permission of the control type message carries vehicle control permission. Generate a permission matching flag when the basic state maintenance type message does not carry vehicle control permission or the control type message carries vehicle control permission. Generate a permission mismatch flag when the basic state maintenance type message carries vehicle control permission or the control type message does not carry vehicle control permission. Generate a message permission matching result based on the permission matching flag and the permission mismatch flag. The identifier matching result is used to confirm that the message belongs to the current handover transition state. The source base station matching result is used to confirm that the message source is consistent with the handover path. The message permission matching result is used to confirm that there is no conflict between the message category and its declared execution permission. Basic status maintenance messages should not request vehicle control permissions, while control messages should explicitly declare vehicle control permissions; this correspondence enables mutual verification between the category label and the permission field, preventing the bypassing of subsequent freeze processing by faking the business type.
[0033] S303: Transitional messages are classified and marked based on the identifier matching result, source base station matching result, message permission matching result, sequence number offset, and arrival time interval. Among non-abnormal messages, those with a matching identifier, matching source base station, matching message permission, a sequence number offset meeting the preset sequence number offset judgment condition, and an arrival time interval meeting the preset signaling delay judgment condition are marked as normal transitional messages. Among non-abnormal messages, those with a matching identifier, a source base station identifier consistent with the original base station identifier, a matching message permission, a sequence number offset meeting the preset sequence number offset judgment condition, and an arrival time interval not meeting the preset signaling delay judgment condition are marked as delayed residual messages. Abnormal messages, as well as non-abnormal messages that meet any of the following conditions: identifier matching result is mismatched, source base station matching result is mismatched, message permission matching result is mismatched, sequence number offset does not meet the preset sequence number offset judgment condition, source base station identifier is the same as target base station identifier and arrival time interval does not meet the preset signaling delay judgment condition, are marked as suspicious forged messages. Normal transition messages indicate that the message identity, source, permission, sequence and arrival time are all consistent with the current handover transition; delayed residual messages indicate that the message still comes from the source base station and maintains identity and permission matching, but the arrival time shows source-side residual transmission; suspicious forged messages indicate that the message has anomalies in identity, source, permission, sequence or time that cannot be explained by the current handover process.
[0034] S304: Write the basic state maintenance messages in the normal transition message to the restricted buffer. After deleting the control fields carried by the basic state maintenance messages in the delayed residual messages, write their vehicle status fields to the restricted buffer. The control fields are the fields in the message payload that carry vehicle control commands. Generate restricted buffer data. Write the control messages in the normal transition message and the delayed residual messages to the pending confirmation queue and freeze their execution permissions. Record the entry time, original content, and source base station identifier. Generate pending confirmation queue data. Block and discard suspicious forged messages. Record the source address, sequence number counter value, arrival timestamp, and verification failure items. Generate suspicious records. After the basic state maintenance messages are written to the restricted buffer, they only serve as a temporary data source for state continuity during handover and do not directly trigger vehicle control actions. The basic state fields in the delayed residual messages are retained, while the control fields are deleted, leaving only the vehicle status field to participate in subsequent state correction. After the control messages are written to the pending confirmation queue, their original content, source base station identifier, and entry time are saved together for verification with historical records issued by the network side after the establishment of a new secure session. Suspicious forged messages are blocked and discarded, while a suspicious record is created, ensuring that rejected messages still retain traceability.
[0035] The process for determining verification failure items is as follows: When the identifier matching result is a mismatch, record the transitional state identifier carried in the corresponding message; when the source base station matching result is a mismatch, record the source base station identifier; when the message permission matching result is a mismatch, record the declared execution permission; when the sequence number offset does not meet the preset sequence number offset judgment condition, record the sequence number counter value; when the arrival time interval does not meet the preset signaling delay judgment condition and the source base station identifier is consistent with the target base station identifier, record the arrival timestamp. Associate the recorded data and the message category marked on the corresponding transitional message with the transitional message to determine the verification failure item. Verification failure items are saved with field source and failure reason paired, recording not only the conclusion that the message was rejected but also retaining the specific fields that caused the rejection, enabling subsequent new security session acceptance records to distinguish between different reasons such as identity mismatch, source mismatch, permission mismatch, sequence discontinuity, and timing abnormalities.
[0036] When the locally stored transition status identifier is missing, the transition message will not enter the restricted buffer and the pending confirmation queue, and a suspicious record will be formed as the identifier cannot be matched. If the previous valid sequence number cannot be read, the sequence number continuity cannot be confirmed, the corresponding message will not be processed as a normal transition message, and the missing sequence number verification basis will be recorded. If the source base station identifier field type cannot be identified, the source base station matching result will be treated as a mismatch to prevent messages without source basis from entering the subsequent acceptance process. If the restricted buffer write fails or the pending confirmation queue write fails, the corresponding message will remain in an unexecuted state, and the reason for the write failure will be added to the suspicious record to prevent messages from bypassing the freezing or blocking process due to storage abnormalities.
[0037] Please see Figure 1 , Figure 2 and Figure 4 S4: Upon receiving a new security session confirmation message from the target base station network, the handover transition state ends. Based on the transition state identifier, restricted buffer data, pending confirmation queue data, and suspicious records are associated with the new security session. The pending confirmation queue data is reviewed based on the historical delivery records, original instruction hash values, and digital signatures sent by the network through the new security session. Execution permissions for control messages that pass the review are restored, and control messages that fail the review are discarded. Restricted buffer data is corrected based on vehicle status data obtained through the new security session. The technical purpose of this step is to securely take over the data temporarily stored during the transition period after the security session is restored. The new security session confirmation message indicates that the target base station network has completed identity authentication and key negotiation, and subsequent information transmission once again has a protected session channel. After associating restricted buffer data, pending confirmation queue data, and suspicious records with the new security session through the transition state identifier, the data generated during the transition period no longer exists as isolated records but is reviewed, corrected, or recorded as part of the new security session takeover process.
[0038] S401: Receive the new secure session confirmation message sent after authentication and key negotiation from the session signaling interface of the target base station network. End the handover transition state and stop receiving transition messages through the temporary unprotected channel. Based on the transition state identifier, associate restricted buffer data, pending confirmation queue data, and suspicious records, write the associated data into the new secure session acceptance record, and generate transition context data. Transition context data is the data set used during the new secure session acceptance, carrying the current transition state identifier, restricted buffer data, pending confirmation queue data, suspicious records, and the relationships between these data. After stopping the temporary unprotected channel reception, new messages will no longer enter the transition processing link, avoiding the parallel reception of the same type of message through the unprotected channel and the new secure session channel at the same time. The transition context data is passed to the control message review and vehicle status data correction processes.
[0039] S402: Based on the transition state identifier and pending confirmation queue data in the transition context data, the vehicle-mounted communication terminal sends a verification request to the network side via a new security session, carrying the transition state identifier and the sequence number counter value of control-type messages in the pending confirmation queue data. The vehicle-mounted communication terminal reads the verification response returned by the network side in response to the verification request from the receiving queue under the new security session. From the verification response, historical transmission records, original instruction hash values, and digital signatures are extracted. The source base station identifier, entry time, and original content in the pending confirmation queue data are read. The transmission-reception time interval between the transmission time and the entry time in the historical transmission record is determined. The source base station identifier is compared with the base station identifier in the historical transmission record, and the transmission-reception time interval is compared with a preset transmission delay judgment condition to generate a historical transmission matching result. The historical transmission record is the control instruction transmission record stored by the network side in the corresponding security context. The original instruction hash value is a digest stored or returned by the network side after performing one-way hash processing on the original control instruction content. The digital signature is the integrity and source proof formed by the network side signing relevant fields in the verification response. If the source base station identifier matches the base station identifier in the historical transmission record, and the transmission-reception time interval meets the preset transmission delay judgment condition, it indicates that the control messages in the pending confirmation queue correspond to the transmission behavior recorded by the network side in terms of source and timing, and the historical transmission matching result is a match; otherwise, a mismatch result is generated.
[0040] S403: Based on historical matching results, read the network-side public key from the new secure session authentication record generated during the identity authentication and key negotiation process, call the network-side public key to verify the digital signature, call the one-way hash function to process the original content to generate a local instruction hash value, compare the local instruction hash value with the original instruction hash value bit by bit, associate the results of historical matching, digital signature verification, and hash value comparison, and generate a control message verification result. The network-side public key comes from the new secure session authentication record and is used to verify that the verification response was indeed generated by the corresponding network side and that the response content has not been changed. The digital signature verification process is as follows: concatenate the historical distribution record and the original instruction hash value according to the field order in the verification response to form the data to be verified; input the network-side public key, digital signature, and data to be verified into a preset signature verification operation to obtain the digital signature verification result. The local instruction hash value is obtained by processing the original content stored in the confirmation queue using a one-way hash function, and is compared bit by bit to confirm that the original content of the control message temporarily stored on the vehicle side is consistent with the original instruction content corresponding to the historical distribution record on the network side. The historical matching results, digital signature verification results, and hash value comparison results together constitute the control message review results. If any one of these steps fails to meet the requirements, it means that the control message cannot be resumed in the new security session.
[0041] S404: Based on the control message review results, unfreeze control messages with matching results, successful digital signature verification, and consistent local command hash value with the original command hash value, and restore their execution permissions. Discard control messages with mismatch results, failed digital signature verification, or inconsistent local command hash value with the original command hash value. Write the reasons for review failures due to mismatches, failed digital signature verification, or inconsistent local command hash values into the suspicion record. Restoring execution permissions only occurs for control messages with consistent source timing, network-side signature, and original content digest. Therefore, these messages correspond to genuine network-side delivery records and prove that the review response and original content have not been tampered with. Control messages that fail review are discarded and no longer enter the vehicle control execution path. Their failure reasons are written into the suspicion record, ensuring a clear final destination for control messages frozen during the transition period.
[0042] S405: The network side reads vehicle status data collected by the vehicular communication terminal and uploaded via the new security session from the network side's receive queue. It extracts the sampling timestamp, vehicle position coordinates, and speed values from the restricted buffer data and the vehicle status data. Based on the sampling timestamps, it establishes a correspondence between the sampled data, transforms the vehicle position coordinates to a preset geographic coordinate system, determines the geographic distance between corresponding vehicle position coordinates, and the speed deviation between speed values. Data points whose geographic distance or speed deviation does not meet the preset position continuity judgment condition are interpolated and filtered. The processing results are then used to overwrite the corresponding data points in the restricted buffer data, resulting in corrected restricted buffer data. The vehicle status data comes from the protected status information re-uploaded by the vehicular communication terminal under the new security session, and the restricted buffer data comes from the temporary information stored in basic state maintenance messages during the transition period. The process of establishing the correspondence between sampled data is as follows: Sampled timestamps are read from both the restricted buffer data and the vehicle status data. For each sampled timestamp in the restricted buffer data, the sampling time difference between it and each sampled timestamp in the vehicle status data is determined. The sampled timestamp in the vehicle status data with the smallest sampling time difference is retrieved. A correspondence is established when the sampling time difference meets a preset sampling time matching condition. When a sampled timestamp in the same vehicle status data corresponds to different sampled timestamps in the restricted buffer data, the correspondence with the smallest sampling time difference is retained. After converting the vehicle position coordinates to a preset geographic coordinate system, the position and speed differences between corresponding data points are based on the same coordinate and time association. Data points that do not meet the continuity judgment condition are considered state transition points generated during the transition reception process. Interpolation is used to fill in the continuous changes between adjacent states, filtering is used to weaken abrupt noise, and the processing result is used to overwrite the corresponding data points in the restricted buffer data. The corrected restricted buffer data is then entered into the vehicle status record under the new secure session, ensuring that the basic state data and the protected state data maintain continuous connection during the transition period.
[0043] When no confirmation message for a new security session is received, the transition state does not end, and the temporary unprotected channel continues to process transitional messages according to the aforementioned classification, diversion, and blocking rules. If the review request fails to be sent or the review response cannot be parsed, the data in the pending confirmation queue remains frozen, the execution permission for control messages is not restored, and the review link anomaly is recorded. If the network-side public key cannot be read, the digital signature verification cannot be completed, or the original instruction hash value is missing, the corresponding control message is considered to have failed the review and is discarded. If vehicle status data cannot be obtained through the new security session, the restricted buffer data is not directly used as the final status overlay data, but is retained as the pending correction state, and the reason for the missing vehicle status data is recorded. If the sampling timestamp cannot be established, or the coordinate transformation fails, the corresponding data point will not be overlaid, and the reason for the matching failure or coordinate transformation failure will be written into the new security session acceptance record.
[0044] Please see Figure 5 A wireless data security transmission system for heavy-duty trucks includes a handover transition sensing module, a message classification and processing module, a traffic diversion and control execution module, and a session reconstruction and verification module. The handover transition sensing module (S1) reads handover status information, determines the handover transition status, identifies the start timestamp of the protection window period, and generates a transition status identifier. The message classification and processing module (S2) receives transition messages through a temporary unprotected channel, performs message format verification, and generates a set of transition messages with classification tags. The traffic diversion and control execution module (S3) compares the transition status identifier, writes it to a restricted buffer, writes it to a pending confirmation queue, freezes execution permissions, and generates suspicious records. The session reconstruction and verification module (S4) associates transition context data after a new secure session is confirmed, verifies the pending confirmation queue data, restores or discards control messages, and corrects data in the restricted buffer.
[0045] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for secure wireless data transmission in heavy-duty trucks, characterized in that, Includes the following steps: S1: When the source-side session suspension flag and the temporary unprotected channel enable signal are read, but no new security session confirmation message is read, it is determined that the handover transition state is entered. The timestamp corresponding to the source-side session suspension flag is determined as the protection window start timestamp. A transition state flag is generated based on the protection window start timestamp, the source base station identifier, the target base station identifier, and the vehicle identifier. The flag is stored on the vehicle side and the network side and written into the header of the transition message. S2: Receive transition messages through a temporary unprotected channel and perform message format verification. Transition messages that pass the format verification are marked as basic status maintenance messages if the service type field corresponds to the vehicle status parameter and does not contain control command feature codes, and are marked as control messages if they contain control command feature codes. Transition messages that fail the format verification and the remaining transition messages are marked as abnormal messages, and a set of transition messages with classification labels is generated. S3: Based on the set of transition messages with classification tags, compare the transition status identifier carried in the message header with the locally stored transition status identifier, write the basic state maintenance type messages that are consistent to the restricted buffer to form restricted buffer data, write the control type messages that are consistent to the pending confirmation queue and freeze the execution permissions to form pending confirmation queue data, and block the transition messages and abnormal messages that are inconsistent to the comparison to form suspicious records. S4: Upon receiving the new security session confirmation message sent by the target base station network, the handover transition state ends. Based on the transition state identifier, the restricted buffer data, the pending confirmation queue data, and the suspicious record are associated with the new security session. The pending confirmation queue data is reviewed according to the historical delivery records, original instruction hash value, and digital signature sent by the network side through the new security session. The execution permission of the control messages that pass the review is restored, and the control messages that fail the review are discarded. The restricted buffer data is corrected according to the vehicle status data obtained through the new security session.
2. The method for secure wireless data transmission in heavy-duty trucks according to claim 1, characterized in that, The process of S1 is as follows: S101: Read the base station handover request and the timestamp of the base station handover request from the radio resource control layer of the vehicle communication terminal; using the base station handover request as a trigger condition, read the source-side session suspension flag, target base station access request, new secure session confirmation message, temporary unprotected channel enable signal and corresponding timestamp from the core network mobility management entity to obtain handover status information; S102: Based on the handover status information, call the network time protocol or PTP protocol to synchronize the vehicle-side clock and the network-side clock, read the clock offset and link propagation delay, read the signaling reception timestamp and signaling processing completion timestamp from the signaling processing record of the vehicle communication terminal, calculate the time difference between the two timestamps to obtain the device processing delay, correct each timestamp according to the clock offset, link propagation delay and device processing delay, and establish a time alignment window with the corrected timestamp of the base station handover request as the starting point and a preset window length; S103: Based on the time alignment window, determine whether the source-side session suspension mark has been generated, the target base station access request has been sent, the new security session confirmation message has not yet been generated, and the temporary unprotected channel enable signal has been generated simultaneously. If they are simultaneously generated, determine that the handover transition state has been entered, and determine the timestamp corresponding to the corrected source-side session suspension mark as the start timestamp of the protection window period. S104: Based on the protection window start timestamp, read the source base station identifier and the target base station identifier from the base station handover request, read the vehicle identifier from the vehicle communication terminal storage area, read the temporary random number from the vehicle communication terminal security chip, input the source base station identifier, the target base station identifier, the protection window start timestamp, the vehicle identifier, and the temporary random number into a one-way hash function to generate an identifier hash value, determine the identifier hash value as the transition state identifier, save the transition state identifier on the vehicle side and the network side, and write it into the preset field of the message header of the transition message.
3. The method for secure wireless data transmission in heavy-duty trucks according to claim 2, characterized in that, The process of inputting the source base station identifier, the target base station identifier, the protection window start timestamp, and the vehicle identifier and the temporary random number into a one-way hash function to generate an identifier hash value is specifically as follows: According to the preset field order, the source base station identifier, the target base station identifier, the protection window start timestamp, the vehicle identifier, and the temporary random number are converted into binary sequences of preset field lengths, and then concatenated to form data to be hashed. The data to be hashed is divided into multiple data blocks according to the preset group length. The preset initial hash value and the first data block to be hashed are input into the one-way hash function to obtain the hash state value. The previous hash state value and the next data block to be hashed are input into the one-way hash function to update the hash state value. The hash state value corresponding to the last data block to be hashed is determined as the identifier hash value.
4. The method for secure wireless data transmission in heavy-duty trucks according to claim 1, characterized in that, The process of S2 is as follows: S201: Receive each transition message through the temporary unprotected channel, parse the preset fields in the message header and the message payload field, extract the transition status identifier, service type field, received message length, received field position and check field, and detect whether the message payload field carries a control instruction feature code. The service type field is the field in the preset fields in the message header that identifies the service carried by the transition message, and the control instruction feature code is the preset code in the message payload field that identifies the type of vehicle control instruction. Establish message field data. S202: Based on the message field data, read the protocol message length, protocol field position, check field coverage and check parameters from the locally pre-stored message format configuration record of the temporary unprotected channel. Calculate the check value corresponding to the message data according to the check field coverage and check parameters. Compare the received message length with the protocol message length, the received field position with the protocol field position, and the check value with the check field to generate a format check result. S203: Based on the message field data and the format verification result, among the transition messages that pass the format verification, those whose service type field corresponds to any one of vehicle position, vehicle speed, engine coolant temperature and oil pressure and do not carry the control command feature code are marked as basic state maintenance messages, and those that carry the control command feature code are marked as control messages, where the control command feature code corresponds to any one of emergency braking, engine torque limiting and steering system intervention. Transition messages that fail the format verification, as well as transition messages that pass the format verification but are neither marked as basic state maintenance messages nor as control messages, are marked as abnormal messages, generating a set of transition messages with classification labels.
5. The method for secure wireless data transmission in heavy-duty trucks according to claim 1, characterized in that, The process of S3 is as follows: S301: Based on the set of transition messages with classification tags, extract the transition status identifier, source address, source base station identifier, source base station identifier field type, sequence number counter value, arrival timestamp, and declared execution permission carried by each transition message. The source base station identifier field type is a field in the message header preset field indicating that the source base station identifier is a source base station identifier or a target base station identifier. The declared execution permission is a field in the message header preset field recording the permission requested by the transition message. Read the previous valid sequence number from the locally stored received message record before the source-side security session was suspended. The previous valid sequence number is the sequence number counter value of the last message that passed the integrity check and was received before the source-side security session was suspended. Read the preset sequence number offset lower limit, sequence number offset upper limit, and signaling delay threshold. Calculate the sequence number offset between the sequence number counter value and the previous valid sequence number to obtain the sequence number offset amount. Calculate the time difference between the arrival timestamp and the protection window start timestamp to obtain the arrival time interval. S302: Compare the transition state identifier carried in each transition message with the locally stored transition state identifier, and generate an identifier matching result based on whether the two are consistent. When the source base station identifier field type is the source base station identifier type, compare the source base station identifier with the source base station identifier. When the source base station identifier field type is the target base station identifier type, compare the source base station identifier with the target base station identifier. Generate a source base station matching result based on whether the two are consistent. For each transition message, detect whether the declaration execution permission of the basic state maintenance type message carries vehicle control permission, and detect whether the declaration execution permission of the control type message carries vehicle control permission. Generate an permission matching flag when the basic state maintenance type message does not carry vehicle control permission or the control type message carries vehicle control permission. Generate a permission mismatch flag when the basic state maintenance type message carries vehicle control permission or the control type message does not carry vehicle control permission. Generate a message permission matching result based on the permission matching flag and the permission mismatch flag. S303: Based on the identifier matching result, the source base station matching result, the message permission matching result, the sequence number offset, and the arrival time interval, the transitional messages are classified and marked: Non-abnormal messages that are identified as having a matching result, a matching result from the source base station, a matching result for message permissions, a sequence number offset between the lower limit and the upper limit of the sequence number offset, and an arrival time interval not greater than the signaling delay threshold are marked as normal transition messages. Non-abnormal messages that are identified as having a matching result, whose source base station identifier is consistent with the source base station identifier, whose message permission matching result is a matching result, whose sequence number offset is between the lower limit and the upper limit of the sequence number offset, and whose arrival time interval is greater than the signaling delay threshold are marked as delayed residual messages. Abnormal messages, as well as non-abnormal messages that meet any of the following conditions: identifier matching result is not matched, source base station matching result is not matched, message permission matching result is not matched, sequence number offset is lower than the lower limit of the sequence number offset, sequence number offset is higher than the upper limit of the sequence number offset, source base station identifier is the same as the target base station identifier and the arrival time interval is greater than the signaling delay threshold, are marked as suspicious forged messages. S304: Write the basic state maintenance type message in the normal transition message into the restricted buffer, and after deleting the control field carried by the basic state maintenance type message in the delayed residual message, write its vehicle status field into the restricted buffer. The control field is the field in the message payload field that carries the vehicle control command. Generate restricted buffer data, write the control type message in the normal transition message and the delayed residual message into the pending confirmation queue and freeze the execution permission, record the entry time, original content and the source base station identifier, generate pending confirmation queue data, block and discard the suspicious forged message, record the source address, the sequence number counter value, the arrival timestamp and verification failure items, and generate a suspicious record.
6. The method for secure wireless data transmission in heavy-duty trucks according to claim 5, characterized in that, The process for determining the failed verification items is as follows: When the identifier matching result is not a match, the transition status identifier carried in the corresponding message is recorded. When the source base station matching result is not a match, the source base station identifier is recorded. When the message permission matching result is not a match, the declaration execution permission is recorded. When the sequence number offset is lower than the lower limit of the sequence number offset or higher than the upper limit of the sequence number offset, the sequence number counter value is recorded. When the arrival time interval is greater than the signaling delay threshold and the source base station identifier is consistent with the target base station identifier, the arrival timestamp is recorded. The recorded data and the message category marked by the corresponding transition message are associated with the transition message to determine the verification failure item.
7. The method for secure wireless data transmission in heavy-duty trucks according to claim 1, characterized in that, The process of S4 is as follows: S401: Receive the new secure session confirmation message sent after authentication and key negotiation are completed from the session signaling interface of the target base station network, end the handover transition state and stop receiving transition messages through the temporary unprotected channel, associate the restricted buffer data, the pending confirmation queue data and the suspicious record based on the transition state identifier, write the associated data into the new secure session acceptance record, and generate transition context data; S402: Based on the transition state identifier and pending confirmation queue data in the transition context data, the vehicle-mounted communication terminal sends a verification request carrying the transition state identifier and the sequence number counter value of the control class message in the pending confirmation queue data to the network side through the new security session. The vehicle-mounted communication terminal reads the verification response returned by the network side in response to the verification request from the receiving queue under the new security session. The historical delivery record, the original instruction hash value and the digital signature are extracted from the verification response. The source base station identifier, the entry time and the original content in the pending confirmation queue data are read. The time difference between the delivery time in the historical delivery record and the entry time in the queue is calculated to obtain the delivery and reception time interval. The source base station identifier is compared with the base station identifier in the historical delivery record. The delivery and reception time interval is compared with the preset delivery delay threshold to generate a historical delivery matching result. S403: Based on the historical matching results, read the network-side public key from the new secure session authentication record generated by the identity authentication and key negotiation process, call the network-side public key to verify the digital signature, call the one-way hash function to process the original content to generate a local instruction hash value, compare the local instruction hash value with the original instruction hash value bit by bit, associate the results of historical matching, digital signature verification and hash value comparison, and generate a control message review result; S404: Based on the control message review results, unfreeze the control messages whose historical matching results are matched, whose digital signature verification is passed, and whose local instruction hash value is consistent with the original instruction hash value, and restore their execution permissions; discard the control messages whose historical matching results are not matched, whose digital signature verification is not passed, or whose local instruction hash value is inconsistent with the original instruction hash value; and write the reasons for the review failure of historical non-matching, digital signature verification failure, or local instruction hash value inconsistent with the original instruction hash value into the suspicious record. S405: The network side reads the vehicle status data collected by the vehicle communication terminal and uploaded through the new security session from the receiving queue of the network side under the new security session. It extracts the sampling timestamp, vehicle position coordinates, and vehicle speed value from the restricted buffer data and the vehicle status data. It establishes a correspondence between the sampling data based on the sampling timestamp, converts the vehicle position coordinates to a preset geographic coordinate system, calculates the geographic distance between corresponding vehicle position coordinates and the speed deviation between vehicle speed values, performs interpolation and filtering on data points where the geographic distance is greater than a preset position continuity threshold or the speed deviation is greater than a preset speed continuity threshold, and uses the processing result to overwrite the corresponding data points in the restricted buffer data to obtain the corrected restricted buffer data.
8. The method for secure wireless data transmission in heavy-duty trucks according to claim 7, characterized in that, The process of calling the network-side public key to verify the digital signature is as follows: The historical issuance record and the original instruction hash value are concatenated according to the field order in the verification response to form the data to be verified. The network-side public key, the digital signature, and the data to be verified are input into a preset signature verification operation to obtain the digital signature verification result.
9. The method for secure wireless data transmission in heavy-duty trucks according to claim 7, characterized in that, The process of establishing the correspondence between the sampled data is as follows: The sampling timestamps in the restricted buffer data and the vehicle status data are read respectively. For each sampling timestamp in the restricted buffer data, the sampling time difference between the corresponding sampling timestamp and each sampling timestamp in the vehicle status data is calculated. The sampling timestamp in the vehicle status data with the smallest sampling time difference is retrieved. When the sampling time difference is not greater than a preset sampling time matching threshold, a corresponding relationship of sampling data is established. When the sampling timestamp in the same vehicle status data corresponds to the sampling timestamps in multiple restricted buffer data, the corresponding relationship with the smallest sampling time difference is retained.
10. A wireless data security transmission system for heavy-duty trucks, characterized in that, The system is used to implement the wireless data secure transmission method for heavy-duty trucks according to any one of claims 1-9, the system comprising: The handover transition awareness module determines that it has entered the handover transition state when it reads the source side session suspension flag and the temporary unprotected channel enable signal, but does not read the new security session confirmation message. It determines the timestamp corresponding to the source side session suspension flag as the protection window start timestamp, and generates a transition state flag based on the protection window start timestamp, the source base station identifier, the target base station identifier, and the vehicle identifier. The flag is stored on the vehicle side and the network side and written into the header of the transition message. Message classification and processing module: Receives transition messages through a temporary unprotected channel and performs message format verification. Transition messages that pass the format verification are marked as basic state maintenance messages if the service type field corresponds to the vehicle status parameter and does not contain control command feature codes, and are marked as control messages if they contain control command feature codes. Transition messages that fail the format verification and other transition messages are marked as abnormal messages, and a set of transition messages with classification tags is generated. The traffic diversion and control execution module: Based on the set of transition messages with classification tags, it compares the transition status identifier carried in the message header with the locally stored transition status identifier, writes the basic status maintenance type messages that are more consistent into the restricted buffer area to form restricted buffer area data, writes the control type messages that are more consistent into the pending confirmation queue and freezes the execution permissions to form pending confirmation queue data, and blocks the transition messages and abnormal messages that are inconsistent and forms suspicious records. Session reconstruction verification module: Upon receiving the new security session confirmation message sent by the target base station network, the handover transition state is terminated. Based on the transition state identifier, the restricted buffer data, the pending confirmation queue data, and the suspicious record are associated with the new security session. The pending confirmation queue data is verified according to the historical delivery records, original instruction hash value, and digital signature sent by the network side through the new security session. The execution permission of the verified control messages is restored and the verified control messages are discarded. The restricted buffer data is corrected according to the vehicle status data obtained through the new security session.
