Detection method and device for vehicle-mounted communication terminal, vehicle-mounted communication terminal and storage medium
By generating and verifying a security code in the vehicle-mounted communication terminal and performing detection after ensuring the security of the communication connection, the problem of insufficient accuracy of detection results in the existing technology is solved, and more reliable detection results are achieved.
Patent Information
- Application Number
- CN202410569023.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-05-08
AI Technical Summary
The detection results of existing vehicle-mounted communication terminal detection methods are less accurate.
By obtaining the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number of the on-board communication terminal, a security code is generated using asymmetric encryption algorithms and symmetric encryption algorithms, and legitimacy verification and signature verification are performed on the server side to ensure the security of the communication connection before sending a detection instruction for detection.
The accuracy of the detection results is improved, the tampering of the detection results due to insecure communication connections is avoided, and the reliability of the detection is enhanced.
Smart Images

Figure CN118473740B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle-mounted communication terminals, and more specifically, to a detection method and device for a vehicle-mounted communication terminal, a vehicle-mounted communication terminal, and a computer-readable storage medium. Background Art
[0002] The testing of on-board communication terminals is an important step in the production of automotive parts. This step needs to verify the functional integrity and effectiveness of the parts and is a necessary step before the delivery of automotive parts to vehicle manufacturers.
[0003] Currently, the on-board communication terminal can establish a connection with the server through a fixed virtual vehicle identification code, and then the server sends a detection instruction to the on-board communication terminal, which performs detection according to the detection instruction and obtains the detection result.
[0004] However, the accuracy of the detection results obtained using existing methods is poor. Summary of the Invention
[0005] The present application proposes a detection method and device for an in-vehicle communication terminal, an in-vehicle communication terminal, and a computer-readable storage medium to improve the above-mentioned defects.
[0006] In the first aspect, the embodiment of the present application provides a detection method for an on-vehicle communication terminal, which is used for an on-vehicle communication terminal. The method includes: obtaining a terminal unique identifier, a security signature, a virtual vehicle identification code, and an encrypted random number of the on-vehicle communication terminal; the security signature is obtained by signing the terminal unique identifier with a factory private key; the virtual vehicle identification code is intercepted from the encryption result, and the encryption result is obtained by encrypting the terminal unique identifier with a preset random number; the encrypted random number is obtained by encrypting the preset random number with a server public key; the terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number are sent to the server so that the server can pass the corresponding service The server private key of the device public key is used to decrypt the encrypted random number to obtain a decrypted random number, the terminal unique identifier is encrypted by the decrypted random number to obtain the encryption result to be verified, the virtual vehicle identification code to be verified is intercepted from the encryption result to be verified, and the legitimacy verification result is determined according to the comparison result of the virtual vehicle identification code to be verified and the virtual vehicle identification code; and the security signature is verified by the factory public key corresponding to the factory private key to obtain the verification result; and when the legitimacy verification result is the legitimacy verification passed and the verification result is the verification passed, a detection instruction is sent to the vehicle-mounted communication terminal; the vehicle-mounted communication terminal is tested according to the detection instruction to obtain a detection result.
[0007] In a second aspect, an embodiment of the present application further provides a detection device for a vehicle-mounted communication terminal, which is used for a vehicle-mounted communication terminal, and the device includes:
[0008] An acquisition module is used to obtain the terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number of the vehicle communication terminal; the security signature is obtained by signing the terminal unique identifier with the factory private key; the virtual vehicle identification code is intercepted from the encryption result, which is obtained by encrypting the terminal unique identifier with a preset random number; the encrypted random number is obtained by encrypting the preset random number with the server public key;
[0009] The sending module is used to send the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number to the server, so that the server decrypts the encrypted random number through the server private key corresponding to the server public key to obtain the decrypted random number, encrypts the terminal unique identification through the decrypted random number to obtain the encryption result to be verified, intercepts the virtual vehicle identification code to be verified from the encryption result to be verified, and determines the legitimacy verification result according to the comparison result of the virtual vehicle identification code to be verified and the virtual vehicle identification code; and verifies the security signature through the factory public key corresponding to the factory private key to obtain the verification result; and when the legitimacy verification result is legitimacy verification passed and the verification result is verification passed, sends a detection instruction to the vehicle communication terminal; the detection module is used to detect the vehicle communication terminal according to the detection instruction to obtain the detection result.
[0010] In a third aspect, an embodiment of the present application also provides a vehicle-mounted communication terminal, which includes: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by one or more processors, and the one or more programs are configured to execute the above method.
[0011] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0012] The present application provides a detection method, device, vehicle-mounted communication terminal and computer-readable storage medium for a vehicle-mounted communication terminal. In the present application, the vehicle-mounted communication terminal obtains a terminal unique identification, a security signature, a virtual vehicle identification code and an encrypted random number, and sends the terminal unique identification, security signature, virtual vehicle identification code and the encrypted random number to a server, so that the server performs legitimacy verification and signature verification based on the terminal unique identification, security signature, virtual vehicle identification code and the encrypted random number. When the legitimacy verification result is that the legitimacy verification passes and the signature verification result is that the signature verification passes, it indicates that the vehicle-mounted communication terminal, the server and the communication connection between them are secure. At this time, the server sends a detection instruction to the vehicle-mounted communication terminal; then the vehicle-mounted communication terminal detects the vehicle-mounted communication terminal according to the detection instruction to obtain a detection result, thereby avoiding the situation where the detection result is tampered with due to the insecurity of any of the vehicle-mounted communication terminal, the server and the communication connection between them, thereby improving the accuracy of the detection result.
[0013] Other features and advantages of the embodiments of the present application will be described in the following description and, in part, will become apparent from the description or be understood by practicing the embodiments of the present application. The objectives and other advantages of the embodiments of the present application can be achieved and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 A flow chart of a detection method for a vehicle-mounted communication terminal proposed according to an embodiment of the present application is shown.
[0016] Figure 2 A schematic diagram showing a process for generating a security code in an embodiment of the present application is shown.
[0017] Figure 3 A schematic diagram showing the communication connection relationship between a host computer, a server and a vehicle-mounted communication terminal in an embodiment of the present application is shown.
[0018] Figure 4 A schematic diagram of a legality verification process in an embodiment of the present application is shown.
[0019] Figure 5 A schematic diagram of a signature verification process in an embodiment of the present application is shown.
[0020] Figure 6 A flow chart of a detection method for a vehicle-mounted communication terminal proposed according to another embodiment of the present application is shown.
[0021] Figure 7 A schematic diagram of a preparation stage in an embodiment of the present application is shown.
[0022] Figure 8 A schematic diagram of a security code injection stage in an embodiment of the present application is shown.
[0023] Figure 9 A schematic diagram of a security verification stage in an embodiment of the present application is shown.
[0024] Figure 10 A schematic diagram of a detection stage in an embodiment of the present application is shown.
[0025] Figure 11 A structural block diagram of a detection device for a vehicle-mounted communication terminal proposed in one embodiment of the present application is shown.
[0026] Figure 12 A structural block diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] In order 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0028] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0029] See also Figure 1 , Figure 1 A flow chart of a detection method for a vehicle-mounted communication terminal proposed in one embodiment of the present application is shown. The method is applied to a vehicle-mounted communication terminal and includes:
[0030] S101: Acquire a unique terminal identifier, a security signature, a virtual vehicle identification code, and an encrypted random number of the vehicle-mounted communication terminal.
[0031] Among them, the security signature is obtained by signing the terminal unique identifier with the factory private key; the virtual vehicle identification code is intercepted from the encryption result, and the encryption result is obtained by encrypting the terminal unique identifier with a preset random number; the encrypted random number is obtained by encrypting the preset random number with the server public key.
[0032] In this embodiment, the vehicle-mounted communication terminal (Tbox) can generate a product serial number (SN) as a unique identifier for the vehicle-mounted communication terminal. The unique identifier can also be automatically generated for the vehicle-mounted communication terminal by the manufacturer of the vehicle-mounted communication terminal, stored in the vehicle-mounted communication terminal, and directly accessed by the vehicle-mounted communication terminal.
[0033] The vehicle communication terminal can generate a factory private key and a factory public key, then send the factory public key to the server, which stores the factory public key. The server can generate a server private key and a server public key, then send the server public key to the vehicle communication terminal, which stores the server public key. The server can be a TSP (Telematics Service Provider) server.
[0034] The vehicle communication terminal can sign the terminal's unique identifier based on an asymmetric encryption algorithm (such as the national secret SM2 algorithm) using the factory private key as the secret key to obtain a secure signature.
[0035] The vehicle communication terminal can randomly generate a random number as a preset random number based on any algorithm, for example, a 16-byte random number. The vehicle communication terminal can then encrypt the terminal's unique identifier using a symmetric encryption algorithm (such as the national SM4 algorithm) using the preset random number as a secret key, obtaining an encrypted result, and then extracting a virtual vehicle identification code from the encrypted result. A data fragment of the target data length can be extracted from the end of the encrypted result as the virtual vehicle identification code, for example, if the target data length is 17 bytes.
[0036] The vehicle communication terminal can also use an asymmetric encryption algorithm (such as the national secret SM2 algorithm) to encrypt the preset random number with the server public key as the secret key to obtain a confidential random number.
[0037] The generation process of security code (including security signature, virtual vehicle identification code and encrypted random number) is as follows Figure 2As shown, after obtaining the terminal unique identification, the terminal unique identification is signed using the factory private key and the national secret SM2 algorithm to obtain a secure signature; the terminal unique identification is encrypted using the national secret SM4 algorithm and a preset random number as the secret key to obtain an encrypted result, and the last 17 bytes of the encrypted result are intercepted as a virtual vehicle identification code; at the same time, the preset random number can be encrypted using the server public key and the national secret SM2 algorithm to obtain an encrypted random number.
[0038] In some embodiments, a host computer is communicatively connected to a server and an on-board communication terminal. A factory private key and a factory public key can be generated in the host computer, and then the factory public key is sent to the server, which stores the factory public key. The host computer can be a desktop computer, laptop computer, mobile terminal, etc., which is communicatively connected to the server and the on-board communication terminal. Accordingly, the server can generate a server private key and a server public key, and send the server public key to the host computer, which stores the server public key. The host computer and the on-board communication terminal can be connected via a CAN (Controller Area Network) protocol.
[0039] like Figure 3 As shown in the figure, the vehicle communication terminal is connected to the host computer through Ethernet equipment and CAN equipment (electronic equipment based on the CAN protocol communication connection). The power supply connects the host computer and the vehicle communication terminal. At the same time, the vehicle communication terminal can be connected to the server through a dedicated network channel. The dedicated network channel is used to transmit vehicle control application data, national standard data, enterprise standard data, etc.
[0040] The host computer can generate a product serial number for the vehicle-mounted communication terminal as a unique terminal identifier of the vehicle-mounted communication terminal.
[0041] The host computer can generate a factory private key and a factory public key, and then send the factory public key to the server, which stores the factory public key. The server can generate a server private key and a server public key, and send the server public key to the vehicle communication terminal, which stores the server public key.
[0042] The host computer can sign the terminal's unique identifier based on an asymmetric encryption algorithm (such as the national secret SM2 algorithm) using the factory private key as the secret key to obtain a secure signature.
[0043] The host computer can randomly generate a random number as a preset random number based on any algorithm, and then the host computer can encrypt the terminal unique identifier based on a symmetric encryption algorithm (such as the national secret SM4 algorithm) with the preset random number as the secret key to obtain the encryption result, and then intercept the virtual vehicle identification code from the encryption result.
[0044] The host computer can also encrypt the preset random number based on an asymmetric encryption algorithm (such as the national secret SM2 algorithm) using the server public key as the secret key to obtain an encrypted random number.
[0045] After the host computer obtains the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number, the on-board communication terminal can obtain the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number from the host computer, and then the on-board communication terminal stores the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number.
[0046] S102: Send the terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number to the server.
[0047] After the server receives the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number, the server decrypts the encrypted random number through the server private key corresponding to the server public key to obtain the decrypted random number, encrypts the terminal unique identification through the decrypted random number to obtain the encryption result to be verified, intercepts the virtual vehicle identification code to be verified from the encryption result to be verified, and determines the legitimacy verification result based on the comparison result of the virtual vehicle identification code to be verified and the virtual vehicle identification code; and verifies the security signature through the factory public key corresponding to the factory private key to obtain the verification result; and when the legitimacy verification result is legitimacy verification passed and the verification result is verification passed, sends a detection instruction to the on-board communication terminal.
[0048] After the on-board communication terminal receives and stores the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number, it can also send the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number to the server, and the server receives the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number.
[0049] Afterwards, the server can decrypt the encrypted random number based on the decryption algorithm corresponding to the asymmetric encryption algorithm used to encrypt the preset random number (for example, if the asymmetric encryption algorithm used to encrypt the preset random number is the national secret SM2 algorithm, then the decryption algorithm here is also the national secret SM2 algorithm), using the server private key as the secret key to obtain the decrypted random number.
[0050] After obtaining the decryption random number, based on the symmetric encryption algorithm used to encrypt the aforementioned terminal unique identifier (for example, if the symmetric encryption algorithm used to encrypt the terminal unique identifier is the national secret SM4 algorithm, then the symmetric encryption algorithm here is also the national secret SM4 algorithm), the decryption random number is used as the secret key to encrypt the terminal unique identifier to obtain the encryption result to be verified, and then the virtual vehicle identification code to be verified is intercepted from the encryption result to be verified. Among them, the virtual vehicle identification code to be verified can be intercepted from the encryption result to be verified based on the position information of the virtual vehicle identification code in the encryption result. For example, the virtual vehicle identification code is a data fragment of the target data length intercepted at the end of the encryption result; the server intercepts the data fragment of the target data length at the end of the encryption result to be verified as the virtual vehicle identification code to be verified.
[0051] Afterwards, the server can compare the virtual vehicle identification code to be verified and the virtual vehicle identification code, and when the virtual vehicle identification code to be verified and the virtual vehicle identification code are the same, determine the legitimacy verification result as legitimacy verification passed; when the virtual vehicle identification code to be verified and the virtual vehicle identification code are different, determine the legitimacy verification result as legitimacy verification failed.
[0052] The process of obtaining the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number is as follows: Figure 2 When shown, the process of legality verification is as follows Figure 4 As shown. Figure 4 In the process, the encrypted random number is decrypted by the server private key and the national secret SM2 algorithm to obtain the decrypted random number. The terminal unique identifier is encrypted and calculated using the national secret SM4 algorithm with the decrypted random number as the secret key to obtain the encryption result to be verified. The last 17 bytes are intercepted from the encryption result to be verified as the virtual vehicle identification code to be verified. The virtual vehicle identification code to be verified and the virtual vehicle identification code are then compared to see if they are consistent. If they are consistent, the legitimacy verification is passed. If they are inconsistent, the legitimacy verification fails.
[0053] At the same time, the server can also decrypt the security signature based on the decryption algorithm corresponding to the aforementioned asymmetric encryption algorithm for signing the terminal unique identifier (for example, if the symmetric encryption algorithm for signing the terminal unique identifier is the national secret SM2 algorithm, then the decryption algorithm here is also the national secret SM2 algorithm), using the factory public key as the secret key to obtain the decrypted terminal unique identifier. The server then compares the received terminal unique identifier and the decrypted terminal unique identifier to see if they are the same. When the terminal unique identifier and the decrypted terminal unique identifier are the same, a verification result of signature verification is obtained. When the terminal unique identifier and the decrypted terminal unique identifier are different, a verification result of signature verification failure is obtained.
[0054] The process of obtaining the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number is as follows: Figure 2When shown, the signature verification process is as follows Figure 5 As shown. Figure 5 In the process, the security signature is decrypted using the factory public key and the national secret SM2 algorithm to obtain the unique identifier of the decrypted terminal. The unique identifier of the decrypted terminal is then compared with the unique identifier of the terminal to see if they are consistent. If they are consistent, the signature verification is passed. If they are inconsistent, the signature verification is failed.
[0055] When the server determines that the legitimacy verification result is passed and the signature verification result is passed, the server can generate a detection instruction and send the detection instruction to the vehicle communication terminal so that the vehicle communication terminal can perform detection and obtain the detection result.
[0056] In some embodiments, the host computer is connected to the vehicle-mounted communication terminal. After the vehicle-mounted communication terminal stores the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number, the host computer can configure the DID (data identifier) parameters of the vehicle-mounted communication terminal. After completing the configuration of the DID parameters of the vehicle-mounted communication terminal, the vehicle-mounted communication terminal is controlled to establish a connection with the server through the CAN protocol. After the vehicle-mounted communication terminal establishes a connection with the server, the vehicle-mounted communication terminal sends the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number to the server.
[0057] A D ID parameter logically represents an object (e.g., intake valve position) or a collection of objects that should be available in memory. Different D ID parameters are used to indicate different contents. For example, a D ID parameter "0x0100-0xA5FF" is used to indicate a specific vehicle manufacturer.
[0058] S103: Detect the vehicle-mounted communication terminal according to the detection instruction to obtain a detection result.
[0059] After receiving the detection instruction, the vehicle-mounted communication terminal is detected according to the detection instruction to obtain a detection result.
[0060] Among them, the on-board communication terminal may include multiple items to be detected, and the detection instructions may include instructions corresponding to each item to be detected. According to the instructions corresponding to each item to be detected, each item to be detected is detected separately to obtain the sub-detection results of each detection item, and the sub-detection results of all items to be detected are summarized to obtain the detection results.
[0061] In some embodiments, the detection instruction can be a trigger instruction. The vehicle-mounted communication terminal can trigger detection according to the detection instruction, and detect all items to be detected in the vehicle-mounted communication terminal, obtain the sub-detection results of each detection item, and summarize the sub-detection results of all items to be detected to obtain the detection result.
[0062] In this embodiment, the on-board communication terminal obtains the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number, and sends the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number to the server, so that the server performs legitimacy verification and signature verification based on the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number. When the legitimacy verification result is legitimacy verification passed and the signature verification result is signature verification passed, it indicates that the on-board communication terminal, the server and the communication connection between them are safe. At this time, the server sends a detection instruction to the on-board communication terminal; then the on-board communication terminal detects the on-board communication terminal according to the detection instruction to obtain the detection result, thereby avoiding the situation where the detection result is tampered with due to the insecurity of any one of the on-board communication terminal, the server and the communication connection between them, thereby improving the accuracy of the detection result.
[0063] See also Figure 6 , Figure 6 A flow chart of a detection method for a vehicle-mounted communication terminal proposed in another embodiment of the present application is shown. The method is applied to a vehicle-mounted communication terminal and includes:
[0064] S201: Acquire a unique terminal identifier, a security signature, a virtual vehicle identification code, and an encrypted random number of the vehicle-mounted communication terminal.
[0065] The description of S201 refers to the description of S101 above and will not be repeated here.
[0066] S202: Generate a user name and a user password corresponding to the user name according to the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number.
[0067] After obtaining the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number of the vehicle communication terminal, a user name and a user password corresponding to the user name can also be generated based on the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number of the vehicle communication terminal.
[0068] Optionally, a user name can be generated based on the terminal unique identifier and the virtual vehicle identification code; the user name is signed to obtain a user signature corresponding to the user name; and a user password corresponding to the user name is obtained based on the user signature, the encrypted random number and the security signature.
[0069] You can concatenate the terminal unique identifier, "-" and the virtual vehicle identification code into a string as the user name. For example, concatenate "-" between the terminal unique identifier and the virtual vehicle identification code.
[0070] After that, a random key can be randomly generated. Based on a name encryption algorithm (such as HMAC-SM3), the random key is used as the key to sign the user name to obtain the user signature. The user signature, "-", the encrypted random number, "-", and the security signature are then concatenated into a string to obtain the user password corresponding to the user name. For example, a "-" is concatenated between the user signature and the encrypted random number, and another "-" is concatenated between the encrypted random number and the security signature.
[0071] S203 : Based on the user name, user password, and device type of the vehicle communication terminal, a communication connection with the server is established through a message queue telemetry transmission protocol.
[0072] After obtaining the user name and password, the vehicle communication terminal can establish a connection with the server through the message queue telemetry transmission protocol through the user name (Username), user password (Password) and the device type (source) of the vehicle communication terminal, so as to send information to the server through the message queue.
[0073] In some embodiments, the host computer is connected to the vehicle-mounted communication terminal. After the vehicle-mounted communication terminal stores the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number, the host computer can configure the DID (data identifier) parameters of the vehicle-mounted communication terminal. After completing the configuration of the DID parameters of the vehicle-mounted communication terminal, the vehicle-mounted communication terminal is controlled through the CAN protocol based on the user name, user password and device type of the vehicle-mounted communication terminal, and a connection is established with the server through the message queue telemetry transmission protocol.
[0074] Based on the user name, password, and device type of the vehicle communication terminal, a connection can be established between the vehicle communication terminal and the server via a message queue telemetry transmission protocol within a dedicated network channel between the vehicle communication terminal and the server. The dedicated network channel is used to transmit vehicle control application data, national standard data, and enterprise standard data.
[0075] S204: Generate a connection data packet according to the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number.
[0076] After the on-vehicle communication terminal establishes a connection with the server through the message queue telemetry transmission protocol, the on-vehicle communication terminal can generate a connection data packet based on the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number, wherein the connection data packet includes at least the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number.
[0077] In some embodiments, S204 may further include: obtaining network channel information of a target network channel and a device number of the vehicle-mounted communication terminal; the target network channel being the network channel between the vehicle-mounted communication terminal and the server; generating a client identifier based on the network channel information, device type, and device number; and generating a connection data packet based on the client identifier, the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number. The network channel between the vehicle-mounted communication terminal and the server may be a dedicated network channel between the vehicle-mounted communication terminal and the server.
[0078] The network channel information, device type and device number can be concatenated to obtain a concatenated string as the client identifier. Table 1 shows the client identifiers of different vehicle-mounted communication terminals. Table 1 is as follows:
[0079] Table 1
[0080]
[0081]
[0082] After obtaining the client identifier, a connection data packet can be generated based on the client identifier, terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number. The connection data packet includes at least the client identifier, terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number.
[0083] For example, the content of the connection data packet may be as shown in Table 2, which is as follows:
[0084] Table 2
[0085]
[0086] S205. Send the connection data packet to the server through the message queue telemetry transmission protocol, so that the server extracts the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number from the connection data packet.
[0087] The on-board communication terminal can send the connection data packet to the server through the message queue telemetry transmission protocol. After the server receives the connection data packet, it extracts the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number from the connection data packet. Then the server performs legitimacy verification and signature verification in accordance with the aforementioned S102 method, and sends a detection instruction to the on-board communication terminal if the legitimacy verification result is passed and the signature verification result is passed.
[0088] It is worth mentioning that the server can send detection instructions to the vehicle communication terminal through the message queue telemetry transmission protocol.
[0089] S206. Send an emergency call detection instruction to the external detection device according to the detection instruction, so that the external detection device performs an emergency call detection on the vehicle-mounted communication terminal according to the emergency call detection instruction, obtains an external detection result, and returns the external detection result.
[0090] Emergency call (ECALL) detection is a detection item that must be completed by an external device. Emergency call detection can be completed by an external detection device, wherein the external detection device can be the aforementioned host computer, specifically, the external detection device can be a desktop computer, a laptop computer, a mobile terminal, etc.
[0091] After receiving the detection instruction, the vehicle-mounted communication terminal can directly generate an emergency call detection instruction based on the detection instruction, and then send the emergency call detection instruction to the external detection device. The external detection device performs an emergency call detection on the vehicle-mounted communication terminal based on the emergency call detection instruction to obtain an external detection result.
[0092] S207 : Detect multiple preset internal detection items in the vehicle-mounted communication terminal according to the detection instruction, and obtain internal detection results corresponding to each of the multiple preset internal detection items.
[0093] The multiple preset internal detection items refer to all items to be detected in the vehicle communication terminal. For example, the preset internal detection items may be hardware version number, software version number, CAN status, power status, Ethernet status, etc.
[0094] The on-board communication terminal tests all preset internal detection items in the test instruction according to the test instruction, obtaining a test result for each preset internal detection item. The test instruction may not include individual instructions for each preset internal detection item; the test instruction only serves as a trigger, triggering the on-board communication terminal to test all of its preset internal detection items. This eliminates the need to generate an instruction for each preset internal detection item, preventing the server from sending separate instructions for each preset internal detection item, thereby improving detection efficiency. Furthermore, the preset internal detection items in the on-board communication terminal can be tested in parallel, further improving detection efficiency.
[0095] S208: Generate a detection result according to the internal detection results and the external detection results corresponding to the plurality of preset detection items.
[0096] After obtaining the internal detection results and the external detection results corresponding to the plurality of preset detection items, the internal detection results and the external detection results corresponding to the plurality of preset detection items may be aggregated to obtain a detection result.
[0097] In this embodiment, the detection result can be a file in json format, and the detection result can be as follows:
[0098]
[0099]
[0100] In some embodiments, after S208, the method may further include: sending the detection results to the display terminal and the server respectively, so that the display terminal displays the detection results and the server stores the detection results. The display terminal may be the aforementioned host computer, and the detection results may be sent to the display terminal via the CAN protocol so that the display terminal can display the detection results. At the same time, the detection results may be sent to the server via the message queue telemetry transmission protocol in the dedicated network channel between the vehicle-mounted communication terminal and the server, so that the server stores the detection results.
[0101] The detection process of the vehicle-mounted communication terminal of this embodiment includes a preparation phase, a security code injection phase, a security verification phase, and a detection phase. Figure 7 As shown, the host computer generates a factory private key and a factory public key, and sends the factory public key to the service server so that the server stores the factory public key. At the same time, the server generates a server private key and a server public key, and sends the server public key to the host computer, which stores the server public key.
[0102] The security code injection stage is as follows Figure 8 As shown, the host computer generates a unique terminal identifier for the vehicle communication terminal and can also write the unique terminal identifier into the vehicle communication terminal. The host computer then generates a security code based on the unique terminal identifier. The security code includes: a security signature, a virtual vehicle identification code, and an encrypted random number. The host computer then writes the security code into the vehicle communication terminal.
[0103] The security verification stage is as follows Figure 9 As shown, the host computer configures the D ID parameters of the vehicle communication terminal to realize the configuration of the D ID parameters of the vehicle communication terminal. At the same time, the host computer triggers the connection to connect the vehicle communication terminal to the server, and sends the terminal unique identification, security signature, virtual vehicle identification code and encrypted random number of the vehicle communication terminal to the server, so that the server can perform legitimacy verification and perform signature verification if the legitimacy verification passes. If the signature verification also passes, a detection instruction is generated.
[0104] Detection stage Figure 10As shown, the server sends a detection instruction to the vehicle-mounted communication terminal. The vehicle-mounted communication terminal performs an external inspection (that is, the aforementioned emergency call detection) through the host computer (that is, the aforementioned external detection device) according to the detection instruction to obtain the external detection result. At the same time, it performs a self-inspection according to the detection instruction (that is, the aforementioned detection of multiple preset internal detection items in the vehicle-mounted communication terminal), obtains the internal detection results corresponding to each of the multiple preset internal detection items, and then summarizes the internal detection results corresponding to each of the multiple preset detection items and the external detection results to obtain the detection result. Afterwards, the vehicle-mounted communication terminal can send the detection result to the host computer so that the host computer can display the detection result. At the same time, the vehicle-mounted communication terminal can send the detection result to the server so that the server can store the detection result.
[0105] In this embodiment, the detection instruction does not need to include individual instructions for each preset internal detection item. The detection instruction only needs to trigger the vehicle-mounted communication terminal to detect all of its preset internal detection items. Therefore, there is no need to generate an instruction for each preset internal detection item, avoiding the server sending an instruction for each preset internal detection item separately to perform the detection, thereby improving detection efficiency. At the same time, the preset internal detection items in the vehicle-mounted communication terminal can be tested in parallel, further improving detection efficiency.
[0106] In addition, in this application, the on-board communication terminal reports the test results through the original dedicated network channel. This method can reduce the dependence on the on-board communication terminal production plant and the TSP server private network deployment and reduce investment, while reducing the repeated development and maintenance investment of the offline host computer and TSP server to meet offline testing.
[0107] See attached Figure 11 , Figure 11 The following is a block diagram of a detection device for a vehicle-mounted communication terminal according to an embodiment of the present application. The device 1200 is used for a vehicle-mounted communication terminal and includes:
[0108] The acquisition module 1210 is used to obtain the terminal unique identifier, security signature, virtual vehicle identification code, and encrypted random number of the vehicle communication terminal; the security signature is obtained by signing the terminal unique identifier with the factory private key; the virtual vehicle identification code is intercepted from the encryption result, which is obtained by encrypting the terminal unique identifier with a preset random number; the encrypted random number is obtained by encrypting the preset random number with the server public key;
[0109] The sending module 1220 is configured to send the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number to the server, so that the server decrypts the encrypted random number using the server private key corresponding to the server public key to obtain a decrypted random number, encrypts the terminal unique identifier using the decrypted random number to obtain an encryption result to be verified, intercepts the virtual vehicle identification code to be verified from the encryption result to be verified, and determines a legitimacy verification result based on a comparison result between the virtual vehicle identification code to be verified and the virtual vehicle identification code; verifies the security signature using the factory public key corresponding to the factory private key to obtain a verification result; and, if the legitimacy verification result is a legitimacy verification pass and the verification result is a verification pass, sends a detection instruction to the vehicle-mounted communication terminal;
[0110] The detection module 1230 is used to detect the vehicle-mounted communication terminal according to the detection instruction and obtain a detection result.
[0111] Optionally, the sending module 1220 is also used to generate a user name and a user password corresponding to the user name based on the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number; establish a communication connection with the server through the message queue telemetry transmission protocol based on the user name, user password and device type of the vehicle-mounted communication terminal; generate a connection data packet based on the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number; and send the connection data packet to the server through the message queue telemetry transmission protocol, so that the server extracts the terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number from the connection data packet.
[0112] Optionally, the sending module 1220 is also used to generate a user name based on the terminal unique identifier and the virtual vehicle identification code; sign the user name to obtain a user signature corresponding to the user name; and obtain a user password corresponding to the user name based on the user signature, encrypted random number and security signature.
[0113] Optionally, the sending module 1220 is also used to obtain the network channel information of the target network channel and the device number of the vehicle-mounted communication terminal; the target network channel is the network channel between the vehicle-mounted communication terminal and the server; a client identifier is generated based on the network channel information, device type and device number; a connection data packet is generated based on the client identifier, terminal unique identifier, security signature, virtual vehicle identification code and encrypted random number.
[0114] Optionally, the detection module 1230 is also used to send an emergency call detection instruction to an external detection device according to the detection instruction, so that the external detection device performs an emergency call detection on the vehicle-mounted communication terminal according to the emergency call detection instruction, obtains an external detection result, and returns the external detection result; detects multiple preset internal detection items in the vehicle-mounted communication terminal according to the detection instruction, and obtains internal detection results corresponding to each of the multiple preset internal detection items; generates a detection result based on the internal detection results corresponding to each of the multiple preset detection items and the external detection result.
[0115] Optionally, the detection module 1230 is further configured to send the detection results to the display terminal and the server respectively, so that the display terminal displays the detection results and the server stores the detection results.
[0116] See also Figure 12 , which shows a structural block diagram of an electronic device 900 provided in an embodiment of the present application. The electronic device 900 in the present application may include one or more of the following components: a processor 910, a memory 920, and one or more application programs, wherein the one or more application programs may be stored in the memory 920 and configured to be executed by the one or more processors 910, and the one or more programs are configured to execute the method as described in the aforementioned method embodiment.
[0117] The processor 910 may include one or more processing cores. The processor 910 utilizes various interfaces and circuits to connect various components within the electronic device 900. It executes various functions and processes data within the electronic device 900 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 920, as well as accessing data stored in the memory 920. Optionally, the processor 910 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 910 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content to be displayed; and the modem handles wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 910, but may be implemented separately through a communication chip.
[0118] The memory 920 may include a random access memory (RAM) or a read-only memory (ROM). The memory 920 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat history data) created by the electronic device 900 during use.
[0119] In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0120] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0121] On the other hand, the present application also provides a computer-readable storage medium, which stores program code. The program code can be called by a processor to execute the method described in the above method embodiment.
[0122] The computer-readable storage medium can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a cluster of ROMs. Alternatively, the computer-readable storage medium includes a non-volatile computer-readable storage medium. The computer-readable storage medium has storage space for the program code that performs any of the method steps in the above-described method. These program codes can be read from or written into one or more computer program products. The program code can, for example, be compressed in an appropriate form.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A detection method for a vehicle-mounted communication terminal, used for a vehicle-mounted communication terminal, characterized in that: The method comprises: Obtaining a terminal unique identifier, a security signature, a virtual vehicle identification code, and an encrypted random number of the in-vehicle communication terminal; the security signature is obtained by signing the terminal unique identifier with a factory private key; the virtual vehicle identification code is intercepted from an encryption result, the encryption result being obtained by encrypting the terminal unique identifier with a preset random number; the encrypted random number is obtained by encrypting the preset random number with a server public key; Sending the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number to a server, so that the server decrypts the encrypted random number using a server private key corresponding to the server public key to obtain a decrypted random number, encrypting the terminal unique identifier using the decrypted random number to obtain an encryption result to be verified, intercepting the virtual vehicle identification code to be verified from the encryption result to be verified, and determining a legitimacy verification result based on a comparison result between the virtual vehicle identification code to be verified and the virtual vehicle identification code; and verifying the security signature using the factory public key corresponding to the factory private key to obtain a verification result; and sending a detection instruction to the vehicle-mounted communication terminal when the legitimacy verification result is a legitimacy verification pass and the verification result is a verification pass; The vehicle-mounted communication terminal is tested according to the test instruction to obtain a test result.
2. The method according to claim 1, characterized in that Before sending the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number to the server, the method further includes: Generate a user name and a user password corresponding to the user name according to the terminal unique identifier, the security signature, the virtual vehicle identification code and the encrypted random number; Establishing a communication connection with the server via a message queue telemetry transmission protocol based on the user name, user password, and device type of the vehicle-mounted communication terminal; Generate a connection data packet according to the terminal unique identifier, the security signature, the virtual vehicle identification code and the encrypted random number; The sending of the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number to the server includes: The connection data packet is sent to the server via a message queue telemetry transmission protocol, so that the server extracts the terminal unique identifier, the security signature, the virtual vehicle identification code and the encrypted random number from the connection data packet.
3. The method according to claim 2, characterized in that The obtaining of a user name and a user password corresponding to the user name according to the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number includes: Generate a user name based on the terminal unique identifier and the virtual vehicle identification code; Signing the user name to obtain a user signature corresponding to the user name; A user password corresponding to the user name is obtained according to the user signature, the encrypted random number and the security signature.
4. The method according to claim 2, characterized in that The generating of a connection data packet according to the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number includes: Acquire network channel information of a target network channel and a device number of the vehicle-mounted communication terminal; the target network channel is the network channel between the vehicle-mounted communication terminal and the server; Generate a client identifier according to the network channel information, the device type, and the device number; A connection data packet is generated according to the client identifier, the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number.
5. The method according to claim 1, wherein The virtual vehicle identification code is a data segment of the target data length intercepted at the end of the encryption result; the server intercepts a data segment of the target data length at the end of the encryption result to be verified as the virtual vehicle identification code to be verified.
6. The method according to claim 1, characterized in that The detecting the vehicle-mounted communication terminal according to the detection instruction to obtain a detection result includes: Sending an emergency call detection instruction to an external detection device according to the detection instruction, so that the external detection device performs an emergency call detection on the vehicle-mounted communication terminal according to the emergency call detection instruction, obtains an external detection result, and returns the external detection result; Testing a plurality of preset internal detection items in the vehicle-mounted communication terminal according to the detection instruction, and obtaining internal detection results corresponding to each of the plurality of preset internal detection items; A detection result is generated according to the internal detection results corresponding to each of the plurality of preset internal detection items and the external detection result.
7. The method according to claim 1, characterized in that After detecting the multiple items to be detected in the in-vehicle communication terminal according to the detection instruction and obtaining the detection results, the method further includes: The detection results are sent to a display terminal and the server respectively, so that the display terminal displays the detection results and the server stores the detection results.
8. A detection device for a vehicle-mounted communication terminal, used for a vehicle-mounted communication terminal, characterized in that: The device comprises: an acquisition module, configured to acquire a terminal unique identifier, a security signature, a virtual vehicle identification code, and an encrypted random number of the in-vehicle communication terminal; the security signature being obtained by signing the terminal unique identifier with a factory private key; the virtual vehicle identification code being intercepted from an encryption result obtained by encrypting the terminal unique identifier with a preset random number; and the encrypted random number being obtained by encrypting the preset random number with a server public key; a sending module, configured to send the terminal unique identifier, the security signature, the virtual vehicle identification code, and the encrypted random number to a server, so that the server decrypts the encrypted random number using a server private key corresponding to the server public key to obtain a decrypted random number, encrypts the terminal unique identifier using the decrypted random number to obtain an encryption result to be verified, intercepts the virtual vehicle identification code to be verified from the encryption result to be verified, and determines a legitimacy verification result based on a comparison result between the virtual vehicle identification code to be verified and the virtual vehicle identification code; and verifies the security signature using a factory public key corresponding to the factory private key to obtain a verification result; and, if the legitimacy verification result is a legitimacy verification pass and the verification result is a verification pass, sends a detection instruction to the vehicle-mounted communication terminal; The detection module is used to detect the vehicle-mounted communication terminal according to the detection instruction to obtain a detection result.
9. A vehicle-mounted communication terminal, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program codes executable by a processor, and when the program codes are executed by the processor, the processor executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Bluetooth-based virtual key vehicle control system, method and device and computer equipment
CN110798795A
Automobile electronic identification and V2X authentication combined method
CN112738761A