Control command transmission and reception methods and related equipment
By assigning sequence numbers to control requests and signing them with PKI certificates, the low security and risk of duplicate transmission of vehicle remote control commands are resolved, thereby improving the security and reliability of vehicle control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- VOYAH AUTOMOBILE TECH CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-31
AI Technical Summary
Vehicle remote control commands are vulnerable to illegal theft, malicious tampering, and replay attacks in open networks, leading to unauthorized control of the vehicle and affecting the safety of passengers and the vehicle.
By assigning a sequence number to the control request and encapsulating it into control command data, a digital signature is generated using a Public Key Infrastructure (PKI) certificate. The vehicle then performs legality and integrity verification to defend against replay attacks.
It enhances the security and reliability of remote control commands, prevents tampering and replay attacks, and ensures the legitimacy and security of vehicle control.
Smart Images

Figure CN122496192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle network security technology, specifically to a control command transmission and reception method, a transmitting end, a vehicle end, a device, and a computer-readable storage medium. Background Technology
[0002] With the increasing prevalence of intelligent connected vehicle technology, remote vehicle control has become a crucial function of vehicle-to-everything (V2X) systems. When remote control commands are transmitted over open networks, they are vulnerable to security threats such as illegal theft, malicious tampering, forged transmissions, and replay attacks. This could lead to unauthorized control of the vehicle, thereby compromising the personal safety of passengers and the security of vehicle property. To ensure the legitimacy of the source, integrity of transmission, resistance to tampering, and prevention of replay attacks for remote control commands, it is essential to implement secure signatures and identity verification for V2X remote control commands. This will enhance the security and reliability of V2X communication and meet the relevant requirements for information security and functional safety of intelligent connected vehicles.
[0003] In related technologies, cloud certificates used for signature verification on the vehicle side are mostly pre-installed at the factory, with the certificate and public key information stored fixedly in the vehicle-side device.
[0004] However, using cloud certificates fixed on the vehicle makes remote control command transmissions susceptible to tampering and forgery, posing a significant security risk. At the same time, the vehicle side has difficulty effectively identifying duplicate commands and resisting replay attacks, and intercepted control commands can be executed repeatedly, making it difficult to guarantee the security of remote vehicle control. Summary of the Invention
[0005] This application provides a control command transmission and reception method, a transmitting end, a vehicle end, a device, and a computer-readable storage medium, which can solve the technical problems of low security and high risk of repeated transmission of control commands in the prior art.
[0006] In a first aspect, embodiments of this application provide a method for sending control commands, the method being applied at a sending end, the method comprising: If a control request is received, a sequence number is assigned to the control request according to a preset rule, and then the sequence number, the control request, and the public key infrastructure (PKI) certificate are encapsulated into control instruction data. The control command data is signed to generate a digital signature; The control command data and digital signature are sent to the vehicle terminal so that the vehicle terminal can perform security verification based on the control command data and digital signature.
[0007] In conjunction with the first aspect, in one implementation, the method further includes, before encapsulating the serial number, the public key infrastructure (PKI) certificate, and the control request into control instruction data: Verify the legality of the control request; If valid, then the corresponding sequence number is assigned to the control request according to the preset rules. If the request is invalid, the control command sending process will be terminated and a request failure message will be generated.
[0008] In conjunction with the first aspect, in one implementation, the step of performing a signature calculation on the control command data to generate a digital signature specifically includes: The control command data is processed using a hash algorithm to obtain the original message digest. The original message digest is asymmetrically encrypted using the private key corresponding to the PKI certificate to obtain a digital signature.
[0009] In conjunction with the first aspect, in one implementation, the preset rule is: Each vehicle terminal maintains a corresponding serial number, which increments with the number of control requests received for the corresponding vehicle.
[0010] Secondly, embodiments of this application provide a control command receiving method, which is applied to a vehicle and includes: If control command data and digital signature are received from the sender, the control command data is parsed to obtain the sequence number, public key infrastructure (PKI) certificate, and control request. The PKI certificate is validated for legitimacy. If the PKI certificate passes the validation, the digital signature is verified using the public key in the PKI certificate. If the verification passes, the serial number is validated for legality. If the serial number validation passes, the corresponding control operation is executed according to the control request.
[0011] In conjunction with the second aspect, in one implementation, the verification of the legitimacy of the PKI certificate includes: Verify whether the issuing authority of the PKI certificate is correct, whether the PKI certificate is valid, whether the certificate serial number is correct, and whether the certificate status is valid. If all verification results are yes, then the PKI certificate verification is considered successful. If any verification result is negative, the PKI certificate verification is deemed unsuccessful.
[0012] In conjunction with the second aspect, in one implementation, verifying the digital signature based on the public key in the PKI certificate includes: A hash algorithm is used to calculate the actual message digest from the control command data; The digital signature is decrypted using the public key to obtain the original message digest; The actual message digest is compared with the original message digest. If the actual message digest matches the original message digest, the verification is considered successful.
[0013] In conjunction with the second aspect, in one implementation, the step of validating the serial number specifically includes: Query the latest sequence number in the vehicle's memory that corresponds to the sending end; If the serial number in the control command data is greater than the latest serial number, the serial number verification is deemed successful, and the latest serial number is updated based on the serial number in the control command data.
[0014] In conjunction with the second aspect, in one embodiment, the control command receiving method further includes: Determine if a PKI certificate exists in the vehicle's memory; If it does not exist, the PKI certificate will be stored in the vehicle's memory.
[0015] In conjunction with the second aspect, in one implementation, if a PKI certificate exists in the vehicle-side memory, it is determined whether the PKI certificate in the vehicle-side memory is consistent with the PKI certificate in the control command data. If they are inconsistent, the PKI certificate in the vehicle's memory will be updated to the PKI certificate in the control command data.
[0016] In conjunction with the second aspect, in one embodiment, the vehicle-side memory is a vehicle-side security chip or encrypted Flash, used to store PKI certificates and the latest serial number.
[0017] Thirdly, embodiments of this application provide a transmitting end, the transmitting end comprising: The encapsulation module is used to assign a sequence number to the control request according to a preset rule if a control request is received, and then encapsulate the sequence number, the control request, and the public key infrastructure (PKI) certificate into control instruction data. The generation module is used to perform signature calculation on the control command data and generate a digital signature; The sending module is used to send the control command data and digital signature to the vehicle terminal, so that the vehicle terminal can perform security verification based on the control command data and digital signature.
[0018] Fourthly, embodiments of this application provide a vehicle terminal, the vehicle terminal comprising: The parsing module is used to parse the control command data and digital signature sent by the sending end to obtain the sequence number, public key infrastructure (PKI) certificate and control request. The first verification module is used to verify the legitimacy of the PKI certificate. If the PKI certificate passes the legitimacy verification, the digital signature is verified based on the public key in the PKI certificate. The second verification module is used to perform a validity check on the serial number if the verification passes, and to execute the corresponding control operation according to the control request if the validity check of the serial number passes.
[0019] Fifthly, embodiments of this application provide a control command transceiver device, the control command transceiver device including a processor, a memory, and a control command transceiver program stored in the memory and executable by the processor, wherein when the control command transceiver program is executed by the processor, it implements the steps of the control command sending method as described in the first aspect and the steps of the control command receiving method as described in the second aspect.
[0020] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a control instruction transceiver program, wherein when the control instruction transceiver program is executed by a processor, it implements the steps of the control instruction sending method as described in the first aspect and the steps of the control instruction receiving method as described in the second aspect.
[0021] The beneficial effects of the technical solutions provided in this application include: Upon receiving a control request, a sequence number is assigned to the control request according to preset rules. The sequence number, the control request, and the Public Key Infrastructure (PKI) certificate are then encapsulated into control command data. A digital signature is generated by performing a signature calculation on the control command data. The control command data and the digital signature are then sent to the vehicle terminal for security verification. By introducing a sequence number to provide a unique identifier for the command, the vehicle terminal can identify duplicate commands and defend against replay attacks. Simultaneously, the PKI certificate is issued along with the command, allowing the vehicle terminal to obtain a valid verification certificate without pre-installing a verification certificate. This simplifies the vehicle terminal certificate management process and improves the security and reliability of remote control command transmission and verification. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating an embodiment of the control command sending method of this application; Figure 2 This is a flowchart illustrating an embodiment of the control command receiving method of this application; Figure 3 This is a functional module diagram of an embodiment of the control command sending device of this application; Figure 4 This is a functional module diagram of an embodiment of the control command receiving device of this application; Figure 5 This is a schematic diagram of the hardware structure of the control command transceiver device involved in the embodiments of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0025] In a first aspect, embodiments of this application provide a method for sending control commands.
[0026] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the control command sending method of this application. Figure 1 As shown, the control command sending method includes: Step S10: If a control request is received, a sequence number is assigned to the control request according to a preset rule, and then the sequence number, the control request, and the public key infrastructure (PKI) certificate are encapsulated into control instruction data. In this embodiment, if the sending end (vehicle network platform) receives a control request initiated by the control end, it first assigns a unique sequence number to the control request according to a preset sequence number allocation rule. This sequence number is used to identify the instruction corresponding to this control request, providing a basic identifier for the vehicle end to verify the legality of the instruction. Subsequently, the sending end integrates the assigned sequence number, the received control request, and the public key infrastructure (PKI) certificate used for identity authentication into complete control instruction data according to a preset encapsulation format, ensuring that all core information related to the control instruction is included, providing a complete data foundation for subsequent signing and verification.
[0027] Step S20: Perform signature calculation on the control command data to generate a digital signature; In this embodiment, the sending end performs a signature calculation operation on the complete control instruction data encapsulated in step S10 to generate a corresponding digital signature. By encrypting the control instruction data, a digital signature that can characterize the integrity and legitimacy of the data source is generated, so that the vehicle end can verify the authenticity and integrity of the instruction through the digital signature, preventing the instruction from being illegally tampered with or forged during transmission.
[0028] Step S30: Send the control command data and digital signature to the vehicle terminal so that the vehicle terminal can perform security verification based on the control command data and digital signature.
[0029] In this embodiment, the sending end packages the control command data encapsulated in step S10 with the digital signature generated in step S20, and sends it to the target vehicle through the vehicle network communication link to ensure that the vehicle can receive the control command data and the corresponding digital signature at the same time.
[0030] In this embodiment, upon receiving a control request, a sequence number is assigned to the control request according to preset rules. The sequence number, the control request, and the Public Key Infrastructure (PKI) certificate are then encapsulated into control command data. A digital signature is generated by performing a signature calculation on the control command data. The control command data and the digital signature are then sent to the vehicle terminal for security verification. Introducing a sequence number provides a unique identifier for the command, providing a basis for the vehicle terminal to identify duplicate commands and defend against replay attacks. Simultaneously, the PKI certificate is issued along with the command, allowing the vehicle terminal to obtain the latest legitimate verification credentials without needing to pre-install a verification certificate, thus improving the security and reliability of remote control command transmission and verification.
[0031] Furthermore, in one embodiment, the method further includes, before encapsulating the sequence number, public key infrastructure (PKI) certificate, and control request into control instruction data: Verify the legality of the control request; If valid, then the corresponding sequence number is assigned to the control request according to the preset rules. If the request is invalid, the control command sending process will be terminated and a request failure message will be generated.
[0032] In this embodiment, before encapsulating the serial number, PKI certificate, and control request into control command data, the sending end (vehicle network platform) first verifies the legality of the received control request. If the control request is legal, the subsequent step of assigning a serial number to the control request is executed; if the control request is illegal, the control command issuance process is immediately terminated, and a request failure prompt containing the reason for failure is returned to the control end.
[0033] In this embodiment, by performing a pre-validation check on the control request, invalid control requests initiated by unauthorized control terminals are prevented from occupying the resources of the sending terminal, reducing useless instruction encapsulation, signing, and distribution operations, and improving the operating efficiency of the sending terminal. At the same time, the subsequent process of unauthorized control requests is blocked from the source, preventing unauthorized requests from being further processed and distributed to the vehicle terminal, reducing the risk of unauthorized vehicle control, and further improving the security of remote control.
[0034] Furthermore, in one embodiment, the step of performing signature calculation on the control command data to generate a digital signature specifically includes: The control command data is processed using a hash algorithm to obtain the original message digest. The original message digest is asymmetrically encrypted using the private key corresponding to the PKI certificate to obtain a digital signature.
[0035] In this embodiment, firstly, the sending end uses a preset hash algorithm (such as the SM3 hash algorithm) to perform hash calculation on the encapsulated complete control command data (including sequence number, control request, and PKI certificate) to obtain a fixed-length original message digest, which uniquely corresponds to the original control command data. Subsequently, the sending end calls its own private key, which corresponds to the PKI certificate carried in the control command data, and uses an asymmetric encryption algorithm (such as the SM2 algorithm) to encrypt the original message digest. After encryption, a digital signature is obtained. Finally, the digital signature is packaged together with the control command data and sent to the vehicle end.
[0036] In this embodiment, a unique message digest is generated through a hash algorithm to ensure the integrity and verifiability of the control command data; asymmetric encryption is performed using the private key corresponding to the PKI certificate to ensure the uniqueness and unforgeability of the digital signature. Only the sender holding the corresponding private key can generate a valid digital signature, providing a reliable basis for subsequent signature verification at the vehicle end, and further strengthening the source authentication and anti-tampering capabilities of the control command.
[0037] Furthermore, in one embodiment, the preset rule is: Each vehicle terminal maintains a corresponding serial number, which increments with the number of control requests received for the corresponding vehicle.
[0038] In this embodiment, the preset rule is as follows: the sending end maintains an independent serial number counter for each target vehicle. This counter corresponds one-to-one with the unique identifier of the target vehicle (such as the vehicle VIN code). The serial number counters of different vehicles are independent of each other and do not affect each other. When the sending end receives a control request for a target vehicle, it calls the serial number counter corresponding to that vehicle, increments the current value of the counter by 1, obtains the serial number corresponding to this control request, and then encapsulates the serial number together with the control request and PKI certificate into control command data.
[0039] In this embodiment, by maintaining an independent serial number for each target vehicle, the confusion of instructions caused by multiple vehicles sharing a single serial number is avoided, enabling the vehicle to accurately identify control instructions for itself. The serial number increases with the number of control requests received by the corresponding vehicle, providing a clear basis for the vehicle to determine whether the instruction is repeated or an illegal replay instruction, effectively improving the ability to resist replay attacks, while also improving the orderliness and security when multiple vehicles are controlled concurrently.
[0040] Secondly, embodiments of this application provide a method for receiving control commands.
[0041] In one embodiment, reference is made to Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the control command receiving method of this application. Figure 2 As shown, the control command receiving method includes: Step S40: If control command data and digital signature sent by the sending end are received, the control command data is parsed to obtain the sequence number, public key infrastructure (PKI) certificate, and control request. In this embodiment, the vehicle-side monitors the vehicle-to-everything (V2X) communication link in real time. If it receives control command data and a digital signature from the sender, it immediately parses the received control command data. The parsing process employs conventional data parsing methods in the field. According to the sender's encapsulation format, three core pieces of information are extracted from the control command data: a sequence number to identify the command, a public key infrastructure (PKI) certificate for identity authentication, and a control request for controlling the vehicle. This ensures that the core data required for subsequent verification and execution operations are accurately extracted, laying the foundation for subsequent security verification processes.
[0042] Step S50: Verify the validity of the PKI certificate. If the PKI certificate passes the validity verification, verify the digital signature based on the public key in the PKI certificate. In this embodiment, after the vehicle-side extracts the PKI certificate, it first performs a validity check on the PKI certificate. The system uses a preset verification logic to determine whether the PKI certificate is valid, thereby confirming the legitimacy of the sender's identity. If the PKI certificate passes the validity check, it indicates that the sender's identity is legitimate and trustworthy. The vehicle-side then extracts the public key contained in the PKI certificate and uses the public key to verify the received digital signature. By verifying the validity of the digital signature, the system confirms that the control command data has not been illegally tampered with or forged during transmission, ensuring the integrity and reliability of the command data.
[0043] Step S60: If the verification is successful, the serial number is validated for legality. If the serial number is validated for legality, the corresponding control operation is executed according to the control request.
[0044] In this embodiment, if the digital signature verification passes, it indicates that the control command data is authentic, complete, and of legitimate origin. The vehicle further verifies the validity of the extracted serial number by using preset verification logic to determine whether the serial number meets the requirements, thereby identifying whether the command is a duplicate command and providing a basis for preventing replay attacks. If the serial number validity verification passes, it indicates that the control command is a valid command that is legitimate and not duplicated. The vehicle then executes the corresponding vehicle control operation according to the parsed control request, completing the closed loop of receiving, verifying, and executing remote control commands, ensuring the security and legitimacy of vehicle control operations.
[0045] In this embodiment, if control command data and a digital signature are received from the sending end, the control command data is parsed to obtain a sequence number, a Public Key Infrastructure (PKI) certificate, and a control request. The PKI certificate is validated for legitimacy. If the PKI certificate validation passes, the digital signature is verified using the public key in the PKI certificate. If the verification passes, the sequence number is validated for legitimacy. If the sequence number validation passes, the corresponding control operation is executed according to the control request. This ensures that the control command data is not maliciously tampered with during transmission, guaranteeing data integrity. By introducing a sequence number verification mechanism, duplicate commands can be identified, effectively resisting replay attacks. Simultaneously, relying on multi-level verification logic of certificate legitimacy verification and signature verification, the vehicle's ability to securely identify remote control commands is improved, ensuring that only legitimate, complete, and non-duplicate commands can be executed, thereby enhancing the security and reliability of vehicle remote control.
[0046] Furthermore, in one embodiment, the validity verification of the PKI certificate includes: Verify whether the issuing authority of the PKI certificate is correct, whether the PKI certificate is valid, whether the certificate serial number is correct, and whether the certificate status is valid. If all verification results are yes, then the PKI certificate verification is considered successful. If any verification result is negative, the PKI certificate verification is deemed unsuccessful.
[0047] In this embodiment, after the vehicle-side parses the control command data to obtain the PKI certificate, it performs four verification operations in sequence: First, it verifies whether the issuing authority of the PKI certificate is correct, checking whether the issuing authority information recorded in the certificate is consistent with the vehicle-side's preset list of trusted CA authorities. If they are inconsistent, the verification fails. Second, it verifies whether the PKI certificate is valid, extracting the effective time and expiration time from the certificate and comparing it with the vehicle-side's current system time. If the current time is not between the effective time and expiration time, the verification fails. Third, it verifies whether the certificate serial number is correct, checking whether the certificate's own serial number matches the certificate serial number rules (such as encoding format and number of bits) preset by the sender. If they do not match, the verification fails. Fourth, it verifies whether the certificate status is valid, querying whether the PKI certificate has been revoked by the issuing authority through the vehicle-side's built-in certificate status query interface. If it is in a revoked state, the verification fails. Only if all four verification results are yes, the PKI certificate verification is considered successful; if any verification result is no, the PKI certificate verification is directly deemed unsuccessful, and subsequent signature verification and command execution operations are rejected.
[0048] Further, in one embodiment, verifying the digital signature based on the public key in the PKI certificate includes: A hash algorithm is used to calculate the actual message digest from the control command data; The digital signature is decrypted using the public key to obtain the original message digest; The actual message digest is compared with the original message digest. If the actual message digest matches the original message digest, the verification is considered successful.
[0049] In this embodiment, firstly, the vehicle-mounted terminal uses the same hash algorithm (such as the SM3 hash algorithm) as the sending terminal to perform hash calculation on the received complete control command data (including sequence number, control request, and PKI certificate) to obtain the actual message digest. Subsequently, the vehicle-mounted terminal extracts the sending terminal's public key from the verified PKI certificate and uses the same asymmetric encryption algorithm (such as the SM2 algorithm) as the sending terminal to decrypt the received digital signature. After decryption, the original message digest generated by the sending terminal is obtained. Finally, the vehicle-mounted terminal compares the calculated actual message digest with the decrypted original message digest byte by byte. If the two are completely identical, the digital signature verification is considered successful. If any byte is inconsistent, the verification is deemed unsuccessful, the control command is immediately discarded, and subsequent operations are refused.
[0050] In this embodiment, the legality of the source and integrity of the transmission of the control command are ensured. Only the digital signature generated by the legitimate private key of the sender can be decrypted by the corresponding public key. Furthermore, the two message digests will be consistent only when the command has not been tampered with. This further blocks forged and tampered illegal commands and improves the reliability of vehicle-side command verification.
[0051] Furthermore, in one embodiment, the validity verification of the serial number specifically includes: Query the latest sequence number in the vehicle's memory that corresponds to the sending end; If the serial number in the control command data is greater than the latest serial number, the serial number verification is deemed successful, and the latest serial number is updated based on the serial number in the control command data.
[0052] In this embodiment, after the digital signature verification is successful, the vehicle terminal queries its own memory (security chip) for the latest serial number corresponding to the sending end (this serial number is the serial number in the control command that the vehicle terminal previously received and verified). Then, it compares the serial number in the control command data obtained this time with the latest serial number found in the query. If the current serial number is greater than the latest serial number stored in the vehicle terminal, the serial number verification is determined to be successful, and the latest serial number in the vehicle terminal's memory is updated to the currently received serial number to provide a basis for the next verification. If the current serial number is less than or equal to the latest serial number stored in the vehicle terminal, the serial number verification is determined to be unsuccessful, the command is considered a duplicate command, the control request is directly rejected, and the local serial number is not updated.
[0053] In this embodiment, by adding verification of the serial number, accurate identification of duplicate instructions is achieved, effectively resisting replay attacks.
[0054] Furthermore, in one embodiment, the control command receiving method further includes: Determine if a PKI certificate exists in the vehicle's memory; If it does not exist, the PKI certificate will be stored in the vehicle's memory.
[0055] In this embodiment, after parsing the PKI certificate and completing the certificate validity verification, the vehicle immediately determines whether the PKI certificate exists in its own memory (security chip). If no PKI certificate is stored in the vehicle's memory (such as when the vehicle receives the sending end instruction for the first time or completes the certificate verification for the first time), the PKI certificate obtained in this parsing and verified is stored in the designated secure storage area of the vehicle's memory. At the same time, the storage time and related information of the certificate are recorded to provide a basis for subsequent signature verification and certificate update.
[0056] In this embodiment, by storing the verified certificate in the vehicle's memory, the need to re-verify the certificate's validity each time an instruction is received is avoided (subsequent verification can be performed periodically based on the certificate's validity period), simplifying the subsequent signature verification process on the vehicle and improving instruction verification efficiency. At the same time, storing the certificate locally on the vehicle provides a stable source of public keys for subsequent signature verification, ensuring the continuity and reliability of the signature verification process.
[0057] Furthermore, in one embodiment, the control command receiving method further includes: If a PKI certificate exists in the vehicle's memory, then determine whether the PKI certificate in the vehicle's memory is consistent with the PKI certificate in the control command data; If they are inconsistent, the PKI certificate in the vehicle's memory will be updated to the PKI certificate in the control command data.
[0058] In this embodiment, after determining that a PKI certificate exists in its memory, the vehicle further compares the PKI certificate stored in memory with the PKI certificate obtained and verified in this parsing. The comparison includes core information such as the certificate issuing authority, public key information, validity period, and certificate serial number. If the two information are completely consistent, it is determined that the certificate has not been updated, and no operation is required; the subsequent serial number verification step continues. If there is any inconsistency between the two information (such as the sending end replacing the certificate due to private key leakage, or replacing the certificate after it expires), it is determined that the certificate needs to be updated. The new PKI certificate obtained by the vehicle in this parsing is used to overwrite the old PKI certificate stored in memory, completing the dynamic update of the certificate. At the same time, the certificate storage time is updated to ensure that the latest and legitimate certificate is used for subsequent signature verification.
[0059] Furthermore, in one embodiment, the vehicle-side memory is a vehicle-side security chip or encrypted Flash, used to store PKI certificates and the latest serial number.
[0060] In this embodiment, the memory on the vehicle side used to store the PKI certificate and the latest serial number is specifically a security chip or encrypted Flash memory built into the vehicle. The security chip employs an encrypted storage mechanism to encrypt the stored PKI certificate and the latest serial number, preventing unauthorized theft or tampering of these documents. The encrypted Flash memory is tamper-proof and power-loss resistant, ensuring that the stored PKI certificate and the latest serial number are not lost after a power outage and can be directly accessed upon the next vehicle startup without needing to be retrieved again. When storing, querying, or updating the PKI certificate and the latest serial number, the vehicle side accesses the security chip or encrypted Flash memory through an encrypted interface, ensuring the security of the stored content.
[0061] Thirdly, embodiments of this application also provide a transmitting end.
[0062] In one embodiment, reference is made to Figure 3 , Figure 3 This is a schematic diagram of the functional modules of an embodiment of the sending end of this application. Figure 3 As shown, the sending end includes: The encapsulation module 10 is used to assign a sequence number to the control request according to a preset rule if a control request is received, and then encapsulate the sequence number, the control request, and the public key infrastructure (PKI) certificate into control instruction data. The generation module 20 is used to perform signature calculation on the control command data and generate a digital signature; The sending module 30 is used to send the control command data and digital signature to the vehicle terminal so that the vehicle terminal can perform security verification based on the control command data and digital signature.
[0063] Furthermore, in one embodiment, the sending end further includes a verification module, used for: Verify the legality of the control request; If valid, then the corresponding sequence number is assigned to the control request according to the preset rules. If the request is invalid, the control command sending process will be terminated and a request failure message will be generated.
[0064] Furthermore, in one embodiment, the generation module 20 is used to: The control command data is processed using a hash algorithm to obtain the original message digest. The original message digest is asymmetrically encrypted using the private key corresponding to the PKI certificate to obtain a digital signature.
[0065] Furthermore, in one embodiment, the encapsulation module 10 is used for: Each vehicle terminal maintains a corresponding serial number, which increments with the number of control requests received for the corresponding vehicle.
[0066] Fourthly, embodiments of this application also provide a vehicle-side device.
[0067] In one embodiment, reference is made to Figure 4 , Figure 4 This is a schematic diagram of the functional modules of one embodiment of the vehicle-side of this application. Figure 4 As shown, the vehicle end includes: The parsing module 40 is used to parse the control command data and digital signature sent by the sending end to obtain the sequence number, public key infrastructure (PKI) certificate and control request. The first verification module 50 is used to verify the legitimacy of the PKI certificate. If the PKI certificate passes the legitimacy verification, the digital signature is verified based on the public key in the PKI certificate. The second verification module 60 is used to perform a validity check on the serial number if the verification passes, and to execute the corresponding control operation according to the control request if the validity check of the serial number passes.
[0068] Furthermore, in one embodiment, the first verification module 50 is used for: Verify whether the issuing authority of the PKI certificate is correct, whether the PKI certificate is valid, whether the certificate serial number is correct, and whether the certificate status is valid. If all verification results are yes, then the PKI certificate verification is considered successful. If any verification result is negative, the PKI certificate verification is deemed unsuccessful.
[0069] Furthermore, in one embodiment, the first verification module 50 is used for: A hash algorithm is used to calculate the actual message digest from the control command data; The digital signature is decrypted using the public key to obtain the original message digest; The actual message digest is compared with the original message digest. If the actual message digest matches the original message digest, the verification is considered successful.
[0070] Furthermore, in one embodiment, the second verification module 60 is used for: Query the latest sequence number in the vehicle's memory that corresponds to the sending end; If the serial number in the control command data is greater than the latest serial number, the serial number verification is deemed successful, and the latest serial number is updated based on the serial number in the control command data.
[0071] Furthermore, in one embodiment, the vehicle terminal also includes a first determination module, used for: Determine if a PKI certificate exists in the vehicle's memory; If it does not exist, the PKI certificate will be stored in the vehicle's memory.
[0072] Furthermore, in one embodiment, the vehicle terminal also includes a second determination module, used for: If a PKI certificate exists in the vehicle's memory, then determine whether the PKI certificate in the vehicle's memory is consistent with the PKI certificate in the control command data; If they are inconsistent, the PKI certificate in the vehicle's memory will be updated to the PKI certificate in the control command data.
[0073] Furthermore, in one embodiment, the vehicle-side memory is a vehicle-side security chip or encrypted Flash, used to store PKI certificates and the latest serial number.
[0074] The functions of each module in the above-mentioned sending end and vehicle end correspond to the steps in the above-mentioned control command sending and receiving method embodiment, and their functions and implementation processes will not be described in detail here.
[0075] Thirdly, embodiments of this application provide a control command transceiver device, which can be a vehicle controller or other similar device.
[0076] Reference Figure 5 , Figure 5 This is a schematic diagram of the hardware structure of the control command transceiver device involved in the embodiments of this application. In the embodiments of this application, the control command transceiver device may include a processor, a memory, a communication interface, and a communication bus.
[0077] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0078] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the control command transceiver device, as well as interfaces used for interconnecting the control command transceiver device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0079] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0080] The processor can be a general-purpose processor, which can call control instruction transceiver programs stored in memory and execute the control instruction transceiver method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the control instruction transceiver program is called can be referred to in various embodiments of the control instruction transceiver method of this application, and will not be repeated here.
[0081] Those skilled in the art will understand that Figure 5 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0082] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0083] The present application has a computer-readable storage medium storing a control instruction transceiver program, wherein when the control instruction transceiver program is executed by a processor, it implements the steps of the control instruction transceiver method described above.
[0084] The method implemented when the control command sending and receiving program is executed can be referred to in various embodiments of the control command sending and receiving method of this application, and will not be repeated here.
[0085] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0086] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0087] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0088] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0089] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0090] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0091] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for sending control commands, characterized in that, The control command sending method is applied at the sending end, and the control command sending method includes: If a control request is received, a sequence number is assigned to the control request according to a preset rule, and then the sequence number, the control request, and the public key infrastructure (PKI) certificate are encapsulated into control instruction data. The control command data is signed to generate a digital signature; The control command data and digital signature are sent to the vehicle terminal so that the vehicle terminal can perform security verification based on the control command data and digital signature.
2. The control command sending method as described in claim 1, characterized in that, Before encapsulating the serial number, public key infrastructure (PKI) certificate, and control request into control instruction data, the following steps are also included: Verify the legality of the control request; If valid, then the corresponding sequence number is assigned to the control request according to the preset rules. If the request is invalid, the control command sending process will be terminated and a request failure message will be generated.
3. The control command sending method as described in claim 1, characterized in that, The step of performing a signature calculation on the control command data to generate a digital signature specifically includes: The control command data is processed using a hash algorithm to obtain the original message digest. The original message digest is asymmetrically encrypted using the private key corresponding to the PKI certificate to obtain a digital signature.
4. The control command sending method as described in claim 1, characterized in that, The preset rule is as follows: Each vehicle terminal maintains a corresponding serial number, which increments with the number of control requests received for the corresponding vehicle.
5. A method for receiving control commands, characterized in that, The control command receiving method is applied to the vehicle end, and the control command receiving method includes: If control command data and digital signature are received from the sender, the control command data is parsed to obtain the sequence number, public key infrastructure (PKI) certificate, and control request. The PKI certificate is validated for legitimacy. If the PKI certificate passes the validation, the digital signature is verified using the public key in the PKI certificate. If the verification passes, the serial number is validated for legality. If the serial number validation passes, the corresponding control operation is executed according to the control request.
6. The control command receiving method as described in claim 5, characterized in that, The process of verifying the legitimacy of the PKI certificate includes: Verify whether the issuing authority of the PKI certificate is correct, whether the PKI certificate is valid, whether the certificate serial number is correct, and whether the certificate status is valid. If all verification results are yes, then the PKI certificate verification is considered successful. If any verification result is negative, the PKI certificate verification is deemed unsuccessful.
7. The control command receiving method as described in claim 5, characterized in that, The verification of the digital signature based on the public key in the PKI certificate includes: A hash algorithm is used to calculate the actual message digest from the control command data; The digital signature is decrypted using the public key to obtain the original message digest; The actual message digest is compared with the original message digest. If the actual message digest matches the original message digest, the verification is considered successful.
8. The control command receiving method as described in claim 5, characterized in that, The step of validating the serial number specifically includes: Query the latest sequence number in the vehicle's memory that corresponds to the sending end; If the serial number in the control command data is greater than the latest serial number, the serial number verification is deemed successful, and the latest serial number is updated based on the serial number in the control command data.
9. The control command receiving method as described in claim 5, characterized in that, The control command receiving method further includes: Determine if a PKI certificate exists in the vehicle's memory; If it does not exist, the PKI certificate will be stored in the vehicle's memory.
10. The control command receiving method as described in claim 9, characterized in that, The control command receiving method further includes: If a PKI certificate exists in the vehicle's memory, then determine whether the PKI certificate in the vehicle's memory is consistent with the PKI certificate in the control command data; If they are inconsistent, the PKI certificate in the vehicle's memory will be updated to the PKI certificate in the control command data.
11. The control command receiving method according to any one of claims 8 to 10, characterized in that, The vehicle-side memory is a vehicle-side security chip or encrypted Flash, used to store PKI certificates and the latest serial number.
12. A transmitter, characterized in that, The sending end includes: The encapsulation module is used to assign a sequence number to the control request according to a preset rule if a control request is received, and then encapsulate the sequence number, the control request, and the public key infrastructure (PKI) certificate into control instruction data. The generation module is used to perform signature calculation on the control command data and generate a digital signature; The sending module is used to send the control command data and digital signature to the vehicle terminal, so that the vehicle terminal can perform security verification based on the control command data and digital signature.
13. A vehicle end, characterized in that, The vehicle end includes: The parsing module is used to parse the control command data and digital signature sent by the sending end to obtain the sequence number, public key infrastructure (PKI) certificate and control request. The first verification module is used to verify the legitimacy of the PKI certificate. If the PKI certificate passes the legitimacy verification, the digital signature is verified based on the public key in the PKI certificate. The second verification module is used to perform a validity check on the serial number if the verification passes, and to execute the corresponding control operation according to the control request if the validity check of the serial number passes.
14. A control command transceiver device, characterized in that, The control command transceiver device includes a processor, a memory, and a control command transceiver program stored in the memory and executable by the processor, wherein when the control command transceiver program is executed by the processor, it implements the steps of the control command sending method as described in any one of claims 1 to 4 and the steps of the control command receiving method as described in any one of claims 5 to 11.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a control command transceiver program, wherein when the control command transceiver program is executed by a processor, it implements the steps of the control command sending method as described in any one of claims 1 to 4 and the steps of the control command receiving method as described in any one of claims 5 to 11.